ACS712 - Current Sensor Module - Page 1
Forum section: electronics / general

author: TJ232
author_rank: Frequent Contributor
timestamp: June 02, 2015, 11:45:45 am
content: Hello,In the process to find better isolated current measurement solution I am exploring the posibility to use the ACS712 Current Sensor Board with the ESP8266. As they are all over the place, so why not.Main identified problems to solve:ASC712:5 Vdc power supply devicemeasure positive and negative 5/20/30Amps, corresponding to the analog output 100mV/A BUT"ZERO" point, means no test current through the output voltage is VCC / 2 =5v/2=2.5V !ESP8266:3V only deviceADC range max: 0-1VSo far, the solution that I found was to use a difference amplifier:If you know any other way to do it or have any related ideas, please feel free to shareFor reference:ASC712 Current module meets ESP8266

author: Rerouter
author_rank: Super Contributor
timestamp: June 02, 2015, 12:28:05 pm
content: As the other chip is driving its output, why not just a voltage divider, it would protect your device from ever having its range exceeded, and does the job just fine, turns a 0-5V swing into a 0-1V swing,

author: langwadt
author_rank: Super Contributor
timestamp: June 02, 2015, 01:00:40 pm
content: just divide the output with 5, and you'll get 0-1V with 0.5V at zero current

author: PeterFW
author_rank: Frequent Contributor
timestamp: June 02, 2015, 01:34:11 pm
content: If you only need one directional current measurement you can use a dirty trick to increase the resolution.You wire the ACS712 reversed, so that a positive current reads as a negative.Then you add a voltage diviver to the output that brings the 2.5V down to 1V.Now, if current flows it will read as a negative value from the upper limit of your ADC range.This way you can use the full resolution even if the output voltage is VCC/2 referenced.A bit dirty but i worked in my application.

author: TJ232
author_rank: Frequent Contributor
timestamp: June 03, 2015, 08:41:30 am
content: Quote from: Rerouter on June 02, 2015, 12:28:05 pmNice and elegant idea.Did you use such a configuration ?Any drawback?What's happening to lower gains?

author: TJ232
author_rank: Frequent Contributor
timestamp: June 03, 2015, 08:43:33 am
content: Quote from: PeterFW on June 02, 2015, 01:34:11 pmBelieve it or not, I was doing last week the same "dirty" trick and yes, worked OKThe only problem is that is a liitle bit to much near the edge.

author: mikerj
author_rank: Super Contributor
timestamp: June 03, 2015, 08:51:45 am
content: If you don't want bidirectional current sensing, why not use one of the Allegro sensors designed for unidirectional sensing such as the ACS713?

author: PeterFW
author_rank: Frequent Contributor
timestamp: June 03, 2015, 09:11:00 am
content: Quote from: mikerj on June 03, 2015, 08:51:45 amIndeed, i can tell you why i dit that.Because the ACS712 was abundant on Ebay with connectors, board and headers for next to nothing.The ACS713 would have been a pain in the arse to get and way, way, way more expensive.

author: TJ232
author_rank: Frequent Contributor
timestamp: June 03, 2015, 09:59:40 am
content: Quote from: PeterFW on June 03, 2015, 09:11:00 amSame here, the idea was to use the dirt-cheap ACS712 Modules available everywhere. To buy chip only it's more expensive and out of scope.

author: nctnico
author_rank: Super Contributor
timestamp: June 03, 2015, 11:01:41 am
content: Just use the difference amplifier setup with one leg tied to VCC/2.

author: TJ232
author_rank: Frequent Contributor
timestamp: June 06, 2015, 10:10:31 am
content: Part 2 of the story :programming the ACS712 Current reading function.Question for any of you using frequently the ASC712 sensor: it is all the time so noisy or is just mine ?Using the Voltage Level Shifter and DC op amp module with a big number of reading gives decent result but in case of direct voltage divier the noise level is very high.

author: PeterFW
author_rank: Frequent Contributor
timestamp: June 06, 2015, 11:53:02 am
content: Quote from: TJ232 on June 06, 2015, 10:10:31 amThe ones i had were too, they have decent noise floor.You can increase the filter capacitance to get that down at the cost of bandwidth.There is page in the datasheet about that.With a 0,1µF capacitor i got it down to about 2 bits with the 10 bit ADC i used.

author: Rolo
author_rank: Regular Contributor
timestamp: July 18, 2015, 05:41:35 pm
content: I used two ACS712's and I noticed that having a clean powersupply makes a difference. When testing it the power came from the USB port, after that I put it on a simple linear 5 volt supply it got a lot better. Second thing I noticed is that placing it near other equipment can make the 0 level shift. In my application I made a calibration routine in software so it can be adjusted by one push button on the back of the PSU (in this case).

author: Brutte
author_rank: Frequent Contributor
timestamp: July 19, 2015, 12:03:28 pm
content: QuoteIs your shunt resistor connected to GND? If you want an isolation then most likely it is floating - you can use a "differential" setup with 5 resistors. The example below gives a differential gain=1, the common mode can be as high as +-300V and the voltages on op-amp inputs are still within +-3V range.Indices as on your 4-resistor chart:R1=R3=99kR2=100kR4=1k,the fifth is R5=1k which connects inverting input to GND.Uout=1*(V2-V1)CMRR=inf, but resistor matching is critical.

author: Jeroen3
author_rank: Super Contributor
timestamp: July 20, 2015, 07:38:55 am
content: I'd think the price difference between ACS712 and 713 is gone when you have to add additional circuitry.

author: Chris C
author_rank: Frequent Contributor
timestamp: July 24, 2015, 05:37:49 pm
content: Two potential noise sources I don't see mentioned:1) The ACS712 output buffer sources 3mA *max*. When connected to a voltage divider, you're requiring it to source additional current. Make sure the values of the divider are not so low that you're stressing the output buffer. (But not so high that it exceeds the maximum recommended input impedance of your ADC, or you'll get errors from the sample-and-hold capacitor failing to charge properly.)2) Those Ebay ACS712 modules are so cheap, I wonder whether they contain legitimate ACS712's, rather than a clone or factory rejects. I have a Ebay module, and a ACS712 straight from Allegro (free sample). I've been meaning to compare the two but haven't gotten around to it yet. The last clone-vs-real comparison I did (on the nRF24L01+) showed the clone was very poor at rejecting power supply noise.