First Post! Hep with my first SIMPLE switching Regulator 12v ->5V

Status
Not open for further replies.

Ocelaris

New Member
First Post! Help with my first SIMPLE switching Regulator 12v ->5V

Hello,
What a neat site, I hope this is as enjoyable as it appears to be. I don't have any formal background, but just like to tinker, and impove my electronics knowledge...

My project for over the holidays is to improve the visibility of my motorcycle by adding running lights and more brake lights. I plan on using 350ma high brightness LEDs, LUxeons or knockoffs. My biggest challenge is in the side lights which will function as brake lights and turn signal lights... It's a small space, and most of that space will be taken up by the LED's heatsinks...

So I didn't want to use a linear regulator to bring 12v down to 5v, because at 320ma per LED that's 2.33 watts of power being dissipated by the VR... need to keep heat and size down, so I thought a little switching regulator would work. Found a few for ~13-16$...

Texas Instruments bought out Power Trends which used to make a LM78XX style 3 pin switching power regulator that was only slightly bigger than a T220 case, but now they have the PT6101:

**broken link removed**

Which would work fine 1 amp is enough, but at 15$ a pop from digikey, I was hoping to make my own to save some $.

C&D also has a module at mouser, but that's 18$ a pop for 1amp 12v -> 5v

The trick is running only 2 LEDs @ 2v forward voltage drop from 12volts is realistically what I'm doing. I could make 1 big switching regulator, and distribute the 5v around the bike, but they sometimes need different on/off states, blinking, brake light etc...

Any reccomendations on a "kit" or SMD sized switching regulator? I can do dip/sip soldering fine, but the inductors really scare me, I have had bad experiences trying to size for current and physical dimensions inductors before... But I'd really like to build my own, but hoping somebody had some cheap easy chip guidelines to follow to make a small ~1-2 amp switching regulator.

Thanks, Bill
 
Last edited:
You may want to just drive everything from 12V. Instead of worrying about a regulated voltage, go for a regulated current through the LEDs - that will work best for a constant brightness even as the 12V rail varies.
 
check out National's SimpleSwitcher line of integerated switchers. As the name implies, they are very simple to use. **broken link removed**

The LM2575 is an 'older' chip, runs at a low freq, so it needs a BIG inductor, but the low freq also means less expensive switching diode and capacitors.

The LM2675 runs at a much higher freq, requiring a smaller inductor. It's also 'newer', claiming an efficiency of 90+ percent.

OutToLunch has it right, drive your leds with constant current, don't worry about voltage, let the chip do that. Both of these simple switchers can be configured for constant current by changing the feedback circuit (using a sense resistor in place of the voltage divider).
 
Thanks, I do plan on running constant current for sure, since it's a high wattage LED, and at 8-9$ a pop, don't want them fizzling.

The problem is starting from 12-14.5v, I am only running 2, 2v LEDs in series, so I'm only at 4v forward voltage drop... So I am then dissipating 8-10.5 volts @.35mA = 2.8-3.675watts of power wasted. So I was trying to get the voltage down with a switching regulator... But there are so many...

I found a few constant current switching regulators, namely the Maxim 5035

**broken link removed**

Which has an application to turn the regulation into a current regulator. Like you said changing the feedback circuit to constant current using a sense resistor... But I'm fuzzy on whether I could do that with most/all switching regulators...

Does this work the same as using an LM317 linear regulator for constant current, instead of constant voltage? If I can look at that circuit and apply it to the switching regulator, that would give me a "hint"... Thanks for the help
 
try this link instead

**broken link removed**

specificaly:

LM3404 1.0A Constant Current Buck Regulator for Driving High Power LEDs, VIN Range from 6V to 42V

LM3405 500kHz/1.6MHz 1A Constant Current Buck Regulator for LED Driver (ooh sot23-6)


any regulator that exposes a feedback pin, be it linear (lm317) or switching (lm2575) can be configured to operate as constant current or constant voltage.

one thing that you'll want to watch for is the feedback voltage ... a lot of chips are set at the same 1.23 - 1.25v that the original LM117 family used. This means you'll experience quite a bit of power dissipation in your sense resistor using high-power leds. For example:

Amber Luxeon III is 1.4 amps.
V/I=R tells us 1.25v / 1.4a = 0.89Ω, for sake of the example lets round that up to 1 ohm.
V/R=I = 1.25v / 1Ω = 1.25a
I²R = P says 1.25a * 1.25a * 1Ω = 1.5625 watts!

