Author Topic: ACS711 not outputing full voltage range.  (Read 2850 times)

0 Members and 1 Guest are viewing this topic.

Offline guitchessTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: us
ACS711 not outputing full voltage range.
« on: October 23, 2019, 02:40:35 pm »
Hello. 

I am trying to design a switched receptacle that is triggered by current on a parallel receptacle. 
The issue I'm having is that the ACS711 starts with a normal output (Vcc/2) but after amperage reaches about 5 amps, the output falls/rises back  to the original level.   

The IC is the x25AB version. 
Vcc is from a 1117-3.3 giving a base Vout of 1.64v.  Depending on current direction, Vout will rise to about 1.91v or fall to 1.58 before resetting.
I'm testing with a drill, which has a peak current draw rating of 7.8 amps.  The Vout resets at about 3/4 trigger pull.

If any of you more experienced designers have some advice, I would greatly appreciate the input.

Attached are schematic, pcb images, and ACS711 datasheet.
« Last Edit: October 23, 2019, 02:52:54 pm by guitchess »
Just a 48 year old carpenter.  No training. No school. Self taught at electronics and programming.  So yes, I'm out of my depth.
 

Offline jdraughn

  • Regular Contributor
  • *
  • Posts: 106
Re: ACS711 not outputing full voltage range.
« Reply #1 on: October 24, 2019, 09:11:20 am »
When you say resetting, do you mean from 3/4 to full the current reading output resets to vcc/2, but if you release the trigger a tiny bit like back to 1/2 then the current goes back up?
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3382
  • Country: gb
Re: ACS711 not outputing full voltage range.
« Reply #2 on: October 24, 2019, 11:46:52 am »
Is that a 1uF capacitor on the output of the ACS711 (marked 105 on the schematic)? The datasheet specifies the maximum capacitive load as 1nF, a thousand times lower.
 

Offline guitchessTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #3 on: October 24, 2019, 12:40:31 pm »
When you say resetting, do you mean from 3/4 to full the current reading output resets to vcc/2, but if you release the trigger a tiny bit like back to 1/2 then the current goes back up?


Yes.  Once I hit that threshold, the 711s output reverts back to Vcc/2.  If I slightly release the trigger, it does go back to working.  Also, if I pulse the drill at a low level, being careful not to go past half or so, the Viout(the datasheet  label) will peak higher. 

I got to wondering if the ACS711 was being upset by the magnetic flux(I'm a rookie, not sure what this is really called) of the relay, but yesterday I  tested without the jumper that leads to the MCU and it functioned no differently. 

I was also thought that the current draw of  the relay may be keeping the 711 from functioning properly, but the no jumper tests made no difference.
Just a 48 year old carpenter.  No training. No school. Self taught at electronics and programming.  So yes, I'm out of my depth.
 

Offline guitchessTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #4 on: October 24, 2019, 12:46:00 pm »
Is that a 1uF capacitor on the output of the ACS711 (marked 105 on the schematic)? The datasheet specifies the maximum capacitive load as 1nF, a thousand times lower.

Yes, I had made that mistake.  Unfortunately, changing it to the proper value made no difference in the IC's output. 

I had also used a 10k instead of the 1k resistor for the fault pullup.  Sadly, the change to 1k failed to make the IC function as expected.
Just a 48 year old carpenter.  No training. No school. Self taught at electronics and programming.  So yes, I'm out of my depth.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5170
  • Country: ro
  • .
Re: ACS711 not outputing full voltage range.
« Reply #5 on: October 24, 2019, 12:50:39 pm »
It's probably not the issue, but I don't see any tantalum capacitor on the board, for the 1117 output.

Keep in mind that 1117 regulators can oscillate, without a capacitor on the output that has ESR between 0.1 ohm and 1 ohm - ceramic caps should be avoided (or add a resistor in series), a 10-47uF electrolytic would probably be good choice.
There are some 1117 regulators, made by some companies, which claim they're safe to use with ceramic capacitors, but I found it best to just treat them as if they require 0.1 ohm or higher ESR on the output.

Considering the small distance between the two chips, you can probably drop the ceramic capacitor on the input of the ACS711 IC ... for decoupling purposes it should be closer to the pads anyway.
« Last Edit: October 24, 2019, 01:00:11 pm by mariush »
 
The following users thanked this post: wraper

Online wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: ACS711 not outputing full voltage range.
« Reply #6 on: October 24, 2019, 01:01:47 pm »
Where did you get this ACS711? It might be counterfeit. Also try placing ferrite beads on current sense wires.
« Last Edit: October 24, 2019, 01:06:42 pm by wraper »
 

Offline guitchessTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #7 on: October 24, 2019, 02:05:30 pm »
It's probably not the issue, but I don't see any tantalum capacitor on the board, for the 1117 output.

Keep in mind that 1117 regulators can oscillate, without a capacitor on the output that has ESR between 0.1 ohm and 1 ohm - ceramic caps should be avoided (or add a resistor in series), a 10-47uF electrolytic would probably be good choice.
There are some 1117 regulators, made by some companies, which claim they're safe to use with ceramic capacitors, but I found it best to just treat them as if they require 0.1 ohm or higher ESR on the output.

Considering the small distance between the two chips, you can probably drop the ceramic capacitor on the input of the ACS711 IC ... for decoupling purposes it should be closer to the pads anyway.

Yes, being a rookie, I haven't learned where substitutions are ok and where they're not.  I had this one in place before I read that it takes a 10uf and up to equate to a small tantalum.  What's really frustrating is that when I learn something like this, it makes me wonder how many times it has caused issues in the past and I was too ignorant to know.

Thanks for looking and the tip.
Just a 48 year old carpenter.  No training. No school. Self taught at electronics and programming.  So yes, I'm out of my depth.
 

Offline guitchessTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #8 on: October 24, 2019, 02:07:20 pm »
Where did you get this ACS711? It might be counterfeit. Also try placing ferrite beads on current sense wires.

I got this one from Digikey.  I hope we don't have to start worrying about fakes from them.

Also, I'll see if I can dig some up. 

Thanks for the tip. 
Just a 48 year old carpenter.  No training. No school. Self taught at electronics and programming.  So yes, I'm out of my depth.
 

Online wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: ACS711 not outputing full voltage range.
« Reply #9 on: October 24, 2019, 02:14:52 pm »
As you are connecting drill, it likely produces wide band noise. And coupled through internal capacitance of ACS711, quite likely it can make IC go nuts. Hence I suggested placing ferrite beads. Using noise suppression capacitors might help as well.
 

Offline djacobow

  • Super Contributor
  • ***
  • Posts: 1170
  • Country: us
  • takin' it apart since the 70's
Re: ACS711 not outputing full voltage range.
« Reply #10 on: October 24, 2019, 03:01:29 pm »
What is the fault/ output doing? A short current spike from the drill could be sending the unit into fault mode, which it recovers after current goes down and stays down for a bit.

Would be interesting to test with a less noisy load, perhaps a resistive heater driven through a variac.
 

Offline guitchessTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #11 on: October 24, 2019, 05:02:25 pm »
Well I started the morning changing loads.  Didn't try a resistive load, just different.  a single speed blower motor.  Probably not much less noisy.  It did reveal a few things.

Thank you and everyone for your input.  I think I may have it sorted out.  Unfortunately, it shows my lack of experience/technical knowledge. 

I think my issue is that I had DC on the brain.  When I measure the VIOUT on AC mode, it appears to work properly.  However, it measures 0v with no passing current.  When current is applied, the voltage goes up.  Measurements show that it is an accurate 55mv/amp as well. 

To my way of thinking this is right because VIOUT goes the same direction as the measured current.  I think the only reason any VIOUT was showing with the drill is because of noise or possibly the variable speed circuit.  With the blower motor that I tried this morning, there was no reaction from VIOUT when measuring DC but when measuring AC, the voltage was right on. 

How does this theory sound to more experienced designers?

Unfortunately, this thesis requires a version 3.  Which, will have to include a rectifier and an op amp.

Again, thanks for all the help.   Any tips, input, or advice is always appreciated.
« Last Edit: October 24, 2019, 05:05:52 pm by guitchess »
Just a 48 year old carpenter.  No training. No school. Self taught at electronics and programming.  So yes, I'm out of my depth.
 

Offline guitchessTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #12 on: October 24, 2019, 05:05:14 pm »
What is the fault/ output doing? A short current spike from the drill could be sending the unit into fault mode, which it recovers after current goes down and stays down for a bit.

Would be interesting to test with a less noisy load, perhaps a resistive heater driven through a variac.

I haven't measured the fault output yet.  I really had ruled that out because the datasheet said that the IC had to power off to reset it.  I will  try that direction though.  Thanks.
Just a 48 year old carpenter.  No training. No school. Self taught at electronics and programming.  So yes, I'm out of my depth.
 

Offline guitchessTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #13 on: October 24, 2019, 05:53:39 pm »
Well here's V.3.  It feels a bit overkill to use an op amp for a precision diode, but unless I'm calculating wrong I would have to be pulling 3 amps  just to get over the voltage drop of a simple peak detector. 

I'm going to try to breadboard this up and find out if I have my head screwed on straight.  Feel free to let me know if you think is not. :D
Just a 48 year old carpenter.  No training. No school. Self taught at electronics and programming.  So yes, I'm out of my depth.
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #14 on: October 24, 2019, 07:02:51 pm »
As you are connecting drill, it likely produces wide band noise. And coupled through internal capacitance of ACS711, quite likely it can make IC go nuts. Hence I suggested placing ferrite beads. Using noise suppression capacitors might help as well.
On this particular topic: I used several models in the ACS series a few years ago during a study of brushed DC motors. Peak startup currents were on the order of 70A with sustained currents in the low 10's of amps - in other words, far more than the ~8 amps mentioned by the OP. If you want to talk about noise, I can post some amazing scope photos. There aren't many noisier "signals"!

The ACS devices worked flawlessly. They revealed an amazing amount of detail on the commutation as the brushes made and broke contact. Absolutely no "resetting", etc. If the current exceeded the range of the particular device its output would saturate, but when the current came back down the output signal would follow faithfully. The one caveat here is that the ACS's we were using did not have the "fault" output. They simply saturated as described. (The internal current path will sustain ~500% of the device's rated current so you can saturate them to some degree without damage.)

