Jump to content

DIY LED Drivers with Microcontroller


Brian Ward

Recommended Posts

Funny, I was just posting in your other thread!

 

Did you look at the datasheet? There is a 'typical' circuit at the bottom of the first page.

 

Think of it this way, the CAT4101 ensures that the current from a separate source that is going through the LEDs is at a constant current. It does this by varying the voltage that it drops through itself (LED pin and GND pin), ideally the voltage would be set such that the voltage dropped is at a minimum.

 

The chip itself requires a 5Vdc signal to operate, so it needs a separate voltage (can be the 5Vdc common from the arduino board).

The GND also needs to be the samd GND from the arduino board.

The RSET is a "hard set" of the maximum current of the circuit, Table 3 on the second page of the datasheet shows that a resistor with a value of 750 ohms will give a maximum of 700 mA current.

The PWM needs to be connected to one of the PWM pins on the arduino.

 

That is pretty much it.

 

Rob made it easy by designing his own board. (speaking of which, perhaps we could talk him into doing a re-order if there is enough interest biggrin.gif ).

Link to comment
Share on other sites

  • Replies 62
  • Created
  • Last Reply

Top Posters In This Topic

I went through the datasheet, but I wasn't sure if all those components were necessary. It looks like the Vin MUST be the same power supply as that driving the LEDs? I'm guessing that's what allows the chip to regulate the current?

 

So I'll just need to add up the cost for each fixture to determine if I can set up each fixture to run independently.

 

Is there any problem that you know of with running a 48V power supply into 4 or more of these CAT4101 circuits in order to cut down on the actual number of power supplies I need?

Link to comment
Share on other sites

No, Vin is the low voltage (and almost zero current) signal that drives the electronics within the chip. LED is the sensing/regulating output (that is much higher current). However, Vin can be from the same power supply as the LED supply, the chip just needs to have a 5Vdc signal applied to the input. On Rob's schematic (the RC link), he shows a voltage dropping device (LM7805) that would use the same power supply as the LEDs to drive the CAT4101.

 

The chip needs at least .5Vdc sensed at the LED pin to regulate current through the LEDs, its internal circuitry will vary the voltage it drops in order to regulate the current (if I understand how it works correctly). Remember, each LED drops the input voltage by ~3.5ish volts. When I design my circuit, I will also put a voltage divider before the LEDs such that I can vary the input voltage and shoot for less than a volt at the LED pin.

 

You can "slave" arduino's so that they can be independently run or dependent upon a master... I was reading into that last night... writing the code for it looks kind of rough for me, though. However, it can be done, I have a decent reference for it.

 

RE 48Vdc power supplies... I personally am uncomfortable working on stuff that is greater than ~30Vdc... consequences of failure (personal injury and damage) get much higher as the voltages rise. That being said, so long as you wanted to run 13 LEDs per string, I would think it could be done.

Link to comment
Share on other sites

On Rob's schematic (the RC link)

 

This is what I can't find on the RC thread. He references only the 3-driver one and that's a file I can't open.

Link to comment
Share on other sites

No, Vin is the low voltage (and almost zero current) signal that drives the electronics within the chip. LED is the sensing/regulating output (that is much higher current). However, Vin can be from the same power supply as the LED supply, the chip just needs to have a 5Vdc signal applied to the input. On Rob's schematic (the RC link), he shows a voltage dropping device (LM7805) that would use the same power supply as the LEDs to drive the CAT4101.

 

The chip needs at least .5Vdc sensed at the LED pin to regulate current through the LEDs, its internal circuitry will vary the voltage it drops in order to regulate the current (if I understand how it works correctly). Remember, each LED drops the input voltage by ~3.5ish volts. When I design my circuit, I will also put a voltage divider before the LEDs such that I can vary the input voltage and shoot for less than a volt at the LED pin.

 

You can "slave" arduino's so that they can be independently run or dependent upon a master... I was reading into that last night... writing the code for it looks kind of rough for me, though. However, it can be done, I have a decent reference for it.

 

RE 48Vdc power supplies... I personally am uncomfortable working on stuff that is greater than ~30Vdc... consequences of failure (personal injury and damage) get much higher as the voltages rise. That being said, so long as you wanted to run 13 LEDs per string, I would think it could be done.

 

So paralleling ....

 

If I connect the meanwell AC/DC through CAT4101 chips, the chips will handle the current regulation so having 1 power supply split across multiple strings should be fine, right?

Link to comment
Share on other sites

Guest thefishman65

