# Motor Shield - any way of reducing peak voltage output to DC motor?

Hi all,

So I've been reading on topic of PWM. I have Arduino UNO R3 and accompanying motor shield and I use them to successfully control a variety of DC motors (start/stop, rpm, direction, brake).

I've been wondering about the motor power supply from the shield. I have options of 9V power supply to the shield via DC jack or 5V via USB. This will give me slightly reduced voltage on Vin, A and B.

Say I want to connect a 6V DC motor to A and 8V DC motor to B. In that case I would like to use 9V power supply. But what I'm worried about is the longevity of 6V motor - my understanding is that PWM reduces only average voltage and not the peak voltage.

So, is there any way to achieve this in a safe manner? So far I've been running low voltage motors by using a DC power supply but I'd need to control them in different pairings via the shield.

Any assistance would be greatly appreciated.

Which shield.
The official Arduino motor shield with the flat L298 dinosaur drops/looses 2-4volt, depending on motor current,
so your 6volt motor is quite safe with a 9volt motor supply.
Your 8volt motor might not get full power with that shield.

You can always limit max PWM value in code.
Leo..

If you don't use the full 255 value with PWM you won't have any problem. Very roughly if analogWrite(255) gives you the full power from the 9v supply then analogWrite(170) would give you the equivalent power for 6v. However you need to experiment and usually when a motor is said to use 6v that is not a precise figure - a little more will be unlikely to do any harm. Just check the temperature of the motor and if seems too hot use a lower analogWrite() value.

...R

PS ... my simple calculations do not take account of the voltage loss in the L298

Hi Leo, Robin2,

Leo,

I'm using Arduino Motor Shield Rev3. Plugging in a 9V DC supply gives me approx. 8.5-8.6V on both A and B connectors (I checked this with my multimeter). This is practically equivalent to Vin voltage, because of the drop on the diode. And while keeping the PWM analogWrite at 255. Where should I test for 2-4V drop? Sorry if asking daft questions, I'm not an electrical/electronics guy. As per my understanding of the PWM control, limiting the max PWM value will reduce the average voltage, but not the peak. Would this affect my motor?

Robin2,

I've been able to do exactly that with PWM - I'd set the analogWrite(x), measure the output on pins A or B and tweak untill I get what I'm looking for. But my understanding is that I'm measuring only the average voltage, and not the peaks. Which is why I'm wondering about the damage. It's a small, micro-gear motor so I guess it will always find a way to cool off, I'm just wondering if there are other risks and how far I can push it.

What matters for a motor is the average current that passes through it. The voltage is not really important unless it is so high (perhaps hundreds of volts) that it overcomes the insulation. Of course if you connect a high-voltage high-capacity battery directly to a motor you will get a high average current and the motor may be damaged.

But when the voltage is only applied part-time as it is with analogWrite() values less than 255 then the average current will be lower and may be within the capability of the motor even though the voltage is high.

...R

krlesxe:
Plugging in a 9V DC supply gives me approx. 8.5-8.6V on both A and B connectors (I checked this with my multimeter).

You probably checked that without a motor connected, or without a load on the motor.
When you connect a load to those pins, the voltage will drop.
There is an average volt drop of 2.55volt@1Amp and 3.7volt@2Amp listed in the datasheet.

We didn't see yet which motors you're using (current draw), so we could be guessing.
Leo..

Robin2:
What matters for a motor is the average current that passes through it. The voltage is not really important unless it is so high (perhaps hundreds of volts) that it overcomes the insulation.

Gotcha. My current reading on DC power supply is approx. 30mA at 2.5V so I hope it will be OK.

Wawa:
You probably checked that without a motor connected, or without a load on the motor.
When you connect a load to those pins, the voltage will drop.

OK, I see. You are right, when I connected a 12V motor and 9V power supply (funny combo but both were laying around) I got approx. 8.5V on Vin but 6.9V on connector B. I didn't check the current but I assume it was less than 1A.

Thank you both one more time for your replies.