Control Leds with a microcontroller?

Thread Starter

dragracekid

Joined Jun 5, 2011
13
I have a little project very simple im sure of making around 3 different leds turning on and off in succession i don't really know where to start i think i need a micro controller but im not very sure where to start any help would be great im sorry if im a noob at this but im trying to learn
 

Thread Starter

dragracekid

Joined Jun 5, 2011
13
Maybe it is better to explain I'm making a hookah hose that has a Plexiglas part with leds in it. I don't have much room so I'm trying to find bright rgb lights and I want a button that will cycle through 7 basic colors (or the 3 if that is better) and either the same button or another one that makes them blend together through all colors is there an easy way to do this?
 

debjit625

Joined Apr 17, 2010
790
If you want to create different colors using primary color Red Green Blue ,then you have to control the intensity of the colors from the LEDs.That could be done by controlling the current through the LEDs.

Now in electronic you can control current by many different ways, but I find using microcontrollers is easy, just select any microcontroller with in-built PWM feature i.e... it should have a PWM module and that’s it, using PWM you can control the LED's current.


Good Luck
 

Thread Starter

dragracekid

Joined Jun 5, 2011
13
ok so i went to rvac (electronics store near me) and they dont have the microcontroller i need all i found was a 555 timer so until i get the correct parts i was just gonna see if i can make a circuit on a breadboard to make the rgb go through the colors is there a schematic i can use? ill search of course but if someone can point me in a direction that would be great
 

debjit625

Joined Apr 17, 2010
790
can i use this just multiply it by 3? to have 3 knobs to change the intensity of each color in the led?
Yes you can, but if you are just experimenting and don’t want to do that complex 555 stuff at first, then their is a very simple solution not efficient but works, use a variable resistor around 100K linear and a 330 ohms resistor in series with your LED..like this


But if you want to do it in 555 way then rather to follow instructables ,check Bill's article as per me they are the best compared to instructables ,as the link was provided by DumboFixer on above post : http://forum.allaboutcircuits.com/sh...ad.php?t=19075,these

I am specific about the 555's PWM article by Bill.

You can also bias transistor to control current, but that again makes stuff complex so ,I prefer 555.

Also their are many LED driver IC which can be used to control current,you can search them on google.

Good Luck
 

Attachments

Thread Starter

dragracekid

Joined Jun 5, 2011
13
thank you for your help i actually used the 555 timer and it worked great with the pots i got but now i have one more question im looking at getting a pic micro controller (pic16f737 or 767) and i was wondering if that is just way over kill or if it would work well for what i need to use it for? again all im doing is having lights cycle through with one button and throb through the spectrum with the other button thanks for any help :)
 

Markd77

Joined Sep 7, 2009
2,806
They are a bit overkill. PIC12F675 has only 8 pins instead of 28 and will do the job well. It has 5 I/O pins and 1 input only pin.
 

brozizds

Joined Aug 15, 2010
135
howdy,
I have built a similar circuit with Bill M's help at this thread http://forum.allaboutcircuits.com/report.php?p=308549 and it works great you can easily adapt the pcb to RGB LEDs since I have made several of these PCBs and now I have just got a Arduino UNO ($30.00 approx.) which you can program your LEDs to do whatever. Bills design works great, but you will have some work cutout for yourself but a great learning experience even building your own pcb. If your in a hurry the Arduino is pretty quick to learn (Aadfruit sells them and has good start up tutorials) :)
 
Top