Skip to content

12. Output devices

Assignment

Individual assignment: add an output device to a microcontroller board you have designed, and progrm it to do something.

What i did

. Define RGB LED.

. Designed board with a RGB LED in KiCAD.

. Mill and solider the components.

. Programed the board.

RGB LED: is a type of LED that can produce three main colors that are RED, GREEN, and BLUE.In other words,its a single LED that contains three LEDs inside it. A common anode RGB LED consists of four terminals out of which one is for the common anode, one is for RED LED cathode terminal, one is for the GREEN LED cathode terminal, and the last one is the for BLUE LED cathode terminal.

Below is the picture of RGB LED diffused smd.

Below is datasheet of RGB LED terminals(anode and cathode).

Below, I made design in which RGB LED colors changes according to arrengement of colors and delay time each displays. I used KiCAD software. Below is the schematic editor.

I assigned into footprints to find fablib components.

Below, i switched schematic editor to PCB editor.

Below, i had to make Route tracks in PCB.

Below, with PCB i have to make edge cuts and plot to produce F.CU svg and Edge cuts files.

Below is F.CU image in Gimp to produce F.CU PNG to export in mods.

Below is F.CU mill tracks.

Below is Edge cut image in Gimp to produce Edge cut PNG to export in mods.

Below is list of components to be solidered.

After i have to pass my F.CU PNG and Edge cuts PNG in mods to abtain rml files and send them to Roland machine to print PCB.

Below is my final board with solidered components.

I used Arduino to program the board. The pins were set the programming was done as follows.

const int bluePin = 1;
const int greenPin = 2;
const int redPin = 3;


void setup() {
 pinMode(bluePin, OUTPUT);
 pinMode(greenPin, OUTPUT);
 pinMode(redPin, OUTPUT);
}

void loop() {
  digitalWrite(bluePin, HIGH);
  digitalWrite(greenPin, LOW);
  digitalWrite(redPin, LOW);
  delay(1000);

  digitalWrite(bluePin, LOW);
  digitalWrite(greenPin, HIGH);
  digitalWrite(redPin, LOW);
  delay(1000);

  digitalWrite(bluePin, LOW);
  digitalWrite(greenPin, LOW);
  digitalWrite(redPin, HIGH);
  delay(1000);

  digitalWrite(bluePin, HIGH);
  digitalWrite(greenPin, HIGH);
  digitalWrite(redPin, LOW);
  delay(1000);

  digitalWrite(bluePin, LOW);
  digitalWrite(greenPin, HIGH);
  digitalWrite(redPin, HIGH);
  delay(1000);

  digitalWrite(bluePin, HIGH);
  digitalWrite(greenPin, LOW);
  digitalWrite(redPin, HIGH);
  delay(1000);


}

The RGB LED is working perfectly. It was prommed to light up RGB LED. the each color displays 1000 and changes to another color.

Download files here

RGB LED files


Last update: August 17, 2022