Output Devices

Tasks of the week

Group Assignment

  • Measure the power consumption of an output device.
  • Individual Assignment.

  • Add an output device to a microcontroller board you've designed, and program it to do something.
  • Group Task

    In this week's group task, we have to measure the power consumption of an output device.

    Measuring Power Consumption of RGB LEDs

    As one of our project is on RGB LEDs so we decide to find the power consumption of RGBs on different color pattern. We write some codes which blink 1 RGB with specific color and measure current on that project.

    Code to check Red LED


    Checking current of RGB when only one Red LED is ON


    The current is measured 47mA which is multiplied with 5 Volts is equal to 235mW

    Code to check Green LED


    Checking current of RGB when only one Green LED is ON


    The current is measured 40mA which is multiplied with 5 Volts is equal to 200mW

    Code to check Blue LED


    Checking current of RGB when only one Blue LED is ON


    The current is measured 48mA which is multiplied with 5 Volts is equal to 240mW

    Code to check "White" LED


    Checking current of RGB when only one "White" LED is ON


    The current is measured 78mA which is multiplied with 5 Volts is equal to 390mW

    Code to check "Black" LED (no LED)


    Checking current when no any RGB LED is ON


    The current is measured 32.1mA which is multiplied with 5 Volts is equal to 160.5mW

    Different colors have different current consumptions. As per results we found that green color have low power consumption and white has maximum power consumption.

    Individual Task

    As Individual task for this week, I choose to embed a 16X02 LCD to Atiny 44 IC. So, for that I designed it on eagle. Before designing it, I read the pin-configuration of LCD, here the LCD which I used is "Standard HD44780 LCD".


    Basic description about the used LCD are given here for better understanding: The pin configuration of the LCD and connections to attiny44 are pointed out below:

    I sketched its design on page, to assemble and connection of the each and every pin of the required circuit for easiness in designing in eagle. the Sketch is shown here:

    this is an easy way to designing the circuit on a page


    Now it is the time to design and implement above sketch on "Eagle". I collect all required components in "schematic" part of the eagle software then make connections to them. After connecting the required connections of components, I went to "board" part where I gave final shape to my board.





    After completing from eagle side, I exported .png image of the design then by using basic steps to generate .rml files for traces, drills, and outline.





    Here I got two connections which joined each other due to less empty space, so by getting rid from this problem, I disconnect wrong paths by using a cutter. In below images both parts are shown.

    Wrong path connections, then disconnecting them by cutter


    Bill of material of the board, and soldering the components


    Board is soldered, and connections checked by multimeter, LCD can be attach and remove easily to and from board


    Now It is time to up the board by burning bootloader to microcontroller through ISP programmer. Below images shows successful completion of the burning bootloader in the circuit.

    The blinked LED is not ON by programming, It is power LED, connected directly to VCC and ground with a limiting resistor of 499 ohm value. The other image reflects as burning bootloader successfully


    I upload the simple LCD code in arduino ide, it compiled and uploaded successfully, the code is written below:

    #include "LiquidCrystal.h"
    const int rs = 5, en = 4, d4 = 3, d5 = 2, d6 = 1, d7 = 0;
    LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
    void setup() {
    lcd.begin(16, 2);
    lcd.setCursor(6, 0);
    lcd.print("NADIR");
    }
    void loop() {
    lcd.setCursor(1, 1);
    lcd.print("FABLAB KHAIRPUR");
    }

    Code uploaded successfully


    Below images shows that how brigtness is increased simply by varying the potentiometer





    This was all about LCD interfacing with attiny44 on a single board, I enjoyed and learnt many undefinable things in this week. So, this is output device week, and I displayed the text on LCD by controlling it through a microcontroller 'attiny44'.

    Download all files from here

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