Switching Supply

Here is a switching supply I built using Arduino (on my own board). It uses variable PWM output to drive a switching transistor, which is connected to an inductor. The Arduino ADC is fed from the voltage output, divided using two resistors. It adjusts the pulse width to maintain as close as possible to 1V into the ADC. Here I have a picture of it lighting a neon lamp, using a 9V battery (I used 1:100 for the divider so I measure close to 100V on the output).

Arduino code and schematic are here: https://github.com/franksmicro/Arduino/tree/master/SwitchingSupply2

Cool thing.