Pic Controlled RGB LED Driver

Discussion in 'The Projects Forum' started by mbasile35, Mar 21, 2012.

  1. mbasile35

    Thread Starter New Member

    Nov 2, 2011
    23
    0
    Hey everyone

    I'm looking into getting a pcb manufactured for RGB LED Lighting modules, where one PCB is populated with the necessary components for control, LED's driven by the controls, and an output hookup for a subsequent board, which would ideally be the same board with just the LED's populated. But that's not important right now, I'll worry about design later. Right now I'm concerned with putting together a schematic. Specifically, I'm using an existing circuit as a base and making my own adjustments, there's just a few things that confuse me about it, and hopefully some of you here can help me decipher it. Anyways, here is the circuit in question:
    [​IMG]

    I'm pretty confident i understand the function of each component, what i don't understand, howevver, is the ouput. This is a diagram that shows how to hook up the LED's to it..[​IMG]
    This leads me to believe that all of the LED's are supplied a constant positive voltage and the transistors, when triggered, complete the path for the LED's to ground. However from the schematic, I don't see that at all? In fact, i dont't understand at all what's going on in the ouput? Can anbody help me figure it out?

    This is the project page for the circuit


    thanks in advance,
    Mike
     
  2. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    That's exactly what is happening:
    http://brunningsoftware.co.uk/FET.htm
     
  3. mbasile35

    Thread Starter New Member

    Nov 2, 2011
    23
    0
    Thanks for the reply! I thought i knew what was goin on! I kinda knew the basic concept of transistors, and i read up last night and that's what i came up with. The reason i was confused is the lableing on the schematic. CN1-1, CN1-2, CN1-3 and CN2-1, CN2-2 and CN2-3 must be 2 sets of 3 pins from 2two seperate Connectors and not Channels which is what i thought. I wouldve expected J for a connector but hey what do i know. The PCB only has one connector of 6 pins and not 2 connectors of 3, that's what got me. I'm gonna finish up with the schematic hopefully by tomorrow, and post it up here to see what you guys think.
     
  4. mbasile35

    Thread Starter New Member

    Nov 2, 2011
    23
    0
    Hey Everybody


    I think I'm about done with the schematic, with one exception. I want to add a 5 Pin ICSP header into the circuit as I plan on using an SMD micro controller. The programmer i have is a cheap JDM2 programmer i bought from ebay. The ICSP out header has pins labeld: Vpp, Vcc, GND, Data, CLK. The controller I'm using is the PIC 12F683 Can anyone give me a hand making the ICSP connections? Here's the schematic:
    [​IMG]

    For the sake of neatness, there is only one LED shown connected to each transistor, but when complete each transistor will have multiple LED's
     
  5. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    You just need to connect up MCLR, VDD, VSS, ICSPDAT and ICSPCLK to the programmer, not sure on the order for JDM programmer, but you probably have that information.
    This will work if you solder just the PIC, then program, then add the other components.
    If you want to add all components, then program, it would be safest to swap the transistors on CLK and DAT to the unused pin and the one with just a switch and alter the code to suit.
    As it is, programming would switch the transistors on and off rapidly and the programmer won't be able to supply enough current for the LEDs so programming would probably fail.
     
  6. mbasile35

    Thread Starter New Member

    Nov 2, 2011
    23
    0
    Isn't there a way, by adding other components such as diodes to block the programming voltage from entering the circuit? I was reading here but wasn't following too well.
     
  7. mbasile35

    Thread Starter New Member

    Nov 2, 2011
    23
    0
    Does anyone know how i can incorporate an ICSP circuit onto the existing circuit WITHOUT changing and pin connections?
     
  8. mbasile35

    Thread Starter New Member

    Nov 2, 2011
    23
    0
    Hey everyone

    Quick update, I've decided against the single board design. And since I dont need to only use one side of the board for the control circuite, i'm going to use more through hole components, mainly so i don't have to add an iscp, and for ease of assembly. Anyways; I've got a main control board laid out and half way routed by I'm also considering puting MOSFETs on each light "module" insetad of 1 main MOSFET per channel. I'm considering this so that i can reduce trace width. I guess its best to start with what i have and go from there.[​IMG]

    This is my initial design for the light module pcb. It takes 24 Volts in, and powers 5 high power RGB LED's. There are also 3 current limiting resistors, 440Ω for the Red channel, and 220Ω for the Green and Blue channels. Both of these component packages were custom made in eagle, which i'm just a little bit wear about. If anyone is willing to check my work, i'd be happy to send the library files to you. Here are the data sheets for both the LEDs and resistors Each set of colors is wired in series, and draws 30ma from a 24 V source, for a total of 90mA per board.


    Basically, what I want to know is what do you guys think is best?
     
  9. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    With a 24V supply and five 2.35V red Leds then its current is only (24 V - 11.75V)/440 ohms= 27.8mA. The resistor dissipates 0.34W of heat.

    With five 3.5V green or blue LEDs the current is (24 - 17.5V)/220 ohms= 30mA. The resistor dissipates 198mW of heat.

    The LEDs have a wide range of forward voltage so some might quickly burn out.
    The current is so low that Mosfets are not needed.
     
Loading...