Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Lighting (RGB diodes) driver

Status
Not open for further replies.

Vermes

Advanced Member level 4
Advanced Member level 4
Joined
Aug 2, 2011
Messages
1,163
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,316
Activity points
22,318


Presented device is a 40 RGB diodes driver. The construction is quite simple, there are few elements on the board:
  • stabilizer LM7805 + heat sink + voltage filtering capacitors
  • microcontroller Atmega8
  • ULN2803AG
  • quartz 16MHz
  • system MAX232 connected on tape



The driver is to control 40 RGB diodes on common wires.

Assumptions:
  • ability to connect 40 RGB diodes
  • remote control by the program from touch panel
  • different lighting programs consisted of:
    • PWM (gradual transition of colours)
    • possibility to turn on a single colour of diode – with its adjustable brightness
    • police lights
    • all colours in turn
    • possibility to change the speed of effects (time of transition, blinking, etc.)
  • possibility to connect different diodes
  • possibility of emergency control using buttons

System ULN2803 were used to control diodes because of they are really easy to connect, quick to be changed when damaged and their maximum current consumption of 500mA.

The board was made by thermal transfer method, then chemical tin covered. Pictures show the board before and after covering.
Then holes were drilled, elements soldered and the program uploaded.



The program for the driver was written in Bascom, and the program for the computer in C++ Builder. Below you can see a screen of running the control program.



Remember to declare Timer2 correctly, because mistakes can cause problems with using output OCR2 in Atmega8. Below there is the correct configuration to control PWM from OCR2 output.

Code:
Config Timer1 = Pwm , Prescale = 1 , Pwm = 8 , Compare A Pwm = Clear Down , Compare B Pwm = Clear Down 
Config Timer2 = Pwm , Pwm = On , Prescale = 1 , Compare Pwm = Clear Down 

'Wyjścia PWM: 
Pwm1a = 0 
Pwm1b = 0 
Ocr2 = 255

Video of the program working:


Pictures of tests:



Link to original thread (useful attachment) – Sterownik oświetlenia - Sterownik diod RGB
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top