In the instructions, it says I need to connect the battery directly to the spot indicated to allow battery voltage to be transmitted back to the ardustation.

I would like someone to confirm that connecting an 18.2 volt lipo batttery directly to this location, will not let out all the magic smoke.

Views: 54

Reply to This

Replies to This Discussion

Let me correct my question.
It is the ArduShield that has the voltage monitor connection. Can someone confirm that 18.2 volts will work fine, and not fry the circuit?
check the schematic for the shield. there is a voltage divider with a 240 and 100k resistors. so the voltage input from the pack is divided by 3.4 ( 240+100 / 100 ) and the resulting signal goes to the arduino input. you wouldn't want the result to be much over approx 5 volts, or really shouldn't have anything over what voltage the arduino sees for Vcc. If you're using a separate receiver pack and letting the receiver power ardupilot through the servo lines (the default setup), that voltage could go lower like 4. so I wouldn't put more than 3.4 * Vcc, could be as low as 13.6v.

is 18.2 your maximum pack voltage or your nominal pack voltage? an extra volt or two may not hurt anything, but not sure if it would goof up the analog inputs to have anything higher than Vcc.

A very simple solution: put another resistor in series with the battery pack sensing lead. so the divider divides the voltage down more. for example, another 240k resistor in line, would give (240 + 240 + 100) / 100, or a 5.8 division. so even if your supply to Vcc for the arduino went as low as say 4 volts, it should be perfectly fine to put 23 volts to the voltage sense input. more dividing will give less voltage measurement resolution, so don't put too large a resistor.

Another solution would be to add several diodes or leds in line. they would subtract approx 1.3 volts per diode, so that would be another simple way to keep the input low enough.

Either way, change code to calculate the voltage correctly, depend on what was added.
The 18.2 volts is from a 6s Lipo Pack powering my ESC. Monitoring the 5 volts from the ESC to power my RX, does not help, as by the time the 5 volts starts to drop the 18.2 will have fallen well below useable range for the motor.

I would like to monitor the voltage of the 6s LiPo pack, and based on the info you provided, 18.2 volts divided by 3.4 is 5.353

It looks as though 18.2 volts would be reasonably safe, as .353 volts is nominal. Please correct me if I am misunderstanding your information.
Most 6s lipo battery pack voltage is 22.2 dc and with full charge 25.2v dc. You may have 4 cell lipo or a defective 6 cell pack! You should measure voltage after full charge to be sure of highest applied voltage and design resistor voltage divider as Dale suggests. Remember you can only release magic smoke one time..
Good catch, I'm an idiot. You are of course correct with the 6S voltage being 22-25 volts.
I've been working with so many voltages over the last couple of weeks, picking motors/batteries/speed controller combinations, etc I got my wires crossed on lipo packs and voltages.

so that being said 25/3.4 = 7.35 volts which would most likely let the smoke out of the ardushield.

I will be looking at putting a 240k resistor in line, using the formula you have provided.

Thanks twice over...
Just to follow up and ask an additional question.
I am adding a 220k ohm resistor in line with the power going into the voltage connection on the ardushield.

This gives me (220 + 240 + 100)/1000=5.6

25 / 5.6 = 4.464285714285714 which is well within the 5 volt safety margin.

Now my question is this;
In looking at the ardupilot 2.6 code, I found the following line in the defines.h file
#define BATTERY_VOLTAGE(x) (x*(INPUT_VOLTAGE/1024.0))/0.000294117

This appears to be the correct location to modify for the additional 220k ohm resistor, but I am at a loss as to how I would go about making the modification. Could someone tell me if this is in fact the correct line, and how I would go about determining the modifications I need?
Not sure, but my guess would be to fiddle with the "0.000294117" value (seems to be a correction / scaling value).

Note that 1/0.000294117 = 3400 (see the magical 3.4 value?)

If we replace that value with 0.000178571 , you should get the right reading (I hope).
1/0.000178571 = 5600 (i.e. 5.6 scaling factor)
(This was calculated by 1 / 5600 )

Try:
#define BATTERY_VOLTAGE(x) (x*(INPUT_VOLTAGE/1024.0))/0.000178571

RSS

Groups

© 2012   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service