> First of all thanks everyone for your replies. I think when I get access to > the internet I'll check out the servo motors. In the meantime though this > method of pwm then sampling the generated voltage intrigues me. > I want to deliberately control the speed, so if I'm generating say a 50% > duty cycle pwm, and I want to slow the motor down, I just shorten the duty > cycle then read off the inferred speed (generated voltage) and if its not > slow enough shorten the pwm again. Is this correct? I think so, if "shorten the PWM" means to decrease the duty cycle but leave the period the same. Otherwise it's not PWM (Pulse Width Modulation), although other schemes can be used too. However, there are some gotchas with this scheme of detecting the speed of a DC motor: 1 - It doesn't work at high PWM duty cycles. The motor has significant inductance, and current will continue to flow for a while thru the flyback diode after the drive voltage is removed. This flyback voltage is large noise on the signal you are trying to measure, which is the open circuit back EMF created by the motor running as a generator. One way to get around this is to use a higher voltage than the maximum average voltage you ever want to apply to the motor. That guarantees a maximum PWM duty cycle, but also alows for nasty consequences in case of software bug or other failure. 2 - The back EMF of a DC generator is not a nice flat DC signal. Each winding by itself produces an AC signal, which are selectively switched to the output by the brushes at the right time so that the winding with the maximum positive peak is always selected (this is a bit simplified, but a workable model in this context). Point sampling this waveform is a bad idea because the AC component is quite significant. It would have to be averaged over at least one motor pole. This is usually not practical or possible. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.