Networking and Communication

Making the Hello Bus Boards Talk

While the Hello Bus boards are about as simple of a circuit as one can make (an LED, which can be controlled by a microcontroller), the focus this week was on learning to build circuits that could be networked, either wirelessly or wired. Starting with the given circuits, I milled and stuffed three boards:

This network would consist of three identical nodes (aside from the "bridge," which contains a FTDI header to connect the network to a computer). The nodes are connected via 4-pin headers:

However, as can be seen above, all of my nodes weren't aligned in the same direction. When I plugged in the network to my computer via the FTDI cable, I began to smell solder burning. The node that was "backwards" had the wrong pins receiving power, and melted off my microcontroller!

Since you technically only need a bridge and one node to create a network, I decided to proceed with my two good boards (now aligned correctly to avoid the above mistake), and programmed the microcontrollers using my FabISP. Each node runs the same code; however, you have to identify each node by changing the node id before flashing each one with C code. In the code below, this involved editing the variable declaration #define node_id, and giving each node a unique number:

You can communicate with the network via Serial Port in Arduino; first select the correct Serial Port, then select 'Serial Monitor' to open up a Serial window through which you can communicate with the nodes:

 

Everything ran perfectly when I first tested the network....the LEDs would flash as programmed, and the correct node name would display on the serial monitor. However, when I plugged in the network again to document the project, I found that both LEDs on the bridge and the node lighted up, and stayed on?? I decided to reflash each node with the same C code using my FabISP, in case I accidentally changed something the previous day:

Reflashing the bridge:

Reflashing the node:

The code flashed successfully for both nodes. However, both nodes stay lighted up, and nothing outputs when I type in '0' or '1' in the Serial Monitor. Right now, I am not sure what has happened???

Published on   May 1st, 2013