RGB LED driver, Any comments?


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Im using a single 12F683 (or 12F675) for controlling the RGB channels and I still have space for an extra potentiometer (for sweep speed) and 2 buttons.



    For PWMing I use PWM instead HPWM, of course if you have 3 HPWM is a little easier, but not much...

    you share a common ground and use a 7805 regulator for the pic, then you can power the regulator and the leds with any value from 5-24V (+ after the resistors)

    I drive luxeon leds without problem

    Have fun

  2. #2
    Join Date
    Jan 2006
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    Hey Peu, I'm working on pretty much the same thing with a 12F675 PWMing to 3 Mosfets. Everything is working well except I'm finding when I PWM from GP2 and GP4 the MOSFETs don't really pulse they pretty much just stay on, or switch off when the cycle gets low enough. I'm not sure why, I've poked the ANSEL and CMCON, but it seems maybe the output voltage on those pins is a little different or something. Anyone have any ideas what might be going on? I see you are driving your green channel with GP2, does that work fine for you?

  3. #3
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ERIK
    Hey Peu, I'm working on pretty much the same thing with a 12F675 PWMing to 3 Mosfets. Everything is working well except I'm finding when I PWM from GP2 and GP4 the MOSFETs don't really pulse they pretty much just stay on, or switch off when the cycle gets low enough. I'm not sure why, I've poked the ANSEL and CMCON, but it seems maybe the output voltage on those pins is a little different or something. Anyone have any ideas what might be going on? I see you are driving your green channel with GP2, does that work fine for you?
    I used this header in a previous version that used gpio.0 as an adc input and 1,2 and 4 as the pwm channels

    @ device pic12F683, intrc_osc_noclkout, wdt_on, mclr_off, protect_off
    @ device INTRC_OSC_NOCLKOUT
    DEFINE OSC 4

    trisio =%00000001
    ansel =%00000001 'analog off except gpio.0
    cmcon0 =%00000111 'Comparators Off
    pasos con 16
    ciclos con 10
    conta var byte
    puerto var byte


    and this is the routine I use for the led brightness increase:

    for conta=0 to 255 step pasos 'Rise routine
    pwm puerto, conta, ciclos ; puerto is the port to be used
    next conta
    high puerto ; after it reached the top brightness, set port high
    return


    you can use the same routine for decreasing, just change the for next and put a LOW after the loop instead of the high.

    hope it helps


    Pablo

  4. #4
    Join Date
    Dec 2005
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Erik

    Try using a 1K pull down from the gate to ground on your MOSFET's. I have found that sometimes they get a little flaky with PWM and the 1K seems to make a huge difference.

  5. #5
    Join Date
    Jan 2006
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    Ya did put some 1K's on and found the same thing, that it all worked perfectly. I should've come back to this post with that. Strange that I haven't seen any mention of doing that anywhere else.

  6. #6
    Join Date
    Nov 2005
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    I don't know for sure,

    since i changed my computer I should digg out the old schematics somewhere. But I'm pretty sure that there where pulldown resistors in my design. It's never a good thing to leave the pics pin floating in mid air, which will always cause weird results.

    This being said, does anyone think it's feasable to design a RGB christmas light with 50 channels from one PIC controller, prefferably 16C class? I don't think it can be done. Last year with the 8 channel set-up, it was already clear that the switching between the colours was getting a bit iffy to say the least, colours bleeded a bit from one transistion to another when working with 2 or more colours at the same time. I would use decimal counters to go down the row of leds, but I don't think it could be switched fast enough to at least have a flicker-free view.

    It was programmed like this:

    set pwm for red - green - blue
    turn on all used channels
    wait a few msec
    turn off all channels
    set pwm for red - green - blue
    turn on all used channels
    wait a few msec
    turn off all channels
    etc...

    When I wanted one out of two leds to be red and the other ones blue, I ended up with a light shade of blue and a shade of pink, which made me think the PWM channels didn't ramp down fast enough or something.

    Steve

  7. #7
    Join Date
    Mar 2007
    Posts
    3


    Did you find this post helpful? Yes | No

    Wink I am a new user.Where is the asm or hex code for this cicuit

    I am a new user.Where is the asm or hex code for this cicuit.
    Thank you very much.

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by eduman View Post
    I am a new user.Where is the asm or hex code for this cicuit.
    Thank you very much.
    You haven't written it yet!

  9. #9
    Join Date
    Mar 2007
    Posts
    3


    Did you find this post helpful? Yes | No

    Smile

    Sorry,
    I don't understand.

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by eduman View Post
    Sorry,
    I don't understand.
    People spend a lot of time learning, building, writing, testing, researching, and repeating that same process until they get the result they are looking for.

    I (as well as many others) would be more than happy to write the code to fit your application, design a circuit, build a board, and I'll even hand deliver it to your house/business/whatever...for the right price!!!
    Or maybe you could just learn it yourself...

    Post your idea for a circuit, and some code to go along with it. We can help you iron out problems.
    There's a lot of people around here that would be more than willing to help you out.
    But, as for me (and most others), I'm not going to do it for nothing.
    One hand washes the other...
    You wash my back, I'll wash yours...
    Do unto others...
    blah blah blah
    Get the picture now?

  11. #11
    Join Date
    Mar 2007
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    Thank you for your information.

  12. #12
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Thumbs down Here to make money?

    Quote Originally Posted by skimask View Post
    People spend a lot of time learning, building, writing, testing, researching, and repeating that same process until they get the result they are looking for.

    I (as well as many others) would be more than happy to write the code to fit your application, design a circuit, build a board, and I'll even hand deliver it to your house/business/whatever...for the right price!!!
    Or maybe you could just learn it yourself...

    Post your idea for a circuit, and some code to go along with it. We can help you iron out problems.
    There's a lot of people around here that would be more than willing to help you out.
    But, as for me (and most others), I'm not going to do it for nothing.
    One hand washes the other...
    You wash my back, I'll wash yours...
    Do unto others...
    blah blah blah
    Get the picture now?
    You're here to make money? With that in mind a long with your rather rude attitude, I think you're in the wrong place. Not saying that it's not possible to pick up a job or two around here, but with that sort of attitude I wouldn't hold my breath.

  13. #13
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Thumbs down

    Quote Originally Posted by T.Jackson View Post
    You're here to make money? With that in mind a long with your rather rude attitude, I think you're in the wrong place. Not saying that it's not possible to pick up a job or two around here, but with that sort of attitude I wouldn't hold my breath.
    Man, you miss the point completely and entirely...way over your head...

    I'm glad you got a good, expensive education. I'm glad that somebody will pay you for your hard learned skills. I hope somebody will recognize you for your many years of effort. I hope those same people recognize you for your years of experience so far. I wish you luck in future electronic adventures. May the demons of evil get confused on their way to your doorstep. I bow to your overwhelming skill and intuition.

    If I may quote a little something I found here on the site:
    Date of Birth: February 8, 1977
    Age: 30
    Biography: Fulltime student - Bachelor of Applied Science in IT
    Location: Australia
    Interests: Cars, Computers, Electronics
    Occupation: Currently not employed

    I like that last line the best!
    Last edited by skimask; - 29th March 2007 at 14:01.

Similar Threads

  1. Conway's Game Of Life
    By wellyboot in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 28th May 2020, 06:14
  2. Free Project - 245 LED Display
    By T.Jackson in forum Code Examples
    Replies: 221
    Last Post: - 16th August 2009, 04:59
  3. new and need help
    By smeghead in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd November 2008, 20:19
  4. Scale 8bit ADC RGB LED voltmeter
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd February 2008, 03:37
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts