Error loading component: com_tags, Component not found.

Luckily I haven’t repeated burning the IC again and have a working prototype since the last post! That’s the good news, but there is also some sort of bad news which I’ll go into later.

Getting past the enable circuitry

The main problem that I’ve been facing while trying to get the prototype working is pulling the enable pin on the boost IC up to Vbat, something which has been a challenge. The circuit I was trying to get working consisted of 3 N-Channel MOSFETs, and unfortunately it didn’t work how I needed, which resulted in the first boost IC burning out. So I started trying to swap out the N-Channel MOSFETs to something I had in my possession, NPN BJT transistors, however I quickly discovered this wasn’t working either. After a lot of head scratching, I asked members of my hackerspace for some help. The result was definitely useful, as it gave me a fallback in case I couldn’t get this working with a single IO pin, but also changed the way I started thinking.

So after some thinking, I tried with some PNP BJT transistors I had, I started to get something workable but would have preferred if they were MOSFETs as I felt they shouldn’t use a lot of current, luckily the member who drew up the schematic mentioned that there were some P-Channel MOSFETs available at the hackerspace. Another member messaged me privately offering to give me some that he had but I didn’t have a breakout board so initially declined, but he replied that he could make one for me. A few hours later and we met at a train station where he gave me the PCB he made with the components already populated.

When I got home that night, I set up the circuit and found sadly the BSS84 P-Channel MOSFETs didn’t give me the effect I needed at the low voltages, there was probably other MOSFETs which would have been suitable for the job, but I made the decision to just use the BJT transistors for the battery side circuitry. One thing I discovered when I was prototyping is that I couldn’t pull the base of the PNP responsible for holding the enable pin direct to ground as the voltage dipped too much most likely due to excessive current draw, but a 1K resistor solved that.

Integrating the parts for a proof of concept prototype

The other part of the battery side circuit is driving the microcontroller’s pin low so it can detect the button being pressed. When I tried the circuit, I noted that if the PNP transistor was in circuit, the voltage of the IO wasn’t at the 5V I had been expecting but at approximately 3.5V instead, a few attempts to rectify the problem didn’t result in a change, so I decided I had to test with a microcontroller. Using an ATTiny85 was possible, but decided to use an Arduino Duemilanove I had to quickly write a test program so I could see the state of the pin. The LED had a dull flicker to it when I powered up the project, which meant that the pin was dipping below the threshold needed to remain a logical high, something not exactly surprising as the power supply output does have some noise on it, partially thanks to the ‘poor’ design which I’ll touch on later.

To combat this, I used a debouncing routine on the microcontroller (a slightly better implementation will be used on the ATTiny) to measure the state of the pin every 5ms, and then use it to cause the pin to shut off completely if it was held low for a second. A little more code to add in handling for the neopixels as well as some proper battery holders and the first prototype was born!

I wanted to ensure that everything still worked at lower voltages, so I took the prototype together to CCHS and hooked up a variable power supply and started finding out some interesting things about my circuit.

Successful prototype but with small problems

The first thing that surprised me is it had to be around 1V to get the boost IC to start switching, higher than the 0.9V than I expected. The current draw from the power supply was pretty constant at 0.3A when the boost IC was working, even when I turned up the voltage to emulate another AAA cell. The other problem is that the microcontroller wasn’t behaving correctly and would stop functioning.

Unlike what I had thought, the output from the boost IC with the LEDs going through their sequence wasn’t 5V; the output was more like 3.6V with 2 AAA batteries, even less (3.2V) with a single AAA battery. The microcontroller was locking up possibly due to the low output voltage in the single AAA battery case as the battery discharged but not when there were 2 batteries. It also explains some of the strange behaviour I was getting when I had it connected to the power supply.

The question is how this problem was occurring; the theoretical answer turned out to be simple and originated back when I originally designed the breakout board for this chip. The reason why the answer is theoretical is that I haven’t gotten a chance to make a more integrated board yet which will allow me to test my theory, but feel this is the answer as there is a section dedicated in the TPS61027 datasheet about PCB layout consideration, which the current prototype isn’t following. Some of the problems are partially because it’s implemented in a breadboard but additionally due to some of the bad decisions I made when designing the breakout board, such as extremely thin traces (10 mil) which may have ended up thinner due to the etching process used to make the breakout board.

The next prototype most likely won’t be made professionally, but will be another etched PCB if I can manage it but include all the components I’m planning to use in the final revision of the board including the through hole tactile switches in addition to ports for programming, testing and still fitting in a bread board.

Moving forward to a product

One of the aims with this project is to be able to sell the boards after I complete the code and prototype, ensuring the end result is compact enough to fit in most costume projects. The end of this project is coming up soon enough, and it’s looking like I’ll be selling these boards for USD$9.95 but the price may change depending on how the next few prototypes go. If you’re interested in purchasing one of these boards, you can contact me either via email or twitter. I may do a limited run of cheaper boards depending on how many people contact me but for the moment I’ll be concentrating on getting this project wrapped up as soon as I can.

Full KiCAD files and code will be available at a later date, but for now the repository to keep an eye on is here. Hopefully next update won’t be in a month’s time as I have the parts coming shortly for the prototyping.