Go Down

Topic: Can't stop current drain through L298N H Bridge (Read 1 time) previous topic - next topic

daveparry

I've put together an Arduino-Uno powered project which opens and closes the doors on the chicken shed  based on a light resistor. All works fine, very happy with it, been running for over a year.

I've recently tried to reduce the power consumption on it, just to see if I could. I know for low power applications you shouldn't really be using Arduinos at all, I get that. I just wanted to see if I could reduce the power being used by the H Bridge which drives the motors.

I have one 12V supply for the Arduino (using sleep mode where possible etc) and another 12V power supply connected to the H bridge (L298N based) which has its own 5V regulator on it which I believes is quite thirsty even when inactive. I therefore wondered whether I could turn the power to the bridge off when I don't need it. I am only driving motors for about 1 minute, twice per 24 hours. The rest of the time it is dormant, but still using 30mA or so just sitting there. I know that's not huge, but it means I have to recharge the 7Ah battery every 7-10 days.

So I set up a MOSFET (520Ns) to connect/disconnect the GND of the 12V H Bridge supply. I still find, to my annoyance, that the 12V still draws 20mA! How can that be?

The only explanation I can think of is that there are 4 logic connections from the Arduino which are normally LOW. There is a common GND for the H Bridge and the Arduino. Can the 12V supply find a route through to GND via the Arduino?

I've sketched a very rough and ready circuit diagram hoping this may make sense to some kind soul who is prepared to help. Thanks.

Dave

Wawa

You could switch the positive power line to the H-bridge with a relay.
Turn the relay on just before the H-bridge code, and off after it.
Add some delay after the relay code, to make sure power has stabilised.
Leo..

TomGeorge

Hi,
When you disconnected the gnd of the supply from the H-Bridge, you left a circuit from the positive of your motor supply battery, through the shield and through the output pins of the arduino controller, to the gnd of the motor supply battery.

As Wawa has suggested use a relay to switch the positive side of the H-Bridge.

Tom.... :)
Everything runs on smoke, let the smoke out, it stops running....

daveparry

I see now. Thanks both.

Incidentally, could I achieve the same with a P channel MOSFET if I wanted to keep it all solid state? I've just tried playing with a 2 Relay arduino board and it is pulling nearly 100mA when excited. Seems a lot.

daveparry

@TomGeorge - just a thought - but when the H Bridge supply -ve and the GND link are both disconnected - how does it find a circuit back to the supply? This is just connected to the Drain of an inactive MOSFET.

TomGeorge

Hi,
You will have disconnected the gnd connection to the H-Bridge, but not the gnd connection of the motor supply and the arduino gnd.

Tom.... :)
Everything runs on smoke, let the smoke out, it stops running....

daveparry

But, and this could sound stupid, the 9V rail is floating isn't it?

Or in other words, the electrons can not find their way back in to the battery.

I can see there is a connection to the 5V supply ground, but without a common ground, the 9V means nothing surely?

MarkT

The L298 has two supplies Vss and Vs, disconnecting both and setting the Arduino outputs
that control the bridge to LOW will all be necessary to power down the chip.

Note that setting both enable pins LOW should minimize the quiescent current to a max of
4mA from Vs and 6mA from Vss.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Wawa

Incidentally, could I achieve the same with a P channel MOSFET if I wanted to keep it all solid state? I've just tried playing with a 2 Relay arduino board and it is pulling nearly 100mA when excited. Seems a lot.
Did you use a 12volt relay, powered straight from the SLA battery.
100mA is rather high for a 12volt relay, but not a problem when it's only on for 2minutes a day.
Just measured a blue 12volt relay, used on common ebay relay driver boards. 30mA..

You could use a P-fet for high-side switching.
A small NPN transistor is also needed as level shifter.
I can draw you a diagram.
Leo..

Marciokoko

#9
Sep 26, 2018, 03:15 pm Last Edit: Sep 26, 2018, 03:16 pm by Marciokoko
Did you get this sorted out?  I have a similar issue which uses this setup.  I haven't tried it yet but Mark's suggestion sounds interesting; setting both Arduino output pins towards L298(In1 & In2) to LOW:


Go Up