I bit banged a PWM routine (several bits of sample code available on piclist.com under I/O routines) then immediately before turning on the output transistor I measured the voltage at the motor using the A/D module. I used this measured value to adjust the duty cycle up or down. Worked pretty well. All I did for a feedback circuit was a 10k resistor from the drain of the transistor to the RA0 input with a 6.8k to ground to divide the voltage down and a .33uF cap to ground to smooth out the waveform. I was running at about 150 Hz so I had lots of time to measure and do calculations. -----Original Message----- From: Justin Grimm [mailto:Justin.Grimm@SOUTHCORP.COM.AU] Sent: Monday, August 26, 2002 2:03 AM To: PICLIST@MITVMA.MIT.EDU Subject: [EE]: DC motor control Does anyone know the best way to control the speed of a 12v DC motor without losing too much torque? Would pwm work or just varying the voltage? Thanks Justin -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics