Andre D.

Technology has been my passion as long as I can remember. As such, I have pushed the limits of human advancement from a young age, from setting up a custom Minecraft server on an old laptop, in fourth grade, capable of hosting as many as 16 visitors simultaneously, to building a remote controlled Coke can that could roll as I pleased, defying physics and reality. At BlueStamp, after breezing through my starter project in a matter of minutes, the SparkFun Simon Says Kit, I began work on my intensive project, which I conceived of and proposed myself (here is the writeup). I built and developed a wearable device, a headband that secures 16 vibrating motors around the wearer's head, and contains an Arduino, an orientation sensor, and a bluetooth chip. These components combined with some nifty code allow the headband to serve its purpose: communicating precise GPS directions to a visually impaired pedestrian.

Area of Interest
Electrical Engineering, Applied Computer Science
Skills
HTML5 & CSS3, Web Design, Swift 3, Arduino, C, Java 8, Python, iOS & Android App Development, FRC Robotics, Autodesk Eagle, Autodesk Fusion 360, Autodesk Inventor, GIMP, Adobe Photoshop, Adobe Illustrator
School
Hunter College High School
Grade
Rising Junior

The Project

Andre's final milestone.

The Process

Pre-Project

Overview

For my starter project I assembled a Simon Says circuit from a kit. This circuit emulates a simple memory game and its sole purpose is entertainment. The interface consists of four buttons and four corresponding LEDs. The diodes light up in a progressively longer and more complicated sequence, and it’s the player’s job to remember this sequence and repeat it back by pressing the buttons in the same order. The whole thing is controlled by an Atmega328 microcontroller, which is an integrated circuit that can interpret inputs (AKA the buttons) and send signals to outputs (in this case the lights). The MCU runs a firmware developed by Sparkfun (vendor of the kit) such that it turns the lights on in a way that makes sense and verifies that the player put in the correct order in with your buttons and resets when you lose and plays sounds on the buzzer and just controls everything that happens.

Parts

The buttons are actually interesting too because the lights are mounted inside of them. The way that works is the LEDs are soldered first and then the hollow soft part is screwed on top, and the soft part has a conductive disc on the bottom. So when you press the button, the conductive disk touches the PCB and completes an electrical connection that the Atmega chip can then interpret.

There are a few miscellaneous components on the PCB as well. A piezoelectric buzzer on the back plays tones of various frequencies based on alternating signals sent to it by the MCU. There are two switches, one connecting the batteries to everything (a power switch) and another connecting the Atmega to the buzzer, allowing the player to mute the sound. Finally, there are two capacitors near the microcontroller. A capacitor holds some energy so while the device is running normally the capacitor is charged up. If for whatever reason there’s not enough power coming from the battery to satisfy the microcontroller’s needs, the energy from the capacitors is used. This allows a steady supply of electrical current to the MCU is it runs smoothly and doesn’t shut off.

Breadboard Model

The circuit continuously turns on one of sixteen LEDs such that it's always pointing towards geographic North. It's a digital, tilt-compensated compass.

This circuit was important to my process because I can test my code rapidly, for both the compass and vibrating motors, without having built my headband yet. This circuit is also effective because it makes it really easy for me to tell when something isn't working, since it's obvious when an LED is on or off, whereas with the motors it can be really unclear.

The Arduino controls the circuit, running code that communicates both with the lights and the compass. the way it talks to the lights is through these 595 shift registers, which serve as serial to parallel converters. This means I can send serial data to them from the Arduino, via only 3 pins, and the data is outputted simultaneously to 16 pins, in parallel. Shift registers are efficient because they can be daisy chained, meaning that with just three pins you can run one register for 8 outputs or one hundred registers for 800 outputs. The subsequent ones don't require any extra pins.

It also communicates with the LSM303 sensor with a protocol called I2C which allows a potentially large amount of peripheral chips to send data to a central controller, taking up only two pins per chip, one for Data and one for the Clock. This chip provides not only magnetometer data for raw compass data, but also accelerometer data so the tilt of the device is known. This allows the 3D compass heading vector to be projected onto the 2D plane occupied by the LED circle.

It all comes together as the Arduino reads this data from the compass and performs an algorithm that converts these raw outputs into a tilt-compensated heading in degrees. This degree quantity represents how far off the device is from North. These degrees are then turned into a number from 1 to 16 corresponding to one of the LEDs in the circle. That LED is then turned on through the shift registers and the compass heading is updated once again for the newest heading.