DC 24 Volts to power the LEDs, cut down to 5 to power the CATs. The schematic is basically the one on the data sheet. I just used a potentiometer for the sense resistor. I did not worry about individual caps since the 5 volts was an onboard regulator and just sued some large ones to regualte the 24 volts and 5 volts. PM your email and I will send you a PDF.

 

The CATs are only rated at 25 volts. You can hook multiple CATs up to one supply. I don't see how you can use a 48 volt supply.

Link to comment
Share on other sites

DC 24 Volts to power the LEDs, cut down to 5 to power the CATs. The schematic is basically the one on the data sheet. I just used a potentiometer for the sense resistor. I did not worry about individual caps since the 5 volts was an onboard regulator and just sued some large ones to regualte the 24 volts and 5 volts. PM your email and I will send you a PDF.

 

The CATs are only rated at 25 volts. You can hook multiple CATs up to one supply. I don't see how you can use a 48 volt supply.

 

Gotcha. I was just drawing it out and figured that I don't need that much voltage. A 12V/150W meanwell (http://www.meanwell.com/search/NES-150/default.htm) will drive 12.5A. That 10A at 80%. So if I build the circuit shown on the datasheet and parallel them all, I can use this one power supply ($33) to drive up to 30 LEDs if I wire them with the CAT4101 in 3 LED pieces. Since the 4101 is there to regulate the current, I don't have to worry about the current divider breaking down when I alter the actual current through any given set of 3.

Link to comment
Share on other sites

Guest thefishman65

That will add $1 or so per LED for the driver. If you can find a 24 volt 6.5 amps supply in the same price range or less then it will only be $0.50 per LED. So for 30 LEDs you can save $15. Was the $33 including shipping? I have seen 24 in the $15-20 range.

Link to comment
Share on other sites

Guest thefishman65

Brian,

 

One other thought. It maybe cheaper to separate the controller and driver into 2 boards. You can get Arduino system pretty cheap on ebay and I can sell you just the boards you need. Also it means you could get the LEDs up and running on timers and add the controller later. I was going to do 2 fixtures also, but changed to one. Well the LEDs work, but the controller is still in the wings. Just some thoughts.

Link to comment
Share on other sites

DC 24 Volts to power the LEDs, cut down to 5 to power the CATs. The schematic is basically the one on the data sheet. I just used a potentiometer for the sense resistor. I did not worry about individual caps since the 5 volts was an onboard regulator and just sued some large ones to regualte the 24 volts and 5 volts. PM your email and I will send you a PDF.

 

The CATs are only rated at 25 volts. You can hook multiple CATs up to one supply. I don't see how you can use a 48 volt supply.

 

 

The datasheet says that the CAT 4101 can withstand voltages up to 25 volts at the LED channel. Since the Vin for the LEDs is upstream of the LEDS, wouldn't the LEDs each drop line voltage by ~3.5 volts? So if Vin was 48 volts and there were 13 LEDs, the total voltage drop from the string of LEDs would be ~45.5V so the voltage "felt" by the LED channel would be 3.5 Vdc.

 

What am I missing?

 

(all in normal operations... I understand the risk of an LED shorting out, which could set off a chain reaction that would fry most things in the ckt <- one of the reasons that I would only run 24 Vdc power supplies)

Link to comment
Share on other sites

So paralleling ....

 

If I connect the meanwell AC/DC through CAT4101 chips, the chips will handle the current regulation so having 1 power supply split across multiple strings should be fine, right?

 

assuming you are talking about a voltage regulated meanwell NOT a constant current power supply, I agree... this is what I planned on doing. I found a 10amp 24Vdc power supply that I had planned on running all the CAT4101s with.

Link to comment
Share on other sites

Brian,

 

One other thought. It maybe cheaper to separate the controller and driver into 2 boards. You can get Arduino system pretty cheap on ebay and I can sell you just the boards you need. Also it means you could get the LEDs up and running on timers and add the controller later. I was going to do 2 fixtures also, but changed to one. Well the LEDs work, but the controller is still in the wings. Just some thoughts.

 

 

I am still interested in those two boards :)

Link to comment
Share on other sites

That will add $1 or so per LED for the driver. If you can find a 24 volt 6.5 amps supply in the same price range or less then it will only be $0.50 per LED. So for 30 LEDs you can save $15. Was the $33 including shipping? I have seen 24 in the $15-20 range.

 

I'm definitely planning on making it modular. Plan was to do the controller and driver on the same board mounted on top of the fixture. The Meanwell constant-voltage driver (12V/10A, 24V/6.5A, or whatever) would be separate. This would allow each fixture to be used independently or together. Of course, I'm still deciding on whether to use 1 controller or multiple.

 

 

