Using a PICAXE to replace an LED SMPSU??

radiogareth

Senior Member
I have been wondering if a Picaxe could replace something like a PT4115 LED driver chip by essentially doing the same thing. http://www.micro-bridge.com/data/CRpowtech/PT4115E.pdf shows the chip in question which I have found in a lot of '12 volt' LED drivers. They work really well too, apart from needing a 3 volt overhead.
I'd like to drive a single Red, Green and Blue 3 watt LED using similar principles but off 5 volts. Page 5 of the data sheet explains circuit operation which I think could be achieved in software with the A/D (possibly 10 bit needed). The PIC would need to be clocked a lot faster, but the flexibility could be a lot greater. Target processor 14M2. Yes I could just use suitable series resistors, but that would be wasteful of power. I'd guess that ramping up a PWM might achieve a similar effect, but would probably be too slow unless you arrange the software to ramp up the Mark:Space ratio until the target average voltage is achieved across the current sensing resistor which would need a smoothed average.

Any thoughts.......

TIA
 

geoff07

Senior Member
I'm not entirely sure what you are asking, but remember that the maximum output current from a Picaxe pin is around 25mA. So driving a 3W led is going to need something else as well.
 

hippy

Ex-Staff (retired)
I too wasn't sure what you were asking and I couldn't really figure out what page 5 of the PT4115 datasheet was trying to tell me.

Can a PICAXE-14M2 drive one or more high powered LED's with FET or other drivers and make them dimmable ? I would say yes.

Does that make for a PT4115 replacement ? I am not sure. Beyond controlling brightness is there any other aspect of the PT4115 you are seeking to replicate or is required ?
 

Goeytex

Senior Member
These type of LED drivers use a sense resistor in a feedback loop to control the peak current on cycle by cycle basis.
As the current output rises, the voltage across the sense resistor rises. When this voltage reaches a level that
represents the limit current, the fet is turned off. It's really a rather simple switching power supply.

A Picaxe cannot respond fast enough to the voltage rising across the sense resistor to cut the FET off soon enough
to operate at the speed (1MHz) and efficiency of the PT4115. It's really not the right device for the job.

However, clever use of the Picaxe internal comparators might could result in much slower speed (50 - 100kHz maybe?) , and less efficient hysteretic type switching LED controller. But I doubt performance could ever approach that of the PT4115. This is not something that can be done in a day or two. R & D time is likely several weeks to several months, depending upon electronics & SMPS design experience, available parts, & proper test equipment.

SMPS design is difficult and tricky at best, as there are a numerous things to consider and lots of potential "gotchas".
 

radiogareth

Senior Member
OK Goeytex, all points received. A lot of these type of controllers seem to be fine at 250Khz, so although I accept that its not the ideal tool for the job I will have to try it (at some point) with a Picaxe at 32MHz and see what happens.

Gareth
 
Top