Author Topic: How to detect when a device is using more than 200mA ?  (Read 1907 times)

0 Members and 1 Guest are viewing this topic.

Offline tigrouTopic starter

  • Regular Contributor
  • *
  • Posts: 83
  • Country: be
How to detect when a device is using more than 200mA ?
« on: March 30, 2020, 11:36:56 pm »
I have a small portable outdoor camera. It is powered by 8 x AA batteries.
I would like to detect when the device is recording. It does not record all the time but only when something is near or when there is noise.
Using a multimeter, I found out that the device use approximately 200mA when it's recording (with a peak of 1-2A at start). Then (once recording session is done) it fall back to 0.00A (the best I could measure with the multimeter). It's probably below 1mA.

I have been thinking into using a current sense module like the ones based on MAX471 or ACS 712 to measure current and trigger something.

Is there a better or simpler way ? (eg : measuring voltage in a resistor using an opamp)
My ultimate goal is to output a +5V or +3V signal when device is recording.
The problem of the modules above is they produce a voltage which is a function of the current (eg : 100mv/A)
« Last Edit: March 30, 2020, 11:41:09 pm by tigrou »
 

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1158
  • Country: lt
Re: How to detect when a device is using more than 200mA ?
« Reply #1 on: March 31, 2020, 12:26:03 am »
I would use a rail to rail type comparator hooked to a voltage drop resistor, and reference set by potentiometer, but it needs some work and design. In some old electronics I have seen overcurrent protection made by winding copper wire on a reed switch, thus making a low voltage drop current activating relay. I wonder how low activating current can be achieved with reasonable amount of windings.

If you go for current sense resistor and some custom solution it may be useful to bypass a resistor with a reasonable size capacitor. It will reduce momentary voltage drop in case of high short startup current and also filter your circuit response a little. It depends how long are these high current pulses. Voltage drop should be minimized as possible to save energy and to not starve a camera when it wants to take high current.

Keep in mind that current used may change a little as batteries are getting discharged.
« Last Edit: March 31, 2020, 12:58:31 am by Manul »
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7184
  • Country: pl
Re: How to detect when a device is using more than 200mA ?
« Reply #2 on: March 31, 2020, 06:41:23 am »
Possibly the crudest and cheapest solution (if it works at all):

0.1Ω series resistor on the positive supply connection.
A TL071 opamp with inputs connected to the ends of that resistor. Be sure to use a real one, not rebranded LM358 :P
Using the offset null function you should be able to set detection threshold to a few mV, which corresponds to tens of mA.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13076
Re: How to detect when a device is using more than 200mA ?
« Reply #3 on: March 31, 2020, 06:56:55 am »
Wind a coil of magnet wire on a drinking straw as a former to give enough ampere turns to activate a reed switch. 
 

Offline tigrouTopic starter

  • Regular Contributor
  • *
  • Posts: 83
  • Country: be
Re: How to detect when a device is using more than 200mA ?
« Reply #4 on: March 31, 2020, 08:08:38 am »
Wind a coil of magnet wire on a drinking straw as a former to give enough ampere turns to activate a reed switch.

