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.
DONT FORGET THE JUMPER WIRES SHOWN IN RED!
C1 1uF 250V
C3 47uF 50V
C4 47uF (50V)
C7 4u7 (50V)
D1 600V 250ns
IC5 7805 5volt regulator
IC7 PIC 12F683
L1 Inductor (22R104C)
R3 1K Linear Trimmer
R4 330 Ohm
R6 330 Ohm
SV1 3 Pin Header
X2 3 Screw Terminal