I think i understand it now. If 5A is the maximum and the output increases by 185mV for each amp then the output range should be 0-925mV. If vcc is 5 then you add 2.5 giving 2.5-3.425V for positive so the entire range must be 1.575-3.425V.
Ive read a datasheet for a PIC that has ADC but i didnt see anything about the lowest input voltage (unless i missed it or didnt understand it). Would i be right in saying that you take the output from the other chip and lower it so the range becomes 0-1.85V and set the PICs Vref to 1.85V? I think this is what the amplifier thing was about that i read somewhere. I think the idea is to stretch the 1.85V so the range goes from 0V all the way up to 5V so the PIC can read it easier
I dont think i should have this problem using the resistor method because i can set the PICs Vref to the vdd pin (5V) then use the potential divider circuit to make sure its output is 5V when a little over the maximum amount of amps are being drawn (im making it a little over so i can add overload warning and safety cutoff)
Where does 30 come into it? On the main page it said +/- 5A to 30A
Ahh, I see. I was getting confused before because it looked like the range of the chip was 5-30. I see now at the bottom of the other page there are 3 versions of that chip with different ratings
You have some options:
1. Use +5V Vdd as Vref and use it as is with reduced sensitivity
2. Use a lower external VRef (which could be as simple as a voltage divider from Vdd)
3. Use Vdd as Vref and an opamp setup for DC gain to amplify the signal
However, all this is the easy part. When measuring AC voltage/current you will need to sample both many times per half-cycle (what frequencies are you dealing with?) and average the readings over each half-cycle. This also means you'll need to detect zero crossing.
I think for the actual project im going to use vdd because the potential divide part can change its value to make use of the full 5V (i dont have any outputs 5V or less).
The frequency is 50Hz (UK AC) but because its DC ripple i guess that makes it 100Hz. As i said before im going to only take the highest value. If i sample it at about 400 times a second then at least one sample will be extremely close to the absolute max. Because of DC ripple it also has 2 chances per second to get as close as possible. I can then discard all the lower readings. The highest value will be reset after each 400 samples so it can detect a drop in current.
Im not sure if a PIC chip can check the ADC chanels that fast though. I might need a higher resonator. If using 10-bit then the chip can detect 1024 different voltage levels. At 5V max each level is 4.8828125mV. As long as the input value is within 4.8828125mV of the highest point in the DC ripple i should get an accurate reading. The good thing about DC ripple (or any kind of sinewave based line) is that it stays near the top for a longer period of time than any other point in the wave but still i might need more than 4 sample points on each bump. To make it even worse the pic chip will have to deal with 8 ADC pins. It might be an idea to split the work between multiple PICs
If you run that 100hz DC ripple across a capacitor with a very small value bleed resistor, said capacitor will quickly charge up to the peak value of that ripple, thereby negating your need to quickly sample the output, maybe even isolate it with a diode so it (the cap) can't bleed back into your supply. Basically, you end up with a full wave filter without much of a load.
Bookmarks