Irratic readings from Allegro's current sensor...
Hello to all readers...I have a little situation as far as readout from the above sensor.· Actually, readings are very stable when the current flow, (charging or discharging) is resistive or inductive (12 DC pump motors) .· Example, when the solar panels are charging, I get an accurate readout of current (charging).· When I turn on various loads, light, pumps, etc. the readings again are stable (discharging).
The irratic readings only show up when I am using my 2500 watt inverter.· Now, this inverter is on my boat, and it will charge the house bank when incoming shore power is available, up to 125 amps into a 12volt bank (very large battery bank).· When the shore power is not available, the device will go into invert and provide AC power from the same 12 volt house bank.
I believe that there must be alot of noise or spikes on the DC power line connected to the house bank, in invert mode or charge mode, thus causing the wild DC amprage readings (wiring from inverter to house bank is 2/0 wire). The Allegro device ASEK754SCB-130 (will measure plus or minus 130 amps) provides an output of 0 to 5 volts.· 2.5 volts being 0 amps, and 5 volts representing 130 amps (charaging).· 0 volts output would be -130amps discharging).
Again, I believe that the LTC1298 ADC, is so fast, that it is taking readings when the chargerer/inverter is modulating (for a lack of a better discription). I don't have a scope to witness this.
I was wondering if I could buffer the output with a capacitor, choke arrangement to smooth out the output, much like a power supply, before the LTC1298 ADC.
The stamp only makes amp reading about once every 5 seconds, so there is time for some sort of averaging circuit.· I must also add, that I have tried to take several readings with the LTC1298 ADC and averaging, but just one really low reading throws off the accuracy when it comes to averaging.
Have any of you fell readers run across this unusual problem, and do you think some sort of smoothing circuit would work.· I did try several small capacitors (.1u, 1u, 10u, and a 100u) with no help.
Thoughts would be appreciated on this...
Deno
The irratic readings only show up when I am using my 2500 watt inverter.· Now, this inverter is on my boat, and it will charge the house bank when incoming shore power is available, up to 125 amps into a 12volt bank (very large battery bank).· When the shore power is not available, the device will go into invert and provide AC power from the same 12 volt house bank.
I believe that there must be alot of noise or spikes on the DC power line connected to the house bank, in invert mode or charge mode, thus causing the wild DC amprage readings (wiring from inverter to house bank is 2/0 wire). The Allegro device ASEK754SCB-130 (will measure plus or minus 130 amps) provides an output of 0 to 5 volts.· 2.5 volts being 0 amps, and 5 volts representing 130 amps (charaging).· 0 volts output would be -130amps discharging).
Again, I believe that the LTC1298 ADC, is so fast, that it is taking readings when the chargerer/inverter is modulating (for a lack of a better discription). I don't have a scope to witness this.
I was wondering if I could buffer the output with a capacitor, choke arrangement to smooth out the output, much like a power supply, before the LTC1298 ADC.
The stamp only makes amp reading about once every 5 seconds, so there is time for some sort of averaging circuit.· I must also add, that I have tried to take several readings with the LTC1298 ADC and averaging, but just one really low reading throws off the accuracy when it comes to averaging.
Have any of you fell readers run across this unusual problem, and do you think some sort of smoothing circuit would work.· I did try several small capacitors (.1u, 1u, 10u, and a 100u) with no help.
Thoughts would be appreciated on this...
Deno
Comments
http://www.rocketroberts.com/techart/inverter.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There's nothing like a new idea and a warm soldering iron.
I am not concerned with measuring the AC current into or out of the inverter.
Thank you, as the link was interesting to read.
Deno
Oh... and I honestly know little about this stuff... I really don't know what you should do.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There's nothing like a new idea and a warm soldering iron.
Tracy Allen, do you have any thoughts on this sensor?
Deno
Would you mind terribly drawing up a simple schematic of your system, so we might be able to provide additional assistance. Please include at least the following components:
Line voltage input and output (as/if applicable)
DC-->AC Inverter input and output
12 VDC "house bank"
Any other batteries in the system
Allegro currrent sensor
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I don't know how to· draw a schematic on the computer, and I don't have a scanner to get it into the computer.· However, I will try to explain the hookup.
Basiclly, this is a 12 volt house system, comprised of 3 8D batteries.· Each battery has a capacity of 225 amp hours, of which you can use half before the battery is considered discharged.· About 11 volts.
The inverter is a 2500 watt Heart inverter which means it will run a 2500 watt device on 12 DC.· It also doubles as a battery charger, when AC input voltage is present, which is 120v AC. It can charge up to 125 amps.
I have the Allegro device ASEK754SCB-130 device·installed with large battery cables between the inverter, house loads, and the 3·8D batteries on the negative side of the battery. It is easier to collect and consolidate the negatives then the various positives that run all over the boat.· This is a standerd practice for inverters on boats.
The Allegro device ASEK754SCB-130·does work very well when the inverter in not charging or inverting.· Measuring the output of the··Allegro device ASEK754SCB-130· does show a very stable voltage between 0 and 5 volts, depending on charging or discharging with a digital volt meter which does not show spikes or noise because it averages (i think).
I just think that here is so much noise on the 12 line going thru the Allegro device, and the LTC1298 is just sampling at the wrong time.· It, does give a good reading every once in a while, which tells me, if I could smooth out the noise and spikes, I could get good reading all the time.
I hope this further explains the hookup.
Deno
Thank you again...·
Again, I am sure that the inverter/charger is spiking the· 12 volt bank, and the ADC is sensing· this spike from time to time.
Thank you for your drawing, as it does help to explain the circuit.
Deno
How erratic are the readings, as a % of the average?
Yes, a bit of RC filtering could do wonders.
The resistance R can be quite large if it is only sampling once every 5 seconds. Try any R from 10kohms to 1 meg. With 1 meg, it could filter even 60 hertz modulations. The RC network should be located right next to the LTC1298 inputs. Averaging in software is most effective if it is synchronized to the fundamental frequency of the modulation and would require that you sample the input much more often.
Here are additional things to look at:
* Is the LTC1298 hooked up in differential mode, to measure the voltage difference directly across the shunt? The diagram above assumes this is true. The alternative is one side of the shunt grounded.
* Where does the power supply for the LTC1298 and CPU come from, and in particular, where is it grounded?
* How close is the LTC1298 to the shunt? What kind of wiring is it, loose wires? Twisted pair? Shielded?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
The reading are very irratic...for example, I know from the bar graph on the inverter control panel, that I am charging·, lets say 80 amps.· The readout will swing from minus 100 amps to a plus 100 amps.· Every once in a while it will read 80 amps.· This condition happens when charging or discharging.· With the charger/inverter turned off, the reading are right on. I don't think I can compute a percent average, because of the wild fluctions.
The LTC1298 is hooked up as single ended, meaning, I am switching the device between the 2 channels.· One channel measures 12 volt battery voltage thru a voltage divider.· This voltage reading is right on and is not irratic.· The other channel of the LTC1298 is interfaced with Allegro's current sensor, and this is not a shunt.· It outputs a voltage from 0 to 5 volts, with 2.5 volts being "zero" charge or discharge. 5 volts would indicate 130 amps charging and 0 volts would mean 130 amps discharging.
The power supply for the LTC1298 is directly wired thru a fuse to the house batteries. This includes the ground.
The LTC1298 is connected to the Allegro device thru a twisted and shielded wire with a distance of about 8 feet.· The sensor wire does not come close to the large charging/discharging cables from/to the inverter.
I have tried various capacitor combinations between the output of the Allegro device and ground, but at the site of the current sensor, not at the LTC1298 device.
Thanks again for your input...
·
What happens with a multimeter connected to the Allegro output with the inverter on--Does the meter reading fluctuate? Try it with the multimeter on the DC, and also look at it to see how much it reads on the multimeter AC range.
RC filtering is simpler.
I'd still put the RC close to the LTC1298, because the resistor will create a node that is subject to noise pickup on the right hand side.
The capacitor could be up to several microfarads and the resistor up to a megaohm, but I have to emphasize that the filter itself can cause an error due to the input current of the LTC1298. That current is proportional to the rate at which the LTC1298 samples the input, and at one sample every 5 seconds like your program is doing now, it will not be a problem even if R=1 megaohm.
The RC network can average the input signal, but might not give a right-on indication of the RMS (effective) current. The shape of the pulse waveform might be too extreme to give a good average close to the RMS value. It is worth a try though.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I have filtering capacitors on the power line to the current sensor, so I am alittle supprised that the AC is getting to the device.· I measured the frequency of the supply, and it appears to be 0. This AC voltage does stop when I turn off the charger/inverter.
The frequency of this AC is exactly 120 hertz.· Any thoughts on how to filter this AC component out.· Various sizes of capacitors seems to have no effect.
Thank again on this ongoing problem.
Deno
Did you try the RC filter right at the LTC1298 inputs? The RC filter will need a time constant of much longer than 1/120 second. 10 microfarad tantalum with 100 kohms would have 1 second time constant and that should do the trick. Multimeter voltage inputs often have that long of a time constant. The fact that the DC range of the multimeter is relatively steady shows that it can be done.
Also, multimeters sample at a multiple of the power line frequency, so they can reject power line noise. You can do that in your system, but it takes some fine-tuned programming. Are you using a BS2? The BS2 would have to take an even number of samples (say N=4) from the LTC1298 at intervals of exactly 8.3 milliseconds, and average those. Then wait your 5 seconds and do it again. That can be combined with the RC filter at the input and still not create an input current error.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Deno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I can live with the inaccurate charging values, as it is the discharge info that I like to monitor.
Thanks again, Tracy.
Deno
PS My next stamp project in the spring will be a "follow me" golf cart.·
I am curious to know exactly what RC filter values and what sampling rate you are using.
- Sparks
Also, I install a very small computer pillow fan (12 volt) that blows directly on the Allergro device.· When I am pumping 120 amps thru it, it seems to get alittle warm.· I have taken it's temp, but the little fan can't hurt.· When you look at the 2/0 battery cables being necked down to that little device, you have to wonder....
Make sure you use good solid connections to the device.· I actually built a small base to hold the Allegro current sensor EV board on standoffs, with 3/4 inch wide, 1/8 inch thick copper· strips bolted to the EV provided holes with 1/4 inch brass bolts.· The other end of the copper strips (2 inches) is stud mounted to secondary mounts that the large battery cables bolt to.· This takes all strain off of the Allegro device.
Hope this helps...I do believe the device works better then a standard shunt, because of the output being 2.5 volts at 0 amps, verses 0 volts at 0 amps with a standard shunt..· To much error can get into the readings at the lower voltages using a shunt type device.
Deno
·
Thanks also to everyone who has helped with this discussion. It is helping me anticipate possible problems before I encounter then.
I am hoping to temporarily install my Allegro sensor this weekend and run some tests on it. I doubt I will be hooking it up to a microcontroller right away but now that there is some interest in seeing waveforms I just might lug over the oscilloscope to see what I can observe about the signal. I might take some temperature readings of the sensor as it operates as well. However, I do not plan to be pulling anything close to 130 amps through it this weekend!
I will try to let you know if I uncover anything interesting.
- Sparks