I want my solid state Tesla coil to play music. I built it to only accept square wave input. Does anyone know howI take a normal melody (no voice,) only keep the main soundtrack (no bass or anything else) and convert it into pure and simple square wave?

  • \$\begingroup\$ A pure and simple square wave is simply that and, by definition it cannot be modulated. Maybe you might pulse width modulate the square wave? Whether it produces music I have no idea. \$\endgroup\$
    – Andy aka
    May 8 at 17:44
  • \$\begingroup\$ Yes, I want to modulate the frequency of it in order to create music \$\endgroup\$ May 8 at 17:46
  • \$\begingroup\$ Does that idea work at all? \$\endgroup\$
    – Andy aka
    May 8 at 17:58
  • 1
    \$\begingroup\$ I have built a working tesla coil that plays music. It does indeed PWM with the slayer exciter. Not exactly high fidelity heheh...but makes an interesting conversation piece. \$\endgroup\$ May 8 at 18:02
  • \$\begingroup\$ This might help: electroboom.com/?p=575 \$\endgroup\$ May 8 at 18:05

1 Answer 1


The task you are after is easier to approach from the other end:

  1. Get some sheet music. What you need is a single voice melody. An example. 1.1 A MIDI file of the song, if available, may save you a lot of manual work.

  2. Convert pitches into frequencies. C (the note starting the example song) is 261 Hz, any half tone up is up by 12-th root of 2

  3. Generate the square waves for each note by whatever means available (e.g. Arduino) and feed it into your Tesla coil setup. Take care to deal with different note durations. You may want to create 5% or 10% silence at the end of each note in order to distinguish the beat when some note repeat.

p.s. Also take care not to burn anything, yourself included.

p.s.2 You can get a lot of inspiration from what 1980s computers and game consoles did (see Retrocomputing.SE, a lot of 1980s hardware had only square waves available).

This is the same approach in modern hardware made for completely different purpose.

  • \$\begingroup\$ Thank you very much! \$\endgroup\$ May 8 at 19:18
  • \$\begingroup\$ One thing I do not understand is how and where do I turn the notes into frequencies? \$\endgroup\$ May 8 at 19:22
  • \$\begingroup\$ It's up to you. You can do it on paper or write a small program. \$\endgroup\$
    – fraxinus
    May 8 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.