Electronics > Projects, Designs, and Technical Stuff
ACS711 not outputing full voltage range.
<< < (5/6) > >>
guitchess:

--- Quote from: IDEngineer on October 25, 2019, 07:31:48 am ---Here's an idea: Switch to one of the unidirectional ACS parts.

--- End quote ---

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.


--- Quote from: IDEngineer on October 25, 2019, 07:31:48 am ---
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.

--- End quote ---

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

Thanks again for your input.
guitchess:

--- Quote from: ZaphodBeeblebrox 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.

--- End quote ---

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. 


--- Quote from: ZaphodBeeblebrox on October 25, 2019, 05:33:17 pm ---
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.

--- End quote ---
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. 


--- Quote from: ZaphodBeeblebrox on October 25, 2019, 05:33:17 pm ---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.

--- End quote ---
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.




guitchess:
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
StillTrying:
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. :)
IDEngineer:

--- Quote from: StillTrying on October 26, 2019, 08:41:37 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. :)
--- End quote ---
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?
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod