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

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

--- End quote ---
Yes I know.   That's what happens when an old, uneducated redneck carpenter decides to step into the complex world of EE. 

For the purpose intended, the low rail cap is not important.  Since I'm feeding to a 3.3v PIC, I didn't really think I would need the headroom, especially considering the simple purpose of the circuit.  However, if that changes, I can always supply the 358 with a separate regulator, or even directly from the main supply.

Connecting directly is how I started.  With DC it works perfectly.  With AC, the PIC sees the DC offset, but does nothing with the amplitude change caused by more current.  My meter also sees it the same.  For some reason it did while testing with the drill, but 3 other AC loads have the same effect.  With this new circuit, it works with every AC load I've applied except the drill.  I'm at a loss on how to get the PIC to detect something I can't even see with the meter. 
guitchess:

--- Quote from: IDEngineer on October 26, 2019, 10:10:50 pm ---
--- 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?

--- End quote ---

What you have to keep in mind is that I am a hobbyist trying to recreate from scratch a device that I can buy commercially for $40-$50.  If I order a new part every time a super smart and more experienced engineer suggests, I'll have $50 in parts lying here with no project in mind.  Foolishly chosen or not, I will find a method to use what I already have, however inelegant that may be. 

I am not bucking what you've offered out of stubbornness, just merely expressing my state of mind. 

Also, my search on Digikey showed only a few unidirectional parts with similar specs and they were over $5 each(more than I have in the rest of the board).  They have a 5v version for $2.81, but since it would be feeding a 3.3v PIC it's really not much benefit. 

I have no optimistic delusions that I will port this to a commercial product and make a zillion dollars.  It will be made 3 or 4 times(probably still optimistic) for some fellow carpenters as an educational project for me and as gift for friends. 

As always, thank you and thank everyone for your input.   
StillTrying:

--- Quote from: IDEngineer on October 26, 2019, 10:10:50 pm ---The bidirectional part has a quiescent output bias of 1.65V. That means the bottom HALF of its dynamic range is essentially useless
--- End quote ---

Yes, with a +/- 25A ACS711 and an 8-bit ADC its resolution isn't going to be high, but maybe good enough for the OP's current level detection.
I'd get rid of the LM358.
For the AC current measurement I'd probably provide a set zero which averages and remembers the ~1.65V zero current level, and then averages lots of ADC values above and below the 1.65V zero level, which should give a binary value equivalent to 0.9x the RMS value of AC current.


--- Quote from: guitchess on October 27, 2019, 04:55:00 am ---It will be made 3 or 4 times(probably still optimistic) for some fellow carpenters as an educational project for me and as gift for friends.
--- End quote ---

Is it to switch on/off a dust collector. :)
guitchess:

--- Quote from: StillTrying on October 27, 2019, 10:10:35 am ---Is it to switch on/off a dust collector. :)

--- End quote ---

Yes it is.  At least switch a vacuum.  My friends don't have a dust collection system and mine has a startup spike that I'm fairly sure is more than this 711 can handle.  May give it a try though. I would also have to upgrade the relay.

I also have plans to use one to start a fume extractor when switching on my soldering iron.  I may go with a DC motor, however.

Thanks
ZaphodBeeblebrox:

--- Quote from: guitchess on October 26, 2019, 06:58:51 pm ---
--- 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. 

--- End quote ---

But AC is only DC that changes polarity? I'm assuming you are using a net frequency of 50 or 60 Hz, so from the point of view of the ACS, that is DC changing polarity - it should output more than Vcc/2 for the positive half, and equal that amount under Vcc/2 for the negative half.

You could then choose to calculate the RMS or quasi-peak value directly in hardware, or let the ADC of the MCU sample it and do some basic DSP'ing there. I don't thick you need a very high sample rate to get something working :)


--- Quote from: guitchess on October 26, 2019, 06:58:51 pm ---
--- 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. 

--- End quote ---

I'm afraid the actual value is worse: you'll only get as high as 3.5V (and that is pushing the limit), which means you lose 1.5V.

I really think you should remove the output cap of the ACS711 too. The datasheet mentions a maximum value. Since there is no real need to place a capacitor there anyway, why even put one there? Fewer components leads to fewer headaches  ;)

On another note, the difference you see between different loads could be due to RF currents being measured? This can be solved by placing a small capacitor right across the sense terminals of the ACS711 (something like X7R, 10 nF, 0603 would probably be a good start if this is the case). I have never seen this happen though (which does not mean it can't).
Navigation
Message Index
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod