DigiBadge Mini Revision 2!
So, I’ve had some ideas for how to improve the DigiBadge Mini, but without a complete re-design. So, where the DigiBadge Mini was a re-named revision of the DigiBadge V2 (Hence the R1), the DigiBadge Mini R2 is a revision of the R1. There’s a bunch of changes, which I’ll go over below. Warning! This will get quite nerdy and in-depth! If you’re looking for the new shop information, you can just skip to the end.
Simply put, while running off of battery power is great and super convenient – Most of the battery life is wasted. Rough estimates say that’s only about 25% of the life of alkaline batteries! Additionally, the screen gets super dim fairly quickly as the battery voltage dips. So, I went with a voltage regulator.
The one I went with can put out up to 240mA at 3.3v, and can take input voltages of between 1.75v and 4.5v. This gives us two great thresholds.
First, 0.9v is generally regarded as “Dead” for a single alkaline cell, and with two cells you get 1.8v – So this can fully utilize the AAA batteries. While there is some efficiency loss – The datasheet indicates somewhere between 10-20% depending on input voltage. Even so, that still means we’re using significantly more of the battery than we were previously.
Second is the top end – 4.5v. As single-cell LiPo rechargeable batteries output between 3.0v and 4.2v depending on charge, this allows the DigiBadge to utilize LiPo batteries as well. This does risk the cell if the programming isn’t adjusted, as draining the LiPo below 3.0v will damage the battery, but someone wanting to modify their DigiBadge for LiPo use wouldn’t have a difficult time.
The voltage regulator will allow better use of the batteries, a consistently bright screen, and the potential to use LiPo batteries. This seems like a win all around, and was the primary addition I wanted to make to the R2. So, objective complete! But I had more ambitions.
The biggest personal issue that I had with the R1 was that the buttons were tiny and not super intuitive. People wanted to press down relative to the PCB, isntead of on the edge. They were also much smaller than I liked and were hard to press. It’s what I get for not thinking about scale when working zoomed in. So, I found some new ones. Some bigger ones.
Let’s compare. The current buttons are 3.5mm by 3mm by 1mm, with a button that measures 1.5mm by 1mm and sticks out 0.5mm. And the button itself is super close to the PCB, making it hard to press. The new buttons are 7mm by 2.5mm by 3.5mm, with a button that measures 3mm by 1.5mm and sticks out 1mm, and also has a 1mm gap between the bottom of the button and the pcb. And it’s a black button on a white/metal casing, so it sticks out more visually in addition to sticking out more physically as well.
This should make using the buttons a lot easier and more straightforward, which helps accessibility tremendously. With this, my two primary goals are complete with the R2. But I wanted more, so I kept going.
Hard Power Switch
I noticed that the batteries on stored R1s were dieing a lot quicker than I would have liked. That is, they were dieing within a few days or weeks, and not the months or years that they should have been. When I measured power consumption, even with everything turned off, the device was still taking about 1mA. While significantly reduced from the 35mA it can pull with everything going, this was still a few orders of magnitude above where the device should be with the ATMega in deep sleep.
I’m fairly sure the culprit is the TFT itself, as it never turns off when the device is in sleep mode – And making it turn off adds a lot more complexity and size to the code. And a 97% reduction in power consumption is still good for temporarily turning off, but for long-term storage I wanted an option to completely cut the power.
I revisited the power switch from the V2 and considered using it, but the way the leads were just took up way too much space. Conveniently, though, the company that makes it also makes one that has the leads go under the device. This is the one I used.
This will allow for the device to be turned completely off for long-term storage, which will greatly enhance battery life. But that wasn’t the end of the changes.
There have been two status LEDs added to the PCB – An orange light and a green-yellow light.
The Orange LED will turn on as long as the voltage regulator is outputting power. It’s a simple indicator that the device is on.
The Green-Yellow LED is controlled by a pin on the microcontroller. In the simplest mode, this means that it’ll be easy to tell that the microcontroller itself is working, but it also allows for more communication. I plan on turning it off when the microcontroller is in its deep sleep mode, letting the user know with a glance whether the device is fully off or only in sleep mode. Additionally, it can potentially be programmed to flash or blink at certain points, provided there is enough room in the code to do so.
That’s the last hardware addition, but there is one more change.
Re-arranging the pin headers
To fit everything how it needed to be, the FTDI header was rotated and placed next to the 2×8 pin header. Not terrible, and it still exists. But the 2×8 pin header itself has had some changes as well.
Because one of the pins was taken to controll the status LED, and another was taken to measure battery voltage, there were two empty spots. However, I quickly found use for these. First, I added the “Reset” pin to the 2×8 header, and re-arranged the pins to make the left-hand six pins an ICSP header. This makes initial programming of the devices much simpler for me, and I can build a fairly simple device to burn bootloaders this way. Second, I kept the voltage pin connected, as this allows for connecting of external power sources to go through the voltage regulator – Such as a LiPo battery. A few of the other pins were moved around as well, to make things easier to route with everything moved.
With all the hardware in place, there was only one thing left to do – Route the connections.
A 4-layer PCB
When routing everything, I ran into a problem: Lack of space. While there’s a decent amount of unused space on the board, this is underneath of the battery pack. As most of the issues with routing was from everything being crammed together, this couldn’t really be used easily.
So I sent a message to my manufacturer, asking about prices of 4-layer boards vs 2-layer. Obviously, they’re more expensive, but they’re really not too pricey. I decided to utilize a 4-layer board, having one of the internal planes be a 3.3v plane, the “Bottom” plane being used for SPI communication routing, the “Top” plane being used for most of the routing, and the other internal plane being used largely for connecting the 2×8 pin header. Of course, these aren’t hard rules, but it let me quickly and easily get the board routed without the hassle of re-routing every third trace because it was in the way of another trace… I got close a few times, but I’m fairly sure that ultimately it wasn’t possible.
So, the R2 will have bigger buttons, a voltage regulator, a power switch, and status LEDs on a 4-layer PCB. Sweet! Now, for the other news.
And a picture!
I’m setting up a Tindie Store!
Half of the reason I shut down my previous store was because the upkeep was… a pain. Managing the whole storefront, with frontend and backend, and running integration with things was just annoying. And then I had to have people find me, and it was just too much. Add on to this the fact that shipping things out sometimes took forever due to my day job, and… Well, it wasn’t great.
I recently thought about putting my stuff on Tindie. It’s an established marketplace, and someone else takes care of the backend. Sure, they take a little bit, but I also save time. I still have the issues with shipping, but I can be open and up front about that.
So with that said, I’m putting together a Tindie store. Stay tuned, as while it’s not ready yet, it should be soon!