0
\$\begingroup\$

I am trying to amplify the signal from ACS712 to read it better. The problem is that I am using an 8-bit ADC, and what I want to take measure are things like energy-saving lights, or other things with low consumption. So what I am trying/what I want to do is
1) Rectify the signal (from a sinusoidal signal, with range 0-5V, to a signal not sinusoidal 2.5V-5V).
2) Lower the level, from 2.5V-5V to 0-2.5V
3) Amplify the range, from 0-2.5V to 0-5V (there is an alternative: amplify to 0-10V but saturate on 5V)

In this way, I will take advantage the 256 step better (in the case of saturate the signal the ADC will read better the low consumption... no?)

Here is the schematic I copy from the ACS712 datasheet, I was making some test with operationals on proteus, but I get no good result.

schematic

simulate this circuit – Schematic created using CircuitLab

Thank you.

EDIT

Finally, after an infinite number of tests I get this circuit:

enter image description here

The signals on the oscilloscope are:
-Green: GND
-Yellow: the signal from the source without the DC signal (after C3).
-Blue: the rectified signal (it loses some signal). -Pink: the amplified signal (it works perfect between 0V and 1.6V... but only amplify until 3.5V, it makes different pictures if source is on 1.7V or if is on 5V, but the max value is 3.5V).
I was trying to remove the first LM358 and put a diode and a capacitor... but testing, and removing all circuit for the test, and let only C3, R9 a diode and other resistor (parallel with R9), I get a 1V constant signal after the diode. The circuit was like this:

schematic

simulate this circuit

The capacitor is not connected because it would be the next test, but the first failed.

\$\endgroup\$
  • \$\begingroup\$ The LM358 does not have rail-to-rail outputs, so if you want 5V out you need to power it with a higher voltage (eg. +7V). Your circuit is a full wave rectifier with peak detect. It's doing that job OK, but will grossly overestimate the power consumption of typical low power devices. \$\endgroup\$ – Bruce Abbott Jan 19 '16 at 18:20
2
\$\begingroup\$

The output from the ACS712 is centred at 2.5 volts dc and, for a range of input currents will produce an output waveform that can peak up at 3.5 volts or trough down as low as 1.5 volts.

You have an ADC that requires it to be centred at 2.5V so half the battle is done. I would strongly consider doing nothing and let the ADC/MCU convert the sampled current into an RMS value. This, of course, means taking continual samples at several hundred hertz in order to properly measure the RMS current and avoid a lot of aliasing.

what I want to take measure are things like energy-saving lights, or other things with low consumption.

What you propose in your circuit is a very basic rectifier circuit and this immediately introduces a "several-percent" error in measurement and also restricts your ability to only measuring sinewaves and not more complex current waveforms (that are typical in building and household appliances).

To make your circuit work better you need a bleed resistor across C1 but, I urge you to do all signal processing using an MCU and forget about adding diodes and capacitors externally.

If you want to measure power you need to sample voltage and current at a rate not less than 1kHz to get any measure of accuracy.

\$\endgroup\$
  • \$\begingroup\$ Thanks @AndyAka. The circuit I show is what I found on the data sheet, but what I was trying was something very similar at the answer of Bruce Abbott, but testing with proteust it doesn´t work... maybe the values of R´s. \$\endgroup\$ – Eloy Fernández Franco Jan 13 '16 at 22:51
  • \$\begingroup\$ Bruce's circuit is what I'm saying plus his has a little gain to make full scale a lot bigger but keep the midrail output at 2.5V. Both methods involve sampling the waveform at no less than 1kHz and certainly more if you want accuracy of current measurement. If you need power measurement you'll need to simultaneously sample voltage at the same rate and do software multiplication and averaging but, it all depends on what accuracy you want. I've designed consumer power meters so I'm a bit biased toward the accurate end of things. \$\endgroup\$ – Andy aka Jan 13 '16 at 23:24
0
\$\begingroup\$

'Energy-saving' lights and other electronic devices often have a very peaky current waveform that may not be in phase with the voltage.

Here's an example:-

BS Ledlight LED T5 30cm Warm White: enter image description here

In this device the current peaks at only 50V, and drops to almost zero at peak voltage. The result is an apparent power consumption of 4.8VA, but an actual power draw of only 1.5W.

Any instrument that processes voltage and current separately will not get the right answer, no matter whether the waveform is rectified to a peak value, averaged or converted to rms. To measure power accurately you must take many simultaneous readings of the instantaneous current and voltage (both positive and negative), multiply them together and average the results over one cycle.

You need to digitize the entire current waveform at a high sampling rate, interleaved with measurements of the voltage waveform. You can then calculate power by multiplying and averaging the digital values.

The ACS712x05 has an output voltage range of 1.5V to 3.5V for +-5V peak current input. To measure the current draw of low power devices more accurately you could amplify its output with a rail-to-rail op-amp, like this:-

schematic

simulate this circuit – Schematic created using CircuitLab

R1 and R2 set the zero point reference at 2.5V. R3 and R4 set the gain to 5, which saturates the ADC input at +-2A peak current.

\$\endgroup\$
  • \$\begingroup\$ Thanks @BruceAbbott (and sorry for the delay, I was a little bussy). Assuming your schema, and after some changes, I did mine. It is on my edit. Thanks. \$\endgroup\$ – Eloy Fernández Franco Jan 19 '16 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.