Internet of Batteries: DEF CON 27 - "They don't support that"
BoI | Definition: Noun, Battery of Internets
Welcome to the Internet of Batteries: DEF CON 27 Edition! We've been told that the SAO standard "doesn't support" a battery back-powering the circuit on the VCC, which means we've done the most logical thing...Built a badge/SAO hybrid to support back-powering through it's pinout! While the badge is compatible with SAO 1.69bis, if plugged in to a DC27 badge it will most likely blow up the moon.
This project created a simple (and mostly-safe) battery badge which back/forward-powers any electronic badge & add-on via VCC pins, supplying a 500mA @ 3.3V while keeping track of how much power is drawn via back-powering and forward powering other badges and SAOs. This badge runs off of it's own power, and is able to operate as a standalone unit. To view power usage statistics users connect to the Captive ArcadeTM on the ESP32 to view local battery power consumption and discharge stats.
Additionally, there is a WiFi Mesh Network (Itero) which powers the IoB. Through this network you can send broadcast messages to one big group chat, or sent PMs to up to 25 added devices. To scan for available nodes in the area, add other batteries to your "friends" list, and interact with group & private chat, you will need to connect to the Captive ArcadeTM. When connected, "Friends" and scanned nodes will show green.
- Power switch ON to charge
- If LEDs flash on boot, boi is in safe mode, charge it
- BTN 1 on boot = force safe mode - faster charge
- BTN 1 + BTN 2 on boot = factory reset
- Orient VCC on headers
- Drink all the booze
- Hack all the things
- See you @DEFCON 28!
- Power switch must be in the ON position to charge
- If the battery voltage is TOO LOW, the LEDS will flash ONCE on reboot, then go dark and output current battery voltage on serial out (115200). Once above 3.7v the battery should show animation while charging if rebooted at that time
There are FIVE buttons on the DC27 version of the Internet of Batteries:
|RESET||This button is located on the BACK of the DEF CELL, under the battery next to the power switch||This resets the Boi|
|BTN 1||Cycle mode, 2x toggles Captive ArcadeTM||CLK 1 : Capacity -> Node Count -> Party!!!
DBL CLK 1 : Toggle Captive Arcade
|BTN 2||Toggles backpower on SAO rail on/off||Auto-off if voltage is detected going the wrong way across the SHUNT resistor|
|DEFLOCK||Stealth touch button where it says "DEF CON XXVII" in the white strip at the top of the battery.||Press and hold to cycle through and set light show for each mode|
|BONUS||Press and hold for a fun throwback, does not currently actually show capacity||boop booP boOP bOOP BOOP! BOOP! BOOP! BOOP!|
This is very important and will help to minimize blowing up like a Note in the sky
- Detect power on rails: If voltage on LiPoly is too low, FLASH LEDS ONCE and boot in to "Safe Mode"
- Button assignment :
- LED assignment :
LED_LEV20, LED_LEV40, LED_LEV60, LED_LEV80, LED_LEV100, LED_S_NODE, LED_S_BATT, LED_POUT_ON
- DNS setup
- WiFi setup
- Enable Captive ArcadeTM if no password is set
- React to user input
- If voltage across shunt changes direction, and BACKPOWER is ON, force power state to NO_BACKPOWER
<code><div> back: _____ ____|ESP32|____ --- |USB | |PWR | | |STFF|_____|STFF| | | SAO SAO | | |USB | | | Battery |~6.5cm | Goes | | | Here | | | INA219| | |SAO_SWITCH__SAO| | |_______________|--- |-----~3.5cm----| front: _____ ____|_____|____ | | | DEF CON XXIIV | | SAO SAO D | | BTN1 LED E | | L L LED F | | E E LED C | | D D LED E | | BTN2 LED L | | SHUNT L | |SAO_________SAO| </div>
How to flash new firmware
Note: We had to modify the libraries for the Adafruit INA219 and ASyncTCP in order to pull this off. Copies are provided in the source repo and should auto-import on build with PlatformIO
- Install VS Code
- Install PlatformIO...