Nice! ok, lets see.
The layout is less than idea, but... should be functional. With a linear regulator and microcontroller being powered by your supply - I can't see this drawing more than 50mA from the LM2577 circuit. That could be a problem as even though we look at the 'maximum' current a SMPS can supply, with these simple switchers, all the datasheet references expect a load current quite high, often > 1.0A.
There isn't a ground plane, and the trace supplying power to it from the USB is indeed very thin, but should be good for a few 100mA. There are a couple of traces going under the chips pins - one of which is the feedback line.
This can be prone to noise (any high current traces) but given that you've got it going straight to a pot, that should load it down enough to keep its output steady. The lack of ground plane or heavy ground traces can cause all sorts of issues which I won't go into (another big post maybe?)
Ok, even though the layout isn't great, I'm sure you can get it working without changing that, and the biggest issue I can see so far is the inductor.
As you can see the inductor I was originally using was a weedy little axial leaded RF choke type, so now I'm kind of limited to trying to find an inductor which will fit the space I left for it!
The inductor I'm using at the moment is radial leaded with a ferrite core, specced as follows:
Inductance: 100uH
DC resistance: 0.3ohms
Max DC current: 790mS
Resonant frequency: 5MHz
You may have destroyed the chip on your board by using a smaller inductor to start with. This is because, if the current in an inductor rises above its saturation current (which could have been <100mA in your original inductor) its inductance drops significantly. This means above a certain current it behaves less like an inductor and more like a resistor, the only thing limiting the current that can flow in it is its DC resistance - and if that was low, like 0.2ohms then I=V/R = 4.5/0.2 = 21A can flow.
Of course yu're input cannot supply that and your original inductor most likely had a larger resistance, maybe 1ohm, meaning 4.5A max could have flowed, limited by the USB input to <500mA, but that takes some time to kick in.
The datasheet for the LM2577 has a vast number of equations to calculate inductor peak current, average current etc.. so we can use those to calculate rough specs based on assumptions about your circuit. If all this checks out (all the parts you've used appeared to be ok) then the only thing left is the layout - but that is of course harder to change than the parts, as you'll have to get new PCB's made up, so I guess you want to avoid that
I just deleted a whoole load of calculations from the datasheet, because it has a graph/table for inductor selection. It seems they recommend a higher inductance value for lower load currents. for an input of 4.5V min, 12V out and a maximum output current of 200mA, the table on page 17 of the datasheet recommends an inductance of: 330uh. This makes sense because your switcher is fixed frequency, 52kHz, and a higher inductor means the current in it rises slower when switched on. When drawing less current from the output its current when switched off will fall slower too, as the frequency is 'fixed' at 52kHz, this means the ripple in current will be smaller. That is for the '12v option', which essentially is the same as the adjustable version set for 12v out.
Lower ripple current means the inductors current will swing less from its average current, so if its average current is say 400mA, it won't swing between 100mA and 700mA (close to 700mA would put it in saturation).
Rather than show ALL my calculations I'll just show what I cam e up with from the datasheet making the following assumptions: A quick run down. Vin: 4.5-5.5V (probably 5V). Vout: 12V. Iout (max): 200mA. Vsat 0.3V. Diode drop = 0.5V
Duty cycle: 0.66 max. E.T (volts x time for charging inductor) = 53.3. Iind (average inductor current, at full load): 0.636A.
Using the table on page we want a y axis of 53.3, and a X axis of 0.63, this gives us again 330uh.
Although, there's an elephant in the room - your ebay module probably has an inductor of 100uH, and yet it works fine? This can only mean that 100uH is 'fine' providing it is of high enough current rating, or.. the switcher on your board is screwed, or the layout causing it to switch erratically, or... the compensation network isn't right. - thats a lot of things to check :/ I can be hard to measure the current in the inductor, and difficult to see whats happening in the ebay module without a scope.
The compensation network. Pg19 has an equation for calculating R, we don't know the value on your ebay module but we can calculate what it 'should' be based on your specs. You can plug in your numbers, but I get a maximum value of: 1066ohms,
or '1k' will do. This is based on vout of 12V, vin(min) of 4.5, and Load current max of 200mA.
Similarly for Cout, I get 79uF. and CC 130nF.
These numbers, although nicely calculated, are a bit of a joke from the datasheet, because they are specific to a certain load current.
So, after all that theory, practical things to try. Although it could well be layout (its not helping) here are things to try.
- Add a load current, say 100mA, for 12V out thats a 12 ohm resistance. If you have any power resistors it would help because we 're going to dissipate 1.2W. Check if anything gets hot.
- Replace your switcher chip on board with a new one. If its regulating, then its probably 'not dead', but you never know, sometimes broken chips can behave oddly.
- Replace the inductor with a 100uH one, specced at 3A Isat. Also you could try a 220uH, and even a 330uH, these will require lower saturation currents, say 1.5A.
I strongly suspect that the only real difference between your board and the ebay one (aside from layout, lack of ground plane and thicker traces) is that inductor. Its higher saturation current means it can take a higher current ripple without saturating.
In an ideal world your inductor would have a peak current of roughly double the output current (you draw 100ma at the output, it'll have 200mA peak in the inductor) - but that is for an ideal switcher, the chip maybe have limited on/off times which means the peak current in the inductor, even when drawing very little current - can be much higher.
Do you think the thin trace going from the 2577 to the inductor could be causing problems? I know the traces should all be as thick as possible but it was the only way I could see to route it! as you can probably tell it was originally designed to be home etched single sided with jumpers. In retrospect when I decided to have it fabricated properly I should have gone back over it to see what I could improve knowing that more vias and traces on the other side were an option!
(EDIT: Could have added a ground plane too!)
The thin trace going to the inductor? yes, very much so. Even when the current is fairly low, a thicker trace provides lower impedance. I often design boards to be home etched and end up accidentally leaving jumper links on the design when sending it out for manufacture, and yes, took me a while to be 'liberal' with via's, double side traces and thicker traces when having it built - because I HATE drilling boards, and double sided ones are just a hassle.
As I mentioned in an earlier post, I had the rest of my circuit breadboarded at one point with the eBay board attached and all powered from USB with absolutely no problems, so theoretically if I can get the switching circuit to work as intended the design SHOULD work!
At this point though I'm beginning to think that it must be my board design that's to blame. Should have done more research about SMPS before I made it!
So it seems its just the switcher, on your board. If you can get parts very similar to the ebay module (try and get the same inductor, and just solder stubby thick wires to it, then solder that to your board!) with the same compensation netowrk values, and the same output caps - and it *still* doesn't behave? then I'm afraid its the layout. First port of call though, inductor.
Wow what a post... sorry, I tend to just ramble with equations, detail and idea's. Don't be put off, skip most of it until you see something that makes sense lol
Edit: just remember you mentioend the adjust pot got hot: its only 1k, so it'll be disappating 144mW. Try using 4.7k or 10k.