3
\$\begingroup\$

Background: I'm working on a circuit that uses an ATmega 328 processor, and a hall effect sensor. We're creating a small wireless sensor, so what we're focusing on now is power consumption. We want to seal a battery within the unit, but that means that our battery life starts as soon as the device is manufactured, rather than when a customer starts using it.

I've been thinking of a way to "turn on" the circuit when it's ready to be used. The obvious ways of "insert a battery" or "flip a switch" don't work as well, since the unit needs to be 100% sealed to protect against the environments it will be in.

My idea was to use the hall effect sensor to latch the processor's power on, so the first time it encounters a magnetic field, the circuit turns on. We're using an AH920 hall effect sensor, which provides a low signal when a magnetic field is present. From my research, all SCRs I found needed a high signal to latch on.

SCR Diagram

Question: Can you make an active low SCR? Since an SCR is just 2 transistors in a feedback loop, if you moved the Gate connection to the base of the PNP transistor (instead of NPN) would it still work the same?

The secondary question is, if I wanted to make an SCR with 2 transistors, instead of an IC, how can I tell how much current is consumed in the feedback loop that keeps both transistors on?

\$\endgroup\$
  • \$\begingroup\$ Yes you can with NPN base shunt to reduce sensitivity to PNP leakage current. How about a touch sensor toggle power switch from idle or sleep mode \$\endgroup\$ – Sunnyskyguy EE75 Jul 16 '18 at 19:50
  • 1
    \$\begingroup\$ A practical SCR using discrete transistors picked out at random will be a little more complicated, regardless of where you place the gate pin. \$\endgroup\$ – jonk Jul 16 '18 at 19:59
  • \$\begingroup\$ Note that an MCU typically cannot control its own power via a single inverting-type active semiconductor. To make that work, you need a non-inverting structure of two; otherwise the I/O protection diodes end up completing the path to turn it on. \$\endgroup\$ – Chris Stratton Jul 16 '18 at 22:03
2
\$\begingroup\$

You are chasing your own tail trying to add components to reduce the power consumption of the ATMega328P, it already has incredibly low power consumption when in a deep sleep state.

You should read the information here, Nick catalogues the various states and gives you a small sketch to test out each one.

You can get the current down to about 0.15uA which is well less than the self discharge rate of most of the batteries you might potentially use:

well

The leakage current of a P-FET (perhaps this) is likely in the order 0.5 uA and the typical Hall-effect sensor you might use (perhaps this) in the order of 0.5 - 1.0 uA for a total of probably more than 1 - 1.5 uA leakage just for your sensor logic.

One potential workable solution would be to put you MCU to deep sleep, and wake on a pin change. You could use a small reed relay if you wanted magnetic trigger ...or you could use a real switch (N.O. or N.C.) to trigger.

\$\endgroup\$
  • \$\begingroup\$ I might be able to do it with the hall effect connected to an interrupt pin. Deep sleep until signal seen. \$\endgroup\$ – Xyver Jul 20 '18 at 20:01
  • 1
    \$\begingroup\$ @Xyver The problem is as soon as you put a Hall Effect sensor in place your current budget will increase above what the ATMega will draw. IMO the lowest possible current budget would be a small reed relay to trigger the AVR awake. If you really want to get close to the self discharge rate of the battery (which would be the longest battery performance possible) then I don't see another way to go. \$\endgroup\$ – Jack Creasey Jul 20 '18 at 20:15
1
\$\begingroup\$

You want to find a better solution than the "SCR". The voltage drop across it causes too much potential loss of battery capacity due to the reduced voltage available to the load. Instead you should be considering a P-FET switch gets dynamically gets turned on when energy from the battery is needed.

The control structure around the P-FET can be the microcontroller that goes into low power sleep mode except when processing is required. Wake from sleep can be periodic via a timer or event driven from some changing signal. There are numerous MCUs that have very low power consumption in sleep mode and the software would turn off the P-FET to shut off power to rest on the circuit while asleep.

\$\endgroup\$
  • \$\begingroup\$ Yes, I noticed that as well (the SCR has a ~1V drop), so I was going to use the SCR to turn on a transistor, to activate the processor. Then there would only be a 0.2V drop (or less, one transistor I was looking at was 0.05V) We are using the sleep mode as well, thats one of the main power reducers in the circuit. \$\endgroup\$ – Xyver Jul 16 '18 at 20:22
  • \$\begingroup\$ Since you are already using sleep mode drop the SCR completely and just use the P-FET controlled from the mcu output pin. No need for the continuous current sink of the SCR. Also use the FET instead of a BJT. Base current in BJT is also wasted battery energy. \$\endgroup\$ – Michael Karas Jul 16 '18 at 20:43
  • \$\begingroup\$ I can imagine how to make it so that the PFET turns the rest of the circuit on and off when entering/exiting sleep mode, but how would I use it for the "first on" activation of the circuit? We're aiming for at least a year of battery life, and the way we have the sleep/awake cycles, the sleep portion still eats about 50% of power. So if the circuit was always asleep, it would still only last 1.5 years... \$\endgroup\$ – Xyver Jul 16 '18 at 21:22
  • 1
    \$\begingroup\$ @Xyver If you are looking for a year's operation and are already at 50% just sleeping, you need to take a close look at other MCU families which are FAR FAR superior in this regard. Have you already done so and rejected them for some reason? \$\endgroup\$ – jonk Jul 17 '18 at 4:44
  • \$\begingroup\$ @jonk I just started this project, my coworker designed the rest of the circuit. I'm pretty sure the atmega was chosen since its the same processor on arduinos, the other one I was researching and going to suggest was the Attiny. I need to look at the code to see if we can port it over. The calculations we've done are based on the microcontroller sleeping for 8 seconds, waking up to increment the watchdog, then sleeping again. This continues, and every 15 minutes the microcontroller reads the sensors, sends a signal to the base station, and goes back to sleep. \$\endgroup\$ – Xyver Jul 17 '18 at 17:43
0
\$\begingroup\$

I don't know if size is a concern, but if not too much, then you could incorporate a normally closed reed relais and store the circuit together with a magnet glued to it, to be removed when use starts.

\$\endgroup\$
  • 1
    \$\begingroup\$ What you are referring to is a reed switch. A reed relay would be that plus a coil, which is both unnecessary and unworkable here, since the coil would draw more power than permissible. \$\endgroup\$ – Chris Stratton Jul 16 '18 at 22:00
  • \$\begingroup\$ Yes, you're right, a reed switch. Then add a magnet, as I mentioned before, and let the buyer remove the magnet upon first use. \$\endgroup\$ – HarryH Jul 18 '18 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.