Assignment 15
10.5.2017
Topic: Embedded Networking and Communications
Design and build a wired &/or wireless network connecting at
least two processors.
Learning outcomes:
- Demonstrate workflows used in
network design and construction.
- Implement and interpret
networking protocols.
Have you:
- Described your design and
fabrication process using words/images/screenshots.
- Explained the programming
process/es you used.
- Outlined problems and how you
fixed them.
- Included original design files
and code.
Node for serial communication
This idea comes from my final project. I needed
communication between two microcontrollers. The first one measures
inside temperature and operate as user interface. The second one
measures battery voltage and controls motors. I needed very simple
communication between units and with minimal wires. Communication
speed is low and amount of data also low. I designed new node
board which includes temperature measurement function as I
studied in Assignment 13. Here I used Attiny45 microcontroller. It
uses internal 8 MHz clock as default. I didn't change any fuse
bits.
Also, I minimized size of the board using the same connector for
programming and serial communication. TX pin serves also as SCK
pin and RX pin as MISO pin. I designed similar connection order,
VCC, GND, TX and RX, as my old board from Assignment 10. Further,
pin PB3 control both the RED led and ADC measurement. When it is
1, led lights, and when it is 0, temperature measurement circuit
grounds via PB3. Green led is controlled by pin PB0. I added also
a button to test RESET pin feature.

Communication is treated by serial connection via TX and RX pins
and with 9600 baud rate. The communication code originates from Neil's
hello.bus.45.c code from Fabacademy 2017 pages. I studied
the original code and made some minor changes. I set clock speed
as 8 MHz, added definition for RED led and increased the led delay
to 1 sec.
I milled and soldered by hands two node
boards, programmed them via Atmel studio 7 as earlier assignments
advised and used my Arduino for test purposes. Empty Arduino sketch
can be used as serial communication link to boards.
I produced similar boards, programmed them with only node number
change and they still works differently. Both nodes blink a green
led similarly, but sends different story back to Arduino: node 1 in
readable form and node 2 in unreadable form.
However, they works: understand the address code and react
accordingly.
Dorina had similar problem, she reported in her pages.
I changed also bit delay time to 105 for node 2 and it works now.
Original bit delay time was 100.
I can see also RED led shinning even it is not controlled anyway.
I have plan to use my old board from Assignment 10 as a bridge board
here. It needs similar communication code as these node boards.
Also, I will add temperature measurement components to my nodes and
report temperature changes via them to the bridge board.

I used old hard disk cable from computer as a serial cable. Nodes
worked as designed. When I typed node_id number, this node blinked
RED led. I changed led to RED led, because GREEN led was
connected to pin PB0/MOSI and pins in both nodes were connected
together via serial cable.

Included original Eagle files and control code:
Board schematic: FABnode02.sch
Board layout: FABnode02.brd
Control code: FABserIO_main.c
Board as png files: fabnode_track02.png
and fabnode_out02.png.