PWM and voltage for motors

Hi all,

I have a motor that I need to control using pam, the load is obviously too great for an arduino pin so I'm using an npn transistor (pin to base, +5V to collector and motor on emitter). However this motor can not be pwm'd, it needs a standard voltage, I tried installing an RC low pass filter behind it and as far as I can tell I get the correct voltage, however when I load this using the motor my power output drops to 0.8V instead of the 3.3V my multimeter was showing before the motor was connected. It's like the capacitor is not charging enough. I've tried many different variations of resistor and capacitor, some have too much ripple, but none of them can provide the power (on the transistors collector theres power coming directly from a 9v pp3 via an LM7805). I have also tried a voltage follower but unsurprisingly it couldn't handle the load (a few watts).

Does anybody have a way of converting pwm to voltage with very small ripples but still provide decent power? Some sort of active low pass filter?
Any help you can give would be great because I've been stuck at this for a week now.


Not exactly sure how your circuit works or the motor specs. Typically PWM-ing a DC motor (assuming that's what you're using) works well for adjusting motor speed. Yes, the Arduino board will only supply enough power to drive really small motors without much load. And the board will only output 5V, or 3.3V with even much less current.

Without knowing what you're trying to do, I'd suggest looking into using a Darlington Array (ULN2003). They're cheap, easy to use, and can supply half an amp with a large supply voltage (up to 50V). There should be many circuit examples on the web. BTW, your strategy of using an NPN is beginning to look like a Darlington circuit.

Look at Arduino Forum. for an example of how to wire a stepper motor. Note that you'll only be using 1 circuit of the 2003 to drive your motor. The unipolar stepper requires 4 - it's essentially 4 DC motors. The key is that the motor power doesn't come from the Arduino board. Rather the board is just switching the power on and off (PWM).

Good luck.

Thanks for the help, but I obviously wasn't overly clear in my OP. I have a standard DC motor with requires a small amount of power (about a watt), I can control its speed using pwm via an npn transistor, however this motor has a tachometer that I need to read in my sketch, I do this using the interrupt RISING functionality. My main issue is that when I try to use both the PWM and read the tacho at the same time the ticks from the PWM are read as rising on the tachometer cable thus rendering useless my RPM counter (If I hold the motor in place on one of the spots where the tachometer is high, the RPM reads as arduino PWM frequency as each time the arduino's voltage rises the tachometers voltage rises sending out a false count).

I there fore need a way to get an adjustable voltage from the arduino to this motor, it obviously needs as little ripple as possible so that I can avoid triggering the rising interrupt. I have not been able to achieve this with an RC low pass filter, or similar (1 watt load seems to be the stumbling block)...

So does anyone have any ideas,
Many Thanks

Are you sending the PWM drive voltage and sending back the tacho signal within the same cable bundle. If so then "cross-talk" is your problem. Simply run the PWM power and the tacho signals in completely separate cables.

No I'm afraid not, unless I've misunderstood you,

If we imagine the tachometer as a brush connected to the tachometer output wire, the ticks are registered every time it touches one of the 4 charged output plates around the circumference of the motor, the problem is, these plates are only charged when the motor is powered, so if the motor is controlled with PWM the power on the plates changes between high and low, therefore giving false readings. I need to provide a constant power to these plates so that my tachometer doesn't fluctuate and give false readings.

Hopefully what I say is starting to make sense now.