Project in progress
Arduino Musical Tesla Coil

Arduino Musical Tesla Coil © GPL3+

This is a musical Tesla Coil driven by an Arduino and Slayer-Exciter. Using an Arduino, you can play music with pure electricity!

  • 5,430 views
  • 3 comments
  • 9 respects

Components and supplies

Apps and online services

About this project

About the Project

I’ve always had an interest in Tesla Coils. The arcs shooting off the top-load creates some of the best displays of physics I’ve ever seen.However, not being used to many of the high-voltage components in normal Tesla Coil designs, it was difficult to find a starting point. After doing some research, I found a basic circuit called a Slayer-Exciter circuit. This is a transistor-based design with very few components, making it a good choice for a beginner. Now, the arcs by themselves are cool, but I decided to make themuseful. So, I added an Arduino Uno with the tone() function to generate music using the arc (see the video). So, on to building…

WARNING: The output of the coil is high voltage, so be very careful.

What You’ll Need:

  • Arduino Uno R3 x1
  • TIP31C Transistors x2
  • Transistor Heat Sinks x2
  • 4N35 Optocoupler x1
  • 10k Resistor x1
  • Red LED x1
  • PVC Pipe (1 in. Diameter, 17 in. Length) x1
  • 30 Gauge Enamel Coated Wire
  • 26 Gauge Rubber Coated Wire (Solid Core)
  • Jumper Wire

Coil Design

The coil design is a relatively simple air core transformer. Using some 26 gauge wire, I wrapped about 6 turns to form the primary coil (inductor L1 in the circuit). There is nothing that the coil should be wrapped around.For the secondary coil (inductor L2), I used the enamel coated wire and the PVC pipe. Out of the 17 inches of pipe, I only wrapped the coil around 16 ½ inches.Tape can be used to hold the wire in place. We can calculate the number of turns based on the length of the pipe and the typical diameter of 30 gauge wire:16.5 in. / 0.01 in. = 1,650 turns.

Circuit Construction

The circuit is a very simple circuit. The schematic is shown below. The most basic version of it uses a single NPN transistor and a diode to drive the primary coil. I added in a second transistor to create a bigger arc on the output. The Arduino paired with the 4N35 acts as an interrupter for the circuit.

Operation

The circuit is relatively simple to understand. The transistor and diode together make the circuit self-resonating – meaning it tunes itself to the resonant frequency of the coil. I’ll explain the circuit using a single transistor. The collector of the transistor is connected to one end of the primary coil. The base is connected to our power (18 volts). Because of this, the transistor is in saturated mode, allowing current to flow through the primary coil. This causes a magnetic field to build up around the primary coil. This magnetic field induces a voltage in the secondary coil. However,once the current in the secondary coil reaches a certain level – namely, the breakdown current of the LED – the base of the transistor is connected to ground. This puts the transistor into cutoff mode, turning off the primary coil which breaks down the magnetic field making the current fall in the secondary coil. Since the current dropped in the secondary coil, it is no longer at the breakdown level of the LED. This allows the transistor to move back into saturation mode, repeating the process. The interrupter allows us to modulate this process by turning the circuit on and off. If the modulation signal is at the frequency of a musical note, that note will be heard at the arc.

We can calculate the output voltage of our circuit using the following formula: Ns/Np = Vs/Vp,where Ns is the number of turns on the secondary coil, Np is the number of turns on the primary coil, Vs is the voltage of the secondary coil, and Vp is the voltage in the primary coil. By inputting our known values, we get: 1,650/6 = Vs/18V =>18V*1,650/6 = Vs => Vs = 4,950V. Our output voltage is around 4,950 volts.

The sound is produced the same way lightning produces thunder.The high voltage electricity heats the air producing the arc. This heated air adds pressure to the air around it. If we modulate the arc at the frequency of a musical note, the air will vibrate at that frequency producing the sound.

A Word of Caution

During operation, the transistors can get hot. Be sure to use heat sinks on them.

Code

