Using BC327 instead of BC337 but not working as expected?

The circuit given on that site is wrong. It might conceivably do something useful if the collector and emitter of the TIP122 were swapped and the 2K2 resistor were changed to a much lower value, i.e. 5V divided by the required LED current. But it's an extremely inefficient way of driving high power LEDs.

I thought something was a little strange there. Is there a way to have the link changed from the playground to stop others following it?Arduino Playground - HomePage

I thought that about swapping the emitter and collector around as it seemed wrong that the current passing through the LED would be collected by the emitter. This didn't work, the LED would light up say 50% on a TLC write of 0 and go to maybe 75% brightness at a write of 4095. Would it be worth changing the 1k or the 10k?

Is there a simple (but more efficient) method?

Many thanks!

Please supply a link to the LED you want to drive from the TLC5940.

The idea is to control some RGB strips, (eBay specials) http://www.ebay.co.uk/itm/110834883443. I think they are common anode and require 12v. I will use probably 12 channels of the TLC5940 to control 12v MR16 bulbs in my lounge ceiling (as you have helped me to get working earlier in the thread) and use 3 of the left over channels for some RGB strip.

However at the moment for testing on the breadboard the load I am trying to control is a standard 20mA yellow LED connected through a 500ohm resistor.

The page you linked to indicates that those LEDs are designed to work from a constant 12v supply and take not more than 3A. Presumably, this means around 1A per colour. So to dim them, all you need to do is to switch 12V to them using PWM. Start with a regulated high-current 12V supply, perhaps a standard ATX supply. If you want to use TLC5940s, then I would use P-channel mosfets to do the switching. They don't need to be logic level ones, something like IRF9530 will do. Connect source to +12V, drain to the +ve side of the LED strip, and gate to TLC output. Also connect a pullup resistor of around 1K ohms between the gate and +12v. Connect the negative side of the LED strip to ground. [EDIT: set the TLC current to around 20mA, i.e. more than the 12mA that will be sourced through the 1K resistors, to ensure that the TLC outputs saturate.]

A slightly cheaper option would be to use PNP darlington transistors in place of the mosfets, with base series resistors instead of the pullup resistors. However, you would then need to increase the supply voltage to around 14V to get full brightness.

Thanks David that sounds pretty simple :slight_smile: I think I will try the first option, that way I can use the same 12v power source for the LED strips and the MR16 LED bulbs :slight_smile:

I will get some IRF9530's ordered to try out.

Thanks again

Many thanks, it seems to work perfectly with the IRF9530's :slight_smile:

Hello... I was putting together 5 * 3wRGB(350ma per color) to create single RGB wash fixture and wanted to use the TLC5940, seen you guys went thru some trial/errors in the post. I'm techy but not with electronics so much, does anyone have the exact circuit I could see or the BOM and parts. Knowing the TLC can't reach 350ma and there's a solution around it, as was discussed in this thread early but can anyone summarize this recent build? It was a bit hard for me to follow at 100%.... Thanks!

dc42:
The page you linked to indicates that those LEDs are designed to work from a constant 12v supply and take not more than 3A. Presumably, this means around 1A per colour. So to dim them, all you need to do is to switch 12V to them using PWM. Start with a regulated high-current 12V supply, perhaps a standard ATX supply. If you want to use TLC5940s, then I would use P-channel mosfets to do the switching. They don't need to be logic level ones, something like IRF9530 will do. Connect source to +12V, drain to the +ve side of the LED strip, and gate to TLC output. Also connect a pullup resistor of around 1K ohms between the gate and +12v. Connect the negative side of the LED strip to ground. [EDIT: set the TLC current to around 20mA, i.e. more than the 12mA that will be sourced through the 1K resistors, to ensure that the TLC outputs saturate.]

A slightly cheaper option would be to use PNP darlington transistors in place of the mosfets, with base series resistors instead of the pullup resistors. However, you would then need to increase the supply voltage to around 14V to get full brightness.

This is working nicely, but I have just realized the LED strips I have are common anode :frowning: Could I use the IRF9530's to run them somehow?

There is no easy way of using IRF9630s to drive common anode LED strips. Here are two suggestions.

The left-hand one uses PNP darlingtons, which will drop around 2V. So you will need a 14V power supply and small heatsinks for the darlingtons. You can probably omit the 1K resistor, because the darlingtons have 8K resistors built in to them.

The right-hand one uses an octal inverter chip to feed logic level mosfets. There are lots of variations on this (for example, using transistors instead of the 74HC240), however the main thing is that you need to invert the signal polarity between the TLC outputs and the mosfets gates, otherwise the PWN will work in reverse and you won't be able to turn the LED strips complete off.

Hi David. Thanks for the help as always!

I circuit on the left seems more straight forward, but like you say it will be dropping some voltage so will produce some heat. I might get some TIP127's to try out.

The circuit on the right looks quite complicated, and the 74HC240 looks like it might require a fair amount of circuitry to run it?

Thanks

The only additional circuitry the 74HC240 needs is to connect the Vcc and ground pins, put a 0.1uF decoupling cap between them, and also connect the 2 enable inputs to ground. It's an octal buffer, so 2 of them will handle all 16 outputs from the TLC5940.

Thanks they don't sound to complicated after all, I think I will get a few to try out. There seems to be a few manufacturers making them, in general with a IC like this, will they all be the same?

Thanks again

edit.
which of the logic level mosfets do you think would be the cheapest? I can only make out IRL540 from you circuit diagram, are the others likely to be any cheaper than those?

Thanks!

dtokez:
Thanks they don't sound to complicated after all, I think I will get a few to try out. There seems to be a few manufacturers making them, in general with a IC like this, will they all be the same?

Yes, they will all be the same. Be careful, there is a 74HCT240 as well as a 74HC240. The 'T' version is less suitable for this application.

dtokez:
which of the logic level mosfets do you think would be the cheapest? I can only make out IRL540 from you circuit diagram, are the others likely to be any cheaper than those?

From my supplier (Farnell UK), in order of increasing price they are STU85N3LH5 and then NTD4815-35G. I assumed you only wanted through-hole mosfets; there are much cheaper SMD ones.

Brill, thanks David!

I'm searching eBay at the moment, I have used Farnell and RS but I rarely have orders large enough to qualify for the free shipping :frowning:

Would the SN74HC240N or the 74HC240A be the same part?

The IRL540's seem to be the cheapest and most readily available on eBay so I think I will go with a few of them. Probably will stick tho through hole this time because my PCB layout skills are lacking somewhat and usually find it easier to route through hole hole 2.54 pitch stuff.

Thanks again

dtokez:
Would the SN74HC240N or the 74HC240A be the same part?

SN74HC240N is the right part, from Texas Instruments. 74HC240A doesn't sounds like a complete part number, however MC74HC240AN is also the right part, from Motorola.

dtokez:
Probably will stick tho through hole this time because my PCB layout skills are lacking somewhat and usually find it easier to route through hole hole 2.54 pitch stuff.

All the parts I listed are through hole. The first 2 have 0.09" lead spacing, but I have used them with 0.1" stripboard. If you are prepared to go SMD and use SOT23 packages, then there are much cheaper mosfets available than the ones I listed.

Finally got the parts and some time to test out the circuit. I got STU85N3LH5's in the end. After a couple of hours of hiccups I can glady say its working :slight_smile: first I had a strange ground problem that was the cause of some very weird behavior and then I hooked up the 74HC240 not realizing that the pin out is such that the inputs are staggered from side to side of the device :blush:

Thanks David as always! That should be the hardware aspect sorted so I can start building it and using all the channels I will need :slight_smile:

dc42:
The right-hand one uses an octal inverter chip to feed logic level mosfets.

Sorry to reheat this old thread, but it's a really clear discussion of this situation.

The design I'm working on is pretty much exactly as you describe: a TLC5940 connected through a logic inverter to a mosfet, which controls a high-power LED. In my case the logic inverter is a SN74LS04 and the mosfet is a DMN3404L.

My question is about how you chose that 100-ohm resistance between the logic inverter and the mosfet gate. If I'm understanding things right, while the logic inverter output is high, I will be running (5V)/(100Ω) = 200mA through that resistor. So, with six channels at full brightness, I'd be spending 1.5W to keep the lights switched on. That seems like a lot.

What would happen if I swapped this for a (much) higher-value resistor? I'm guessing the answer has to do with mosfet performance, about which I know very little. But it seems worth my while to calculate the biggest resistance I can get away with.