I'm working on a project that is keeping track of Milli amps coming out of a lipo battery.
Right now I have just had the project run off my laptop and powered off the USB cable.
The sensor I am using to read amps is a AttoPilot 180 amp shunt device.
If I hold the arduino in my hand the reading I get for amps in my application matches the reading from my console on my Battery Charger. The Battery Charger is actually discharging the lipo. It is acting as a load on the circuit.
If I put the arduino down on the bench my amp readings go down drastically and don't match what my Battery Charger is showing.
Seems I am having some sort of grounding issue? I have not run the project disconnected from the computer yet. Maybe this issue will go away when the project is running and powered off my RC aircraft?
I was going to power the arduino off of the RC aircraft Receiver. Since the aircraft receiver has 5 or 5.5V in it's bus I can just run a couple of jumper wires from an extra Servo port on the Receiver to the 5V Arduino Port and a ground from the Receiver Port to the ground on the Arduino board. Right?
maarset:
So I need to tie in the ground on the breadboard to the main ground on the computer?
The Arduino ground is perfectly adequately connected to the laptop ground via the USB cable. You do not need to worry about that at all.
Whatever ground is on circuitry on your breadboard (can't quite see in your picture, a better close-up would be useful) clearly needs to go to a ground pin on the Arduino. I cannot see any other grounds of relevance. You really should however give a link to the current shunt device and a focused (useless otherwise) picture of how it is connected.
Hi, just a question, have you worked out what the resolution is for your setup.
If you are using the 50V/180A unit, have you calculated what each count of the ADC in the arduino represents current wise?
The spec says that the output are scaled to 3.3v.
If you use 3.3V ref then.
That is if 180A is your full 1024 count, then each count = 180/1024=0.175A.
If however you have 5V ref
then (3.3/5)*1024= 675 will be your max count.
So each count wll be 180/675= 0.266A
So in either case I'd say you are only interested in Amps, not mA resolution.
If it is all going to be battery powered, then an external 3.3V reference would be advisable.
I agree earths can be a problem, but I'd be placing bypass caps in the outputs of the sensor at the arduino end, even though they are on the sensor board. Your hand could be acting as bypass.
The sensor is a series device for current measurement.
Hi, the reason to add caps is to do with what is called bypassing.
Even though you have a DC circuit, they can oscillate and /or pick up any electromagnetic interference, ie mains frequency, PWM drivers, through leads and layout configuration.
These oscillations will/can cause your readings to become effected, the arduino analog input will only measure what is being fed to it, so if there is interference on the voltage level then it will be measured as well.
Good ground connection also helps to minimise any DC voltage offsets that measuring low voltages can be sensitive to.
Thanks tom and mike. Starting to make sense.
This is the sensor I am using
To figure out amps from the Analog signal I was doing
IRaw is the analog signal.
IFinal = IRaw/3.7; //180 Amp board. But I will try your way Mike.
Now when you guys say 5V ref or 3.3V ref do you guys mean which power port I am using off of the Arduino to my breadboard?
I'm wondering if my LED unit will run on 3.3V.
I will have to do some reading about the decoupling.
I tried running the project on a 6V Lithium pack. A123 technology. My Amp readings were way too high.
I ran the project connected to the laptop with the laptop either plugged into the power cord and tested it without the power cord plugged in. It was the most accurate with the power cord plugged in.
Ref voltage, the voltage you put into the Vref pin on the arduino which will act as the voltage value input where you get the npmaximum reading from the analogue read.
By default it is 5V so everything you measure is referanced to that. This can be as low as 1.1V to get finer steps in a measurement, but be sure to read up how to do it correctly or you will damage your arduino.
I hope you did not run the arduino off 6V but put it through a regulator like the power jack.
It sounds like you might have because 6V is too low to provide the 5V referance and the arduino would be running at about 4V which would give you a higher than expected reading.
So this Analog Ref Voltage is where I pointed in the Image? If I use A then it is 5V and if I use B it is 3.3V for Ref Voltage?
And 3.3V would give me a better resolution? Do I have to do anything different in my Setup() function if I use 3.3V when setting up the analog port?
So if I use a 6V battery to power my project then I should use 3.3V reference. Got it.
And to cut down on noise would I try a capacitor on the ground wire going from the sensor to the ground on the Arduino?
So this Analog Ref Voltage is where I pointed in the Image?
No it is next door but one from B and is marked IOREF.
To use it for 5V do nothing it is already connected.
To use it for 3V3 then connect IOREF to B BUT before you take a sample you must do:-
analogReference(EXTERNAL);
in your setup function.
That makes full scale 3V3 and so the steps are smaller, that is 3.3 / 1024 = 3.222 mV per step
As opposed to the normal 5 / 1024 = 4.88 mV per step.
So if I use a 6V battery to power my project
You should not power the Arduino with 6V because the regulator will be unstable under those conditions.
Powering my BreadBoard from the IOREF port and run "analogReference(EXTERNAL);" in the setup function. This should give
me a voltage reference of 3.3V.
I might try shortening the wires going to the sensor.
And I will pick up some Bult Capacitors that will bridge the IOREF port and the ground port. Something between 10uF to 220 uF.
And since I will be doing a ref voltage of 3.3 I will try a 7 to 9 volt battery as a power source for the Arduino Uno.
No you do not power anything from the IOREF pin.
If you power your arduino from 3v3 then there is no need to connect the IOREF to anything as it is connected by default connected to the supply.
No you do not power anything from the IOREF pin.
If you power your arduino from 3v3 then there is no need to connect the IOREF to anything as it is connected by default connected to the supply.
So right now I power the breadboard from the 5V port on the Arduino.
So if in setup if I do "analogReference(EXTERNAL);" then board is automatically running at 3.3 Volts and I can still power the breadboard from the 5V port?
Or do I need to feed the arduino 3.3 volts from a 3.3 volt battery?