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.

hello_world

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.

hello_world

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.

hello_world

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

hello_world

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

hello_world

I milled the PCB with SRM-20

hello_world

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.

hello_world

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

hello_world

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

hello_world

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

hello_world

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
hello_world

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

fablab bcn iacc

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.