Based on my experience, I'd trust the ACS is working properly - unless the "fault" thing is the cause. There are standard versions without the fault output, and since it seems you don't care about the fault output anyway, why not use a similarly rated version without the fault feature? That would eliminate one possible source of the problem.

EDIT: Studying the functional diagram in the posted spec sheet, it's hard to see how latching the fault output would affect the analog signal path.
« Last Edit: October 24, 2019, 07:12:44 pm by IDEngineer »
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #15 on: October 24, 2019, 07:05:41 pm »
I got to wondering if the ACS711 was being upset by the magnetic flux(I'm a rookie, not sure what this is really called) of the relay, but yesterday I  tested without the jumper that leads to the MCU and it functioned no differently.
There are (internally) differential versions of the ACS family that eliminate sensitivity to external magnetic fields. The "standard" ones can be affected (since they are Hall devices). We encountered this phenomenon (relay coils causing a measurement offset) but switching to the (pin compatible) diff versions resolved it.
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #16 on: October 24, 2019, 07:17:39 pm »
With the blower motor that I tried this morning, there was no reaction from VIOUT when measuring DC but when measuring AC, the voltage was right on.
Huh? The ACS will give you an output voltage based on current flow, no matter if that current flow is AC or DC. It is not an AC coupled device. The version you're using is biased at 1/2 the supply rail so it can report current flowing in both directions, as you'd expect with AC, but it will report DC just fine. There are other unidirectional versions for pure DC applications, and they don't have the midpoint output bias, but the midpoint versions still report DC in either direction just fine.

"no reaction from VIOUT when measuring DC" doesn't make sense. Are you certain you were flowing some current when you performed this "DC" test?

EDIT: Up to the frequency limit of the device (looks like 100KHz from this spec sheet), an AC current should give you an AC output (into a pure resistive load, anyway  :)). This device does not "convert"  AC current into a DC representation - that implies filtering which this device does not do. There are versions that have a filter pin to which you can connect a capacitor for some first-order filtering, but this device has the fault output instead. Try running a (say) 10KHz sine wave through the ACS - what do you see on the output? It should be a 10KHz sine wave.
« Last Edit: October 24, 2019, 07:21:45 pm by IDEngineer »
 

