Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Current sensor too sensitive

Status
Not open for further replies.

lilimike

Member
I am trying to detect when a bilge pump is turned on. Based on the circuit bellow I have this current sensor (ACS756), its output is VCC/2 when no load and I get around 40mV/A as stated in the datasheet.
My goal is to trigger an I/O pin from a Raspberry Pi when the pump turns on and also when the pump turns off.
I've added a comparator with a voltage divider as reference voltage to give the the same VCC/2 and my circuit appears to be almost running.
The problem is or appear to be similar to a manual switch bouncing. or maybe the load is just barely enough to trigger the comparator. When the pump starts, the Raspberry Pi is responding with ON, ON, ON, ON (sometimes more) but I need to get only once ON and once OFF. Ive tried to feed the output of the comparator to a Schmitt Trigger chip but I still get the same result. Is there anything simple I can add to improve? I'm open to any other solution as well.
I don't have the actual pump, I am testing with a small 12 Volts motor powered by an external supply.
CurrentDet.JPG
 
Last edited:
Your comparator would benefit from having hysteresis. Also, supply decoupling, a cap across R8, and a star ground system might help.
 
Your comparator would benefit from having hysteresis.

Looking at page 15 Figure 50 from MC34071 datasheet I am having difficulty understanding what I have to do to add hysteresis.
Do I still need to apply my two 10k voltage divider at Vref and what would be the value of R1 and R2?
The output voltage of the current sensor is at 2.24V at no load. I have a voltage difference of +0.16V when the motor is ON
 
Try reducing R8. That would lower the Vref on the comparator thereby allowing the output of the current sensor to more positively exceed Vref.
 
Here's how you could add hysteresis:
AddingHysteresis.gif
R1,R3 and the 2k pot effectively make up the 'R1' shown in Fig 50 of the datasheet, with an effective value of ~5k.
Your 0.16V voltage shift is about 7% of the Vcc/2 voltage, so the hysteresis is chosen to be about 3%. Hence the effective 'R1' is about 3% of R2.
 
Try reducing R8. That would lower the Vref on the comparator thereby allowing the output of the current sensor to more positively exceed Vref.

I replaced R7 and R8 with a 10 turns 20K pot. With no load on the sensor I adjusted the pot until pin 6 turned on and marked that setting. I then had the motor ON and adjusted the pot the other way until pin 6 turned off. The difference was 3/4 turn. I then set the pot right in the middle of both measurements but that didn't help. I also tried variations within the window and still the same. I think Alec's suggestion by adding hysteresis should work because the motor consumes more current at start-up. I realized this because while doing the tests above I connected an LED at the output pin 6 and I saw it flickering. The thing is I can't figure out the values for R1 and R2.
 
Looks like our posts crossed :)
 
Status
Not open for further replies.

Latest threads

Back
Top