Go Down

Topic: 6v Battery Monitor (Read 1 time) previous topic - next topic


Jun 12, 2018, 01:28 pm Last Edit: Jun 12, 2018, 01:43 pm by Microboard
This is the circuit for the battery monitor and to power the Arduino Nano.


When i have installed the battery monitor its fluctuating under load 2 x rc motors being powered,
also its tripping the nano board and resetting it.
If this is your problem, why don't you post a complete circuit diagram of your setup that includes all the motors and how they're connected? Posting just the part with your voltage divider is as useless as the 10µF cap in that circuit.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.


Here's a diagram with the motors via the ESC's and 2.4 ghz receiver.


No motors. No details on how that receiver is connected, or what it is. A mysterious "2x ESC". No connection between the (missing) Arduino and motors/controllers.

Potential causes of your problem include: no decoupling caps, no filtering caps, no flyback diodes. 2.4A is that continous or stall current? Can your battery deliver whatever stall current these motors take? (they do demand that current upon startup!).

You're wasting our time posting incomplete schematics. Your own time as well of course but I don't exactly care much about that part.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.



Hi microboard,

Some posts may seem harsh to you but to get answers you have to be able to see the whole project or the answers will be based on misleading information.

So lets look at some of the confusing things i picked up and maybe you can supply some answers to help us help you.

Lots of talk about the battery but you never actually say what your battery is.  Its assumed its a SLA.

You say.
"After testing i've found with the diode theirs a fluctuation in the voltage on serial monitor but with out the diode its stable??"

What diode?  Others asked and you posted a circuit (btw. Its the same as Due_unto' text version so why post it again. And where is the diode?)

Your second circuit? Is almost the same with some wires running to a text "Motors", not helpful at all.

A post with a picture of a motor would have been just as useful.

Information on the actual motor model and the motor controller model would be good as then we would have something to work with.

Finally! Some things to try.

Do you have a multimeter?  What does it say the battery is doing when the Arduino resets?
Eg. Is the voltage dropping?

Can you power the motors or the Arduino from another power source?
E.g power the Arduino from a 9v battery through the regulator and run the motors off the 6v (dont forget to connect the earths on both batteries and leave the resistor divider connected to the 6v).

Set up the Arduino to output serial and send the battery monitor (A0? Your 'circuit' doesn't show) to the computer so you can see the data. Not just your leds.

So now you have done this what happened?

--To the 6v battery volts when the Arduino reset?

--What did the serial out put say whan you powered the Arduino from another power source.
 (BTW you could just run it off the computer USB that you need to connect for serial)




Ok my diagram was bad, :smiley-confuse:

I've added some caps and a diode since and got a little improvement.

But still not 100%

The Battery is a SLA 6v 4.0 amp 20 hour, which is upgraded for the one that it came with ( 7.2-2400 mAh NiMh).

The Motors are MFA 500 4.5 to 15v DC and do pull on the battery, But SLA is the biggest i can fit in the RC Boat without butchering it, and i would like to run it all from the 6v SLA if possible.

I will send some more detailed diagram and photos of where i'm at and i will stick multi meter on when its under load.

Like i say since i put the caps on its not doing it so much.

Thanks Daz i will post this evening.



Ah! a light bulb goes on.

Someone is retrofitting an RCboat.

To run the Arduino off the same battery going on the little i have so far,  i would look into what they call boost/buck converters.

These will take a variety of input voltages and output a stable voltage of your setting.
Either 5v direct input or (recomend going this way) 9v into the Arduino regulator, depending on what else it is running.

Running the Arduino from the same 6v 4ah battery as two motors with a 2 amps each (allow up to 4 amps each max) that are running props in water and that battery will not hold 6v.

Where/how are you running it into the Arduino?

Into the regulator will not work as it requires 7v? I think to run it.

The boost buck will smoth out the ripples created by the motors going on/off and give a stable voltage of your choice.
This one,
Boost/Buck converter

Has 3.8v to 32v input and 1.25v to 35v output up to 3 amps.
I have never tried it with fast fluctuating input voltages but i use it for battery charging and driving led strips with no problem.

Next time you post i would lead with a discription of your project and what you want to do as i believe many others would have pointed out the voltage pitfall earlier and avoided the other posts.

BTW drawing 4a plus from that battery is going to flatten it pretty quick.  Say 40 min run time.

The parents have a cordless vac that has one and it draws around 8 amps and lasts about 10 min tops before you here it slow down.

Also as the motors are dragging the volts down you will not be able to use it to judge battery capacity from volts while in action, so check the volts with engines off.  Still wont be 100% but will be better.

Ps. As it is now, do not trust the readings from your Arduino volt meter as the fluctuating input volts (The Reference) will throw it all out. Not even sure the 1.1v ref mentioned earlier will hold


Jun 13, 2018, 09:39 pm Last Edit: Jun 13, 2018, 10:28 pm by Microboard
Right Daz,

Am struggling tonight to get a full schematics drawn up as my software is pants.

What i'm trying to do is use the Arduino-

1. control main lights 3 x leds i've manged to do this via some resisters and BC547B.

2. Hopper lights 4 x flashing leds again mission complete (resisters and BC547B)

3. Power up buzzer tone ( a few bleeps when you switch on) Job done (happy)

4. Battery monitor TRI led, green for fully charged, blue for half charged and red flashing to changed the battery) and wired via the voltage divider as my crap drawing).

Battery Monitor does work but problems fluctuating when motors are going (under load Multi meter reading 5.6v)

While toggling the transmitter for the motors to turn it resets the arduino and sometimes switches the hopper light on or the main lights..( BUT improved since i've put the caps on)

The motors are powered via 2 x ESC's these are connected straight to the power switch and the ESC's power the receiver R7M.

I've put 2 x 4.7uF caps and a flyback diode near the switch to power the arduino and a 0.1uF ceramic soldered to the pins VIN & Ground  ( the 4.7uf is all i had kicking about think bigger ones might help but dont know what size to order).

So.. from what your saying daz the battery monitor wont work because the battery is going under load making it drop below what i've set it to in the code.

Now what i thought is maybe i put up with it, but try to make it a slower transition between the colours, the monitor leds dont have to be precise just indication. maybe a delay i could put that in the code BUT i dont want the code to be pausing while its doing this delay. would some caps do the job?

Well i think that where i am with it.

PS.the Battery monitor tri leds are powered off the arduino via resisters.

You can see i'm not trying to link to NASA its just a few leds.

Here's some pictures the wiring is a but rustic while i'm prototyping.



Pictures of the project


Here is a link to show you how to post photos so they show up and you dont have to download them to view them.  Makes it easy for others.
thanks to robin2 (and the poster who pointed me to it)

Sooner or later someone is going to ask for code. Before you post, check the forum help on the correct format to post it in.

Ok, so the motors are not being controlled by the Arduino

So you are basically looking to controll leds and a buzzer thats not so hard (im working on lcd layouts myself).
Plenty of examples.

For more on what i said about the battery monitoring.

The Analogue to Digital Converter uses the VCC of the Arduino and divides this into 1024 steps.
Eg. VCC of 5v would be 1024 steps of 0.0048828v each with reference to VCC so half that would be 612 not 2.5v as the Arduino only knows steps of 0 to 1023, you provide the reference voltage and you make one step equal 0.0048828v.

But what if for some reason the reference voltage changed?  Say the battery went flat?
(Bear with me, in my head this makes sense but to you it will look different).

Input of 5v with a resistor divider set to 50% would be 2.5v to you and 612 to the Arduino based on its reference from VCC.
Input of 4v with a resistor divider set to 50% would be 2.0v to you and 612 to the Arduion based on its reference from VCC.

But in the first instance if you had a voltage reading from the Arduino using the formula of 612 x 0.00488 that would be 2.5v
and the second one using the same formula would be the same even though the voltage is now 2 volts.

With the leds if you you display the voltage with reference to the VCC which is dropping along with the battery volts it would be almost the same.

You see, using this would mean that the readings would be unreliable

This is based on the limited understanding of what you have set up.

The capacitors are acting like small batteries and keeping the voltage up when the battery goes down.  Thats basically what a cap is, a small battery.

Disconnect the posative lead of the battery from the Arduino and plug in the USB to power that part of the circuit and see what happens to the battery led readings.

This provides a stable voltage to the Arduino seperate from the battery. Do not disconnect the negative as it uses this as a reference for the battery volts and leave the resistor divider connected to the battery posative.

That i think is more than enough for now as i will begin to repeat myself.
A hand drawn diagram with blocks and pin lables would be good for starters its half way between a near useless fritzing diagram and a circuit diagram and easier to do.



Here are your pictures.


Right spanner in works!

I've tried the 7.2v 2400 mAh NiMh Battery back in the boat and the motors are flying now!

The SLA 6v 4amp was struggling by the looks. (Not enough voltage?)

Only thing these 7.2v batteries don't last very long..

Maybe i could get some 3500 mAh and put 2 x in parallel.??

I will to have a re think and see what my options are battery wise and this might fix the arduino tripping out??


Jun 14, 2018, 03:54 pm Last Edit: Jun 14, 2018, 03:55 pm by Daz1712
Unfortunately you need to run the Arduino on a supply that is not influenced by the motors dragging the volts down and to do that you either fitt another battery to run the Arduino or go the route of a boost/buck box.
This is the route i would try as fitting one will most likely take less space than another battery.
Before doing this try running the Arduino from the USB and see if things remain stable.

You might also look at a 12v 4ah that would take the place of the 6v giving you twice the wattage or for higher cost look at going lithium.

First do the USB thing and prove the voltage drop is the problem.

Ps. You mentioned light on the hopper?  Whats that?


Jun 14, 2018, 05:32 pm Last Edit: Jun 14, 2018, 05:38 pm by Microboard
Ive got a 12v 4amp SLA but it wont fit in the opening on the top of the boat without butchering.

Unless they do a smaller size..

Hopper lights are linked to the servo signal when you toggle it opens hopper and blinks the leds 10 times.

I will try the usb thia evening ans take some more readings..

And maybe order a boost buck..

It wound be better on 12v guess i could cut into the boat so it fits..

Go Up