Offline guitchessTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #17 on: October 24, 2019, 08:48:54 pm »
With the blower motor that I tried this morning, there was no reaction from VIOUT when measuring DC but when measuring AC, the voltage was right on.
Huh? The ACS will give you an output voltage based on current flow, no matter if that current flow is AC or DC. It is not an AC coupled device. The version you're using is biased at 1/2 the supply rail so it can report current flowing in both directions, as you'd expect with AC, but it will report DC just fine. There are other unidirectional versions for pure DC applications, and they don't have the midpoint output bias, but the midpoint versions still report DC in either direction just fine.

"no reaction from VIOUT when measuring DC" doesn't make sense. Are you certain you were flowing some current when you performed this "DC" test?

EDIT: Up to the frequency limit of the device (looks like 100KHz from this spec sheet), an AC current should give you an AC output (into a pure resistive load, anyway  :)). This device does not "convert"  AC current into a DC representation - that implies filtering which this device does not do. There are versions that have a filter pin to which you can connect a capacitor for some first-order filtering, but this device has the fault output instead. Try running a (say) 10KHz sine wave through the ACS - what do you see on the output? It should be a 10KHz sine wave.

First, thanks for replying. 

Second, I'm no longer sure of anything.  :/  After today's testing I only have more questions. 

You are correct that I should trust the device is working.  I took the time/effort/risk to change the IC only to get exactly the same results. 

I'm fairly certain that I'm passing current.  I can use the same set up with a DC motor and get perfect results.  I just haven't focused on DC current because I'm trying to switch an AC receptacle. 

I get an AC signal on my scope(small ebay kit unit).  A 60hz sine that varies in amplitude depending on amperage measured.  I has a DC offset of the 1.64v, which is Vcc/2.  Unfortunately, this shows my lack of knowledge/experience.  In V.3 I was trying to rectify that Sine wave into something usable.  I'm assuming that the DC offset is keeping the rectifier from working.  It's just voltage following the whole wave.

I'm sure by now I really showing my ignorance.  I'll keep studying.  Thanks again
« Last Edit: October 24, 2019, 08:50:48 pm by guitchess »
Just a 48 year old carpenter.  No training. No school. Self taught at electronics and programming.  So yes, I'm out of my depth.
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #18 on: October 25, 2019, 07:31:48 am »
Here's an idea: Switch to one of the unidirectional ACS parts. You'll magically get only one half of the AC waveform, which will effectively act as rectification with no extra parts. Then average that using a simple RC filter (if sufficient) or a higher order filter built with an opamp, and you'll have a "DC" level that indicates average AC current flow. That can be digitized by the A/D in the PIC and away you go.

In case you're wondering... yes, the ACS will still pass your normal AC current. The current sensing terminals are a direct shunt, no rectification or filtering occurs. But the unidirectional part will only "report" current in a single direction - classic single-diode rectification behavior. Follow it up with a filter and it's almost like building a small power supply.
 

Offline ZaphodBeeblebrox

  • Contributor
  • Posts: 23
  • Country: be
Re: ACS711 not outputing full voltage range.
« Reply #19 on: October 25, 2019, 05:33:17 pm »
Looking at your V3 schematics, I think you are overcomplicating things. I've used an ACS711 in the past as well, and the schematic was basically your V1, but without the extra capacitor on the output pin of the ACS711 (and as has been mentioned: the datasheet only allows for 1nF). The pullup on the \Fault pin should not interfere with correct functioning of this IC.

You also got me very confused when you talk about the AC versus DC thing. Could you connect a known current source to the IC and measure the output voltage with an oscilloscope and post the picture? And then the same again with a varying load (say a block wave of 1kHz or similar -- or 50 Hz sine wave if that is easier)? Note: measure this without attaching the output pin to the MCU.

Also, the LM358 you used does not have a rail-to-rail output, which is an issue if you want to use the full range of the ACS711.
 

Offline guitchessTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #20 on: October 26, 2019, 06:37:25 pm »
Here's an idea: Switch to one of the unidirectional ACS parts.

That's probably a good idea, but as I am a hobbyist and a cheapskate, I hate to spend more money on parts when there is no doubt a way to solve the issues.  What really bites is that when I went to research other available parts, I realized I paid twice as much as required.  I could have bought the 5v version and used a separate regulator cheaper than using this device which is the 3.3v version.


You'll magically get only one half of the AC waveform, which will effectively act as rectification with no extra parts. Then average that using a simple RC filter (if sufficient) or a higher order filter built with an opamp, and you'll have a "DC" level that indicates average AC current flow. That can be digitized by the A/D in the PIC and away you go.

Thanks.  It turns out that's exactly the solution I found, with some caveats.  (see next post)

Thanks again for your input.
« Last Edit: October 26, 2019, 07:45:29 pm by guitchess »
Just a 48 year old carpenter.  No training. No school. Self taught at electronics and programming.  So yes, I'm out of my depth.
 

Offline guitchessTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #21 on: October 26, 2019, 06:58:51 pm »
Looking at your V3 schematics, I think you are overcomplicating things. I've used an ACS711 in the past as well, and the schematic was basically your V1, but without the extra capacitor on the output pin of the ACS711 (and as has been mentioned: the datasheet only allows for 1nF). The pullup on the \Fault pin should not interfere with correct functioning of this IC.

That's exactly what I thought, especially after initial testing with DC.  The V1 circuit worked perfectly in those tests.  The issues came when I started testing AC.  Then those issues where compounded by me using a noisy drill as a testing subject. 


You also got me very confused when you talk about the AC versus DC thing. Could you connect a known current source to the IC and measure the output voltage with an oscilloscope and post the picture? And then the same again with a varying load (say a block wave of 1kHz or similar -- or 50 Hz sine wave if that is easier)? Note: measure this without attaching the output pin to the MCU.
It probably doesn't help that as a rookie, I'm probably not using/using incorrectly jargon that most consider basic.  My confusion came from expecting the same type of output from the ACS for both AC and DC. 

Also, the LM358 you used does not have a rail-to-rail output, which is an issue if you want to use the full range of the ACS711.
Yes, I'm just using it because I have a ton of them.  If I'm reading the datasheet properly, I'll lose .3v at the top and bottom from Vcc. 

Thanks for the reply.  Any input/advise is always welcome.




Just a 48 year old carpenter.  No training. No school. Self taught at electronics and programming.  So yes, I'm out of my depth.
 

Offline guitchessTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #22 on: October 26, 2019, 07:38:15 pm »
Ok, after some breadboarding, I have a V.3.1

First, I gave up on testing with the drill.  It still gives all sorts of weird results.  My primary test load is a fan and motor.  It draws about 2.4amps. 

Second, my inexperience kept me from being able to use the precision rectifier shown in V.3.  Please correct me if this is wrong, but I think the DC offset caused this.

The solution I have shown in V.3.1 comes from a simple high pass filter.  Based on the scope signal, it removes the DC offset and crudely rectifies the signal.  I've used a pot to GND so I can tune the voltage input to somewhat match the amperage of the test load. 

The LM358 still seems to be necessary as a buffer. 

Unfortunately, the voltage offset of the LM358 and the PIC keep me from being able to use the ACS to its full potential.  However, the "flaw" in the design may turn out to be a benefit, allowing me to set the minimum current allowed to trigger the relay. 

I've attached V.3.1. As usual, input is always welcome.
I realize there are still flaws(no base resistor).

Thanks
Just a 48 year old carpenter.  No training. No school. Self taught at electronics and programming.  So yes, I'm out of my depth.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: ACS711 not outputing full voltage range.
« Reply #23 on: October 26, 2019, 08:41:37 pm »
What a mess!

An LM358's output will only go up to about 1.8V with a Vcc of 3.3V, so it's not a lot of use.

All you really need to do is apply the ACS711's 1.65V output directly to the PICs ADC, and then detect when it changes from the 1.65V level. :)
.  That took much longer than I thought it would.
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: us
Re: ACS711 not outputing full voltage range.
« Reply #24 on: October 26, 2019, 10:10:50 pm »
All you really need to do is apply the ACS711's 1.65V output directly to the PICs ADC, and then detect when it changes from the 1.65V level. :)
Agreed, but I would still switch to the unidirectional ACS part. Doing so gives you two things: The inherent rectification I mentioned earlier, and a significant increase in useful dynamic range. The bidirectional part has a quiescent output bias of 1.65V. That means the bottom HALF of its dynamic range is essentially useless. The output of the unidirectional part goes from Gnd+0.5V to Supply-0.5V, and would only report on the positive half of your waveform. This nets you a huge increase in useful dynamic range and you can apply it directly to the analog input pin of the PIC.

Going unidirectional has a bunch of benefits. Why mess around with a pile of extra parts, and settle for design compromises, when a single part swap will address so many deficiencies using fewer parts for less money?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf