Simple DC current detector driving a LED? - Page 1
Forum section: electronics / projects

author: Dave92F1
author_rank: Contributor
timestamp: September 06, 2023, 07:56:04 pm
content: I'm looking for a simple circuit that will turn on a LED if more than about 400 mA at 5V is flowing to a device.This is a one-off for a personal project - lighting up a LED when an action camera is drawing enough USB power to be recording.I've looked at little at the datasheets for the TI INA201, INA300, and INA301 (all basically current-sensing opamps with a comparator), I"m not sure which if any are the best choice.Also I have some old LM339 comparators and 741 opamps in my parts box - maybe I could cobble up something from those (plus a shunt resistor and trim resistor).It doesn't need to be extremely accurate, temperature stable, or fast. I looked on eBay and AliExpress for a little premade PCB that'll do this, but without luck.Is there something off-the-shelf that'll do this? Or advice/suggestions for making my own?

author: SeanB
author_rank: Super Contributor
timestamp: September 06, 2023, 08:11:00 pm
content: Reed relay with a coil made from 22 SWG enamelled wire wound on the former. did that recently to make a current detector, using a old reed relay and doing the wire count using the test and see method, which came to around 22 turns of 18 SWG wire, recycled from an old common mode choke, to switch when 2A flowed through. Use a more senistive reed over the one I used, with around 10At sensitivity, so you would only need to wind around 25 turns on the reed to have it trigger reliably. Bit of a wide range in sensitivity on the small units, so you would need to fine tune it, or use a larger more controlled one, and a few more turns instead. BMW used it as a blown bulb detector unit for many years, on the older models, and had the relays, wound in a few cases with multiple coils, for things like indicators, with a few diodes and resistors, to drive a LED on the front panel.

author: Benta
author_rank: Super Contributor
timestamp: September 06, 2023, 08:22:28 pm
content: Yep, reed switch will work. Breaking apart a reed relay is perhaps a little brutal...See here as an example:https://www.littelfuse.com/products/magnetic-sensors-and-reed-switches/reed-switches.aspx

author: magic
author_rank: Super Contributor
timestamp: September 06, 2023, 08:31:52 pm
content: Quote from: Dave92F1 on September 06, 2023, 07:56:04 pmDivide the 5V to get ~40mV or so, adjustablePass camera current through 0.1Ω (on the negative side).Trigger the LM339 off of that.Limit LED current with a resistor.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: September 06, 2023, 08:41:52 pm
content: Quote from: Dave92F1 on September 06, 2023, 07:56:04 pmYou have not specified tolerated voltage drop, but USB power should be disturbed as little as possible.QuoteYes, see the above suggestion in #3. You want minimal sense drop.

author: ledtester
author_rank: Super Contributor
timestamp: September 06, 2023, 09:19:33 pm
content: A recent video on wrapping a coil around a reed switch to make a relay:How to make your own relay - DiodeGoneWildhttps://youtu.be/3wyDibjtgFM

author: Zero999
author_rank: Super Contributor
timestamp: September 06, 2023, 10:01:26 pm
content: Here's a circuit I've used in the past.It will drop about the same voltage as a diode, around 0.7V, which might be too much for a 5V powered circuit.A current relay might drop less, but it's a faff winding your own, as I've not seen any designed for such a low current.

author: Dave92F1
author_rank: Contributor
timestamp: September 06, 2023, 11:38:40 pm
content: Quote from: SeanB on September 06, 2023, 08:11:00 pmA really cool idea I didn't think of that at all. And I have dozens of small reed switches in my parts box, so I'll give it a try just for fun.What do you mean "on the former"? Just wind it around the glass envelope of the reed switch?

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 07, 2023, 12:30:30 am
content: He means wind the coil on a plastic former or bobbin. Reed switch goes in the center hole:

author: DavidAlfa
author_rank: Super Contributor
timestamp: September 07, 2023, 09:16:16 am
content: Still using jellybean parts you'll find anywhere, 100mV drop per amp. This might not work at all in real life, but simulates nicely.Not sure how the LM393 will handle 40mV, maybe a different op-amp or comparator will be needed.Replace D1 with a TL431 if you really want stability, the 1N4148 drifts quite a lot for a 30ºC difference.

author: ledtester
author_rank: Super Contributor
timestamp: September 07, 2023, 08:23:00 pm
content: This page has a couple of ideas for simple current detectors:https://www.raypcb.com/3-simple-current-detection-circuits/I translated the first idea to use high-side sensing and I found a pair of biasing resistors which very closely match the circuit in Reply 6 for a wide range of values of Rs (at least in simulation).The attached plot shows I(D2) vs. I(D3) -- ie. the currents through the LEDs vs. the load current. This graph seems to be independent of Rs.(Note: I used a formula for Imax so that it scales with Rs. Initially I used Imax=0.8/{Rs} but the graph didn't appear to change when you changed Rs. The int(5*...)/5 business is so that you'll actually see the graph change when you change Rs by a small amount.)

author: Zero999
author_rank: Super Contributor
timestamp: September 07, 2023, 08:33:51 pm
content: Skipping the Schottky and silicon diodes does simplify the circuit, but is it increases the voltage drop, especially once current exceeds the turn-on threshold.