David Montenegro

FAB ACADEMY 2015

Final Project | Assignments | Download | About | Contact

04_29 Networking and Communications

On wednesday 04.22.2015 we’ve got the thirteenth online lesson with Neil Gershenfeld.
The next lessons can be found on the Fab Academy account on Vimeo.

For this week the assignment was

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

I produced a bridge board from Neil’s files and designed a node with a Tiny44; they communicate via serial bus: the bridge send a byte to the network, every board receive it but just the correct board react doing something, in this case blinking a led.

Fabrication process

I designed a multi purpose board using routing the pins of an AT tiny44 to use it in different applications, and with a led to visualize if it’s receiving or not.
As usual I milled, soldered, debugged and flashed them.

node_mill

bridge_45

both

I flashed the two boards with the files you find below.

Download Network boards
Bridge code
Node code

Than I used a TTL 232R to send chars to the boards via serial port, but at first attempt it not only hasn’t work, but the two boards were very hot, so I immediately detached from the bus without checking for mistakes.

Note the correct orientation of the connector

connector_position

So I re-flashed again the boards to verify if they still work, recheck the connections and repeat the serial communication. Now, after 5mins they are connected to the FTDI, the chip are just a little bit warm.

So I open the Arduino IDE, and than the serial port console and digit the index of the board. because of this line
#define bit_delay_time 100 // bit delay for 9600 with overhead
I started communicating at 9600 baud but than I tried to communicate at different baudrate:

9600: any char - one simultaneous blink;

So I tried to write a very long string (thousands of chars) and doing so both the leds stays on, apparently still, while the boards were receiving data.
Looking at the .c file I remembered that the value node id has to be changed in order to identify each board.

#define node_id '0'

I used 1 for the bridge and 2 for the node.
I also changed the led_delay value from 100ms to 500ms in order to visualize it easily.

So I reconnected the boards via FTDI, and sending via serial port the id of the board and as you can see first the two boards blink and than just the chosen one blinks.

serial_connection