so you need a 1 ohm 2 watt resistor!

One way around this is to use an op-amp and a smaller sense resistor. For example, using a 0.25Ω resistor drops your power dissipation below 100mW. The op-amp will amplify the voltage from the sense resistor (Which is now 1/4 of what it needs to be)
 
Great, that's pretty much golden, I just need to do some calulatins on that...

I'm just a bit worried about the small size of the SOT23-6 chips, but I ordered 5 samples from national... probably will pick up the inductors/caps etc... at a local place friday so i can tinker over the weeked hopefully...

I got the 3402 for 1watt LEDs, since that's all I will be using... I'll post some numbers, and if I can figure out eagle, a schematic... otherwise photoshop will have to do! Thanks again
 
Ocelaris said:
If I can figure out eagle, a schematic... otherwise photoshop will have to do! Thanks again

Try ExpressPCB [same price ] its learning curve is not as steep.
 
problem with express pcb is there's no export (afik) to an open format ... so you're locked into having express pcb make your pcbs for you.

eagle has a schematic capture program (board layout), which exports in an open format like gerber.
 
I've used ExpressPCB, and I came to that very same conclusion, locked in... tried printing it in PDF etc.. etc... for little projects it's nice, but I want to learn Eagle better. I've made up an excel spreadshee based on some of the calculations that National provided, so I can adapt it to my circumstances. I will try and post the numbers, just need to do the efficiency #s and I'll be done.
 
Ocelaris said:
I've made up an excel spreadshee based on some of the calculations that National provided, so I can adapt it to my circumstances. I will try and post the numbers, just need to do the efficiency #s and I'll be done.

national has all sorts of simulators, but none of them simulate the constant current mode, which is a shame
 
I sorta saw that playing around with the simple switcher program... Would be nice, would make my jump from linear regulators to constant current regulators much more intelligible... as is I've kinda jumped in over my head again with this project

So I finished the spreadsheet, just basically following the example of the
LM3402: **broken link removed**

PDF here: **broken link removed**

**broken link removed**

I have the Spreadsheet here where you can enter input voltage, Forward Voltage Drop of the LEDs in series, Current of the LEDs (350mA), and if you have a special resistance for the LEDs @350mA

http://spreadsheets.google.com/ccc?key=pXwfMBunjDQ1vdjCjSXbJfQ
*Sorry it appears you have to have a gmail account to view the spreadsheet, did not know this... also have Excel document...*

Anyone can view it, if you would like to work on it, drop me your email address and I can add you as a collaborator. Just in case in the future somebody like myself wanted a copy to plug their own #s into it.

Now apparently my chips will be here tomorrow, and now I have to pick the external components, and I'm a bit worried about all those small parts... not necessarily physically soldering, I've done enough SMD rework with my vac-sucker to be ok, but physically placing them on a board etc... and what size components? They recommend obviously making a Gerber Plot and SMD Machine gun, but for this little project, can I just use some regular through hole sized things glued to a piece of cardboard or Predrilled pcb?

I've messed up picking Inductors before, and Caps I think I need all ceramic X7R type...

For L1 it says I need a 4.57µH, 721.875mA capable inductor, but they had a value of 96.00mΩ for Max RDC (Resistance to DC?) Is that a concern for SMD components only? And What is Q? I thought Q was the resistance to saturation, should I pick a High or low value based on my frequency, which is almost 900kHz in my situation?

Besides the infinitesimally small .41Ω Current Sense Resistor that I need which will be hard to find, Is there anything else I am missing that may be tricky? The Schottky diode? 58mA seems like any/all can handle that, and 40v reverse voltage... Here's my parts list for 12v in, 4, 2.5v Forward Dropped 350ma Red/Orange LEDs (looks better on the Google Spreadsheets I promise)

Parts List Spec 1 Spec 2 Spec 3

U1 LM3402
C1 (Cin) 875 nF 25 v X7R ~1nF
C2 (Cb) 10 nF 25 v X7R
C3 (Cf) 100 nF 25 v X7R
C4 (Co) 1.11 µF 10 v X7R
D1 40 v 58 mA 23.33 mW
L1 4.57 µH 721.875 mA 96.00 mΩ
R1 (Ron) 29,552 Ω 1 %
R2 (Rsns) 0.41 Ω 1 %


