Output devices
Week assignment:
ยท Add an output device to a microcontroller board you've designed and program it to do something
Two weeks ago
(see week 8) I started programming the OpenCM9.04 board to run the Robotis Dynamixel smart servos. This week we had to design our own board, which in my case I used to run a servo, and to understand how to program it and run it from scratch.
I used Eagle to draw the schematics of the board and design the PCB, based on Neil's Hello Servo board.

I drew the schematichs the same way they were in FabAcademy's website, but then realized the pins of the voltage regulator were not displayed correctly, according to the model we had in our FabLab.

The model we had is SOT-223, and apparently the pins have different configurations from Neil's board, so the board needed to be changed according to it.

I rotated the voltage regulator and connected to the correct components, so the VoltageIn/VoltageOut are well displayed, as well as the GND.

I then uploaded the traces to Fabmodules, again in Lunix version as I did some weeks ago.

I milled the PCB with SRM-20

Right after milling it I found out there was a trace which wasn't milled properly, and I realized I forgot to check the Design Rules on Eagle.

I get back to design and changed a bit some traces, so that the clearance was correct.

This is the final PCB, once I milled it again.

To program the board I first set the fuses to 20Mhz with Arduino

and then download the C code from
here and the make file from
here. I used the AVRISP mkII to communicate with the computer and the board. I also plugged (in a very rudimentary way) a 9V battery.
To send the maake file to the Attiny44 I used the following code in terminal:
sudo make -f hello.servo.44.make program-avrisp2

Here's a video whilst I was testing the hello servo file, which finnaly run after some more testign.
pass: fab
Download all the files here