Thursday, 22 March 2012

HOW TO CONVERT DC MOTOR INTO SERVO MOTOR

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
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/PRED==Vcc

FOLLOW THE IMAGES































































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
   }

}





7 comments:

vamsi said...

gud man bt sml thng its gng opposit of pod man make change

VAMSI DANDA said...

sir
that is simple sir that can be achieved by interchanging the Vcc and GND of POD

nico cura said...

hello. could you post the code to program the atmega?

Dinesh Vyas said...

good it helps a lot

Frank Lopez said...

wheres code?

roberto sincero said...

Good afternoon. can you post code for atmega please:)

Frank Lopez said...

this guy is showing off his not posting no code or communicating with this his followers

Post a Comment