Would you recommend SMD components and just tough it? I know SOT23 is going to be small... but I'm hoping to get it working :-/ Should be fun either way. Thanks again for all the help, everyone.
 
Last edited:
the chip you linked is a uSOP-8 (MSOP-8), in other words, a micro so8 package, it will have very fine pitch leads, much worse than an SOT23

if you're wanting to do this on protoboard, look for chips in a DIP, or TO-220 package. You don't have to pick a chip that's rated close to your output current (like your 3402 is rated for 500ma for your 350ma output), a 1500ma chip will output 350ma just fine.

if you can't find a 0.41 ohm resistor, I know they sell 0.82 ohm (I've got a bunch) ... using two in parallel will get you 0.41

your schottky should be under power rectifiers or schottky rectifiers ... there's two different kinds of schottkys, ones that only handle very small current, and ones that handle the higher current. 1n5819 is a very common schottky, rated at 1 amp.

for the inductor, find one in a size and package you're comfortable with, the ratings are a secondary concern, just as long as you have one 'big enough' the ic should adjust to whatever you give it ... most of these reference designs aim to use the smallest inductor possible, so you can cram the circuit into a cellphone or other tiny gadget.

same thing with the caps ... X7R are 'premium' capacitors, they maintain their rating to very tight tolerances over a wide temperature range. build your first kit using parts that are inexpensive ... then build another refined version you'll actually use
 
I got the LM3402 chips today, they are going to be incredibly difficult to work with. I think I'm going to scale back my grandiose ideas of that LM3402 is a bit crazy... Why was I going with the LM340X series instead of the simpler DIP packaged 2675 or 2575 constant voltage switching regulator? I really can't figure that one out now. But the 2675 comes in a convenient 8 dip package...

The only problem I see, is figuring out the sense resistor to turn it from constant voltage to constant current...

Per this page on led.linear1.com

**broken link removed**

The Equation is I = Fv (Feedback voltage) / Resistance = Current... so because the 2675 has a 1.21 feedback voltage, rearranging that equation we get

1.21v / .320= 3.78 I have some 3.9ohm 2watt resistors lying around from the LM317s anyways, which comes out to about 315mA...

**broken link removed**

Is that correct in assuming that I would just place a resistor from the Vo to the FB (Feedback) pin? The "adjustable" version shows a resistor dividing network between Vo, Fb, and Ground... so I assume I'm on the right path?

Why was I shooting for the stars? I need some successes under my belt, I have enough failed 555 external NPN projects already... so frustrating to get all excited and now have to wait. Nowhere to get this stuff locally either ;(

If anybody wants to buy some 3402 chips cheap, hit me up will have extras...
 
the feedback resistor goes in series with the load, and the feedback line connects to the load side of the resistor

so for example, the resistor could go between your LED cathode (-) and the ground connection, or it could go between the output capacitor (+) and the LED anode (+), just use whichever connection will result in a shorter wire for the feedback... since you'll be using wires, keep the feedback wire away from the diode, inductor and Vsw pin.
 
If your going to use that switcher from national, make sure you order the "-ADJ" part to get the 1.21V reference. You use small valued resistors that won't burn as much power, too. Instead of a 3.9 Ohm resistor, you could use a 100mOhm resistor and then put that voltage through a non-inverting gain to get 1.21V at the proper current - take that voltage and tie it to the FB pin. A 100mOhm resistor would only burn about 10mW, so an 0603 surface mount would work fine - 0805 may be easier to work with.

If you find you can only put so many LEDs on a single string because of the forward drops, but you need more, you could probably go to two strings of LEDs run off the same output rail. Since this would double the current the part would be putting out you would want to make sure that the power dissipation in the part doesn't exceed about 1 Watt, the thermal impedance junction to ambient is about 105C/W. If you were to do this, you'd need a current sense resistor in both legs to make sure they are balanced but just monitor one of the resistors. There may be a current imbalance between the two strings, but probably not enough to make a noticeable difference.
 
Well, here is some information to help get folks started on finding some suitable switcher chips, how to turn a voltage switcher chip into a constant current, using pre-bias to save power lost in sense resistors, and some sense resistor circuits, with additional op-amp to save losses in sense resistors, and much more:

**broken link removed**
 
is the OP still around - this is an OLD thread, I wonder how they made out with their project?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…