Hello everyone, this is project How-ToDo. Since some of you asked to show in detail my variable frequency arduino generator for high voltage power supply, here it is.
Step 1: Circuit
The circuit is very simple, Arduino nano, I2C OLED display 128 to 68 pixels, 3 transistors and three buttons, two of buttons are responsible for frequency adjustment, and the third button turns ON the output signal. It's would be good to add an optical isolation or driver with GDT but I don't have components for that. Primary coil on the transformer contain 5-10 turns with 14 gauge wire, but 20 AWG wire should be enough. Also for this circuit it is necessary to make a gap between the halves of the ferrite core, I simply put a layer of paper tape.
Step 2: Firmware
The frequency is adjustable from 30Hz to 1MHz, and since its based on built-in PWM, the higher the frequency - the greater the steps, at the end it amounts to tens of kHz, but for my purposes in the range of up to 100 kHz it's good enough.
Before uploading Firmware you need to connect these libraries:
I also added power from the battery, it's some sort of power isolation, but it's going to work fine just with LM7805.
Actually there is not much to talk about, hope you like it, see you soon!
Find me on social media: