Step 4: PCB Design

PCB & CCT are in EagleCad format. Both are included in the ZIP archive.

I looked at several existing designs when making this PCB. Here are my notes re:important design characteristics:

1.I followed the Microchip APP note and used a TC4427A to drive the FET. This A) protects the microcontroller from flyback voltages coming off the FET, and B) can drive the FET at higher voltages than the PIC for faster/harder switching with better efficiency.
2.The distance from the PWM of the PIC to the FET is minimized.
3. FET, inductor, capacitors packed really tight.
4. Fat supply trace.
5. Good ground between FET and wall-wort connection point.

I chose the PIC 12F683 microcontroller for this project. This is a 8 pin PIC with hardware PWM, 4 analog to digital converters, 8Mhz internal oscillator, and 256 byte EEPROM. Most importantly, I had one on had from a previous project. I used the IRF740 FET because of its high acclaim on the Neonixie-L list. There are 2 capacitors to smooth the HV supply. One is a electrolytic (high temperature, 250 volts, 1uF), the other is a metal film (250 volts, 0.47uf). The latter is much larger and more expensive ($0.50 vs $0.05), but necessary to get a clean output.

There are two voltage feedback circuits in this design. The first allows the PIC to sense the output voltage and apply pulses to the FET as needed to maintain the desired level. "Table3. High Voltage Feedback Network Calculations" can be used to determine the correct feedback value given the 3 resistor voltage divider and desired output voltage. Fine tuning is done with the 1k trimmer resistor.

The second feedback measures the supply voltage so the PIC can determine optimal rise time (and period/duty cycle values). From the equations in step 1 we found that the inductor rise time is dependent on the supply voltage. It is possible to enter exact values from the spreadsheet into your PIC, but if the power supply is changed the values are no longer optimal. If running from batteries, the voltage will decrease as the batteries discharge necessitating a longer rise time. My solution was to let the PIC calculate all of this and set its own values (see firmware).

The three pin jumper selects the supply source for the TC4427A and inductor coil. It is possible to run both from the 7805 5 volt regulator, but better efficiencies and higher output is achieved with a bigger supply voltage. Both the TC4427a and the IRF740 FET will withstand up to ~20 volts. Since the PIC will calibrate for any given supply voltage it makes sense to feed these directly from the power supply. This is especially important in battery operation - no need to waste power in the 7805, just feed the inductor directly from the cells.

The LEDs are optional, but handy for trouble shooting. The 'left' LED (yellow in my boards) indicates that HV feedback is under the desired point, while the right LED (red in my design) indicates it is over. In practice you get a nice PWM effect in which the LEDS glow in intensity relative to the current load. If the red LED turns (solid) off it indicates that, despite its best effort, the PIC can't keep the output voltage at the desired level. In other words, the load exceeds the SMPS maximum output.



Part Value