Going forward I want to perfect the compass algorithm by adding some kind of rolling average to smooth out the reading. when I'm happy with the software, I will begin constructing an actual headband with 16 haptic motors instead of lights so I can actually try it on and play with it and really find out how viable it is to use vibration motors as a way to communicate GPS directions.

Headband Assembled, Tracks North Pole

For the second milestone of my project I built a functional prototype and I began programming it so that it always pulses the motor in the direction of North. To make sure it worked I let several of my friends and instructors at BlueStamp try it on and see how well they interpreted the vibrations.

The headband consists of 16 vibrating motors spaced evenly around the circumference of the foam strip, controlled by a miniature Arduino, based on compass readings from the LSM303 sensor. The code is slightly adapted from the code on my earlier breadboard model with LEDs.

I began building this thing by looking up the circumference of an average head, which about 23 inches. I then cut a piece of foam padding about two inches longer than that, and two inches in width. I marked even intervals along the band such that 16 points were evenly spaced with a slight margin on the very edges. I mounted motors to these points with small squares of double sided tape.

The wiring was a little trickier. I folded all the wires to the outside of the band, so that there would be nothing on the inside to annoy the wearer or interfere with the vibrations. First I chained together the ground wires of every motor, such that the 8 rightmost motors were all connected in one long ground wire that runs to the edge of the band, and I did the same thing on the left. For the power wires I used two rainbow ribbon cables that I split up more and more and connected the individual wires to subsequent motors. I found this wiring to be really challenging, almost surgical, because the motor wires are really small and fragile. I used a very fine tip on my iron and a thin solder wire. I made sure to put heat shrink insulation on every connection so that when I was done there were no exposed contacts. I used thin, vertical strands of tape to hold the wires as I was going around and when i was done I put one long horizontal strand of duct tape around the entire headband to protect all the connections and give it a sleeker look.

At this point I realized there has to be a way to actually secure the headband on someone's head. It's important that the headband sits snugly against different head sizes so I stapled a velcro strap to one end and hacked together a duct tape latch on the other end to make the size adjustable.

I was eager to test out all the motors, so I attached a very small adhesive breadboard to one end of the headband. I plugged in all sixteen motors to the breadboard, such that they were connected to an I/O pin of the arduino. This type of direct connection was functional for testing, but it takes up 16 pins for each one of the motors, which is inefficient. Finally, I plugged in the 303 compass sensor to measure the user's orientation.

My first test was a little dismal. I found that just turning on one motor at a time and keeping it on was unpleasant and imprecise. In other words, instead of feeling a tap in a specific direction on my head, I felt this overpowering shaking all over the place which simply wasn't the desired effect. However, after experimenting for some time with different patterns of vibrations, I got really good results from pulsating the motors rather than just keeping them on. After some fine tuning I found the perfect method was to run the motor for just 50 milliseconds and then turn it off for 100 milliseconds after that, so it feels like a gentle tapping in a precise direction, instead of an explosive shock all over the place.

Overall, I'm really happy with the progress of the project, and hopefully I'll be able to keep up this pace. Right now I want to design and order a custom circuit board to be manufactured to hold all the components neatly in the back, as well as a Bluetooth 4.0 module. I'm also going to start working on programming my iPhone to communicate with the Bluetooth module, so that rather than just pointing towards North, the headband can eventually direct the wearer to their destination.

iPhone App with Swift and CoreBluetooth

For the third milestone of my project I made an app for my phone communicate with the headband using bluetooth. In one section of the interface, it just displays a list of available bluetooth devices and connects with the selected one. In another other view, the user can select and send a raw signal from 0 to 360 from a circular picker, to go through all the motors and test them out.

The map view is the most interesting. Here I have implemented the Google Maps Directions API, so the user can type in a destination, and the app will calculate a path from their current location to their destination and display the path on the map. The path is also broken down into an array of coordinate points, and these points are shown as Markers on the map. For clarity, the iPhone "says" a brief spoken phrase describing the route.

The headband will then "guide" the wearer along the route, via every Marker. As they approach the nearest marker, the app switches to the next one, guiding them continuously through the complicated system of streets.

Leave a Comment

Start typing and press Enter to search