18650 Battery Shield Keep Alive Circuit

In a previous project for work I used a 18650 Battery Shield as a quick and easy way to add a battery to a semi portable controller. These shields were readily available and reasonably priced from Amazon allowing for quick shipping. Below is a photo of the shield that I used in my design:

Original 18650 Battery Shield

Now 9 months later I need to make up more controllers so I ordered more of the same 18650 battery shields from Amazon not thinking I would have any problems since the product image looked exactly like what I needed. I was wrong and instead received the “updated” version. Looking around it seems like it is very difficult to get the version I wanted shipped within a reasonable time frame.

New 18650 Battery Shield

There are a few differences between the two versions. The first difference is the pin header spacing and placement on the edges has changed. Not a problem since this will be going into a 3D printed case and I can use wires to connect it to the controller. Not exactly plug in and easy to assemble anymore but not worth the hassle of trying to source the original shield. The annoying difference is that on the old version the 5V rail was on all the time but the new version the user needs to press the button on the side to turn on the 5V rail and then it will only stay on if there is a load connected to the rail. This is an issue since the shield will be buried in a 3D printed enclosure with no way for the user to get to the switch. To solve this problem I designed the following circuit that ‘presses’ the switch if the 5V rail turns off.

18650 Keep Alive Schematic

Comparator U1 looks at the voltage on the 5V rail and the 3V3 rail. If the 5V rail voltage is lower then the 3V3 rail then the button needs to be pressed so the comparator output goes high which drives the N-channel MOSFET Q1. The pin of the tactile switch which has a voltage above ground is connected to the drain of the MOSFET so when the MOSFET is turned on it connects this trace to ground just like if the user was to press the tactile switch. The inputs to the comparators go through a divide by two voltage divider so that the input to the comparator never exceeds Vcc. The 3V3 rail is always on and the comparator is powered directly by the LiPo.

Wanting to get some experience milling PCBs with my CNC 3018 Pro Router I decided to manufacture these PCBs at home rather then send them out to a board house. The process was super easy and produced great results as shown in the photos below. Cutting the PCB to size has always been an area I struggle when making PCBs at home and I was super happy with how easy it was to use the mill to cut out the PCB shape. I will be using this technique for many future projects where I need only a handful of PCBs. I’m not going to go over the steps for milling a PCB here but for anyone interested here is an excellent forum post / tutorial that I followed: Milling PCBs with Cheap Chinese Desktop CNC Router.

After populating the PCB with all the necessary components I used a drop of hot glue to attach it to the battery shield and then connected it up using multi-strand wire. Now the 5V rail stays on with no load. The only issue I can see is a major hit to battery life since without a load the shield draws about 100mA. Reducing this current is easy and not something that I discovered until later. There is a large surface mount resistor on the edge with the 3V connections, see the photo below. Next to this is a unpopulated footprint for what looks like a 0805 resistor, this is a solder bridge. Cut the trace between the two solder pads and the current will go down to a few milliamps.

Cut solder bridge to reduce current consumption
18650 Keep Alive Installed

I have uploaded the design files to a GitHub repository for anyone interested: 18650_keep_alive.

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.