Week 12

Output Devices

Assignment

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

For this assignment I choose to work whit a RGB LED due to the relation with my final project. An RGB LED means red, blue and green LED’s in one package. One of thee advantages of these LEDs is that not only have those three colors, but also can give combinations of this colors (Figure 1). There’s two kinds of RGB LEDs: Common Cathode (-) or Common Anode (+). The difference is explained in Figure 2.

Atom
Fig 1 - Colo r Mixign in RGB LED


Atom
Fig 2 - Common anode and common cathode RGB LEDs


PCB Design and production

The Design of the PCB was just a redesign of the RGB Board presented by Neil during class. The MCU used in this case is an Attiny45 . The board has ISP headers and a two-pin header for Vcc and GND. The design process was very similar to the ones described in Week 7 and Week 11. The schematics and the board are shown in Figure 3 and 4. The PCB Traces image is in Figure 5 and the Finished PCB is in Figure 6.


PCB Programming

To program the board to do something Atmel Studio was used.
The programming of the circuit is quite simple, but is necessary to understand how the RGB LED works. The LED use is a common anode LED, so the Anode is connected to the Vcc Line. And the three colors are linked to three different pin in the Attiny45. In my PCB the network is:

  • Red - PB2
  • Blue - PB1
  • Green - PB0

So if I wanted to light the green color the PB0 pin must be high, or the blue color the PB2 pin must be high or send a signal.

The programming was made using the process describe in Week 9 (Link), with the ATMEL-ICE Programmer, and in this case the Arduino Uno board just to give power to the PCB (Figure 7). I start with a simple program just to create blink in each color. In this point I realize thar the red color doesn’t work; after checked the joints and the tracks didn’t find any error, so it’s possible that the RGB component is broken. However, I was able to keep programming with the other two colors. In the video the results of the programs I tried is showed



Files


In this section the files generated during the development of the assignment will be available to download.


RGB.sch RGB.brd RGB_traces.png one_color.png RGB_Blink.c