ADC Reading range

Thread Starter

ilginsarican

Joined Jul 13, 2017
142
Hi,
I am trying to measure DC current using Hall effect sensor(HCS 300A).
I have to measure 300Amps DC.The sensor gives voltage from M(measure) output,
When the system draws 200Amps ,the sensor output voltage is 4,71V.
If current flows other direction,the sensor gives approximately -4.7V
But my processor operates 3.3V, ADC VREFh can be max 3.3V, VREHL must be equal to analog ground.
How can I convert negative voltage to digital?
 

ericgibbs

Joined Jan 29, 2010
18,869
hi,
Use a level shifting OPA, set the OPA's zero amps as Vadc/2, this will enable measurement of +/- currents.
Which ADC are you using.?
Do you follow OK.?
E
 

Thread Starter

ilginsarican

Joined Jul 13, 2017
142
hi,
Use a level shifting OPA, set the OPA's zero amps as Vadc/2, this will enable measurement of +/- currents.
Which ADC are you using.?
Do you follow OK.?
E
I use MK60DN512vll as processor,so ıt has 16-bit SAR ADC.
It makes sense to level shifting opamp but if I use opamp my resolution will be worse,won't be?
I want to measure 300Amps,it gives approximately 7V. :(
 

Thread Starter

ilginsarican

Joined Jul 13, 2017
142
For 300Amps the sensor output voltage is 7V and
for reverse 300Amps the sensor output voltage is -7V.
I will use level shifter and zero amps will be equal to 3.3V/2,
300Amps will be equal to 3.3v and reverse 300Amps will be 0v.
LSB for ADC is 3.3V/600Amps =5,5mV for this situation.
I am not good at ADC, I am not sure but is 5,5mV too small,isn't it?
 

OBW0549

Joined Mar 2, 2015
3,566
For 300Amps the sensor output voltage is 7V and
for reverse 300Amps the sensor output voltage is -7V.
I will use level shifter and zero amps will be equal to 3.3V/2,
300Amps will be equal to 3.3v and reverse 300Amps will be 0v.
LSB for ADC is 3.3V/600Amps =5,5mV for this situation.
I am not good at ADC, I am not sure but is 5,5mV too small,isn't it?
If you are using a 16-bit ADC and it measures from 0V to 3.3V, its resolution will be (3.3V - 0V)/(2^16), or 50.4 μV, NOT 5.5 mV; you're calculating resolution wrong.

Given that the ADC input range of 0V to 3.3V represents a measured current range of -300A to +300A (600A total), your resolution, in terms of the measured current, will be 600A/(2^16), or 9.2 mA.

Whether you use the method suggested in post #3 to map the sensor's output range onto the ADC's input range, or the method suggested in post #4, the result will be as I described.
 

ericgibbs

Joined Jan 29, 2010
18,869
hi il,
The level shift OPA input would have a resistive attenuation circuit.
The Vout for Zero amps would be 3.3v/2, which would mean the ADC count would be 32768, ie == zero.
As the Amps go positive the ADC count would increase to a possible maximum of 65532 , a negative Amps maximum count of 0000.

Do you follow.?
E
 

ericgibbs

Joined Jan 29, 2010
18,869
hi ilgin,
Using the above level shifting circuit, the sign determination is done by the ADC count value.

copy:
The Vout for Zero amps would be 3.3v/2, which would mean the ADC count would be 32768, ie == zero.
As the Amps go positive the ADC count would increase to a possible maximum of 65535 , a negative Amps maximum count of 0000.

The program would read the ADC count, if it is >32768 , the amps are positive and if less than 32768 the amps are negative.
To get an actual negative value, the program would subtract the count from 32768.

If you set the level shifter scaling to say +/-28000 counts for +/-700 amps, that would give a resolution of +/- 0.025Amps.

E
 

Thread Starter

ilginsarican

Joined Jul 13, 2017
142
hi ilgin,
Using the above level shifting circuit, the sign determination is done by the ADC count value.

copy:
The Vout for Zero amps would be 3.3v/2, which would mean the ADC count would be 32768, ie == zero.
As the Amps go positive the ADC count would increase to a possible maximum of 65535 , a negative Amps maximum count of 0000.

The program would read the ADC count, if it is >32768 , the amps are positive and if less than 32768 the amps are negative.
To get an actual negative value, the program would subtract the count from 32768.

If you set the level shifter scaling to say +/-28000 counts for +/-700 amps, that would give a resolution of +/- 0.025Amps.

E
Thanks your reply.
If I dont use level shifter,the sensor outputs will be -V and +V.
As a second option I want to read both negative and positive voltages with ADC.
The problem is reading negative voltage without level shifter.
I am looking for a solution for second option.
 

MrChips

Joined Oct 2, 2009
30,823
Thanks your reply.
If I dont use level shifter,the sensor outputs will be -V and +V.
As a second option I want to read both negative and positive voltages with ADC.
The problem is reading negative voltage without level shifter.
I am looking for a solution for second option.
Use and ADC that accepts bipolar inputs, i.e. both negative and positive input voltages.
 

ericgibbs

Joined Jan 29, 2010
18,869
3.3V/600=0,0055 so 5,5mV for each Amps.
hi,
That calculation is misleading.
You say that you are using a 16Bit SAR ADC.??, that is 65535 possible counts for 0v thru +3.3v
Assume a total current range of +/-600Amps = 1200amps. [using level shifting]
That is 1200amps/65535 =0.018A/bit resolution.

I ran a simple program based on +/-700amps, with the level shifting OPA scaled for +/=28000 counts, centred on 32768, which gives 0.025A/Bit.
The print out is attached,the first part is for current values close to zero and the second for the full +/-700Amp range.

The program I used was about was approx 20 lines of code.

E
 

Attachments

If this http://www.harting-usa.com/fileadmi...HARTING_Hall_Effect_Current_Sensors_Flyer.pdf is your sensor, then the posters here might be talking Apples vs Oranges.

It's "Hall effect compensated", not a "Hall effect" sensor.

The output is a current which it looks like you place across a burden resistor.

if I'm reading the datasheet correctly, you would need a +- 12 V minimum supply to measure negative currents.
You only have 3 pins. The burden resistor creates 4 pins.

==

Also be aware of absolute type measurements like 0-5 and ratiometric measurements that are usually referred to 1/2 Vcc. They are different.
 
Top