Microcontroller based LED Mood Lamp

By | September 8, 2013

LED Mood Lamp

 Abstract:

This paper describes the high power led mood lamp which is used to produce different colors. Different colors are produced using Pulse width modulation. Varying the pulse width, one can produce millions of color combinations using only the three basic colors – Red, Green, Blue.

Technical aspects:

The high power led mood light is based on P89V51RD2 and the ability of this MCU to produce PWM pulses. Varying pulse width we can produce millions of color combinations using only the three basic colors. So only one RGB (Red-Green-Blue) led is capable producing a rainbow of fading colors.

Any remote controller which makes use of RC5 protocol is used to handle all the functions of the lamp. We can choose fading or jumping between colors, we can select a rainbow style or a random color changing behavior, we can choose slow or fast changing of colors and we can pause on a desired color.

Hardware Block Diagram:

mood_lamp

Fig: Block diagram of the IR mood lamp

Components used:

8051 Microcontroller: P89V51RD2

(8-bit 80C51 5 V low power 64 kB Flash microcontroller with 1 kB RAM)

The 8051 architecture provides many functions (CPU, RAM, ROM, I/O, interrupt logic, timer, etc.) in a single package.

  • 80C51 Central Processing Unit
  •  5 V Operating voltage from 0 to 40 MHz
  •  64 kB of on-chip Flash program memory with ISP (In-System Programming) and IAP (In-Application Programming)
  • Supports 12-clock (default) or 6-clock mode selection via software or ISP
  • SPI (Serial Peripheral Interface) and enhanced UART
  • PCA (Programmable Counter Array) with PWM and Capture/Compare functions
  • Four 8-bit I/O ports with three high-current Port 1 pins (16 mA each)
  • Three 16-bit timers/counters
  • Programmable Watchdog timer (WDT)
  • Eight interrupt sources with four priority levels
  • Second DPTR register
  • Low EMI mode (ALE inhibit)
  • TTL- and CMOS-compatible logic levels
  • Low power modes
    • Power-down mode with external interrupt wake-up
    • Idle mode
  • PDIP 40 package

 LED:  RGB LED

Remote controller:

RC5 protocol based remote controller

Remote controller signal receiver – TSOP1738

Programming Language: Embedded C

Leave a Reply