will this be ok...

Hello all,
Have recently started experimenting with the arduino and am having great fun…then I got my idea for a first project.
Have worked out the easy stuff but have a few questions.Basically I want to monitor the two batterys in my wee campervan for current so I have an idea of power used and individual Device wattage…I was going to use shunt resisters but these are problematic and then I discovered the CSLA2CD HallEffect sensors(-25too85degreesCel)…70ampsAC/DC…low power consumption…so I ordered two at 23quid(total)…they seem ideal for this task.
They work like this …you supply say 8volts(6/12volts)on the two excitation pins and then you will get 4volts on the output pin…the voltage will then rise by 0.033volts per amp load.Now normally I will only have charge/load current about 5/10 amps…but when the diesel heater starts it draws about 25amps for a short duration…I would like to monitor this…so to my reckoning I can monitor up to 30amps and stay under the 5volt limit on the arduino pins ie.0.033mV30 <1volt( remember I will be starting at 4volts)
So am I correct in saying that if I have 0-5 volts range(given I use the 5volt for ref) mapped to 0-1023 resolution (ie 1024) in effect I can theoretically sense at 4.88mVolts.Now if 33mvolts represents one amp then 16.5mV is half an amp and 8.3mV is a quarter amp(I would be happy to sample at this amount)so two points of resolution would be about a quarter of an amp.(my head hurts) :stuck_out_tongue:
some questions are…(1)how accurate would the A/d converter be at this tolerance…(2)would I be better of trying a different design eg.If I put a resistor in line with the sensor output to drop it too say half a volt(remember I am sensing change in voltage) and then I used say the inbuilt 1.1volt ref (the resistor will now fluctuate with heat :~)…(3)if I used 3.3volts/5volt ref and amplified the voltage(from the sensor) using an op amp before again dropping it through a resistor…because I am amplifying the sensor output by a factor of say 3(sensor output up to 1amp range(0.033
30)) before reducing it for the analogue pin.To sum up…I have a sensor which will output 4-5volts…at 0.033volts increments …I want to analog read this pin with some accuraccy with the atmega326.
Have just talked to a pal on the blower and he said I need to “offset” the sensor 4volt output using an opAmp with full swing -0volt to Vss single supply . :astonished:…Shame he lives so far away hehe…think what he means is if I feed 4-5 volts into the opAmp I can trim this to scale 0volts to 5volts on the output thus offsetting the unwanted 4volts.I think “offset” was the magic word… :slight_smile:
Anyhow does this seem do-able…
Thanks for anyhelp…
Ps…Big thanks to all who have made the Arduino magic available to so many for so little…

Assuming I read correctly, you have a DC voltage measurement value that has a range of +4 to +5vdc and you would like to get the most resolution and range from the 10 bit A/D using analogRead() ?

If that is the case, I think one fairly simple arrangment would be to use a simple op-amp to offset that +4vdc to get a 0-1vdc measurement range (offset -4, gain of 1) and then use the Arduino AnalogReference command to use the internal 1.1vdc bandgap voltage as the reference voltage for the A/D conversion. That would then make 0-1.1vdc analog input voltage equal to 0-1023 counts when perfoming the analogRead().

You then may want to utilize the arduino map command to set the internal value range units you want to use in your program: http://arduino.cc/en/Reference/Map

Lefty

The sensor will run from a supply at down to 5.4V, so perhaps running it at 6V would give more headroom - you have to scale the output signal appropriately as per datasheet.

Thanks too both of you guys…great suggestions…I found this…

This is maybe what I am looking for Retrolefty do you think…
I have learned alot already …thats the great thing messing with the Arduino…
Thing is I did not know how to verbalize the issue…hence the rambling…
Offset is the magic concept…
I have all the bits now I think …pulled the display out of an old firealarm…got a RBBB to stick in the veroboard…
thanks again to both of you and to the linked site… :slight_smile: