Introducing the WADDI:
Welcome to my page! My name is Max, and I am a rising junior at Regis High School. Over the past six weeks during BlueStamp, I have created a starter project and an intensive project. My starter project was the TV-B-Gone, a device that is capable of turning off (and on) roughly 100 brands of TV using specific sequences of IR pulses. You can read all about it towards the very bottom of this page. My intensive project was what I have dubbed the “WADDI,” the “Wearable Arm Data Displaying Instrument.” The WADDI is a comfortable, fashionable, patriotic, functional, and versatile device that secures to the forearm, takes data from four different sensors, and displays that information on an OLED screen when specific buttons are pressed. The sensors consist of a humidity sensor, a luminance sensor, a magnetometer, and a GPS module. These sensors all feed data into an Arduino-compatible Teensy 3.1 microcontroller, which acts as the brain of the device and interprets the data. After completing its computations, the Teensy sends the user-friendly information to the screen. I chose to build this project because I wanted to create something that is practical, and that can easily be used by any human being in everyday life. As seen in the below pictures, the WADDI consists of many components, which as a collective group require roughly 1000 lines of code. This created plenty of room for error, and problems frequently walked in and out of that room throughout the entire creation process. In addition to learning expansive and eye-opening new information about electronics, engineering, and programming, I gained invaluable experience with dealing with problems and obstacles, and learned priceless lessons about how to deal with seemingly insurmountable quandaries in general. Read on to learn more about my project, and my overall experience!
Overview video of final product:
The WADDI is comfortable; it is made out of treated leather, and in total weighs less than a pound. It is fashionable; the WADDI casually sits on the forearm of the user, adding a stylishly smooth black accessory to one’s outfit, and shines brilliantly and patriotically with its red, white, and blue LED-lit buttons. As well as being comfortable and fashionable, it is fully functional, and heavily modifiable! I have designed it so that all components are attached to the brace using velcro, meaning that components can be easily added, or removed, or interchanged. All the components and connections are covered by a sleek sheet of leather, with specific holes in it to reveal exposure-dependent components.
The WADDI’s main functionality is centered around it’s four sensors:
The humidity sensor allows the Teensy to calculate the relative humidity of the environment, in a percentage.
The luminance sensor allows the device to calculate the brightness of the environment, in lux (lumens per square meter). This feature helps photographers with setting up the correct shutter speed and aperture rating to shoot a high-grade photo. To give an example, the recommended luminance for a healthy workplace is 500 lux.
The magnetometer reads the magnetic fields of the Earth, allowing for the calculation of compass direction. The WADDI is able to display the cardinal directions (N, E, S, W) and intercardinal directions (NE, SE, SW, NW).
The GPS module can be tracked by up to 11 different satellites at once, allowing the latitude, longitude, altitude, and speed of the device to be displayed on the OLED. The number of satellites currently tracking the user can also be displayed on the screen.
In addition to all of the sensors, the WADDI has a flashlight capability. To function as a flashlight, the Teensy digitally writes the current flowing through two bright white LEDs as high. The two LEDs are placed so that when the red button is pressed, the user can point his/her hand in the direction that they want to point the flashlight.
The WADDI is powered by a 3.7 volt lithium-ion polymer battery, which can easily be charged using an onboard Mini-USB port. As a result of utilizing components with low power requirements and intentionally structuring the code, the WADDI lasts an impressive amount of time without needing to be charged. To provide a reference, I received and connected the battery a week previous to writing this, without completing the charge, and it is still running as I type!
Since I have designed my project to be easily modified, there is no doubt that I will add more functionality to the WADDI in the future. Current plans include adding a GPS distance tracking function in the future, allowing me to calculate how far I run when I go running in my neighborhood. Also, I want to add a watch capability, letting the WADDI display the time and date, and alert the user to any alarms they have set. The flashlight LEDs also have plenty of room for improvement, possibly calling for the addition of Cree LEDs. Another modification I would like to perform is the incorporation of the TV-B-Gone into the WADDI. A laser would also be a crowd-pleasing (and self-pleasing) addition to the device.
Here is my complete documentation of the WADDI:
Electrical Schematic (picture): http://bluestampengineering.com/wp-content/uploads/2014/06/WADDI-Complete-Schematics.png
Code (in Arduino, text file): FINAL_ULTIMATE_CODE
Bill of Materials (Excel file): MAX FINAL BOM BSE WADDI
My Build Plan (Google doc): https://docs.google.com/document/d/17vqEqWo1KNy4VJGjWeo7jC7VTqBEj-YPGB1Aonrzoos/edit?usp=sharing
Scroll down to follow my progress. Thanks for reading!
Milestone 2 of Main Project – Forearm Computer
I have finally reached my second milestone! This was by far the most challenging and most complicated checkpoint to reach. Before starting this milestone, I had connected all of the input buttons to the Teensy 3.1 development board, in addition to the OLED (Organic Light-Emitting Diode) display screen, the flashlight LEDs, and the pink informational LEDs. To get to this milestone, I tested the functionality of each individual sensor alone, and then wrote programs to display their individual readings on the OLED. I then incorporated them all together into one Arduino sketch, allowing the readings of each sensor to be displayed on the OLED screen only when a specific button is pressed. You can see this code in action in my Milestone 2 video above.
I first worked on the HIH-4030 humidity sensor. This was by far the simplest, and least problematic of the four sensors. It transmits its data through a lone analog output, differing the voltage on its pin depending on its humidity reading. Relative Humidity depends on the current temperature of the environment, the readings from an external thermometer are included in a formula which determines the relative humidity.
I next worked on the HMC6352 magnetometer, the sensor that determines compass direction. It reads the magnetic fields projected by the Earth, deducing which way is North. In my code, I do not display the northerly direction, and instead display the cardinal direction the user is pointed, based on the degrees the magnetometer calculates. The most tedious part of this task was creating the arrow that points in the direction the user is facing, having to map out each individual pixel of the arrow on the OLED.
After the magnetometer, I worked with the TSL2561 luminance sensor. In coordination with the code, this sensor determines the brightness of the environment, calculating the amount of lux. Lux is the SI unit of luminance, the intensity of the light perceived by the human eye. This reading is helpful for photographers, and determining the correct exposure value for a picture. My forearm computer, on average, calculates a luminance of 375 lux to 430 lux in the BlueStamp lab, compared to the recommended amount of 500 lux for a healthy workplace ( :/ ).
The last sensor I had to deal with was the Adafruit Ultimate GPS Module. This 66 channel, 10 Hz update GPS receiver proved to be the most arduous component to work with. It communicates with the Teensy through the RX and TX serial ports, and utilizes the TinyGPS Arduino library. From it, I am able to calculate the official atomic time, the latitude and longitude, the speed, the altitude, the HDOP (Dilution of Precision), the cardinal direction of movement, and date. However, on my forearm computer I display the amount of satellites currently tracking the device, the latitude, the longitude, the HDOP, the altitude, and the speed.
After configuring all of the sensors, I had to create an Arduino sketch to incorporate all of them together. This arose as the largest obstacle to hurdle, for there are 873 lines of code in the sketch! When dealing with that many lines of code, and many components, many things can go wrong, which they did. However, I ultimately hurdled all my obstacles and prevailed. While reaching this milestone, I learned a lot more about coding, and electrical components. I also learned that the optimal way to tackle and deal with problems is one step at a time, and to not get ahead of yourself. When creating the incorporating sketch, I attempted to do it in one shot, and include all of the code all at once. When I compiled it all together, there were over 20 errors, and correcting one would just lead to another two errors. I eventually decided to start from scratch, coding one sensor at a time, and in the end I was extremely more effective and efficient. TAKE YOUR TIME
Now that I have all the sensors working together, to get to my next milestone i need to finish my project! To finish, I need to disconnect all the components from the breadboard, and directly solder them to each other. Once that is done, I will configure the battery to power the device, and then mount everything onto the leather brace. I’m almost there!
Milestone 1 of Main Project – Forearm Computer
My main project at BlueStamp Engineering is the Forearm Computer. Originally, I was planning on nearly duplicating a project by Stephanie Maks, the ISEB6, but I ran into too many problems with her code for the device. I have included the link to her project’s page below. As a result of many misfortunes, I have decided to take my own path, only referencing her project occasionally for guidance.
Overall, the device consists of a Teensy 3.1 development board, multiple sensors, command buttons, multiple LEDs, and an OLED (Organic Light-Emitting Diode) display screen. The Forearm Computer communicates using SPI (Serial Peripheral Interface), meaning that it is controlled by a “master” and the master acts over other “slave” componenets. The Teensy acts as the master, interpreting the readings from the sensors, which are the slaves. The buttons will act as input devices, being able to control the device and the screen. The four external sensors of the device consist of a GPS module, a digital magnetometer, a luminance sensor, and a humidity sensor. The GPS module will be able to determine the precise location of the device, and record distance covered over a specific amount of time. The magnetometer will be able to read the compass bearing of the user. The luminance sensor will be able to sense the lux of the device’s current environment, helping the user determine an appropriate exposure level for their camera. Finally, the humidity sensor will be able to calculate the relative humidity of the user’s environment, in addition to altitude. All of these readings will be able to be viewed by the user on the OLED screen. In addition to these sensors, the Forearm Computer will be able to display the time and date on the OLED, as well as the temperature, drawing readings from an on-board temperature sensor.
For this milestone, I have connected the Teensy to the OLED, the four buttons, the pink informational LEDs, and the pair of bright white LEDs which will act as the flashlight. To demonstrate their functionality, I have written a program which makes the OLED display the phrase, “Hello World!” when the right white button is pressed, the pink informational LEDs turn on when the blue button is pressed, the flashlight LEDs turn on when the left white button is pressed, and the flashlight LEDs blink rapidly when the red button is pressed.
To get to this milestone, I’ve faced many challenges. First of all, my initial development board, the SparkFun Pro Micro, refused to function properly and would not communicate with my laptop. After hours of investigation, I decided to utilize a new development board, the Teensy 3.1. However, before the Teensy arrived, I used the Arduino Uno, so in total I have used three different development boards. Another challenge I faced was getting her code to work. I eventually discovered that Ms. Maks created her Arduino code with Arduino 1.0.1, an integrated development environment. The most current version is Arduino 1.0.5, so I discovered that changing my version to that previous version would fix the problem. However, the Teensy 3.1 is unable to communicate with Arduino 1.0.1, only Arduino 1.0.5, so the best option left was to part with her code and make my own. Unfortunately, i have only a basic understanding of the high-level language C++, which Arduino is heavily based off of. I will need to learn a lot and implement significant effort to achieve the level of coding that is required to run my device to the level I would like it to be run. Despite this, I am determined and am excited to have the chance to achieve a better grasp of C++ and learn more about programming.
To get to my next milestone, I need to connect the external sensors to the Teensy, and be able to prove their functionality. After that milestone, I will need to write a program for the Teensy to run, that coordinates all of the sensors and components of the device and provides a fluid way to utilize the device. Finally, I will need to be able to power the device by a battery, and mount the device on a leather brace so it can be worn comfortably. I have much work ahead of me, but I am confident that I will be able to finish successfully.
Starter Project – TV-B-Gone
My starter project is called the “TV-B-Gone,” a kit from Adafruit. Its purpose is to turn off virtually every TV produced. It works extremely well; I was able to turn off TVs from 25 yards away! However, I was unable to turn off the TVs in Penn Station, for the MTA puts tape over their TVs’ IR sensors.
Every TV that is able to be remotely controlled has an infrared light (IR) sensor. TVs are remotely controlled by different sequences of pulsing IR light – each brand of TV responds to a specific sequence of IR pulses. The TV-B-Gone works by emitting IR pulse sequences from its two narrow, long-range IR LEDs and two wide, short-range IR LEDs. Inside the microcontroller, the sequences for almost 100 brands are stored. When the button is pressed, the microcontroller activates a transistor for each LED based on the sequence for a specific brand. Once the first sequence is emitted, the microcontroller sends the next brand’s code, and continues to send sequences to the transistors for all codes stored. It takes about 70 seconds for the TV-B-Gone to go through all of its stored codes. IR light is invisible to human eyes, but can be seen by digital cameras because the CCDs inside digital cameras often cannot distinguish visible light from IR light. That is why the IR LEDs can be seen flashing in my video, but not in real life. IR light also cannot pass through opaque solids, which is the reason that I was unable to manipulate the TVs in Penn Station. However, many restaurants (and annoying neighbors) do not go through the same “safety” procedures as the MTA, so there is still plenty of opportunity to mess with other TVs.
Besides the microcontroller and transistors, other parts in the TV-B-Gone play important rolls, too. The green LED towards the back of the device lights up when the TV-B-Gone is currently emitting IR pulses. The ceramic oscillator sits right next to the microcontroller, acting as its watch and timekeeper, so the IR LEDs emit at the right moments. There are two resistors in the device – one to restrict the current going into the green LED, and one to restrict the current going into the IR LEDs, so the LEDs do not get fried by a surge in energy. The electrolytic capacitor, which charges from the two AA batteries underneath the device, is the main controller of energy for the device, and increases the flow of energy while the TV-B-Gone is emitting.
This device was extremely fun to make, and will provide countless more hours of entertainment away from the soldering iron and out in public.