I like that solution (it's hard to make something simpler and it use no current at all). Since a reed switch usually need 10 and 100 AT to activate I will need lot of turns (50 to 500) for 200mA right ?
Also since the device is now connected to an inductor, it will limit current somehow (at least for a short time). Maybe it will prevent device operating correctly ?
« Last Edit: March 31, 2020, 08:17:01 am by tigrou »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13076
Re: How to detect when a device is using more than 200mA ?
« Reply #5 on: March 31, 2020, 09:04:50 am »
As the inductor doesn't have much iron in its core, its inductance will be fairly low.  Put a few hundred uF of decoupling on the load side of the sense coil.   A bigger problem is series resistance - due to the large startup current spike, its unlikely to tolerate more than a small fraction of an ohm so make sure that the gauge wire you use is thick enough.  Hint: Work out the approx. length for 200 turns then consult an AWG table!
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19918
  • Country: gb
  • 0999
Re: How to detect when a device is using more than 200mA ?
« Reply #6 on: March 31, 2020, 02:43:02 pm »
The reed switch idea might work. I don't see why there would be any need for additional capacitance, by the sounds of it, the camera already has large decoupling capacitors, hence the huge surge.

How sharp does the 5V pulse need to be? Here's a crude circuit I've used in the past to switch an LED on, when it senses current flowing through a small motor. I've replaced the LED with a zener diode to give just under 5V out. Another transistor and some resistors could be added to give some positive feedback, hysteresis and a better pulse shape.

* Current switch.asc (1.87 kB - downloaded 34 times.)
 

Offline tigrouTopic starter

  • Regular Contributor
  • *
  • Posts: 83
  • Country: be
Re: How to detect when a device is using more than 200mA ?
« Reply #7 on: April 01, 2020, 09:15:17 pm »
I just learned there is a device called reed relay which contains a reed switch with some winding around it.

If I can found one that can be activated with a current that is low enough, that sounds like a easy solution.
What is weird is there is two layers of copper wire on each side : one directly in contact with glass and one outside. Both seems to be separated by a thick layer.

@Zero999: I have a question related to your schematic : how much current does it draw when there is no load ? (or something very low like 500 µA)
« Last Edit: April 01, 2020, 09:28:33 pm by tigrou »
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7184
  • Country: pl
Re: How to detect when a device is using more than 200mA ?
« Reply #8 on: April 02, 2020, 05:58:00 am »
I just learned there is a device called reed relay which contains a reed switch with some winding around it.

If I can found one that can be activated with a current that is low enough, that sounds like a easy solution.
Be sure to also check if the coil's resistance is acceptable. This may prove problematic.

For the opamp solution, a TLC271/TS271 could be better with 10µA idle current. The shunt resistor would go to the negative terminal this time.
« Last Edit: April 02, 2020, 06:01:01 am by magic »
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16362
  • Country: za
Re: How to detect when a device is using more than 200mA ?
« Reply #9 on: April 02, 2020, 10:02:42 am »
Your sliced in half reed switch has an inner copper tape wound around the reed glass, which is used as an electromagnetic shield, so that the coil current does not affect the small signals going through the relay contacts. in many applications this is not needed, but as the hermetic reed relays typically are used to switch tiny signals, it is needed, so it is there.  Will be connected to the one pin that is also connected to the case, separate from both the reed contacts themselves and the coil windings.

https://docs.rs-online.com/de05/0900766b81498d86.pdf

Littelfuse reed relay with reasonable sensitivity, you will need 75 turns of wire  wound around the glass body, probably on a plastic former, to guarantee your 200mA will close it, but some might work with only 50 turns for 200mA, or with some and 75 turns you might only need 130ma to close the coil.  Drop out current, where the contacts open, will be around 100mA.

0,75mm enamelled wire there will be around 2m required, 7. 5 layers, around 2R resistance, which will be around 0.4v drop in your circuit..

https://docs.rs-online.com/e937/0900766b8129257e.pdf

Links for example only.
 

Offline exe

  • Supporter
  • ****
  • Posts: 2611
  • Country: nl
  • self-educated hobbyist
Re: How to detect when a device is using more than 200mA ?
« Reply #10 on: April 02, 2020, 10:50:32 am »
Afaik, there are hall-effect current sensors, but they are not very precise devices, and, I heard, may drift over time. I found this one in Google, but there are more: https://www.monolithicpower.com/en/documentview/productdocument/index/version/2/document_type/Datasheet/lang/en/sku/MCS1802/

As of reed relay, can parasitic inductance be a problem?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19918
  • Country: gb
  • 0999
Re: How to detect when a device is using more than 200mA ?
« Reply #11 on: April 02, 2020, 11:21:36 am »
I just learned there is a device called reed relay which contains a reed switch with some winding around it.

If I can found one that can be activated with a current that is low enough, that sounds like a easy solution.
Be sure to also check if the coil's resistance is acceptable. This may prove problematic.

For the opamp solution, a TLC271/TS271 could be better with 10µA idle current. The shunt resistor would go to the negative terminal this time.
The TLC271 no, the TS271 yes.
Afaik, there are hall-effect current sensors, but they are not very precise devices, and, I heard, may drift over time. I found this one in Google, but there are more: https://www.monolithicpower.com/en/documentview/productdocument/index/version/2/document_type/Datasheet/lang/en/sku/MCS1802/
I doubt accuracy is important.

Quote
As of reed relay, can parasitic inductance be a problem?
The camera probably already has lots of decoupling, so it might not be an issue.

I just learned there is a device called reed relay which contains a reed switch with some winding around it.

If I can found one that can be activated with a current that is low enough, that sounds like a easy solution.
What is weird is there is two layers of copper wire on each side : one directly in contact with glass and one outside. Both seems to be separated by a thick layer.

@Zero999: I have a question related to your schematic : how much current does it draw when there is no load ? (or something very low like 500 µA)
The standby current is equal to (V1-the voltage drops over D1 & D2) divided by R2 but, since the voltage drop across the diodes is quite small, they can be ignored giving just under V1/R2 = 12/100k = 120µA. R2 can be increased further to reduce the supply current more, but it will increase the sensitivity of the circuit, as less voltage will be dropped across the diodes and will reduce the base drive to Q1, so R3 will need to be increased, a lower current Zener used and it won't be able to drive such a low load impedance.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7184
  • Country: pl
Re: How to detect when a device is using more than 200mA ?
« Reply #12 on: April 02, 2020, 01:30:18 pm »
The TLC271 no, the TS271 yes.
What's the difference? I have never used the TI version but assumed they are about the same.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19918
  • Country: gb
  • 0999
Re: How to detect when a device is using more than 200mA ?
« Reply #13 on: April 02, 2020, 03:33:58 pm »
The TLC271 no, the TS271 yes.
What's the difference? I have never used the TI version but assumed they are about the same.
I was mistaken. I looked at the section of the data sheet for high bias current mode and neglected the rest. The TLC271 would be fine. :palm:

Anyway, an op-amp isn't ideal. If one wants to go down the IC route, a comparator should be used instead. The LMC7211 seems to be a suitable candidate.
https://www.ti.com/lit/ds/symlink/lmc7211-n.pdf
« Last Edit: April 02, 2020, 07:10:09 pm by Zero999 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf