Week 13: Networking

assignment: design and build a wired &/or wireless network connecting at least two processors

what I made: RS-232 protocol for driving three stepper motor boards from one computer serially

Getting the boards to talk to one another

This week was again a pretty straightforward week because there was a clear application of this week to my final project. I need to drive 3 motor boards from my computer via FTDI cable but don't want to have three dedicated FTDI cables running in parallel. The solution of course was to create a wired network using RS-232 standards to talk to each board separately. Here's a reminder of what these motor boards look like:

board layout

Connecting between each of the 2x3 headers and then ultimately an FTDI cable requires a custom cable. I needed to connect to the GND and TX lines of the FTDI cable and route those lines through to each motor board. I used a 2x3 header but only had two wires run through the connector.

milling boards
finished traces
finished milled boards

This method proved very effective as it meant I didn't have any "dead" lines. Every line that was running the length of the board had a purpose. My motors are spread relatively far apart (at least from an electronics perspective) so it was extremely nice to have such clean wiring.

I used entirely the same control code as from the interface programming week except with the inclusion of Neil's RS-232 sample transmit code. Now a character transmitted at the start of every communication wakes up the board that the lines are talking to in order to make sure the correct board gets the correct step. As a result, I can control three boards from a single FTDI cable via this local wired network.