Uncategorized

Simplest method to reliably detect small currents

Simplest method to reliably detect small currents

Ask QuestionAsked yesterdayActive yesterdayViewed 77 times0This question was migrated from Raspberry Pi Stack Exchange because it can be answered on Electrical Engineering Stack Exchange. Migrated yesterday.

I am trying to detect when there is a current in a given circuit using only a digital input and basic components (e.g. diodes, resisters, transistors); current is intermittent and power is small, 40-100mA @ 12V. I do not need to measure the current, simply know when it is present or not present.

I am trying to avoid additional chips e.g. INA219, optocouplers, etc. Is it possible to detect (again, not measure, only detect) current this way? Detection does not need to be rapid, within 100ms would be fine.

The load can have resistors, diodes, etc. in series or parallel. A voltage drop of up to 2 volts is fine. The power supply is stable around 12 volts and near the load. The digital input/output logic is 3.3V (Raspberry Pi); the presence of current would ideally be read as 3.3V (or at least 2) while the lack of current would ideally be read as 0V (or less than 2).

The important detail I forgot to mention is that the voltage source switches polarity. It is stable at 12 volts, but current can flow in either direction.gpiocurrentShareEditFollowFlagedited yesterdayasked yesterdaygrahmW1733 bronze badges

  • Interesting question, and I’m sure the answer is yes, but this doesn’t sound like a Pi specific question. – joan yesterday

  • Perhaps MAX4172. My Rpi4B with Python is using it to measure/detect 0~5mA diode current, so far so good. PS – But you need MAX4172 chip and its digital output Vo to detect current. – tlfong01 yesterday   

  • 2Pls specify tolerance to a lossless method of measurement (e.g. 700 mV or 50mV or 5mV?) and define current threshold value and tolerance. – Tony Stewart Sunnyskyguy EE75 yesterday
  • 2What specifically is the load that is taking the current? Can the load have a small series resistor inserted to the 0 volt end? Can that series resistor be permitted to drop about a volt when the 100 mA is present? What is the lower limit of current you wish to detect the presence of? How quickly do you want to detect the current? Is the power supply always 12 volts? If not, how can this change? What are the logic voltage levels for your digital input? How far away is the load from the 12 volt supply? How far away is the digital input from the load? – Andy aka yesterday 
  • “…less than 100mA @ 12V” – Not enough information. What is the minimum current that needs to be detected? _”current is intermittent” – What is the minimum period of this current draw that needs to be detected? What is the maximum acceptable voltage loss caused by the current detection? Does this 12V supply share a common ground with your Pi? – Bruce Abbott yesterday 

add a comment  |  show 2 more comments

2 Answers

ActiveOldestVotes0

If you are not critical on your output voltage I typically put a 2 diodes in series with the load on the low side and parallel them with a resistor maybe 10K depending on current. I then use a NPN transistor with the base connected to the load side of the diodes via a 300 ohm resistor and the emitter to ground. The collector is the output. Reverse and you can do the same on the high side. What happens when a load occurs the voltage drop across the resistors will reach the VF of the two diodes in series which is more than enough to turn on an NPN transistor. The diodes handle the current so they have to be sized appropriately. With the right transistor this can be accomplished with 1 diode but in either case you will be getting less then 12V.ShareEditFollowFlaganswered yesterdayGil28611 silver badge33 bronze badges

add a comment0

Requires 50% rated load

schematic

simulate this circuit – Schematic created using CircuitLab

A precision comparator is needed for low threshold currents TBD.ShareEditFollowFlagedited yesterdayanswered yesterdayTony Stewart Sunnyskyguy EE75100k22 gold badges3636 silver badges142142 bronze badgesadd a comment

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.