Showing posts with label arduinoprojects. Show all posts
Showing posts with label arduinoprojects. Show all posts

Tuesday 26 May 2020

whats inside a servo and how to use with arduino full tutorial


​in this tutorial lets explore what is a servo

what is a servo
A servo motor is a rotary actuator or linear actuator that allows for precise control of angular or linear position, velocity and acceleration. It consists of a suitable motor coupled to a sensor for position feedback. It also requires a relatively sophisticated controller, often a dedicated module designed specifically for use with servomotors.
Servomotors are not a specific class of motor, although the term servomotor is often used to refer to a motor suitable for use in a closed-loop control system.
Servomotors are used in applications such as robotics, CNC machinery or automated manufacturing.



We are experimenting with sg90 servo
Lets open and inspect what inside a servo


gear system-used to reduce rpm and increase torque
control circuit-kc8801ic based control circuit
variable resistor -used to give feedback

How to control a servo

Servos are controlled by sending an electrical pulse of variable width or pulse width modulation (PWM), through the control wire. There is a minimum pulse, a maximum pulse, and a repetition rate. A servo motor can usually only turn 90° in either direction for a total of 180° movement. The motor's neutral position is defined as the position where the servo has the same amount of potential rotation in both the clockwise or counter-clockwise direction. The PWM sent to the motor determines the position of the shaft, and based on the duration of the pulse sent via the control wire; the rotor will turn to the desired position. The servo motor expects to see a pulse every 20 milliseconds (ms) and the length of the pulse will determine how far the motor turns. For example, a 1.5ms pulse will make the motor turn to the 90° position. Shorter than 1.5ms moves it in the counter-clockwise direction toward the 0° position, and any longer than 1.5ms will turn the servo in a clockwise direction toward the 180° position
components needed
  1. servo
  2. Arduino
  3. variable resistor
circuit diagram


a servo has 3 pins
connections with Arduino

connect VCC to 5v (red)
connect gnd to gnd(brown)
signal wire to D9 (orange)



after downloading install  library
then open example sketch ( download from here ) and upload that's all


Wednesday 29 April 2020

music with relay and arduino

so in this tutorial, I am going to show you how to create music with relay and Arduino interesting beginner-friendly project

how its works

if you are familiar with relays .you may notice the triggering sound of the relay. that sound is our key .we trigger relays in a particular sequence to generate music awesome let's start building. before that please watch the making video for detailed instructions
components needed

1.arduino uno

2.relay module
3.8 ohm speaker
4.led
5.breadboard



circuit diagram

Sunday 9 February 2020

HOW TO MAKE CUSTOM ARDUINO

we cant use Arduino board in every project because  Arduino is costly and also big size so...In this blog, I am showing how to make your own customized Arduino boardlet's start with a simple circuit

then using easyeda online PCB designer software i added rest switch power supply and attached led to pin 13 
https://easyeda.com/
after  designing the circuit i converted this circuit to pcb
then I upload gerber files to jlcpcb 

Components

  • ATmega328p Microcontroller IC
  • 28 Pin IC Holder
  • 16 MHz Quartz Crystal
  • Capacitors – 2 x 22pF, 100nF, 
  • Resistors –  330Ω, ,10KΩ
  • LEDs x 2 (Red and Green)
  • Push Button (for Reset)
  • 5V Regulator (7805)

you can download gerber and circuit from here

Sunday 21 April 2019

HOW TO CONTROLL MAX7219 LED MATRIX

HELLO FRIENDS,
in today’s video,i am  showing  how to interface 8×8 LED Matrix with  Arduino .i am also showing how to display  simple text and logos on the LED Matrix. it is  very easy and  a fun project for Arduino or LED matrix beginners.





For this tutorial, we will be using a single 8×8 LED matrix which is based on the MAX7219 LED driver module. The driver module creates an interface which makes it easy to communicate with the LED matrix.You can watch the video tutorial by following the link below.



WHATS WE NEED



1.max7219 based led matrix
2.arduino
3.jumper wires




connect vcc to 5v

connect gnd to gnd

CLK TO D10

CS TO D11

DIN TO D12

MULTIPLEXING
Multiplexing is a technique used to connect devices – typically LEDs (for displays) or buttons (for keyboards) – in a matrix of addressable rows and columns. The advantage is simplification of hardware due to the reduced number of pins required. Multiplexed displays using seven-segment LEDs remain popular due to low cost and high brightness.
The 64 LEDs are driven by 16 output pins of the IC. The question now is how is that possible.  Well the maximum number of LEDs light up at the same time is actually eight. The LEDs are arranged as 8×8 set of rows and columns. So the MAX7219 activates each column for a very short period of time and at the same time it also drives each row. So by rapidly switching through the columns and rows the human eye will only notice a continuous light.