Trying to power an Argon and Boron via NPN transistor

I’m attempting to control the power to an Argon/Boron via an NPN transistor. Basically, I have an atmega328 in deep sleep mode waiting for an input interrupt (which uses only 0.15μA). I then want to wake up an Argon/Boron, send a value over the UART, and shut it down. This is for a multi-year project that needs to run on battery.

In any case, I can’t get the Argon/Boron to boot when being controlled through an NPN transistor. I have the + battery connected to Li+, and the negative is going through the NPN transistor (being controlled by the atmega328). I totally removed the atmega328 and just have a breadboard with the Argon/Boron and the NPN transistor and it still won’t boot when ground is going through the transistor. It flashes green about 3 times, flashes white, and repeats. It’s like it’s doing some kind of check on boot which is failing so it’s in a boot loop.

I’ve used transistors many times to do this kind of thing, so I know what I’m doing, it’s just not working with the Argon/Boron. The transistor is a 2N2222 which is rated at 600mA.

BTW, the entire project does totally work when I use the EN pin to power down the Argon/Boron (using a PNP transistor). The problem is that the Argon uses about 30μA with this method, which while not bad, is WAY more than the 0.15μA I’d like the system to use when waiting for a trigger. So all the code is in place and working, and controlling the Argon/Boron with the EN pin does work, it just uses more power than I was planning and I’d like to totally shut the Argon/Boron down with the transistor instead of powering down with the EN pin.

Anyone doing something like this with some success?

A possible test would be to temporarily modify the Argon/Boron Code for Manual Mode (if it’s not already).
If they boot fine without turning on WiFi/Cell, then I’d guess the 600mA “rated” transistor can’t handle the surge ?


I usually don’t interrupt ground because it is the one net that needs to be consistent across all devices in your setup.
It is possible that the current surge generates a larger voltage drop on the BJT and messes up the levels.
I would use a PNP or a PFET on the 5V, or whatever you are using to power it.
Then pull down the base/gate through a resistor.

Hi, from 2N2222 datasheet:

Your VCE(sat) (voltage drop between Collector and Emitter) @500mA is 1.0V so when your LiPo provide just 3.7V maybe is not enough to power Boron/Argon correctly
The 600mA should be ok regarding to Boron datasheet:

but I worried that the voltage drop is too big

1 Like

Another shortcut I use is to design the system around the minimum voltage of the particular battery where it can still meet the Peak power requirements. For me, its much easier to always work with Power (Watts), since both Voltage and Current are both changing throughout the life of the primary battery. That also applies to rechargeable systems, at a much smaller timescale.

So depending on your battery, decide on the minimum Voltage that can still meet the Peak Power (from performance curves). Use that answer to calculate the actual Peak mA (will be higher than mA at nominal) to size the components for.
This method will also get you much closer to your “design/calculated” lifespan, realizing that remaining battery capacity is useless at SOC levels where the required peak power can’t be provided during Startup.

That’s what I was getting at. Ground is bouncing up from the drop on the BJT.
@teckel, I recommend interrupting the positive side of the supply instead of ground.


Thanks for the tips! I pulled an all-nighter on this to figure out a solution. I believe the issue is a big spike in current as it tries to come online. Playing with different resistor values connected to Base did provide positive results. I believe some of the problem is that I typically use a 2N2222 for controlling higher voltages, but in this case it’s a lower voltage (4.0v battery on the arduino side and 3.3v on the Argon/Boron side). Because of this, I needed to use a much lower ohm resistor connected to base than normal to get the transistor to fully open. Instead of 1k to 2.2k, the sweet spot was more like 220 ohms.

Long-term, I’m getting a different transistor that should work better for this situation. Thanks again to everyone, and if someone else is having a problem like this, try a 180-220 resistor, at least to get the project going till a better solution is figured out. BTW, I’m back to 0.1μA when sleeping, right where I need to be.

1 Like

@teckel You should read around in past posts how the Boron will stay awake and not reset even when totally power cycled on +5V in if you merely have the slightest leakage current by connection to your I/O pins. This has caused me tremendous frustration in the past and was a big part of my abandoning Boron for long-term intentions. Basically you need to use relays to mechanically isolate every single pin of your Boron during the OFF state in order to get stable behavior, is the impression that my past experiences here have provoked. Apparently if you use EN/RST in a very particular way you can get the desired effect, but I am warning you about switching 5V. I tried this in the past as a backup watchdog reset for when the Boron would enter permanent green-flashing disconnectivity states that would be instantly fixed with a power cycled. Turns out I only hastened the time before with Boron entered a permanent lockup state requiring manual intervention by trying to switch it on/off by +5V. And this was even using a physical relay watchdog to switch +5V, let alone a transistor. Expect extreme problems if you merely connect one single pin, such as UART RX, to the rest of your circuit.

I’ll avoid using so small resistors (180-220 ohm) in in a base circuit as you are so close to an absolute maximum rating even if datasheet indicate that this transistor can run @Ib=50mA but the question is for how long???
Here is a nice article transistors - 2N2222 Base Current Maximum Tolerance - Electrical Engineering Stack Exchange
Also your atmega328 (basicaly AVR) can sink or source 40mA per pin which indicate again that’s a bad bad idea !
I’ll prefer to go with @Pescatore idea to cutt-off power for Boron/Argon on +5V (or whatever the power is) if you really needs to go around 0.15μA during sleep and instead of mechanical relay you can use PFET or this funky SSR/optocoupler. In this case you will avoid any "Floating GND" for any of your I/O.

@Paul_M I’m not powering +5v or USB, I’m powering Li+. Also, I’ve already tested that it totally shuts down and it’s only pulling 0.1μA when sleeping. And I am isolating the other pins by setting them to input with internal pull-up resistor till I need to communicate. As the communication between then ATmega328 and the Argon/Boron go through a logic level converter, I need to also be sure there’s no power going to the LLC (till needed) as that would also use power. I’m using both a UART (RX/TX) and another control/monitor pin without issue by carefully controlling the pin state on the ATmega328.

@Rftop The project is in SEMI_AUTOMATIC mode, so it already boots, communicates with the ATmega328, and only after turns on the cellular/WiFi and communicates. I believe there’s a quick dip in voltage due to a power surge causing a brownout detector to be tripped, resulting in a boot loop.

1 Like

@teckel ,

I recently had to redesign the power control circuit for my carrier board as the high-side power switches (TPS22810) I was using are now out of stock till - basically - forever. I came up with a circuit you may want to consider using two P-MOSFETS as High-side switches and it seems to ba a good solution.

Hope this helps.



This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.