Variable Frequency Arduino Generator

28,965

76

14

Introduction: Variable Frequency Arduino Generator

About: Just do things, electronics, woodwork, etc.

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:
Bounce2
FrequencyTimer2
Adafruit_SSD1306

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:

1 Person Made This Project!

Recommendations

  • Big and Small Contest

    Big and Small Contest
  • Make It Bridge

    Make It Bridge
  • For the Home Contest

    For the Home Contest

14 Comments

0
bistván1
bistván1

1 year ago

Hello everybody! Would anyone share the code with me?
Thanks, Steve.

0
NoelA11
NoelA11

1 year ago

Really need the code for this project as i have built it all up and when i went to load the firmware the link is broken so now im stuck with a project that will not work without code, and i have no idea on how to write the code myself. i do electronics not code. please can somebody help me with this? either the author or others in this community?

0
bistván1
bistván1

Question 1 year ago

Szia, nagyon érdekelne ez a project, ezért kérlek megosztanád velem a kódot vagy az .ino file-t?
Nagyon köszönöm, Steve Magyarországról.

Hi, I would be very interested in this project, so please share the code or .ino file with me?
Thank you very much, Steve from Hungary.

1
bankarprasad22
bankarprasad22

Question 2 years ago

can i get the arduio code

0
borsibalint
borsibalint

2 years ago on Introduction

Hello!
Gratuation!
It is project veri good!
I would like make. But I not find, Your frimware.
"file is in owner's trash"

0
MoizR4
MoizR4

Question 4 years ago

From what pins I will get the frequency output?

FHJBRA9J80GN0YN.LARGE.jpg
0
MajoranaL
MajoranaL

Answer 2 years ago

From D11

0
langoni
langoni

Question 2 years ago on Step 2

Hi,
I am trying to replicate your generator without success.
Every thing work very well in the board, OLED, Arduino Nano, etc
However, there is not energy in the IRFP terminal...

Some suggestion...

Thanks,
Cesar

0
rajivdeo
rajivdeo

Question 5 years ago

I only compiled the code for Nano. I get following -

Sketch uses 16320 bytes (53%) of program storage space. Maximum is 30720 bytes.

Global variables use 1607 bytes (78%) of dynamic memory, leaving 441 bytes for local variables. Maximum is 2048 bytes.

Low memory available, stability problems may occur.

Before uploading the code, I would like to know - Will this code have real stability problems?

0
MatijaL5
MatijaL5

Question 5 years ago on Step 2

Sorry, l'm looking forward to make this generator but l'm having problems with the code (Adafruit_SSD1306 library). Could you please Help me somehow?

0
tirteos
tirteos

Answer 5 years ago

Height incorrect, please fix Adafruit_SSD1306.h!???
In Adafruit_SSD1306.h

1. uncomment #define SSD1306_128_64
2. comment #define SSD1306_128_32
3. comment #define SSD1306_96_16

In the example ssd1306_128x64_i2c

4. add #define SSD1306_LCDHEIGHT 64

on top of

#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif

0
tirteos
tirteos

Question 5 years ago on Step 2

the frequency can start from 1Hz???

0
NickM312
NickM312

5 years ago

Fantastic project!
Could this be used as a variable frequency generator in my project?
I need to build an inverter from 12v DC input and to output 200v AC with variable frequency between 500Hz and 3kHz upto 3amps.
This will drive an electrolumiscent panel.
Would love to hear your input...

0
electronic_artist_
electronic_artist_

5 years ago

great instructable . i had watched the transformer video i liked your build. awesome.