Student Projects

Showing results for 
Search instead for 
Did you mean: 

myMusicalTesla: 100,000 Volts of Awesome!

The Overview.


myMusicalTesla is an engaging power electronics experiment, that uses sparks to create music!!


Built with the myRIO embedded controller and programmed with LabVIEW, myMusicalTesla includes multiple modes of operation...


  1. It can play pre-programmed songs
  2. You can manually play the sparks using a virtual piano
  3. It can play music from external music sources (like an electric guitar or mp3 player)!!
  4. There is also an mode for quickly testing and configuring the Tesla Coil

The Background.

Nikola Tesla was an electrical and mechanical engineer, futurist and renowned inventor; he made significant contributions to the design of the modern alternating current. Of course, Tesla is best known for his research in 1890's into the wireless transmission of electrical power. To facilitate this pioneering research, Tesla built the incredible resonant transformers we now know as Tesla Coils. Legend has it that Tesla managed to illuminate 100 light bulbs 26 miles away using planet Earth as a conductor for his Tesla Coil!! Unfortunately, there is not enough substantial evidence to support the claim.


In reality, Tesla's mechanism for transferring power is far too inefficient for practical usage. Regardless, Tesla is regarded as an icon of innovation and his research has inspired generations of engineers and scientists ever since.


Tesla's theories (although unpractical) were correct - as you can see in the above video, the sparks produced by myMusicalTesla generate an electric field capable of wirelessly lighting fluorescent tubes! This is due to high frequency electric field generated by the Tesla Coil, which pushes electrons through the tube.



Nikola Tesla reading next to his Tesla Coil


There are a number of different variations of Tesla Coils (TCs), but they all operate in a similar fashion. Tesla Coils are essentially high voltage step up transformers, but they differ in one key way. Since enormous voltages are required to create sparks (rule of thumb: you need 30,000 V per cm of spark) a tightly coupled transformer with an iron core would break down with catastrophic results. Therefore, a loosely coupled transformer (with an air gap) is used. Energy is transferred from one oscillating circuit to another over a number of cycles.




The Project.

myMusicalTesla incorporates three primary modes of operation, as shown in the following image:



My LabVIEW user interface, it automatically deploys real time code to the myRIO


  1. Pre-Programmed Mode - the Tesla Coil (TC) plays a variety of pre-programmed musical songs. I have hardcoded a few examples, such as the themes from Hunger Games, Star Wars and Harry Potter
  2. Instrument Mode - which allows a user to play the TC using a virtual piano. To implement this mode, I repurposed a virtual piano that was created by the LabVIEW developer community
  3. Musical Mode - where audio signals from an attached music source (such as an mp3 player or electric guitar) are used to play the TC




The Controller.

2015-01-14 20.22.34.jpg

myRIO and the myMusicalTesla circuit board I designed



I chose the myRIO embedded controller as the brains behind myMusicalTesla. The myRIO includes a Xilinx Zynq all programmable SOC - which incorporates a dual-core ARM® Cortex™-A9 real-time processor, FPGA fabric, and key peripherals on a single chip. These integrated targets provided the entire processing grunt. In particular, the myRIO's onboard FPGA was vital to the success of the project. The FPGA allowed me to perform audio processing and digital switching deterministically and at high speeds.


The FPGA also gave me full control over my signals - for example, using the integrated 40MHz clock, I was able to add 25nS dead time when switching high voltages. Dead time is essential with Tesla Coils because you do not want the case where both switches are high, thus shorting 340v through to ground. Conversely, you do not want to have them both off for too long because you have an inductive load with no path to ground.


Aside from processing, the myRIO also adhered to my strict I/O requirements. The fully customisable onboard digital I/O was more than capable of modulating the >130,000v sparks at high frequencies (~115,000 Hz). Whilst the integrated 3.5mm audio jack and associated 12-bit ADC, allowed me to accurately acquire audio data at sample rates ranging from 10kS/s to 50kS/s.


Last, but certainly not least... the myRIO supports wireless connectivity, meaning that I never need bring my laptop too near the sparks


Learn more about myRIO here



The Software.



A high level abstract of the myMusicalTesla software


As shown above, myMusicalTesla includes three disparate processing targets (a Windows-based host laptop, a realtime embedded processor and an FPGA). I chose to use LabVIEW to design the system software, as it allowed me to program the three processors with a single development tool and language. This allowed me to make rapid process - I completed the myMusicalTesla software in just a few days.


If you prefer text-based programming, it's worth noting that the myRIO can be programmed in C/C++, using the Eclipse integrated development environment (IDE) and compile tools. The myRIO runs a Linux Real Time OS and so you can SSH into the myRIO and use its Linux capabilities too.


Learn more about LabVIEW here



The Coil.


The original Tesla Coil was a Spark Gap Tesla Coil or SGTC. The circuit is fairly simple; you have an LRC circuit which resonates with another LRC circuit. When driving the primary coil (the left half of the figure below) at resonance you begin to ‘top up’ the voltage on the top load (labelled ‘Torus’). When the voltage is sufficient it ionises the surrounding air and creates a flow of charge - i.e. THE SPARK!!



Spark Gap Tesla Coil (SGTC)


