Output Devices

In this excercise I design and fabricate a PCB with a MicroController Unit (MCU) with a Red, Green and Blue LED. I made a program so that it blinks in a certain sequence.

Design and fabricate a RGB LED controller

I use the same design which I made for input devices since I include a RGB LED on that PCB. I just use the board that has the correct polarization for a common anode instead of a common GND on the RGB LED.

This exercise gets me closer to constructing a working telecommunications device. I have chosen a RGB LED from Fab Inventory. This device has 3 cathodes (1 for each LED) and one anode. I added this device and removed the switch from the input device design in order to have enough pins for this assignment. I used the hello.RGB.45 from Neil's examples as a guide to add the 3 color LED to my own design

hello.RGB.45 video capture

Associating the RGB

When adding the components, I just needed to add the RGB LED association with KiCAD's CvPCB.

RGB LED in CvPCB

Perhaps I can add one phototransistor for each of the 3 colors with charlieplexing on my final project to detect them all at once (using only 3 pins to drive 3 LEDs and 3 phototransistors) and employ synchronous detection for making very precise measurements with just another phototransistor that detects ambient light.

Checking the rules for the schematic

I ran all the Electrical Rules' Checker (ERC) and got 2 errors.

 falta bildo

And the arrows showed the places where they were.

 falta bildo

After connecting the threads correctly, the ERC could find no errors.

 falta bildo

Assigning the footprints to the components

When assigning the components, the RGB LED did not have a footprint yet.

 falta bildo

So I assigned LEDRGB from the Emanuele Goldoni's previously added FabAcademy KiCAD component libraries.

 falta bildo

Generating the NetList

Generating the netlist allows to make a file that contains the component connections.

 falta bildo

Tracing the paths with KiCAD's PCBNew

Reading the netlist on PCBNew allows to import the components and connections to make the traces on the PCB.

 falta bildo

Distributing the components in order to place them on the available space is done with this button.

 falta bildo

This is for distributing them horizontally.

 falta bildo

I tryed to place the components equally separated.

 falta bildo
 falta bildo

But this tool needs a board edge which I did not trace yet in order to distribute the components.

 falta bildo

I placed the components manually.

 falta bildo

So this is the final trace and cut system.

 falta bildo

Creating an image file of the PCB

Now I could export the traces and cuts to 2 different SVG files.

 falta bildo

Opened the SVG in Inkscape and exported the page to PNG.

 falta bildo

At 2000 DPI. (Notice the size became excesive.)

 falta bildo

Creating Gcode for the CNC with FabModules

With these images:

 falta bildo  falta bildo

In Fabmodules I produced this cuts' and this traces' G-code files.

Program for controlling the LED

I just used Arduino IDE's digitalWrite() to turn the LED on for a certain lapse. Then turn it off for another lapse with delay(). The LED sequence of pulsing is described in the embeded programming lesson.

Then I could pulse in 7 different colors by alternating which LEDs glowed and which did not. I made it do that with a for loop which diminished the interval in ever increasing time lapses as also described in the embeded programming lesson.

Testing voltages

As a group, we tested the voltages at each component.

 falta bildo  falta bildo  falta bildo

Conclusions

We can use up to 12 pins for input or output on the AVR AT Tiny 44 Micro-controller Unit. All pins can handle analog as well digital signals.

I have problems with the sizes of the traces. I thought the traces were thin because I used up to 5 offsets. But even when I use 1 offset, I have the same problem. I had to place wires in place of some of the traces. The only board I did not have this problem was with the ISP programmer. I did not modify that design. It is strange because even the Axis program in LinuxCNC that controls the mill, sees the tracks as wide. But they are milled thin. Perhaps it has to do with the quality of the endmill.

The cuts must not be on the edge of the image because Fabmodules will not consider them as lines to cut. The milling and cutting is done around the contrasting colors.

Source files

Edge cuts in Gcode for output device board
Traces in Gcode for output device board
7 colors sequence program

Other photos

 falta bildo  falta bildo  falta bildo