Arduino Music GeneratorArduino
This is used to play the music on the Tesla Coil
/*****************************************************************
 * This is a basic file to play music through an Arduino.
 * 
 * Author: Brandon Michelsen
 * Date: 11/25/2017
 * 
 */

//Define the music pin
#define musicPin 10

//Include the tones file
#include "Tones.h"

//Constructor for the music playing function
void playMelody(float melody[], float durations[]);

//Create a tones array
float tetrisMusic[] =  {
  0, 0, 0, NOTE_E4, NOTE_E4, NOTE_B3, NOTE_C4, NOTE_D4, NOTE_C4, NOTE_B3, NOTE_A3, NOTE_A3, NOTE_C4, NOTE_E4, NOTE_D4, NOTE_C4, NOTE_B3, NOTE_B3, NOTE_C4,
  NOTE_D4, NOTE_E4, NOTE_C4, NOTE_A3, NOTE_A3, 0, NOTE_D4, NOTE_F4, NOTE_A4, NOTE_G4, NOTE_F4, NOTE_E4, NOTE_C4, NOTE_E4, NOTE_D4, NOTE_C4, 
  NOTE_B3, NOTE_B3, NOTE_C4, NOTE_D4, NOTE_E4, NOTE_C4, NOTE_A3, NOTE_A3, 0, NOTE_E3, NOTE_C3, NOTE_D3, NOTE_B2, NOTE_C3, NOTE_A2, NOTE_GS2, NOTE_B2,
  NOTE_E3, NOTE_C3, NOTE_D3, NOTE_B2, NOTE_C3, NOTE_E3, NOTE_A3, NOTE_A3, NOTE_GS3
};

//Create durations
float tetrisDurations[] = {
  4, 4, 4, 4, 4, 8, 8, 4, 8, 8, 4, 8, 8, 4, 8, 8, 4, 8, 8, 4, 4, 4, 4, 4, 4, 4.5, 8, 4, 8, 8, 4.5, 8, 4, 8, 8, 4, 8, 8, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 
  2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 1
};

void setup() {
  //Set the music pin as an output
  pinMode(musicPin, OUTPUT);
}

void loop() {
  //Play the music
  playMelody();
  delay(1000);
}

//Function for playing melodies
void playMelody(){
  //Variables for note durations and pause times
  float noteDuration;
  float pause;
  
  //Loop through the notes
  for(int thisNote = 0; thisNote < (sizeof(tetrisMusic)/sizeof(float))/*Get the array length*/; thisNote++){
    //Calculate the note duration by taking one second divided by the note type
    // Example: quarter note = 1000/4, eightth note = 1000/8, etc
    noteDuration = 1000/tetrisDurations[thisNote];

    //Play the note
    tone(musicPin, tetrisMusic[thisNote], noteDuration);

    //Calculate the pause time (note duration plus 30%)
    pause = noteDuration*1.30;
    delay(pause);

    //Stop the tone
    noTone(musicPin);
  }
}

Schematics

Tesla Coil Schematic
This is the schematics for the circuit.
Arduino tesla coil schematic ood5uwzube
Tesla Coil Schematic
The Fritzing schematic file.
arduino_tesla_coil_Kho155tfyr.fzz

Comments

Similar projects you might like

Mechanical Musical Arm

Project showcase by PIYUSH_K_SINGH

  • 661 views
  • 0 comments
  • 1 respect

Musical Fairy Lights

Project tutorial by Ian Cumming

  • 4,508 views
  • 0 comments
  • 11 respects

Musical Cube

Project showcase by FabLab of Legends

  • 1,606 views
  • 0 comments
  • 1 respect

Motion-Activated Musical Trophy

Project tutorial by Alex Wulff

  • 1,306 views
  • 3 comments
  • 3 respects

Xmas musical robot

Project showcase by benoitdr

  • 652 views
  • 0 comments
  • 2 respects

Dual Axis Solar Tracker Panel with Auto and Manual Mode

Project tutorial by Giannis Arvanitakis

  • 7,146 views
  • 6 comments
  • 37 respects
Add projectSign up / Login