Page 1 of 1
Calculation!
Posted: Mon Jul 01, 2013 8:07 pm
by jgu1
Hi all!
I need a calculation help.
I'm making a project with an ACS758. 200Amp.
It is an hall current sensor that provides 10mV/amp with an offset of 2.5 V this I mean that it starts with giving 2.5 V out at 0 Amp.
How do I calculate to get it to show Amps (floating) in my display with one digit after the decimal point. And how should I read the analog input, as Volts or Int.
I've looked, and tried to change John's fine project with a acs 712, 5 Amp (
http://www.matrixmultimedia.com/mmforum ... lit=acs712 # p30651) but get big step in the display by just a change of 0.5 Amp.
I am sure that´s simple for you expert.

I would be very happy if anyone can help and furthermore a FC examble.
Thanks in advance.
Jorgen.
Re: Calculation!
Posted: Tue Jul 02, 2013 2:23 pm
by Jan Lichtenbelt
Hi Jorgen,
You do not mention the accuracy you want. The most simple procedure is to put the hall-sensor output to the microchip directly. The voltage of the hall sensor will be between 2.5 and 4.5 Volt (0-200Amp). Use the ADC and you have the information you want.
Perhaps better is an external amplifier with offset change. Amplification of 2.5x and offset from 2.5 Volt to GND. The output will be between 0 and 5 Volt, which can be digitalised with the ADC of the microchip.
Good luck
Jan Lichtenbelt
Re: Calculation!
Posted: Tue Jul 02, 2013 8:26 pm
by jgu1
Hi Jan!
Thank´s for reply. Yes I could use an opamp, but as you said connect it to an analog input, it was that's what I want. My thought was that when, it is possible to use an LM35 which also gives 10mV/ degree It may also be possible to use a ASC758 providing 10mV per. Amp. But my problem I have little difficulty in making the calculation.
I will use it for my solar cells which can deliver up to about 40Amp I would like to have as much accuracy as possible, but it should vary up to 500mA it is ok.
Best regard
Jorgen
200 Amp meter
Posted: Wed Jul 03, 2013 11:33 am
by Jan Lichtenbelt
Hi Jorgen
Please find attached my proposal for your 200 Amp meter. ADC between 2.5 Volt (0 Amp) and 4.5 Volt (200 Amp). You do not need a pre-amplifier in this case. The accuracy is about 0.5 to 1 Amp. If that fits, you can use this flowcode. This is a simple flowcode which do use only bytes and integers (no floating paramters). Of coarse the microchip can be changed to an other one with ADC. Pay attention the input pin can differ in that case. Read the applicable datasheet.
Succes
Jan Lichtenbelt
Re: Calculation!
Posted: Wed Jul 03, 2013 1:09 pm
by jgu1
Hi Jan!
Thank you wery much. I will test it as soon as possible and you hear from me.
Best regard
Jorgen
200 Amp meter
Posted: Wed Jul 03, 2013 5:46 pm
by Jan Lichtenbelt
Dear Jorgen
There was a small error in the flowcode. Please find the approved one.
Kind regards
Jan Lichtenbelt
Re: Calculation!
Posted: Thu Jul 04, 2013 5:19 pm
by jgu1
Hi Jan!
Thank you for your fine example.
I have now tested it. Basic works very fine, but there is little disturbance of the linearity.
When I load 1A shows the display 1A and when I load with 8A theshow display 6A. Where in the calculation I can regulate it.
Otherwise, I am very impressed with the stability when you consider the case of 10mV step and it would be a nice Ammeter wich can measure from 0 - 200A - big span.
Thank´s in adcvance
Jorgen
Re: Calculation!
Posted: Sat Jul 06, 2013 9:34 am
by Jan Lichtenbelt
Dear Jorgen,
There was a mistake in the 'Analog_Input_Min = 412' , which should be 512 for 2.5 Volt at 0 Amp. But probably you found out it already yourself.
I simulate the calculation in an Excel file and found a deviation start at 21 Amp (reading 22 Amp).
If the accuracy has to be approved, you have to go to floating point variables. Tell me if you need help.
Kind regrads
Jan Lichtenbelt
Re: Calculation!
Posted: Sun Jul 07, 2013 12:49 pm
by jgu1
Hi again Jan!
I can see that you have changed the preset value in the V.3 By trying this and change and adjust the supply to the ACS758 is (I have made a adjustable and very stable supply for ACS758), I have now a very fine ammeter to my solar charger. It is not entirely linear, (better than before) but good enough for this project. with a range from 0 - 30amp means an error of just under 1A at the top nothing.
With help from you, I use now this in my project and are very satisfy. Thank´s to you again Jan
Best regard
Jorgen