Control Leds with a microcontroller?

Discussion in 'The Projects Forum' started by dragracekid, Jun 5, 2011.

  1. dragracekid

    Thread Starter New Member

    Jun 5, 2011
    13
    0
    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
     
  2. DumboFixer

    Active Member

    Feb 10, 2009
    219
    34
  3. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Use a decade counter and pulse with the desired frequency of LED flashing.
     
  4. dragracekid

    Thread Starter New Member

    Jun 5, 2011
    13
    0
    So if I want to use a 555 with rgb leds how hard is it to make them fade into the next color?
     
  5. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    If you want them to fade then it is better to use a microcontroller!
     
  6. dragracekid

    Thread Starter New Member

    Jun 5, 2011
    13
    0
    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?
     
  7. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    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
     
  8. dragracekid

    Thread Starter New Member

    Jun 5, 2011
    13
    0
    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
     
  9. dragracekid

    Thread Starter New Member

    Jun 5, 2011
    13
    0
  10. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    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
    [​IMG]

    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
     
    • f.JPG
      f.JPG
      File size:
      5.8 KB
      Views:
      55
  11. dragracekid

    Thread Starter New Member

    Jun 5, 2011
    13
    0
    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 :)
     
  12. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    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.
     
  13. brozizds

    Active Member

    Aug 15, 2010
    135
    0
    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) :)
     
Loading...