L298N and arduino powered from same source

Thread Starter

SeanV123

Joined Nov 12, 2020
108
Hello,

I am currently working on a project where I need to supply 10-12V to a L298N motor driver (https://wiki.dfrobot.com/MD1.3_2A_Dual_Motor_Controller_SKU_DRI0002) and around 7.5V to an arduino. My goal is to power both the arduino and the l298n from the same source. So I tried to use a voltage divider in to drop the voltage from 12v to 7.5V for the arduino while 12v was connected to the l298n in parallel. However when I powered it, there was only 2V being supplied to the arduino while the l298n got its full load intended. Does anyone know why this is? Is there something fundamental I’m missing? I’m an electronic hobbyist and I’ve a good understanding of circuits and circuit design so I don’t know where I’m going wrong.
Thanks
 

dl324

Joined Mar 30, 2015
16,917
Does anyone know why this is? Is there something fundamental I’m missing?
A voltage divider for that situation is almost always the wrong thing to do. You don't mention the resistances in the divider, but it probably wasn't stiff enough.

If you can't see reducing the voltage with a voltage regulator, you could use a zener diode. Might need to be a power device depending on how much current the Arduino will want.
 

Thread Starter

SeanV123

Joined Nov 12, 2020
108
A voltage divider for that situation is almost always the wrong thing to do. You don't mention the resistances in the divider, but it probably wasn't stiff enough.

If you can't see reducing the voltage with a voltage regulator, you could use a zener diode. Might need to be a power device depending on how much current the Arduino will want.
Resistances were r1 = 10k and r2 = 15k
 

dl324

Joined Mar 30, 2015
16,917
Resistances were r1 = 10k and r2 = 15k
Definitely not stiff enough. The current in the voltage divider should be at least 10 times the load current. When you do the calculations, you'll see why that's the wrong way to go.

Since you don't need a regulated voltage for the Arduino, you could use a zener diode.
 

Thread Starter

SeanV123

Joined Nov 12, 2020
108
Definitely not stiff enough. The current in the voltage divider should be at least 10 times the load current. When you do the calculations, you'll see why that's the wrong way to go.

Since you don't need a regulated voltage for the Arduino, you could use a zener diode.
What do you mean by “not stiff enough” ?
 

djsfantasi

Joined Apr 11, 2010
9,163
I don't use Arduino, but don't they have a built in regulator?
Yes, they do. You can power an Arduino with either 5V regulated through the 5V pin or anywhere from 7V to 20V through the Vin pin. In the latter case, the onboard voltage regulator will convert the voltage appearing in the Vin pin to 5V needed by the Arduino.

With a couple of caveats. If the motors are noisy, a separate voltage source is needed. This can be as simple as a 7809 (with necessary filter capacitors) to feed in 9V. Or as complex as a completely separate power source with both grounds tied together.

Also note this is true for most Arduino models. Some have a different input voltage range. Check the specific product’s specifications.
 

dl324

Joined Mar 30, 2015
16,917
And by using a zener, I would connect it the ‘wrong’ way to control the voltage?
Yes. Put a 5V zener in series with the 12V source. It will drop about 5V, depending on the current. A half watt zener would tolerate 70-80mA. If you need higher current, you can use a power zener or add a power transistor to convert a lower wattage zener into a power device.

Use a 4.7V zener if you want something closer to 7.2V.
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,163
I’ve read somewhere that you’re not supposed to do that. Not sure why
I’ve done it many times. There is a limit to how much current you can draw, however. Check the specs because I’m not sure how much the limit is. I seem to remember that it’s less than 200mA. The logic for your IC should be well within the limit as long as your not using the Arduino’s 5V to run the motor!
 
Top