100 and 300 ohm values for the divider are way too low for the chip to drive.
You've omitted Cf, the filter capacitor, so the output will be noisy, this might be an issue for you.
Extra decoupling on the 5V rail isn't going to be a problem (its better to have too much than too
little)
There is a minimum output load resistance of 4k7, either to ground or to Vcc, and the output
drive current is limited to an absolute maximum of 3mA to ground, hence the comment about your
100 ohm and 300 ohm divider. [ from the specs in the datasheet ]
I suggest use a 3k3 + 10k resistive divider on the output so that its not overloaded.
The output divider and the filter capacitor Cf form a first-order low-pass filter in order to limit
the noise bandwidth. For 3k3 and 10k divider the effective resistance will be 2k5, so for instance
a 10nF filter cap will give a time-constant of 2k5 x 10n = 25us (ie a noise bandwidth of about
40kHz).
These hall-effect based current sensors are inherently very noisy, you would normally want to set the
filter time constant appropriate to your application to reduce noise. If you want rapid response, you
have to live with the noise. Noise power is proportional to bandwidth.
Could be safer to use a clip-on current transformer and an ADS1115 in differential mode.
Then you can also power both from a single 3.3volt supply.
Leo..
MarkT:
100 and 300 ohm values for the divider are way too low for the chip to drive.
You've omitted Cf, the filter capacitor, so the output will be noisy, this might be an issue for you.
Extra decoupling on the 5V rail isn't going to be a problem (its better to have too much than too
little)
There is a minimum output load resistance of 4k7, either to ground or to Vcc, and the output
drive current is limited to an absolute maximum of 3mA to ground, hence the comment about your
100 ohm and 300 ohm divider. [ from the specs in the datasheet ]
I suggest use a 3k3 + 10k resistive divider on the output so that its not overloaded.
The output divider and the filter capacitor Cf form a first-order low-pass filter in order to limit
the noise bandwidth. For 3k3 and 10k divider the effective resistance will be 2k5, so for instance
a 10nF filter cap will give a time-constant of 2k5 x 10n = 25us (ie a noise bandwidth of about
40kHz).
These hall-effect based current sensors are inherently very noisy, you would normally want to set the
filter time constant appropriate to your application to reduce noise. If you want rapid response, you
have to live with the noise. Noise power is proportional to bandwidth.
This response triggered more questions, but my knowledge is limited to what I have needed to research to accomplish a goal.
i care to only sample the current once a second if that matters. should i look at another option for current sensing? my goal is to have it on the same PCB as the ESP12, I know there is amount of seperation that will need to be addressed, but i intend to offload the board design to a professional once i get the schematic down.
i inherently dont understand noise and its calculations so 25us is greek to me also the "time-constant" term.
so, as far as i understand, i need a 10nF filter cap (along with my 1000uF cap already on the rail) for Cf and 3.3k/10k resistor divider in place of Rf?
if this is true, ill add it to my schematic and get confirmation from you guys.
theskaz:
i care to only sample the current once a second if that matters.
It does for mains AC.
You need to sample at least one full wave (time) with a high granularity (many samples) to find/know the peak of that wave.
Leo..
The ACS722 comes in many flavours, but none of them are AFAIK are 0-4volt.
The unidirectional variety (DC only) outputs 0.1VCC at zero current, and 0.9VCC at max current.
The bidirectional variety (DC and AC) outputs 0.5*VCC at zero current.
Leo..
"Sensitivity
The ACS773 IC has greater sensitivity than the ACS772. The ACS772 operates at 5V and has an output range of 0-4 V, whereas the ACS773 operates at 3.3V and has a measurement range of 0-2.64 V. Therefore each additional ampere of current is represented as a greater voltage in the ACS772, leading to increased sensitivity."
so, if im hearing you right, the bidirectional one will output 2.5v when the load sensed is 100A? (for the 100amp verson)
and a correction to my previous statement: I only want to update a display once a second for current. ill sample and average in code.
Ok. since im not anywhere near an expert, im inclined to shift what im doing.
my project needs a way to measure current and realistically wont go over 60A on 240v mains. i would like to only tap 1 leg and have everything on one PCB. what would you propose?
the idea for using an ACS came from Googling people using arduinos for ammeters.
No experience in mains current sensing, but I would experiment with a WeMos D1 Mini, an ADS1015 (or ADS1115) breakout board, and a clip-on 100A current transformer (ebay) with a 1volt output.
The ADS can be powered from the 3.3volt pin of the WeMos.
The WeMos can be powered from a cellphone charger (if needed with a powerbank backup in between).
ACS sensors need cutting of mains powered wires, and have bare terminals.
A risk you don't want/have to take.
Leo..
im controlling 4 relays (that control 2 240v contactors, and 2 120v outputs) 3 inputs, and the ammeter. its all going inside a box. I originally was going to use an ESP32 but the ADC was wacky. and i want/need wifi. let me take a look at those devices and ill get back soon.
Wawa:
Could be safer to use a clip-on current transformer and an ADS1115 in differential mode.
Then you can also power both from a single 3.3volt supply.
Leo..
Probably wise, yes - and there's no problem with noise with a CT. You can scale the burden resistor
to select whatever full-scale voltage you desire too.
theskaz:
i care to only sample the current once a second if that matters. should i look at another option for current sensing? my goal is to have it on the same PCB as the ESP12, I know there is amount of seperation that will need to be addressed, but i intend to offload the board design to a professional once i get the schematic down.
Mains is an AC signal - you need to sample at significantly higher than twice the frequency, so 150 samples/second or higher - this is basic sampling theorem. I'd recommend 1000 samples/second as
this will allow more accurate rms averaging.
i inherently dont understand noise and its calculations so 25us is greek to me also the "time-constant" term.
Then I recommend learning up the basics of signal sampling and noise and RC filters - its not that difficult and
they crop up everywhere. As I mentioned in another post a current transformer is probably a better approach
and without the noise issue of hall-sensors.
[/quote]
so, as far as i understand, i need a 10nF filter cap (along with my 1000uF cap already on the rail) for Cf and 3.3k/10k resistor divider in place of Rf?
The filter capacitor on the signal is nothing to do with the decoupling capacitors - those are to keep the supply rail voltage constant.
10nF is probably fine for these purposes, a 25us time constant is equivalent to a filter cutoff frequency of about 6kHz, which is more than adequate for even quite dirty mains waveforms.
if this is true, ill add it to my schematic and get confirmation from you guys.
Make sure to take the standard precautions for mains voltage isolation - observe good trace separation (10mm
if possible).
i had a whole bunch of stuff typed out. but i need to start a new thread. the ADS1015 seems like the best option. will a 330ohm resistor work if im using 2 CTs on 2 120v 60Hz legs?
Most of the blue 100A clip-on CT that you see on ebay have a buildin 10ohm burden resistor,
and therefore a fixed voltage output (1volt@100A).
That's ~1.41volt peak or 2.82volt peak/peak AC at 100A.
That means that you have to bias the CT on >0.75volt to prevent clipping (to ground) of the A/D.
And that you have to use a PGA of 2 (2.048volt FS).
A PGA of 2 means the best bias (symetrical clipping) is ~1volt (1.024volt).
I would use a voltage divider, to make ~1volt from the 3.3volt supply.
Could be 220k to 3.3volt and 100k to ground.
Add a ceramic bypass cap (1-10uF) from divider tap to ground.
Two 100k resistors from the divider tap to two differential inputs of the A/D.
CT also connected to those two differential inputs.
Not sure if you should go for an ADS1015 (higher speed) or ADS1115 (higher resolution).
True speed at max I2C rate of Arduino's I2C bus (400kHz) is not in the datasheet.
The ADS1015 (12-bit) should give you enough resolution.
Leo..
theskaz:
i had a whole bunch of stuff typed out. but i need to start a new thread.
That would count as cross-posting - wasting people's time (figuring out from different posts, how you came to the present point).
If you wish now to refer to a different device, just alter the subject of your first post to include the new device. Then people with some familiarity may look at it.
Paul__B:
That would count as cross-posting - wasting people's time (figuring out from different posts, how you came to the present point).
If you wish now to refer to a different device, just alter the subject of your first post to include the new device. Then people with some familiarity may look at it.
that has a different set of questions and is scoped to the whole project. instead of a single element/question. does that still count as cross-posting?