$1 per LED? How do you figure that? I must be missing something ....

 

Getting the LEDs up on timers and then adding the controller later would be good. What boards could you sell me?

Link to comment
Share on other sites

Gotcha. I was just drawing it out and figured that I don't need that much voltage. A 12V/150W meanwell (http://www.meanwell....150/default.htm) will drive 12.5A. That 10A at 80%. So if I build the circuit shown on the datasheet and parallel them all, I can use this one power supply ($33) to drive up to 30 LEDs if I wire them with the CAT4101 in 3 LED pieces. Since the 4101 is there to regulate the current, I don't have to worry about the current divider breaking down when I alter the actual current through any given set of 3.

 

I think I have a misunderstanding somewhere with your plan, so let me talk through it and make sure that I get it.

 

Since the power supply can drop 12 volts, that is strings of 3 LEDs each (3.5Vdc drop per LED for a total of 10.5 volts). Since you want 30 LEDs, that means 10 strings. Since the LEDs are generally driven around 700mA, that means that your power supply should be able to push 7 amps. So the power supply you are looking at will get you there.

 

Did I get that right?

 

Separately, you could do a quick and relatively easy DIY dimmer using the PWM pin and a 555 timer circuit.

Link to comment
Share on other sites

Guest thefishman65

Yea, I missed it to. When the PWM shuts the LEDs off (for a few nanoseconds) the CAT drops the whole voltage since the LEDs don't have any current. If you need a better explanation let me know.

 

he Meanwell constant-voltage driver (12V/10A, 24V/6.5A, or whatever) would be separate

The CATs do the regulation so to drive them all you needs is a constant voltage source. Was this a typo or are you confused?

Link to comment
Share on other sites

Yea, I missed it to. When the PWM shuts the LEDs off (for a few nanoseconds) the CAT drops the whole voltage since the LEDs don't have any current. If you need a better explanation let me know.

 

 

The CATs do the regulation so to drive them all you needs is a constant voltage source. Was this a typo or are you confused?

 

Chad,

 

Yes, this is what I mean.

 

Robert,

 

Yes, this is what I mean which is why I didn't understand why I'd step up to the 24V power supply to save money?

Link to comment
Share on other sites

^oh... good answer! So, it would be ok with either an elaborate safety circuit that would drop shunt the voltage or a completely undimmed circuit (pretty much not worth it in either case).

Link to comment
Share on other sites

Guest thefishman65

Yes chad you got that right.

 

For my board is cost about $35 dollars for 8 drivers or $4.37 per driver to drive 6 LEDs so the driver add $0.73 per LED.

 

CATS are $1.92 each ($064 or $0.32 right there), then pot or resistor, screw terminals if your fancy, the PCB, etc it all adds up.

Link to comment
Share on other sites

Guest thefishman65

Chad,

 

Right probably not worth those efforts for the higher voltage supplies.

 

Brian,

 

I think you see why longer strings costs less now.

Link to comment
Share on other sites

Yes chad you got that right.

 

For my board is cost about $35 dollars for 8 drivers or $4.37 per driver to drive 6 LEDs so the driver add $0.73 per LED.

 

CATS are $1.92 each ($064 or $0.32 right there), then pot or resistor, screw terminals if your fancy, the PCB, etc it all adds up.

 

I see. The recommendation is to go from 3 LEDs per driver to 6 LEDs per driver. That makes sense then.

Link to comment
Share on other sites

Guest thefishman65

Here is the schematic or pretty close. Just muliply the driver part by 8 for my board

Link to comment
Share on other sites

Here is the schematic or pretty close. Just muliply the driver part by 8 for my board

 

How would I go about opening the file? I've looked at this many times and very much wanted to view the schematic but it's not in a common format.

Link to comment
Share on other sites

Guest thefishman65

Click on it :). It is a link to the RC summary (which I did). That is pretty much one channel of my 8 channel boards. PM me your email and I will send you a PDF of the schematic.

Link to comment
Share on other sites

Click on it :). It is a link to the RC summary (which I did). That is pretty much one channel of my 8 channel boards. PM me your email and I will send you a PDF of the schematic.

 

I've read that page repeatedly. I don't see what part of it describes one channel except for the Eagle zip file that is linked to and I can't open.

Link to comment
Share on other sites

Guest thefishman65

For those trying to follow. Repeat the schematic in that link 8 times bu only use one 7805 and one C1.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...