Musical Arc Lighter

Overview - Making Music with Sparks

My partner and I got very into watching She-Ra and the Princesses of Power - so much so that she decided to commission a cosplay outfit, and I wanted to contribute. I had seen the idea of modulating the sparks of an arc lighter lighter to make music way back in 2016, and when I found the perfect golden lighter I knew it was time to make it a reality.

Yes, it’s really the electric sparks themselves making the sound!

I reverse engineered the control chip in the lighter, wrote firmware for an entirely new replacement chip, programmed music, coded all the battery monitoring and charging logic, resulting in possibly the most unexpectedly impressive gift I’ve given yet. She loved it, and hopefully you’ll enjoy the journey of how I built it too…

Come say Hi

Before going down this rabbit hole any further, if you are excited about making this yourself, or want to ask me questions about a similar project you have in mind -please get in touch and ask me something, I'd love to hear from you!

General Principle

As anyone that's changed sheets in dry weather knows - electric sparks makes little snaps. If you make a lot of those snap sounds in close succession, you can get a sort of buzz sound. If you make 261.626 electric snaps in a second, you get the base frequency of a middle C note. And if you change how many snaps you make in a second, you can change the note you're making. Turns out my music synthesis class from university might finally come in handy all these years later!

If we can output a square wave like this from the control chip, we'll get a "snap" sound from the spark on each rising edge.

Reverse-engineering the Chip

Disassembly & Pinouts

Before we can do anything to the lighter, we need to get to it’s juicy (crunchy?) insides to see what we’re working with… and oh my this is going to be a journey <and little did he know it would indeed be a long road ahead>

I took the highest quality photos of the PCB that I could, then flipped them and overlaid them in an image editor to plot out the tracks, to end up with this handy-dandy pinout guide for the chip.

I could then spend a fun few hours on the internet finding a chip that has this pinout and the features I need (spoiler, I used a PIC16F15224).

The Music

Which She-Ra Transformation theme?

First up, let’s swing for this awesome riff used when Adora transforms into She-Ra! My partner’s costume is season 5 She-Ra which is definitely a cooler outfit than the earlier seasons… but the transformation theme is a bit slow and going to totally burn out the coils on the lighter if we try to play it.

So I made an executive creative decision - the lighter is going to play the far more up-beat Season 1-4 theme and we’ll just roll with it...

Notated music

While I do vaguely remember my music classes from high school, I'm not convinced my transcribing skills are up to scratch here, so let’s go see if someone has transcribed this sheet music so I don’t have to.

Oh hurrah, there are fellow nerds on the internet! Who knew?

Our lighter can (probably) only make a single note at a time, so we'll need to go pull out just the melody from one of these, so let’s open these ditties up in MuseScore and cut together the actual melody we can use. I ended up going with a bit of a combo of both tunes as it changes key for the second part of the guitar riff.

Gargoyles Intro

Because I like making life difficult for myself, I figure if I’m making the lighter play one piece of music, why not two? My partner had also been re-watching the original 90s Gargoyles cartoon at the same time as She-Ra, so let’s put that in there as well.

The internet is a wonder and once again I am blessed by not only a reference clip on YouTube, but of course some fellow nerds that made sheet music for it as well!

As before, it needs the single voice melody extracting, so let’s do that, and do some light editing to pull out only the most memorable parts and avoid too many long notes that might toast the lighter coils.

Playing the notes

"Ok, this is great - we’ve got some sheet music , so we just hand it to the goblin in the lighter and get them to play it right?"

"What's that? We need to make a chip play the music instead?"

Ahh MIDI the peak of 1980s music synth technology. OSC is right there, and yet you persist. But hey, it gives us a somewhat machine readable format for us to work with, and I can export the sheet music we found earlier as MIDI files.

This is great, because a MIDI file gives us two main things:

While it’s probably conceivable to make a version of this that’ll play a MIDI file directly on the lighter, the chip is getting one-time programmed and locked into the lighter forever, so I’m going to go with the quick and dirty route and bake the music into the program.

Let's open up the MIDI files in MidiEditor and copy out the note and timing information.

Transposing to code

Getting the notes into a range that can be played is a bit of a juggling act - there’s a limited range of sounds the lighter can make that aren’t either ear-piercing, or too low to be heard.

The melodies we're working from (especially the She-Ra theme) also cover a pretty wide range, so let's do some testing to find a range that I can both be played on the lighter, and has enough range for our melodies.

Turns out to be just over 3 octaves we can play with, so let's make a super fun spreadsheet that transposes the MIDI notes into our usable range, and converts the MIDI timing ticks into miliseconds.

And let's do that for both of the pieces of music we're going to make.

Are you having fun yet?

Timing calculator

Testing, Testing, 123

Now that things are programmed, it's time to test and oh boy was this an adventure. As the chip can't be programed in situ, I needed to make a test rig that would allow me to pull the chip out, flash new code, put it back in, and test. The original code I was working from ran all of the note timing on the main processor thread, and it would cause glitches and other timing errors in the music playback, so I needed to re-write the code to offload all of the timing to the dedicated PWM modules on the IC. This was where buying the "expensive" $5 chip that had all the bells and whistles really paid off. I made the changes and all the music played perfectly!

My test rig

Checking my tuning involved recording the sound of the lighter, putting it into Audacity and opening a frequency analysis

Housekeeping & Ideas for The Future

As I had replaced the entire chip that was originally in the lighter, it meant all the nice logic that lights up the LEDs on the front to show battery charge level, and to slowly blink them while charging all needed to be re-written from scratch.

Not only that, but the button to turn the lighter on is a touch sensor, and having extremely high voltage electric sparks next to a touch sensor causes all kinds of noisy havoc in it's readings.

This part wasn't very interesting, so you don't get any pictures here, but I'll just say there was a lot of internet research to find other people's brilliant solutions to measuring battery voltage, and debouncing noisy buttons that I managed to implement and solve my woes.

What else could this do?

Try it Yourself

This is not for the faint of heart, figuratively and literally - those electric sparks will hurt if you touch them. Do any of this at your own risk. It's not my fault if you die, etc.

Also importantly - you'll need a rather expensive (~$100 USD) PIC programmer to flash your otherwise inexpensive IC.

If you're still interested in trying this yourself, here's what you'll need and some links to resources:

As this was a one-off art project, I can't support anything you do, but I'd love to see what you make, so let me know if you have great success with your own variation of this!

Or go on this journey with some of my other art projects from the comfort of your own toilet/wherever you're reading this.