When the voltage across the spark gap is high enough, it too ionises the surrounding air and causes a huge amount of current to flow through the primary coil due to the sudden completion of the broken circuit– this sudden and drastic change in current induces a large voltage on the secondary coil (by way of Faradays Laws). As mentioned previously, because the coils are loosely coupled, a few oscillations are needed before enough voltage (which can be up to hundreds of thousands of volts!) is created on the top load and the spark occurs. The top load is usually a torus; the reason being that it has no sharp points; this allows the voltage to build up sufficiently. What’s more, it acts as a capacitor – storing charge on the topload and using the air as a dielectric. A sharp pont, known as a breakpoint, is usually added, which increases the concentration of electrons on the torus - therefore the spark will usually be emitted from the breakpoint. For myMusicalTesla, I used a small screwdriver as the breakpoint! This arrangement gives arise to the LRC circuit, the windings are the inductor & resistor (L & R), and the top load is the capacitor (C).


In the low voltage side circuit, the LRC arrangement comes from the primary capacitor (also known as a tank capacitor) and the primary coil (again acting as the resistor and inductor). The spark gap simply acts as a switch; it causes a large amount of voltage to flow when the voltage breaks down across the spark gap. We have now moved to an age of semiconductors and it seems fitting to replace this spark gap with high power, solid state switches – this brings us to the Solid State Tesla Coil or SSTC.



myMusicalTesla high level abstract


This is a high level abstract approach to a SSTC – there's more information in the attached PDF. Replacing the sparkgap with solid state devices (such as MOSFETS or IGBTS) gives us more control over the spark and allows us (with the use of an interrupter) to modulate the spark – thereby creating music! It also has the added benefit of introducing Pulse Width Modulation (PWM) which reduces the amount of heat in the IGBTs due to less conduction losses.


If you want to design your own Tesla Coil, here is a very useful resource for calculating the resonant frequency and other properties  -



The Music.


When the spark occurs, it heats up the surrounding air; when the spark stops, the air quickly cools down. This heating and contracting causes longitudinal waves (sound waves). If we make the spark occur at a certain frequency, say 100 times a second, we get an audible (and surprisingly loud) 100Hz tone!


In the above image, the top wave is the frequency of the note we want to play (for example 440Hz, an A4). Below that is the resonant frequency of the Tesla Coil - in order to generate sparks, this signal needs to be turned on and off at the Tesla Coils resonant frequency.


If we merge the two together, then we end up with the wave shown above. This type of modulation is known as Pulse Repetition Frequency (PRF) modulation.


The Circuit.


Most Solid State Tesla Coils (SSTC) share a very similar design. For example, mine was based off one created by Steve Ward, see below:




I made some alterations to this, including a different IGBT driver (one that I was more familiar with) different IGBTs and a different method for interrupting the drive signal. My design is shown below:



My SSTC Schematic


For a more in-depth explanation of how each part of section of the circuit works, please see the PDF attached "myMusicalTesla".


I used NI Multisim and Ultiboard for a complete circuit design suite. After designing the circuit in Multisim, I ported it to Ultiboard. Once I was happy with the layout and connections, I simply exported the files and sent them off to be manufactured.



myMusicalTesla circuit board

Learn more about Multsim here



The myRIO controls everything in this project, it takes in audio from its inbuilt audio jack, it then samples this data and performs an FFT on the onboard FPGA - allowing it to be run very quickly and obtain high sample rates. Finally, it switches the Tesla Coil 100,000s of times a second in order to resonant the circuit - as well as this, another DIO line is used to pulse the circuit at the frequency of the note you wish to play. This can come from the FFT or, pre-programmed songs. Everything is programmed in LabVIEW allowing me to code quickly and interface the circuit board I designed effectively.



The Developer.

My name's Max Simmonds and I'm studying Electrical and Electronic Engineering at Plymouth University. I'm currently undertaking a placement year at NI UK.


9. Guitar.Still002.jpg

Playing the guitar through the Tesla Coil


Software Requirements.


LabVIEW 2014


LabVIEW RealTime 2014

LabVIEW myRIO module


For Students: if your collage or University owns an Academic Site License, you will have free access to all of this software - speak with your Tutors or IT admin to find out more



Hardware Requirements.


parts list.JPG


Next Actions.

  Download attached zip files, which includes a detailed project summary, circuit theory, Gerber files and LabVIEW source code

  Learn more about the myRIO embedded controller





Additional Images or Video





       Sequence 01.Still006.jpg

WARNING - This demo uses high voltage and high current which can be deadly if used improperly. Always follow the correct safety protocols when dealing with high voltage/current applications. Needless to say, I or National Instruments cannot take any liability for injury sustained when replicating the project.



when i run this main VI ,there is an error.please help !无标题.jpg

NI Employee (retired)

Hi There!

Unfortunately I can't read the error message, if you could translate it into English for me I be happy to help.

The error does seem to be coming the "", which point to the fact it may not be able to find the image (it programmatically sets the background). Try disabling this SubVI(using the "diagram disable" in Programming>>Structures>>Diagram Disable and see if the error disappears.

Let me know how it goes!



Hi, Max,

I tried to play some other musics, and I don't know how to apply FFT on the wav file I got, I tried to split a piece of music into pieces, and then tried using FFT on every piece individually. I was wondering how did u get the arrays and the meaning of the elements in that array of different theme songs.

Best Regards.



I am trying to work on making that to play any wav music as resource. Do u have any advice on that?

Best Reagrds