AdaBox 007
2018-07-11 | By Adafruit Industries
License: See Original Project AdaBox
Courtesy of Adafuit
Guide by Lady Ada
Introduction
Hi there!
If you're looking to subscribe to AdaBox, click here!
If you're here, it's because you were given the gift of electronics with an AdaBox! You are a beginner who is getting started with your AdaBox or you just want to relive what it's like being a beginner at electronics again. But most of all, you want to learn how to build and make stuff with electronics! (If, rather than learn electronics, you'd like to look at pictures of cats instead, please check https://www.adafruit.com/galleries/cats-of-engineering)
And, you're in luck: there's never been a better time.
Gone are the days where you need thousands of dollars of equipment and lots of physics/math background. Nowadays, if you want to learn to work with electronics, you can jump right in for $100 or less, and any sort of computer. And we're talking about learning a lot of electronics - from the basics of analog to the complexities of firmware. With a good pack of parts, you can build a base of knowledge that will take you from your first blinking LED to someone who can start prototyping and inventing custom products.
Who is this for?
Anyone who is interested in learning how to program and access to a modern web browser. That's pretty much the minimum. Remember, this guide is specifically for people who have purchased or received an AdaBox subscription!
You don't need to know a lot of physics or math, and just like an Art Degree isn't required for making art and being creative, you don't need to have a computer science degree. It helps if you're comfortable using computers but that's a skill most people pick up through life.
If you know how to program already - great! If not, don't worry, we'll teach you enough to be dangerous.
Who isn't this for?
While you can follow along without an AdaBox, it will not make as much sense unless you have all of the components and more which either came as a gift or purchased yourself - remember, the goal is helping beginners!
If you're an expert, please visit our hundreds of other tutorials and jump right in at learn.adafruit.com.
Who are you?
Great question. This is me:
I'm Ladyada, and I love to teach people how to build stuff and how they can be creative with technology.
So, are you ready?
Let's do this thing!
Want to buy past AdaBoxes?
- AdaBox001 - Welcome to the Feather Ecosystem
- AdaBox002 – Making Things Move
- AdaBox003 – The World of IoT – Curated by Digi-Key
- AdaBox004 – Making Things Dance
- AdaBox005 – Break for Pi
- AdaBox006 – CircuitPython
Unboxing AdaBox 007
"This is our world now... the world of the electron and the switch, the beauty of the baud." - The Mentor, The Hacker's Manifesto
"HACK THE PLANET!" - Zero Cool, HACKERS
With previous ADABOXes, you've built robots and radios, learned CircuitPython and played retro games. Now you're ready to learn about the dark arts of electronics - this ADABOX is Super Sneaky with a Secret + Spy + Security theme.
Everything in this box will teach you stuff they don't want you to know!
We wanted to bring you the full experience of being a super hacker spy, but without having to hang upside-down from a helicopter, or break into MegaCorp's skyscraper headquarters at 2 AM.
You'll use your brains and hands to solve puzzles, send secret messages, break locks, and listen in on the radio waves around you. Then build some electronic projects that will teach you about security while having some fun. You'll learn how real hackers and security experts work, and at the same time how to protect yourself from spying eyes.
Kit Contents
Large Clear Padlock and Complete Lockpick Kit - Learn about the inner workings of locks with this clear 6-pin pin-tumbler padlock. It will help you get a feel for opening locks without the key.
This lockpick set includes a number of hook picks and diamond picks, a ripple rake for side-dimple locks, as well as two tensioners for turning the cylinder as you lift the pins until - CLICK - you've picked open your first lock!
Software Defined Radio Receiver USB Stick - If you've ever been curious about software defined radio (SDR), this USB stick is the easiest way possible to have fun with a powerful, configurable receiver. Packed with the powerful RTL2832U and R820T tuner, it can tune into signals from 24MHz to 1850MHz. That means you can use a computer (with Windows, Mac, or Linux) to tune into FM Radio, AM signals (but not AM broadcast radio), CW (Morse code!), unencrypted radio signals (such as those used by many police and fire departments), POCSAG pagers, and more.
Adafruit GEMMA M0 - The Adafruit Gemma M0 is a super small microcontroller board, with just enough built-in to create many simple projects. It may look small and cute: round, about the size of a quarter, with friendly alligator-clip sew pads. But do not be fooled! The Gemma M0 is incredibly powerful!
USB cable - 6" A/MicroB - This here is your standard A-micro B USB cable. Perfect for connecting your Gemma M0 to your computer in order to program it. We had these made to our specifications, available in Adafruit Black Approximately 6.5" long from end to end, it's a little more compact than the typical cable -- perfect for the discrete connections you want when you create the Fowl Foul or Mouse Jiggler projects!
Invisible Ink Pen and 5mm UVA LED - Ultraviolet marker pens use ink which lacks color pigment, so it doesn't leave a mark visible to the naked eye under normal lighting conditions. However, when illuminated with a UV light source (sometimes called a blacklight), it fluoresces brightly. This is easiest to see in dim lighting conditions.
The LED emits UV 'blacklight' in the UVA spectrum so it's great for projects with fluorescent materials referred to as UV/blacklight-reactive or 'glow-in-the-dark'. They are bright (350mcd) and have about a 20-degree LED beam.
Please note the UV is clear when not lit and is 'loose' in the large plastic baggie, not to be confused with the blue-ish Infrared (IR) LED!
3 x AAA Battery Holder with On/Off Switch and 2-Pin JST - This battery holder connects 3 AAA batteries together in series for powering all kinds of projects. We spec'd these out because the box is slim, and 3 AAA's add up to about 3.3-4.5V, a very similar range to Lithium Ion/polymer (Li-Ion) batteries, and they have an on-off switch. That makes them ideal for use with 3.3V projects that have a 2-pin JST connector meant for one of our Li-Ion/Poly batteries.
Alkaline AAA batteries - Battery power for your portable project!
These batteries are Alkaline (MnO2) chemistry, with a voltage range of 1.6V (fresh) to 0.8V (dead). The mAh capacity depends on discharge usage but at 25mA rate it is 1200mAh Use them to power your portable Gemma M0 projects!
Fast Vibration Sensor Switch (Easy to trigger) - The "poor man's" accelerometer/motion sensor! These spring-vibration switches are high sensitivity non-directional vibration induced trigger switches. Inside is a very soft spring coiled around a long metal pin. When the switch is moved, the spring touches the center pole to make contact. So, when there's motion, the two pins will act like a closed switch. When everything is still, the switch is open. Great for basic projects and wearables!
Piezo Buzzer - Piezo buzzers are used for making beeps, tones, and alerts. This one is petite but loud! Drive it with 3-30V peak-to-peak square wave. To use, connect one pin to ground (either one) and the other pin to a square wave out from a timer or microcontroller. For the loudest tones, stay around 4 KHz, but works quite well from 2KHz to 10KHz. For extra loudness, you can connect both pins to a microcontroller and swap which pin is high or low ('differential drive') for double the volume.
Panel Mount 10K Potentiometer - This potentiometer is a two-in-one, good in a breadboard or with a panel. It's a fairly standard linear taper 10K ohm potentiometer, with a grippy shaft. It's smooth and easy to turn, but not so loose that it will shift on its own. We like this one because the legs are 0.2" apart with pin-points, so you can plug it into a breadboard or perfboard. Once you're done prototyping, you can drill a hole into your project box and mount the potentiometer that way.
Potentiometer Knob - Soft Touch T18 - Red - This 'soft touch' T18 knob that works great with our Panel Mount 10K potentiometer. The knob is designed to set directly on the potentiometer's ridges so it's an easy & secure fit. It has a nice feel, with a rubbery grip, tweaking it is quite fulfilling.
Woven Metallic Fabric - This woven conductive fabric is silver colored and made of Copper+Nickel-plated nylon. Use small pieces for soft switches, plush keypads, capacitive touch sensors, and other textile interfaces. This highly conductive fabric has a resistance of less than 1 ohm per foot in any direction across the textile.
IR (Infrared) Receiver Sensor - IR sensor tuned to 38KHz, perfect for receiving commands from a TV remote control. Runs from 3V to 5V so it's great for any microcontroller.
Super-bright 5mm IR LED - 940nm - Infrared LEDs are used for remote controls (they're the little LED in the part you point at your TV) and 'night-vision' cameras, and these little blue guys are high powered ones! They are 940nm wavelength, which is what nearly all devices listen to. They're 20-degree beamwidth and work great for any kind of remote control application.
Please note the IR LED is blue-ish even when not lit and is in a mini bag, not to be confused with the clear UV LED!
Enameled Copper Magnet Wire - For winding custom coils, or very fine-pitch rework, we always reach for magnet wire. Magnet wire is very very thin (0.1mm diameter!) copper wire with a very thin layer of insulation. It's used for a range of electronics, hacking and making applications. Commonly these are used for winding transformers, inductors, motor or solenoid coils, speakers, hard disk head actuators, electromagnets, pickups, among other things. However, this wire is also really good for when you have to do PCB repair, jumper wires, or solder directly to SMT pads.
2N7000 Transistor - this component may be 'loose' in the large plastic bag
Other Contents
- Machine Screw Kit -- M3 x 8mm screws and nuts
- Digi-Key Digi-Keyer Puzzle (Subscribers Only!)
- Digi-Key Web Cam Cover (Subscribers Only!)
- EFF Multisticker Sheet (Subscribers Only!)
- 2600 Magazine: The Hacker Quarterly (Subscribers Only!)
- HackSpace Magazine (Subscribers Only!)
- Boldport Club CAD Sticker (Subscribers Only!)
- Blinka Temporary Tattoo (Subscribers Only!)
Projects
Now that we've seen what's inside, let's start making things!
Lock Picking Primer
Included with AdaBox 007 is a clear practice lock and a set of pin tumbler lock picks and tensioners. You can learn how a typical pin tumbler lock works, and then practice opening them without keys!
Check your local ordinances before picking any locks outside of the comfort of your own home. Never pick a lock that isn't yours or for which you haven't gotten permission from the owner
Pin Tumbler in Action
Here's a quick look at the clear lock in action with a key, and then being picked one pin at a time. This lock has six pin stacks, each comprised of a key pin on the bottom and a driver pin on the top. For the cylinder to turn and the lock to open, each key pin must be raised to the point where the driver pin is lifted just above the "shear line" that separates the cylinder from the lock housing. Once each stack is lifted to the proper height, the cylinder is free to turn, opening the lock.
Larger Look
Here's a bigger (much bigger) look at a demonstration pin tumbler in action, being picked open with a comically large tensioner and hook pick.
Greater Depth
If you want to see more details, check out this episode of John Park's Workshop!
Next Steps
There are lots and lots of great resources online for learning to pick locks, as well as many events you can attend to learn from people, such as TOOOL, (The Open Organization of Lockpickers).
For example, here's a really good introductory slide deck on picking from TOOOL.
Have a look at that deck and start practicing to hone your lock picking skills!
As you get deeper into lockpicking as a hobby, an excellent YouTube channel to check out is lock picker extraordinaire Bosnian Bill.
A fun related hobby is making your own lock picks, for when you need something just so! For example, maybe you'll want to build a deep hook to get past that really annoying seven pin lock with multiple security pins!
For more on making picks and tensioners from street sweeper blades and feeler gauges, check out these two other videos from John Park's Workshop.
Anti-Surveillance Phone Pouch
RF Blocking
Our daily carry devices are amazing -- they can download all kinds of useful information, such as top-secret communications and maps -- very useful for a spy! However, they can also upload important data -- including our precise whereabouts at any given time!
Even when you're not using your phone, there's always the chance that you're leaving electronic breadcrumbs about your location. This kind of data is exchanged between cell phone towers as you move about. If you want to be certain you're in full stealth mode, you may need to seal up your phone from all incoming and outgoing radio waves!
A Faraday cage does exactly that, and the best part is that it's very easy to make. All you need is some conductive wire mesh fabric and a way to close it up so that no radio waves can get in or out.
I've made a custom pouch for my phone using a sewing machine. shown here. As soon as I drop it in the pouch, it goes into a radio wave black hole.
Everything from cell reception to Wi-Fi, from Bluetooth to GPS are immediately snuffed out as long as the phone is tightly sealed up in the bag!
Wi-Fi and Bluetooth will usually reconnect quickly as you open the pouch, cell service can take a bit longer.
To make your own RF pouch, check out this learn guide!
Software Defined Radio
Software-defined radio (SDR) is a technique for turning a computer into a radio. But not just an AM/FM radio - by using the computing power on your desktop you can listen and decode a wide variety of broadcasts. SDR can turn your computer into a weather-band receiver, a police/fire report scanner, a music listening station, and more! Instead of manually tuning inductors like a traditional piece of radio gear, it's all done in software by chips fast enough to pick up and decode radio waves on the fly.
If you've ever been curious about software defined radio (SDR), this USB stick is the easiest way possible to have fun with a powerful, configurable receiver. Packed with the powerful RTL2832U and R820T tuner, it can tune into signals from 24MHz to 1850MHz. That means you can use a computer (with Windows, Mac, or Linux) to tune into FM Radio, AM signals (but not AM radio), CW (Morse code!), unencrypted radio signals (such as those used by many police and fire departments), POCSAG pagers, and more.
Getting Started
This tutorial will show you how to get your very first listening adventure underway - listening to FM radio and decoding the RDS/RBDS data signal that is sent along with many FM radio stations as well.
Freq Show: RPi RTL-SDR Scanner
Here's a more advanced tutorial for scanning the airwaves around you with an RTL-SDR radio receiver and a Raspberry Pi. It's a totally portable RF visualizer!
Fun SDR Projects to Try
Beyond listening to FM radio and generally exploring the RF spectrum, there are many other fun things to try out with software defined radio. Check out the list below for some ideas. NOTE: some of these projects require additional hardware or antennas, be sure to check the legality of these project in your local area.
TEMPEST- an SDR tool for eavesdropping on computer screens via unintentionally radiated RF.
Airplanejs - Airplane Tracking with RTL-SDR for Mac OS.
Radio Reference Database - In this incredibly thorough frequency database, you can check out your local region for interesting frequencies to try. Emergency services, vehicle dispatch, Morse code stations, NOAA weather, ship tracking, aircraft/airport communications, there are all kinds of neat things to find!
POCSAG/Flex Pagers - Believe it or not, there are still lots of organizations using pagers to send and receive alphanumeric text messages. They are sent in the clear, and with an added piece of decoding software, you can turn these radio waves into texts. This makes us appreciate modern, secure text messaging quite a bit more.
Digital Speech Decoding - SDR on its own can't act like a police scanner of old, because the law enforcement and public safety channels tend to be digital transmissions, not analog ones that we can easily listen to. This software can help you decode those digital transmissions! Here's more info on getting started with DSD+.
Satellite Imagery - It's possible to download and view satellite imagery with SDR! It requires a more advanced antenna setup, but if you're interested, this tutorial shows you how!
Watch this video (you can scrub through if you like) to watch the image being downloaded in real-time.
Going Further
This just touched the tip of the SDR iceberg. If you'd like to get more involved, be sure to check out:
- RTL-SDR.com for lots of great info, news, tutorials, and more
- RTLSDR subreddit where interested users discuss SDR in great depth
- SigIDWiki where people help one another identify mysterious signals!
- Tire Pressure Monitor Systems this one is quite advanced, but a really fascinating bit of reverse engineering by Jared Boone to read the tire pressure on most modern cars over the air!
SDR Tuning Knob
Have some fun tuning in radio stations with your RTL Software Defined Radio setup by using a real, physical tuning knob! You can make one with just a potentiometer and a Gemma M0, plus some screws to connect the two.
The Gemma M0 can act like a USB HID keyboard, so it's great for sending key commands. Code it in CircuitPython to send keyboard shortcuts to CubicSDR software, or customize it for other uses!
- 1 x Gemma M0
- 1 x 10k Potentiometer
- 1 x Potentiometer Knob
- 1 x USB Cable
Additionally, you'll need two M3x8mm screws and nuts to secure the potentiometer to the Gemma M0 (Alternatively, you can use alligator clip leads if you have some handy).
Build the Tuner Knob
With some careful bending of the legs, you can get the potentiometer to connect to three pads on the Gemma M0. You feed the center leg into pad A2 which will measure the analog voltage of the potentiometer, and then you'll bend the outer legs to contact pins D2 and 3V.
In software, we'll set pin D2 to a ground level, so the potentiometer will be able to reference that ground and the 3V as the wiper turns and changes the resistance value output to the center leg.
First, bend the outer legs on an angle to widen their reach as shown.
Bend the center leg down just a bit so it will be able to dive down into A2.
Then, use the screws and nuts to secure the outer legs to their respective pads — the center leg will contact the A2 pad securely without the need for a screw.
Next, you can add the knob -- try turning the shaft fully to the left first and putting the knob on at the six o'clock position as shown.
Now, plug the USB cable into the Gemma M0 and your computer, and get ready to program it!
Code It
Follow this guide https://learn.adafruit.com/adafruit-gemma-m0/circuitpython to get started with coding the Gemma M0 in CircuitPython. Install the latest release version of CircuitPython on the board.
Also, make sure you install the latest release version of the adafruit_hid library as shown here. Note: there will already be a previous version of the adafruit_hid library in the lib folder on your Gemma M0, but it may not be the version that goes with the latest release of CircuitPython that you just installed. So, go ahead and replace the old library with the new! You can do this by downloading the latest release bundle, unzipping it, and then dragging just the adafruit_hid library to the Gemma M0's CIRCUITPY/lib directory.
You may also want to install the Mu editor https://learn.adafruit.com/adafruit-gemma-m0/installing-mu-editor for your coding needs.
Once you can successfully code in Mu and upload to the board, return here.
The Gemma M0 Radio Tuning Knob software will read the voltage on pin A2. When the potentiometer it is at the midway point, the on-board LED will light up to indicate the center detent. In this position, no key commands will be sent.
In CubicSDR, pressing the bracket keys in the tuning window nudges the tuned frequency up or down, depending on which bracket is pressed.
These happen to be the tuning key commands in CubicSDR software, but you can try out other commands for any software that accepts key commands, even overall system Volume commands if you want!
Here's the code for the Radio Tuning Knob. Go ahead and copy it, paste it into Mu, and then save it as main.py to your Gemma M0.
# Gemma Radio Tuning Knob
# for fine tuning Software Defined Radio CubicSDR software
# 10k pot hooked to 3v, A2, and D2 acting as GND
import time
import board
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
from analogio import AnalogIn
from digitalio import DigitalInOut, Direction
d2_ground = DigitalInOut(board.D2)
d2_ground.direction = Direction.OUTPUT
d2_ground.value = False
analog2in = AnalogIn(board.A2)
led = DigitalInOut(board.D13)
led.direction = Direction.OUTPUT
pot_max = 3.29
pot_min = 0.00
step = (pot_max - pot_min) / 10.0
last_knob = 0
def steps(x):
return round((x - pot_min) / step)
def getVoltage(pin):
return (pin.value * 3.3) / 65536
def spamKey(code):
knobkeys = [Keycode.RIGHT_BRACKET, Keycode.RIGHT_BRACKET,
Keycode.RIGHT_BRACKET, Keycode.RIGHT_BRACKET,
Keycode.RIGHT_BRACKET, Keycode.SPACE,
Keycode.LEFT_BRACKET, Keycode.LEFT_BRACKET,
Keycode.LEFT_BRACKET, Keycode.LEFT_BRACKET,
Keycode.LEFT_BRACKET]
spamRate = [0.01, 0.05, 0.125, 0.25, 0.5,
0.5, 0.5, 0.25, 0.125, 0.05, 0.01]
kbd = Keyboard()
kbd.press(knobkeys[code]) # which keycode is entered
kbd.release_all()
time.sleep(spamRate[code]) # how fast the key is spammed
while True:
knob = (getVoltage(analog2in))
if steps(knob) == 5: # the center position is active
led.value = True
elif steps(knob) != 5:
led.value = False
spamKey(steps(knob))
Wherever your cursor is, is where the Radio Tuning Knob will send its keyboard output! Center the knob to stop all output if you're in the wrong place to send lots of '[' and ']' keys!
Password Vault
Data security is of the utmost importance for the modern spy! To keep your logins buttoned up tight, you can build a small, personal password vault and use it to enter up to three passwords for you when connected to a computer at the touch of a capacitive pad on the Gemma M0.
Long, random passwords -- such as eF@V3p%2R*qhw8 are great because they're so secure when compared to simple ones such as Pencil or 12345, but can be difficult to remember and to type. Increase your password security by using a long, random string of numbers, letters, and symbols instead of some insecure, easy to remember word. Your Password Vault will remember it for you!
Keep your Gemma M0 Password Vault with you at all times, and then simply plug it into your computer with a USB cable, and touch a capacitive touch pad to auto-type your password, then press Enter on your keyboard.
Code it with CircuitPython
Follow this guide https://learn.adafruit.com/adafruit-gemma-m0/circuitpython to get started with coding the Gemma M0 in CircuitPython. Install the latest release version of CircuitPython on the board. You may also want to install the Mu editor https://learn.adafruit.com/adafruit-gemma-m0/installing-mu-editor for your coding needs.
Once you can successfully code in Mu and upload to the board, return here.
Here's the code for the Password Vault -- to use it on your Gemma M0 copy it, paste it into Mu, and then save the file as main.py, and then drag it onto the CIRCUITPY drive that shows up when the Gemma M0 is plugged in.
The Gemma M0 can act like a USB HID keyboard, so it's great for sending key commands. Using the layout.write() command we can have it enter long strings of text, numbers, and punctuation for us!
You'll want to change the three passwords in the code to match your own passwords -- just look for the lines that have the comments # enter your own password here and change the text inside the parenthesis and quotes.
# Gemma M0 Password Vault
# press cap touch pads to enter strong passwords over USB
import time
import board
import touchio
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
from digitalio import DigitalInOut, Direction
led = DigitalInOut(board.D13)
led.direction = Direction.OUTPUT
touch0 = touchio.TouchIn(board.A0)
touch1 = touchio.TouchIn(board.A1)
touch2 = touchio.TouchIn(board.A2)
# the keyboard object
# sleep for a bit to avoid a race condition on some systems
time.sleep(1)
kbd = Keyboard()
layout = KeyboardLayoutUS(kbd)
while True:
if touch0.value:
led.value = True
print("A0 touched!")
layout.write("?F3ErPs5.C.m.0.d.S.") # enter your own password here
time.sleep(1)
if touch1.value:
led.value = True
print("A1 touched!")
layout.write("6@LKNs(WV[vq6N") # enter your own password here
time.sleep(1)
if touch2.value:
led.value = True
print("A2 touched!")
layout.write("3Ff0rT@9j2y&") # enter your own password here
time.sleep(1)
time.sleep(0.01)
print("Waiting for cap touches")
# turn off the LED
led.value = False
time.sleep(0.01)
If you'd like to build a more elaborate version of the Password Vault using a Circuit Playground Express or Circuit Playground Classic, that requires an unlock code to use, check out this guide, the Circuit Playground Password Vault!
Redeem your coupon code
To redeem your AdaBox coupon code, sign into your Adafruit account then click 'My Account' on the top right of the Adafruit page.
Once you're in your account page, click 'Gift Certificates and Coupons'.
Your coupon code will appear under 'account coupons.'
This code is associated with your AdaBox order and can be used once per AdaBox subscription. You must be logged into the Adafruit account associated with your AdaBox order to redeem your coupon code. If you received AdaBox as a gift, the code will appear in your account once you link your Adafruit account to the AdaBox you received.
Shipping costs do not count towards free items. Discount codes do not apply to shipping costs. Discount codes do not apply to gift certificates and software. Only one discount code can be applied if available. Discount does not apply to orders placed before the sale time start. Discount cannot combine with reseller, educational, or any other discounted orders.
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.
Visit TechForum