11. Output devices

"add an output device to a microcontroller board you've designed and program it to do something"

After a week of working on input device, which enable circuits to take input from outside, this week's assignment looks the other way, at output.
Output can take many forms. Simply, it can be a bit read on a serial port or an LED that turns on or off. Beyond that, there are LED arrays, speakers, motors, pumps, displays, etcetera. With output devices, a circuit can communicate with a computer, other circuits and people.
From the input devices assignment, I got the idea to build a circuit like a simple game controller with three touch pads and an array of LEDS. Before diving into that, I decided to build a LED array first.

Hello idea: LED array

For the LED array, I based my schematic on the design from the lectures. Besides building the schematic, I also wanted to push what I can do with Eagle a but further. I wanted to give the board a pleasant look, minimize the amount of milling and include a few graphical and informative features.


When i milled the board I saw that the milling bit was not milling away enough of the copper. I stopped the job on the Modela (which you need to do in the terminal) and restarted it with a different z-value. After that I saw better result.


To solder the board, it is important to think ahead about the logistics of what components you need to put in and how to reach the with the soldering iron. For the LED array, for instance, I covered the inner 'ring' of pads with solder first and the mounted the LEDS.


During milling, a trace came out damaged. The problem was that the trace was too narrow in my design (I specified it 0.01, after making it 0.016 traces turned out better). So I had to do a little repairs on the board:


When the board was finished, I programmed it and played around with different behaviours of the LEDS. For example, the numbers of the LEDs on the board are not the same as the numbers in the schematic. So, in the code, you need to adjust for that.


I wrote code to test:

Next, I want to write code where I replace the code for turning LEDs on and off by functions and arrays. I think that would make the main code much more readable.

top of page