HackerBox 0093: Badgelife
by HackerBoxes in Circuits > Wearables
4074 Views, 10 Favorites, 0 Comments
HackerBox 0093: Badgelife
Welcome to HackerBox 0093. Explore the artistic, interactive, and hackable world of badgelife. Assemble the wearable ESP8266-based IOT Wi-Fi Hacking Badge. Build an IOT G8R platform to serve as "mission control" for the IOT Badge. Leverage versatile alligator-clip interconnects from the IOT G8R to program and experiment with the IOT Badge. Dive into badge add-ons and build four different SAOs. Also assemble an SAO Totem to display your favorite SAOs. Flip out with some upside-down, reverse-mount LEDs. Discover why the Fast Fourier Transform (FFT) is considered, by many, to be the most important algorithm of all time.
HackerBox is the original monthly subscription box for electronics, computer technology, and hacker culture. Each HackerBox is a discovery box, which means all members await and enjoy a new surprise each month. Tech, toys, knowledge, and fun. It's like having a hacker convention, your birthday, and the first day of school - every month - right in your mailbox.
There is a wealth of information for current and prospective members in the HackerBoxes FAQ. Almost all of the non-technical support emails that we receive are already answered there, so we'd really appreciate it if you can take a few minutes to read the FAQ.
Supplies
This Instructable contains information for getting started with HackerBox 0093. The full box contents are listed on the product page for HackerBox 0093 where the box is also available for purchase while supplies last. If you would like to automatically receive a HackerBox like this right in your mailbox each month, you can subscribe at HackerBoxes.com and join the party. Subscribers save at least $15 every month and get each new HackerBox shipped immediately off of the production line.
A soldering iron, solder, and basic assembly tools are generally needed to work on the monthly HackerBox. A computer for running software tools is also required. Have a look at the HackerBox Workshops for tools and supplies along with a wide array of introductory activities and experiments.
The most import thing you will need is a sense of adventure, hacker spirit, patience, and curiosity. Building and experimenting with electronics, while very rewarding, can be tricky, challenging, and even frustrating at times. The goal is progress, not perfection. When you persist and enjoy the adventure, a great deal of satisfaction can be derived from this hobby. Take each step slowly, mind the details, and don't be afraid to ask for help.
WEAR SAFETY GLASSES WHEN SOLDERING, WHEN TRIMMING WIRE LEADS, OR WHEN CUTTING, DRILLING, ETC.
Badges Badges Badges
So what the hack is BADGELIFE?
If you've been to a hacker convention, are a HackerBox member, or are really into DIY electronic wearables, then you know very well the glorious spirt of badgelife. If not, then allow us to introduce you...
An electronic badge is nifty little gizmo, usually worn on a lanyard. As an expression of creativity, a badge may be beautifully artistic, technologically novel, interactive, hackable, or any combination thereof. Electronic badges evolved from the typical cardboard or plastic convention badges. You know, the type that are usually worn to gain access to a convention space. Later, official electronic "access badges" came to be joined by "unofficial badges" that are made and shared by participants of the convention. These are also known as indie badges. The movement to make, wear, trade, and sell these badges is what we call BADGELIFE.
To dive deeper into electronic conference badges, check out the Hackaday Badgelife Documentary or browse over 150 Hackaday articles related to badges.
Electronic conference badges were born and popularized at DEF CON and have spread to many other hacker conventions, maker events, and of course the workbenches of electronics hobbyists worldwide. Speaking of DEF CON, if you're at Hacker Summer Camp 2023, be sure to stop by the HackerBox table in the DC31 Vendor Room or keep an eye out for us hanging around at BSidesLV and Black Hat USA 2023.
Did you noticed that the lanyard in HackerBox 0093 features the quote cited as inspiration for DEF CON 31’s Official Theme?
"We are living through a revolt against the future. The future will prevail."
IOT Wi-Fi Hacking Badge
The IOT Wi-Fi Hacking Badge was designed by c0ldbru of rot13labs. It's a jumbo version of the ESP-12-F (ESP8266) module. It features an actual, functioning ESP-12-F module at its center with its terminals broken out to large alligator-clip-friendly pads around the edges of the badge.
The ESP8266 is a microcontroller (MCU) based on a Tensilica L106 32-bit RISC microprocessor core. It also features the usual array of MCU peripherals as well as a Wi-Fi radio. The badge includes five strapping resistors on the rear to support proper operation of the ESP8266 MCU.
The badge also comprises a Self-Flashing RGB LED powered by a CR2023 Coin Cell via a slide switch. The RGB LED, coin cell, and switch are completely isolated from the ESP8266 module. The ESP8266 and the LED circuit are not connected to each other.
ASSEMBLE THE IOT Wi-Fi HACKING BADGE
Populate the five 4.7K strapping resistors on the back of the badge. The resistors are marked with the value "472" meaning 4 then 7 followed by 2 zeros or 4700 ohms aka 4.7 kiloohms. Resistors are not polarized and can be oriented either way around.
Solder the Self-Flashing RGB LED onto the front of the badge.
- These RGB LEDs are actually three LEDs with an integrated control circuit. They are the ones with clear lenses. There are also LEDs with yellowish lenses (white light) and LEDs with red lenses. Do not use the yellow or red LEDs on this badge.
- Only one Self-Flashing RGB LED is used on this badge. Reserve the remainder of the strip of Self-Flashing RGB LEDs for use with the SAOs.
- The LED must be oriented correctly. Match the larger pad of the LED (cathode or negative) to the larger pad on the PCB. Note that the smaller pad (anode or positive) has a little plus symbol on the PCB.
Solder the coin cell clip and the slide switch onto the back side of the badge.
Solder the castellated ESP-12-F module onto the front of the badge.
IOT Wi-Fi G8R
The IOT Wi-Fi G8R is a flexible tool designed to support hardware hacking on various targets comprising microcontroller/microprocessor devices. The G8R platform provides various elements useful to program, and to interface with, an embedded target. For example, we're going to use it here with the IOT Wi-Fi Hacking Badge.
The name is inspired both by the alligator-clip pads and the 10+ foot chompy beast stalking the lake behind the designer's residence. In fact, HackerBoxes and rot13labs are both located in the natural habitat of these huge, majestic reptiles. Welcome to Florida. Click here and here if you dare.
ASSEMBLE THE IOT G8R Wi-Fi HACKING CONTROLLER
The two 10uF tantalum capacitors are polarized. There is a white box around one side of the PCB silkscreen for each capacitor. There is also a dark stripe on one side of each capacitor. Orient the capacitor such that the dark stripe goes inside the box.
The white square RGB LED is an addressable WS2812B device (often referred to as a NeoPixel). One corner of the LED has a triangle-shaped cutout. The device must be oriented such that the corner with the cutout matches up to the right angle marking (upper left corner) on the PCB silkscreen.
The LM1117 Linear Regulator "converts" the 5V supplied from the USB cord into 3.3V to power the ESP8266 etc. Note that the beefy metal tab will take a few extra seconds to heat up enough to melt solder. Don't cook your hand meat!
If you'd like the USB module to sit firmly and flat against the PCB, you may wish to remove the black plastic insulation from the header pins - after soldering the short ends of the pins to the USB module but before soldering the longer ends through the G8R PCB.
The five-way navigation switch only fits easily in one orientation - go with the Tao.
Programming the ESP8266
Install the Arduino IDE and configure the ESP8266 board support package. We suggest following the ESP8266 Board in Arduino IDE Tutorial from Random Nerd.
Hook up five jumper wires...
G8R --- Badge
3V3 VCC
GND GND
TX RXD0
RX TXD0
UP GPIO0
Connect USB power to the system.
The little blue LED on the actual ESP8266 module (not the bigger LED that we soldered onto the badge itself) should blink quickly a couple times.
- Run the Arduino IDE
- In the IDE, select Tools > Board > Generic 8266 Module
- Also select Tools > Port > (the USB port connected to the CH340E serial module)
Load up the Blink.ino example sketch:
File > Examples > Basics > Blink
In the sketch, change "LED_BUILTIN" to "2" in three separate places.
Remove power to the target - either by unplugging the USB cable or by opening the 3V3/VCC clip jumper.
Hold the five-way switch in the up position while powering back on. This grounds GPIO0 which forces the MCU to restart in bootloader mode where it is ready to accept a firmware upload.
Compile and upload the sketch from the IDE.
Cycle the power again (this time without grounding GPIO0).
The little blue LED should now continuous blink on and off - slowly, which indicates that the blink sketch is now running on the MCU.
FULL G8R DEMO CODE
Download the g8r_demo.ino sketch attached here.
From the IDE menu, use Tools > Manage Libraries to search for and install these two libraries:
- Adafruit NeoPixel
- ss_oled by Larry Bank
Hook up five additional jumper wires (leave the previous five connected as well)...
G8R --- Badge
SDA GPIO4
SCL GPIO5
LED GPIO2
LEFT GPIO12
RIGHT GPIO13
Compile and upload the g8r_demo.ino sketch remembering to put the ESP8266 into bootloader mode by powering the target on while holding the five-way switch in the up position to ground GPIO0 and then cycling the power again after the upload completes.
ARKANOID GAME
This is a fun demo that we use in the HackerBox Core Workshop.
First, download the esp8266noid.ino sketch attached here.
From the IDE menu, use Tools > Manage Libraries to search for and install the "ssd1306" library by Alexey Dynda.
Leave the jumper wires as configured for the g8r_demo.ino sketch.
Compile and upload using the same bootloader process as before.
MORE ESP8266 PROJECTS TO EXPLORE
WiFi Hacking CTF from Cyber Weapons Lab
ESP8266 Deauther from Spacehuhn
Packet Monitor by AlexLynd
Ask your search engine for "8266 OLED" or similar search terms to find even more.
Badge Add-Ons
Introducing the Badge Add-On from Brian Benchoff explains the SAO concept for putting small PCB badges onto regular-sized PCB badges. Basically, SAOs are little badges that we can add-on to our conference badges. The SAO "standard" employs a simple 2x3 pin header connection and "is supported by tens of thousands of badges, and all of the people who are spending their free time designing electronic conference badges are using this standard."
Dig into the link to Brian's introduction to get a history of SAOs. You can also check out the video Design an SAO in KiCAD by Alex Glow, Simple Add-Ons (SAO) by Twinkle Twinkie, and the Box Guide from HackerBox 0068 which includes interview questions with the designers of some very popular SAOs.
HackerBox SAO Totem
SAOs generally plug onto a badge and the badge provides the power supply for the SAO.
But for added SAO fun-time, some badgelifers make SAO Totems. A totem is sort of a badge, but with the specific purpose of simply displaying one or more SAOs. Totems give an SAO a connector where it can sit and hang out and often provide power to light-up the SAOs. Since totems are usually powered by a little coin cell, they're not generally useful for power-hungry options like the Wi-Fi SAO from HackerBox 0068.
ASSEMBLE THE HACKERBOX SAO TOTEM
The HackerBox SAO Totem supports a vertical stack-up of three SAOs.
Solder the coin cell clip and the slide switch onto the back side of the totem.
Solder the three female SAO headers onto the front of the totem. For each one, make sure the keying block is oriented upward towards the lanyard hole.
Sometimes, the six holes in the SAO headers are very tight to start with. It is a good idea to jam a set of male header pins into the connector four or five times to loosen the plastic a little. This helps to prevent an overly-grabby SAO port from ripping the connector from the back of an SAOs while it is being unplugged. SAOs should sit securely on an SAO header but should also slide on and off smoothly and without too much fuss.
Trippie the Space Sloth SAO
Check out the video on How to Solder the Atomic SAO. The Space Sloth SAO uses exactly the same procedure except it has only one LED instead of three.
Solder the 2x6 header to the back of the SAO. Start by tinning one of the pads (usually a corner pad) and while it is molten, slide the header into position correcting both directions and the rotation of the header. Next, solder the other five pads and finally return to the first pad. At each pad, apply enough heat and solder so that the pad and the pin are both entirely flowed over with solder including solder wicking into the space between the pad and the pin. It is important to get a good flow onto all six pads and all six pins (but without shorting between them, of course) in order establish the mechanical stability of the connector. You can see how this should look on the next image down.
Position the vinyl overlay onto the front of the SAO. The overlay is about 1mm shy of each edge all the way around.
Pop two holes in the vinyl for the LED leads. This is easiest to do using the LED itself. From the rear of the SAO, put the long lead through each hole (one at a time) just far enough to puncture the vinyl.
Insert the LED into the SAO. Bring the LED around to the front of the SAO and push the LED leads into the holes created the vinyl. Make sure to place the LONG PIN and the SHORT PIN of the LED into the holes as indicated by the silkscreen markings. Push the LED all the way down until the whitish lens of the LED is sitting against the vinyl. Double check the long/sort orientation one more time!
Solder the LED leads. This is done from the rear of the SAO. Be sure solder flows down into the PCB holes and around each pin of the LED without letting the pins short together. Trim the leads down near the PCB.
Trippie The Space Sloth is now ready for flight... Godspeed Trippie... One small step for sloth, one giant leap for slothkind... Not because it is easy, but because it is hard.
SAOs With Reverse-Mount LEDs
Watch the Artemis SAO Video for details on soldering these SAOs.
The BitHead, Guy Fawkes, and Artemis Mission SAOs all use the same type of upside-down, surface-mount LEDs for a backlit effect.
These SAOs use our custom 2835 sized SMD footprint. The footprint has a central void in the solder-mask between the two terminals. The solder-mask is removed on both surfaces of the PCB so that light can shine through from the back to the front.
We have three different "colors" of 2835 SMD LEDs:
- Phosphor Converted Red (PC Red)
- White (lens is yellowish)
- Self-Flashing RGB (lens is clear)
Check out the SAO Totem image to see the Guy Fawkes SAO featured with all three different LED "colors". The top one is flashing different RGB colors.
KEEP ONE of the RGB LEDs for the IOT Wi-Fi Hacking Badge if you haven't made that one yet.
Current Limiting Resistance:
- Red: 56 Ohm
- White: 56 Ohm
- RGB: 0 Ohm (short)
Because they require different resistances, do not mix the self-flashing LEDs with the other LEDs on the same SAO.
Suggested Default LED Colors:
- BitHead SAO: Two RGB LEDS, 0 Ohm (short) resistor
- Guy Fawkes SAO: Two White LEDs, 56 Ohm resistor
- Artemis Mission SAO: One Red LED, 56 Ohm resistor
ASSEMBLE EACH SAO
Solder the 2x6 header to the back of the SAO. Follow the notes provided above for Trippie the Space Sloth.
Select and solder the correct resistance. Based on the LED color you select, solder either a 56 Ohm resistor or a short (zero ohms) into place on the back of the SAO. As usual, the resistor can be positioned in either orientation. The 0 Ohm resistance can be created using either a tiny piece of wire trim (probably sitting around your workbench) or by using a blob of solder shorted across both resistor pads of the PCB.
Solder the LED(s). Working one at a time, place each LED FACE DOWN onto the back side of the SAO. Note that the back of the LED has two metal contacts. One is larger and one is smaller. Also, one side the LED footprint has a "LARGE" marking on the PCB silkscreen. The larger contact of the LED needs to be positioned adjacent to the pad marked "LARGE". Once the LED is in place, solder can be applied between the LED contact and the adjacent PCB pad. It will take a little bit more solder than usual since there must be enough solder for the connection to flow from the pad up onto the contact of the LED as shown in the image.
Repeat until complete, and then... GIVE ME FUEL. GIVE ME FIRE. We're going back!
The Most Important Algorithm of All Time
The Fast Fourier Transform (FFT) is widely used in engineering, music, science, and mathematics. The basic idea was popularized in 1965, but some algorithms had been derived as early as 1805. In 1994, Gilbert Strang described the FFT as "the most important numerical algorithm of our lifetime", and it was included in Top 10 Algorithms of 20th Century by the IEEE magazine Computing in Science & Engineering. (Wikipedia)
But what is the Fourier Transform? from 3Blue1Brown
Hack the Planet
We hope you are enjoying this month's HackerBox adventure into electronics, computer technology, and hacker culture. Reach out and share your success in the comments below or on other social media. Email support@hackerboxes.com anytime with questions or whenever you need some help.
Want more? Surf over to HackerBoxes.com and join us as a monthly HackerBox subscription member. You'll get a cool box of hackable gear delivered right to your mailbox every month and you'll enjoy a generous member discount.
Please consider sharing this free Instructable with others who may be interested in learning about these subjects. We really appreciate your support and "word of mouth advertising" is the greatest compliment that we can receive.