Some of the mentioned products and components in this project are sponsored by digitspace:

Preview: What You Will Learn

Step 1: Developing the Tesla Coil Controller web application in PHP and JS

With this web application named Tesla Coil Controller, you can control a mini Tesla coil module and a cooling fan on the localhost. It saves the recently entered commands to a database table and prints the current information when requested by Arduino Nano 33 IoT.

You can test the web application (Tesla Coil Controller) before downloading from here.

You can download the web application with all assets and code files in a zipped folder from here.

Features:

1) Send form data (radio button values) without needing to click a classic submit button to Arduino Nano 33 IoT.

2) Turn on or off the mini Tesla coil module.

3) Turn on or of the cooling fan.

Database:

Create a database named `teslacoilcontroller` with a table named `values` in the localhost to save the recently selected commands and print that information when requested by Arduino Nano 33 IoT.

Class (PHP):

I wrote a class named tesla_coil for this project, which includes the functions and global variables used in the web application (Tesla Coil Controller). You can inspect it in the class.php file.

Terminal (PHP):

Via the terminal, you can save data to the database table and send them to Arduino Nano 33 IoT when requested simultaneously.

Index (HTML):

Index (CSS):

Index (JS):

Step 2: Setting up Arduino Nano 33 IoT

If you are a novice in programming with Arduino Nano 33 IoT: do not worry, it is simple to use with Arduino IDE. Just download the required drivers - Arduino SAMD Core - as well-explained here.

To be able to connect to the WiFi via Arduino Nano 33 IoT, download the WiFiNINA library from here.

Then, Arduino Nano 33 IoT will be ready to execute the source code for this project :)

Step 3: Programming Arduino Nano 33 IoT

Bonus: Observe the progress of data transferring on the serial monitor.

Step 4: Assembling the Mini Tesla Coil Module

I ordered this cheap module to spend my affiliate points but, in the end, it turns out to be an intriguing contraption via Arduino Nano 33 IoT :)

I only follow the well-explained instructions on the product page to solder all components precisely.

You can inspect the module and the instructions from here.

- Install 4 resistors - 2 x 10K and 2 x 2K.

- Install the primary coil and the secondary coil.

- Solder jumper wires to the power LED pins to move the LED to the breadboard.

Features

When the coil command is transferred from the web application (Tesla Coil Controller) to Arduino Nano IoT, turn on or off the mini Tesla coil module depending on the value - ON, OFF.

When the fan command is transferred from the web application (Tesla Coil Controller) to Arduino Nano IoT, turn on or off the cooling fan, and its control LED depending on the value - ON, OFF.

Connections

To supply the Tesla coil module, the cooling fan, and Arduino Nano 33 IoT, I used a 12V battery.

With a DC barrel power to wire jack, I connected the battery on the breadboard.

I affixed all components to the breadboards using a hot glue gun.

Due to the fact that I had a spare Arduino Mega at my disposal and am thinking further improvements for this project, I used the Arduino Mega to feed the 2-Way relay with stable 5V as depicted on the schematic. But, you can use a simple voltage divider instead.

Also, you can supply the cooling fan from Arduino Mega (5V) instead of directly from the battery to reduce torque.

You can view the pin connections on the schematic and in the Arduino code.

Videos

Demonstration