Working with servos is a bit costly so i all ways think about conversion of a ordinary DC motor into a servo motor.in a servo motor it consists of a rotatory encoder connected to the shaft of motor for position feed backall optical rotatory encoder are a bit costly. in my looo.....ong search of a cheep encoder i found one
OVER ALL BLOCK DIAGRAM
PSEUDO CODE LOGIC:
main()
{
config adc;
config motor control pins;
while(1)
{
read adc of control pot;
read adc of motor pot;
if(motor adc > control adc)
motor forward; // could also be back ward
else if( motor adc < control adc) //the idea is to turn motor in direction than neutralizes motor back ward ; //error between motor pot value and control pot value
else
motor stop; // if no error motor stop
}
}
guess what??????????????????????
POTENTIOMETER(POT)
all of us familiar with this potentiometer.which act as a potential divider between three points.
it consists of three pins.the resistance between pins 1 and 3 is constant. but if we rotate the shaft then resistance between (1,2) or (2,3) varies.the center pin some times referred as wiper.
MAKING:
take a10k pot and solder three wires to it as shown in the picture
BLACK== GND, BROWN == O/P, RED==Vcc FOLLOW THE IMAGES |
PSEUDO CODE LOGIC:
main()
{
config adc;
config motor control pins;
while(1)
{
read adc of control pot;
read adc of motor pot;
if(motor adc > control adc)
motor forward; // could also be back ward
else if( motor adc < control adc) //the idea is to turn motor in direction than neutralizes motor back ward ; //error between motor pot value and control pot value
else
motor stop; // if no error motor stop
}
}
gud man bt sml thng its gng opposit of pod man make change
ReplyDeletesir
Deletethat is simple sir that can be achieved by interchanging the Vcc and GND of POD
hello. could you post the code to program the atmega?
ReplyDeletegood it helps a lot
ReplyDeletewheres code?
ReplyDeleteGood afternoon. can you post code for atmega please:)
ReplyDeletethis guy is showing off his not posting no code or communicating with this his followers
ReplyDeletesir i need a help
ReplyDeletei want to just convert a servo motor as, there will be two motors connected to the servo control board and if the servo goes up 1st motor will rotate in any direction and when the servo goes down the other one , the 2nd one , will rotate in any direction
Can u please post the code
ReplyDelete