C1 1uF 250V
C3 47uF 50V
C4 47uF (50V)
C5 0.1uF
C6 .1uf
C7 4u7 (50V)
C8 0.1uF
C9 0.1uF
C11 0.47uF/250V
D1 600V 250ns
IC2 TC4427a
IC5 7805 5volt regulator
IC7 PIC 12F683
L1 Inductor (22R104C)
Q1 IRF740
R1 120K
R2 0.47K
R3 1K Linear Trimmer
R4 330 Ohm
R5 100K
R6 330 Ohm
R7 10K
SV1 3 Pin Header
X2 3 Screw Terminal
<p>Are you sure the equation 6 in TB053 is wrong? I have made a simple PIC program that I use to switch 12 volts across a a 1.1A 100uF inductor and using the equation (using L instead of 2L), I get 100/12 * 1.1 = 9.16uS. Multiply this by 1.33 gives 12.18uS. So a frequency of 82KHz.</p><p>When I run this code, I scope the output and I am indeed getting 82KHz, but even with a 75% duty cycle, the maximum voltage I can get is about 74V.</p><p>If the equation in the notes were correct I would have (2*100) / 12 * 1.1 = 18.33uS</p><p>18.33 * 1.33 = 24.38uS</p><p>Giving a 41KHz PWM frequency, which I think would give me a better voltage output.</p><p>All I can find on the internet about inductor charging time involves a series resistor. Please can you explain where you got the equation from.</p><p>Craig.</p>
<p>Actually, I think my problem may be that my diode isn't quick enough. I have just ordered some FR305, 250ns diodes. I'll see if that makes a difference.</p><p>Just out of interest, I have also got an a voltage divider on my input voltage to an analogue pin of the PIC which will alter the frequency depending on the input voltage. At the moment, I only have 2 settings, &lt;5.5V and 5.5 - 12V, but may incorporate some more. </p>
<p>I've changed the diode, but still no luck. 68v is the most I can get out of it.</p><p>I'm running the frequencies as calculated in the instructable, but no luck. Any advice?</p>
<p>Great instructable Ian. Really appreciate the explanations on SMPS operation, calculations of inductor values etc. Thanks for sharing. :)</p>
<p>Hey Ian,</p><p>Thanks for the awesome instructables! I really learned a great deal from it and you explained everything so thoroughly. I appreciate it. I'm hoping to use this circuit for a clock I'm building. Because of my design I already have regulated voltage rails so I'm assuming I don't need some of the components. I'm also using a different microcontroller for regulating voltage so the PIC wouldn't be needed. I was wondering if you could help me slim down your design, or at least tell me which components I can omit. I'm not quite versed in analog electronics so this is a bit new to me. I get the basics but I'm still a bit confused. Feel free to PM me. Thanks again!</p>
ummm.....whats a nixie tube?
A nixie tube is a neon indicator that instead of displaying a little dot, can be used to display numbers or symbols. They were used to indicate numbers before they invented the LED or LCD.<br> A quick web&nbsp; search for &quot;nixie tube&quot; would provide you with far more information than I can or care to include in a posting.<br>
Ian,<br>How do you fab your boards? Do you use a home etch kit or do you order online? Most places I've checked are pretty steep for one-off orders. Got a recommendation?<br>Thx,<br>PT
Nice concise,informative instructable,with more than enough info. PS 15Milliamps is enough to kill you.
no 500 ma
0.06 A through the heart, but 3A from fingertip to fingertip wont kill you.
Not if the fingertips are on the SAME hand,but if they ARE on different arms,then the current path IS across the chest,and hence very likely through the heart.
Yeah, forgot to mention that. you're right! anyway, its better not to use yourself as a high voltage wire......
In the UK it IS .015ma @ 230volts........................
Hey man, thanks for the instructable!
First of all, thank for this excellent instructable. The spreadsheet is really great. And the idea of calculating the charge and discharge times of the inductor rather than the inductor size, is something most vendor application notes leave out. Very educational. There is a note at the end about making it possible to implement this with power supply less than 7 volts. I think in order to do that you would need to use a different FET, because the IRF740 only fully turns on at 8 volts. I don't know if it's possible to find a logic level FET that works up to this kind of voltage, my local distributors don't stock them. In fact it might work better with a power transistor like MJE13005. Well that is just a guess, but in case anyone is trying to build this circuit to boost from very low voltage it could be interesting to think about FET selection. I am experimenting with implementing this topology but based on dsPIC30F1010 instead.
Hey Ian,<br/> Would it be possible/feasible to make a 300W power supply with something like this? Obviously, some modifications would be required. <br/><br/>I'm building a hot-air rework station, and having trouble finding a (cheap) power supply in the 300W range. I've always wanted to make your SMPS, and it would be cool to use it in my project. The PSU would be used to power a heating element like this: <a rel="nofollow" href="http://www.sparkfun.com/commerce/product_info.php?products_id=73">http://www.sparkfun.com/commerce/product_info.php?products_id=73</a><br/><br/>I would need to be able to adjust the power going to the heating element, so the pump would probably be powered separately just to keep things simple.<br/><br/>(I want the couch on your website)<br/>
Hi John,<br/><br/>A few thoughts:<br/>1) Sure, you can make a 300W version with enough/big enough induction coils, but there are much better 'topologies' for such a large SMPS. I would suggest you talk to the helpful people on the Yahoo 'Switchmode' mailing list.<br/>2)My hot air gun is pretty heavy. I bet it has a transformer coil rather than an SMPS. This would prob. be easier to deal with.<br/>3) Have you checked the cost of cheap chineese hot air stations? I got mine for only 3x more than the element you link to (about $100). I bet in the end it is cheaper to buy one then put it together, and much safer too. 300 W is a lot of power to provide (in terms of component cost), and you need some heavy duty casing material etc.<br/><br/>This is the hot air rework station (and soldering iron and smoke extractor) that I bought for around $100 (shop around for better prices then amazon):<br/><br/><a rel="nofollow" href="http://www.amazon.com/Aoyue-968-Digital-Rework-Station/dp/B000HDG0AO">http://www.amazon.com/Aoyue-968-Digital-Rework-Station/dp/B000HDG0AO</a><br/><br/>It is the AOYUE 968. This cheap brand is even recommend by sparkfun in their hot air tutorial. I've had mine for almost a year, and I totally love it. The hot air gun is great, but I've really enjoyed having a quality adjustable soldering iron (I used $10 fire starters before this). The smoke extractor saves a bunch of time because I don't have to hold my head away every time nasty smoke rises from the solder and rosin. I believe (have read several times, but not tried) that this iron is compatible with Hakko (expensive/major rework station brand) parts (tips, heating elements, etc).<br/><br/>As you might divine, I am a fanboi for this tool. It was so cheap, and now i feel not having it was holding me back. I solder QFN on a regular basis without breaking a sweat. Give it some consideration, it was much cheaper than I thought and it will probably last forever for light-medium duty work.<br/>
Oh yeah, and it has a blue LED. That makes everything cooler!
Hello: I wonder if this converter can step up from 12V DC to 300V DC, if so, what is the main component to change? Thanks a lot.
Hi Ian Great job on the PS. Having a problem finding R2 & R3, do you have mfg #'s? I'll be building your PIC programer as well. Hope to hear form you. Thanks Charles
R2 is a 470 ohm resistor (standard and common from the r13 resistor range), you should be able to get it anywhere, even radioshack. R3 is a 1k (1000 ohm) linear trimmer resistor (linear potentiometer). This is also super common. It has three legs and looks like a plastic screw. You can substitute other values as well, but I find 1000ohms to give good range and acceptable fine adjustment (see the spreadsheet to estimate the voltage range with different feedback resistors). I just use a single turn pot, though many recomend a multi-turn pot for fine tuning. I've don't think its worth it - the single turn is so cheap (0.10 vs ~2.00 for a good multi-turn). In the dozens of SMPS I've made, I've never had a problem setting the right voltage with a single turn pot. Good luck! Ian
Hi... Sorry if I missed it but how many Nixies can you light with this PSU? (at once I mean) Thanks - Shahar
Depends on how much current each one gets, how big your coil is, and how high the input voltage is. Use the spreadsheet on step 2 to find this out:<br/><br/><a href="https://www.instructables.com/ex/i/DA49B952E2CE10288F99001143E7E506/">https://www.instructables.com/ex/i/DA49B952E2CE10288F99001143E7E506/</a><br/>

About This Instructable




More by ian:Thermal Tweeter networked Twitter printer @tweet_tree: Twitter controlled Christmas tree Hackable Christmas card & ornament 
Add instructable to: