Tag Archives: Electronics

Brainwave troubles…

The problem: the micro-USB port broke off my first Brainwave board. Then I was given another Brainwave board, but that one the potentiometer for the Y-axis is dysfunctional (it perpetually overheats…).

For the past three weeks now I’ve been trying to debug these problems. I’ve adjusted the potentiometer, I’ve re-soldered the surface mount 0ohm resister for that potentiometer, and on the other board I have painstakingly tried to reattach the micro-USB port with solder and superglue.

photo 2

Figure 1. Where the USB port is supposed to be….

photo 1

Figure 2. Brainwave sans USB port

Trying to solder the tiny contacts for the USB port is pretty much a lost cause.

Anyway, I talked to my 3D printing compatriot, Sorensen, who gave me some ideas for next steps. I may try getting a new potentiometer that will fit on the board, and switch it out for the dysfunctional one. I could also just find a multimeter, and use that for adjusting the potentiometer. It may be that it’s really finicky in terms of adjustment.

But for now I will eat snacks and work on documentation for this other 3D printer kit.

Conquor Every Bug…

Yesterday was a pretty exciting day… I don’t know how I managed to do it, but I turned Terri’s site into a white screen of death.

Figure 1. The White Screen of Death.

Figure 1. The White Screen of Death.

I backed up the contents of the server, re-installed WordPress, changed permissions, changed some files, and finally after re-uploading the contents that I have previously backed up it magically started working again.

Later I tried to upload firmware to my Brainwave board (it’s the little computer board on my Grawmet II 3D printer) and I could not get past one very cryptic error.

This is quite the life.

Brainwave Adventures

A couple weeks ago I was taking my Grawmet home from UW on the bus, and the USB chord was still plugged into the Brainwave Board. (This is the the computer controller for my 3D printer.)  I accidentally bumped the cord, which acted as a lever and popped the micro USB port right off the board. I was most displeased about this, since it was going to be ether extremely expensive for me to replace (by poor college student standards) or extremely difficult to fix.

I took it into the WOOF room (the UW 3D printing club’s meeting space) yesterday to consult with other members about ways to fix it.  As it turned out, I never actually had to fix it because professor Ganter (he’s one of our club advisers) gave me a whole new board! I spent the afternoon soldering it together.

Figure 1. New, un-soldered Brainwave board.

Figure 1. New, un-soldered Brainwave board.

I did surface soldering for the first time, which was pretty fun. I put on some tiny 0Ω resisters that configure the stepping speed of the motors.

Figure 2. The finished, soldered board.

Figure 2. The finished, soldered board.

General take-aways: never leave the USB cord plugged in, and I am pretty decent at soldering.

Traffic Lights go Wireless

The Traffic Light Arduino Platform is now wireless. A independent console (powered by an Arduino) with three programable buttons transmits a code signal using XBees to a receiver. The receiver  (also powered by an Arduino) decodes the input and turns on and off the traffic lights as well as play music accordingly.

Table 1. Traffic Light Language

Screen Shot 2013-08-20 at 10.51.50 AM

TLA System

Figure 1. The whole system, ready for a demo!

The TLA Platform isn’t finished yet. There are still more features to add, and much more code that could be written for different uses, but for now, it’s ready for some people to come and play with it at my lab demo.

XBees and Musical Lights

Right now for the TLA I am focusing on separating the interactive console part from the actual lights by enabling the two to wireless talk to each other. This I am doing using XBees. These are little wireless development things that can communicate with an Arduino board using the serial input and output.

The console part of the system will be programmable and interactive. It will take input from button presses, and turn that into a series of letters and numbers and send that over the XBees.

The traffic light part of the system will also have an Arduino. However, this Arduino won’t do much. It will take in the series of letters and numbers coming over the XBees, and turn lights on and off accordingly.

So far I’ve been working on the traffic light end, the end that takes in letters and numbers, and have been developing an simple lights-on-and-off language. I hadn’t really foreseen this, but so far I’ve actually created this a really fun little program. You type in letters and numbers into the serial console, and lights blink on and off. I’ve even made up little “songs” for them. 😀 I don’t know why, but this totally makes my day.

Next steps: legit flashing Christmas light display on our house.


My “lights language” so far:

0 => 48 =>
1 => 49 => delay(100); //16th
2 => 50 => delay(200); //8th
3 => 51 => delay(400); //quarter
4 => 52 => delay(800); //half
5 => 53 => delay(1200); //dotted half
6 => 54 => delay(1600); //whole
7 => 55 =>
8 => 56 =>
9 => 57 =>

r => 114 => red off
R => 82  => red on
y => 121 => yellow off
Y => 89  => yellow on
g => 103 => green off
G => 71  => green on

Traffic Light Arduino Platform | Project Proposal


So, as the title says, here is my official project proposal for the TLA. This is a general overview of the whole system. Right now I am focusing on the wireless part of the specs, which I think merits it’s own post. Anyway, enjoy.


Rose Beede

July 16, 2013

HCDE 498 – Special Topics: Physical Computing


Tag Line

To add new features to the existing Traffic Light Arduino Platform for the purpose of increasing and testing usability in the context of engineering education.



Project Description


Overview of the Existing System

The Traffic Light Arduino Platform is an interactive, multipurpose system, for use as an educational aid. It consists of a set of traffic lights, along with an interactive console. The interactive console allows users to easily program the traffic lights to do specific behaviors. The interactive console is powered by an Arduino.


New Features to be Implemented

  • Soldered board. The system should be advanced beyond the rough prototype stage that it is in now.
  • Wireless functionality. This will allow the traffic light unit of the system to be moved around a room separately from the interactive console. The wireless receiver will be located on the traffic light unit of the system, and will also be powered by an Arduino.
  • Speaker. This feature will add audio feedback to the system, enabling it to also be useful for people who are visually impaired, as well as improve the overall user experience of the system. The speaker will be located on the traffic light unit of the system.
  • Debugging LEDs. This feature will allow maintenance and testing of the system, even if the traffic lights themselves to be turned off. It will also assist in debugging problems with the system. These LEDs will be powered directly by the Arduino on the traffic light unit, unlike the traffic lights themselves, which are primarily powered by AC power.
  • LCD Displays. These LCD displays will provide user feedback by telling the user about what program is currently doing.
  • User-friendly hardware. This feature will includes creating a box to house the electronics for the interactive console as well as the wireless receiver (see above), as well as other improvements to make the system appear neat, tidy, and organized. This also includes improving user feedback by adding an LCD display to the console.



TLA diagram

Figure 1. Project diagram with new features.



Soldered board board to solder, soldering equipment, wires
Wireless functionality 2 XBee wireless units, new Arduino code
Speaker Sound card, new Arduino code
Debugging LEDs red, green, and yellow LEDs, 3 330 ohm resistors
LCD displays 2 LCD displays
User-friendly hardware wood pieces, basic wood working equipment, wood glue, paint, computer graphics software



I have never done a wireless system before, and so I am uncertain what knowledge I will need for that.

It will also be necessary to develop a new protocol for users to implement new functionality. It will be challenging not only to develop a sound system, but also to ensure that it is hard for users to “break” it.

My Bicycle Computer

My first Physical Computing class assignment for this summer was to create a bicycle computer. This is a device that you stick on your bike and it tells you how fast you are going, what your speed is, etc. Following is how I made my own bicycle computer.

I used an Arduino (with a 9-volt batter pack) to power several features. Data from these features were then displayed on an LCD screen. These features included:

1) Speedometer

2) Temperature Sensor

3) Timer

The speedometer was the most complicated. To make this feature I attached a small rare earth magnet to one of my bike’s wheel spokes. I then attached a magnetic sensor that would read every time the magnet came around the wheel (figure 1).

IMG_1758 copy

Figure 1. Magnet and sensor

This data was then read by the Arduino and computer to miles per hour using the radius of my bike wheel. Finally, miles per hour was displayed by the LCD.

One problem I had with this was getting to zero miles per hour when stopped. Technically, the LCD only displayed the previous revolution’s average velocity. The program would see the magnet, count up milliseconds, see the magnet aging, and then find the elapsed time which would be displayed on the LCD. (Kind of like when you first learn about integrals with that annoying add-up-the-bars method.) This doesn’t matter when you are peddling along at a good speed, but when you stop, the LCD ends up displaying something like 4mph when you aren’t going anywhere. To fix this I would have had to implement some code, saying something like “if elapsed time is > x, set speeed = 0.”

The temperature sensor was pretty easy. All I had to do was follow the schematic for the circuit read the temperature sensor, and use some code snipits from my instructor for converting the feedback from the sensor to degrees F and C. Basically, Arduinos reads all analog input as ints from 0 to 1023, and you need some conversions to change that into temperatures. I also learned to b vary careful about attaching a temperature sensor to a circuit backwards. When this happens the sensor becomes VERY hot in a short amount of time. If you ever attached a temperature sensor backwards, you will know. Trust me.

IMG_1766 copy

Figure 2. The temperature sensor on my breadboard (the large thing further down the board is an Ethernet chord plug-in).

The timer was also fairly simple. I just used a simple Arduino function (millis()) to count up milliseconds since the device was reset, and converted the milliseconds into the format of mm:ss. I could have done hours too without changing much.


Figure 3. My hardware set up


Figure 4. The finished project (as if any project is ever really finished).

It was kind of fun when a fellow bicyclist asked me what my weird, duct-tape-covered box was for

And finally, here is my code:


Rose Beede 7/16/13, with snippits from Andrew Davidson

Code for “Bicycle Computer”


– speedometer, in mph

– temperature sensing

– timer, counting minutes and seconds since start time


//this code computes rate from magnet sensor


long bike_r = 13.5; // bike wheel radius in inches         |


// ———— for speed sensing w/ magnet —————–

const int hallPin = 2; //magnet

const int ledPin = 13;

const int magnetIn = LOW;

const int magnetOut = HIGH;

int magPrev = magnetOut;

long prevRevTime;

long rpm = 0;

long mph = 0;

// ————– for sensing temp ——————-

const int tempSensor = A1;

int tempValue;  // raw analog data

int tempMV;     // corresponding voltage

int prevTemp = 0;   //for only updating if temp has changed, right now just pays attention to F

float tempCent;   // degrees Fahrenheit

float tempFahr;   // degrees Centigrade

//  ——————— LCD ————————

#include “Wire.h”

#include “LiquidCrystal.h”

LiquidCrystal lcd(0);

// ———————– setup ———————

void setup () {

pinMode(ledPin, OUTPUT);

pinMode(hallPin, INPUT); //magnet pin

pinMode(tempSensor, INPUT); // temp sensor input

// set up the LCD’s number of rows and columns:

lcd.begin(16, 2);

//set up serial monitor

Serial.begin (9600);

Serial.println(“*** start”);


// ———————- loop ————————

void loop () {

// ————– calculate and print speed ———–

int mag = digitalRead(hallPin);


if (mag == magnetIn) {

digitalWrite(ledPin, HIGH);

if (mag != magPrev) {

// here is where the magnet is seen first

//calculate revs per min

long curRevTime = millis();

long thisRevTime = curRevTime – prevRevTime;

rpm = 60000 / thisRevTime;


//write to LCD

// (note: line 1 is the second row, since counting begins with 0):

lcd.setCursor(0, 0);

mph = (rpm * 376.8 * bike_r)/(63360.0);


lcd.print(“mph  “);

//reset prevRevTime

prevRevTime = curRevTime;



else {

digitalWrite(ledPin, LOW);


magPrev = mag;  //reset magPrev

// ————– update and print temp ————–

tempValue = analogRead(tempSensor);

// first, convert the sensor reading to the right voltage level (5000 mV, since the Arduino port is +5V)

// the map function is just an efficient shortcut for some ratio math

tempMV = map(tempValue, 0, 1023, 0, 4999);

tempCent = (tempMV – 500) / 10.0;

tempFahr = (tempCent * 9 / 5.0) + 32;

if (tempFahr != prevTemp) {

//write to LCD

lcd.setCursor(12, 0);


lcd.print(“F “);

lcd.setCursor(12, 1);


lcd.print(“C “);


prevTemp = tempFahr;

// —————- time since start —————-

lcd.setCursor(0, 1);

lcd.print(millis() / 60000);


lcd.print((millis() / 1000) % 60);