Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Automotive RGB LED Controllers Using Flash Memory?

Status
Not open for further replies.

Admiral Doom

New Member
Hey guys, this is my first post here. I'm working on a project to integrate Tri-color LEDs into my car to replace all of the interior lights including dash lights, dome light, and footwell lighting. Each of these sections will be independent, so I will be building a total of 3 of these controllers. Each controller will need to drive a total of about 20 LEDs. The controller will be powered by 12v input so I know I'll need to pull that down to 5v. I know the basics of PWM circuits and how to use them to control these LEDs, but here's the tricky part. I need them to be independent (able to operate by themselves without any input besides 12v power) but need to be changed by a connection with a computer (i.e. change color via usb or serial). I have a computer integrated in my car for audio/video, and I'd like to be able to change the color via RGB values from the computer. The easiest way I could think of would be some sort of flash chip that would contain the RGB values to control the PWMs and be flashable from the computer. Has anyone ever seen any schematics for something like this? How would I use values in a flash chip to control a PWM? What would be the easiest way to interface with the computer? I appreciate any advice and any suggestions pointing me in the right direction! Thanks in advance!
 
A tiny microchip PIC would probably handle everything you need, they have internal flash memory in some/most models for storing settings, are easily connected to a host PC via usb/serial/parallel ports, and can either output the pwm directly or control an external pwm.

my 2 cents would be connect using serial if possible (easy!), store and restore the pwm values in the PIC and output them from the pic through a transistor/mosfet to power the leds

Should only need the PIC and very few external compnents. Something to think about. Having an input that reads the state of the sidelights on the car, once sidelights are turned on dim the leds a bit, dark cars and bright leds are no fun (not whilst driving anyway)
 
The LEDs will act as a replacement for lightbulbs in the car, just with custom, changeable color. All the lights will be wired up to the headlight/door switch and the brightness will be set to a good value for night driving. What PIC would you recommend? Remember that I need 3, so hopefully not too expensive! :) Thanks for the quick reply!
 
Last edited:
As mickster has said, a slightly modified (for running more leds) version of the circuit found at RGB LED controller

The 12F629 costs £0.98 from RS, and RS are expensive - I have picked them up for around £0.29 before. It has built in flash storage that you can use to save your settings, and with a little bit creativity on the 'connect to pc' front, you should only need one circuit for your full RGB instead of 3 seperate circuits.
 
From the FAQ:

FAQ:

Multiple RGB lights not staying in sync
This note follows a query I had from someone who built these RGB lights. Because the timing is generated from the internal 4Mhz oscillator and there is no way to synchronize each device with others, even if they are running the same sequence, the colours quickly get out of sync with each other.

If you're building a light bar or any application where you need more than one unit and they need to stay in sync you should build the 'serial controlled RGB driver'.


'serial controlled RGB driver' link:
simple serial RGB LED controller and driver
 
Would that not only apply to the 'sequences' that would get out of sync, in the context of the first post it is only a colour and not a sequence that is being generated, therefore there is nothing to syncronize, but adds unneeded complexity to the project.
 
Yea, the led's will be a constant color, but I'm gonna write a plugin for my computer that will allow me to "push" a new color to the different zones. That serial controlled driver will work PERFECTLY. Thanks for all the advice!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top