I’m late again. Was working on the latest V3 prototype last night and suddenly it was 3 in the morning. Oops. At least I grabbed a shiny picture:
So, what makes this different from the previous versions? Well, pretty much everything. It’s largely the same circuitry, but everything’s been moved around and reorganized to fit better and have fewer traces having to go entirely across the PCB just to go back to where they started. There are a few changes, though.
First and foremost, I’ve decided to try and make a separate “PowerBoard” for the device. This consists of a boost-buck regulator instead of two separate regulators, plus an ATTiny84 to control it. The ATTiny84 has 11 GPIO pins, of which two are being used for I2C communication with the ESP8266, one is being used for monitoring battery voltage, and the last one is being used to control the voltage regulator. This leaves seven GPIO pins free to use for the device the PowerBoard is attached to. The V3 ties one of them to a button, to turn the power back on when that button is pressed. The ATTiny84 runs directly off of the battery power – or USB power if it’s available – so is, essentially, always on and monitoring the inputs. Its power consumption is fairly minimal, and will be minimized as much as possible. It’ll likely be put into a sleep state when the regulator is off, turning it back on when it’s awoken.
The PowerBoard being an I2C device does a few good things for the V3 board. First, as it monitors the battery voltage, the I2C ADC can be removed. That ADC was, roughly about the price of the ATTiny84. The single voltage regulator instead of two is also about even in terms of price. Additionally, since the PowerBoard is an I2C device and we’re not controlling the voltage regulator directly from the ESP8266, we’ve freed up a GPIO pin on the ESP. That has now been tied in to a transistor which controls the backlight, removing the need for the I2C Digital Potentiometer.
In addition to that, there’s the six unused GPIO pins from the ATTiny84 that are broken out, in addition to an ICSP header for programming said ATTiny84. In all, the 18-pin breakout header has pins for all three voltages: +5v USB power, +3.3V Regulated power, and the Battery raw voltage. The regulator can handle anything from 1.8 to 5.5v, making a LiPo battery perfectly suitable (Although I’d recommend adjusting the ATTiny84’s programming to not discharge it too much. And there’s no charging circuit). There’s also two ground pins, the ESP’s three SPI pins, the two I2C lines, the ESP’s ADC line (Which is linked to the buttons, but with the right resistors you can add more. Or you can read them from something else), and all seven of the PowerBoard’s GPIO pins. One of them is linked to the power button, but this can allow for an external wakeup from another device.
The PowerBoard also allows for a great deal of versatility in V3 design. If I wanted to make a LiPo powered V3, it would only require changing the battery and a different PowerBoard with a charging circuit included. If I decided to redesign with a more robust and powerful regulator, it would only require changing the PowerBoard.
I’ve ordered some prototype PCBs for the PowerBoard, which will let me test the voltage regulator circuit independent of the V3, and I’ve inquired into what would be necessary for manufacturing it. It may turn out to be too expensive to do in this fashion, but at the very least I’ll have the circuit tested and not have to worry about that on the V3.