WARNING
This project involves the fondling of a circuit that generates high voltages.
Getting a shock may make you a little tingly in the butthole - It's not that nice sort-of-tingly that you get when when you're pleased about something either.
Fair warning, there's also a bit of meme garbage that I couldn't avoid.
Please don't attempt this project unless you have basic knowledge of Electronics & Microcontrollers. As much as I'd love to help, I'm getting absolutely flooded with emails about difficulty levels
Edit (December 1st, 2017): HackerSpaceShop.com now sells DIY kits!
While dredging through the specials on AliExpress, I found these pretty awesome Dual-Arc Lighters that I couldn't justify purchasing:
But what if I bought them with intention of giving them away as gifts? I could possibly squeeze one in for myself, since, you know, the browser window is already open and all.
...Also, it's almost next year and I've not posted anything this year.
There's an unidentified microcontroller inside this unit, which we'll be replacing with a pin-compatible microcontroller (PIC12F1840) running our own code:
The code drives the transformer using complementary PWM waveforms at ~15.6KHz to generate an arc, just like the previous microcontroller:
...It then modulates the waveform (and hence the arc) at audio frequencies to generate a tune without the need of a speaker/buzzer:
We then play subsequent tunes to create music, and in this case, we're playing a song called We Are Number One by Lazy Town, which has somehow become a meme.
The tune will only play on the 20th power cycle, and only ONCE (ever) - This lighter is a gift to a paranoid friend of mine, who I really like to screw with.
The idea is to give him the lighter, he'll use it, and on the 20th cycle it'll randomly play a tune. He'll then come back to me and say OMG THIS LIGHTER MAKES MUSIC, but despite repeated attempts to make it play, it won't.
...He'll probably go into a crisis wondering if he was hallucinating, i'll play on it, we'll have a laugh (or awkward silence), etc, etc
Anywho, a few seconds into the tune:
I've included a failsafe, such that if the tune plays for under a few seconds (due to say, nicotine-induced jitters or porn withdrawal), the magic byte isn't written and the tune will immediately resume on the next power cycle.
It's possible to have the tune play with a continuous (uninterrupted) arc, however the effect is far more impressive with an interrupted arc, as it tends to meander more.
Schematics and Firmware are provided as Freeware for non-commercial use
[Download] Schematic Diagram (Reverse Engineered)
[Download] Exceptionally shitty source code (in C)
[Download] FS8205 Dual N-FET (Datasheet)
[Download] LTC4054 Linear LiIon Charger (Datasheet)
[Download] MJD2955 Power Transistor (Datasheet)
[Download] 12F1840 PIC Microcontroller (Datasheet)
EDIT1: Added the "Imperial March" tune from StarWars to the firmware by request.
EDIT2: Added the "Cantina Band" tune from StarWars to the firmware by request.
You're best off flashing the microcontroller prior to attaching it to the PCB using a Pomona Test Clip - You can find them on EBay fairly cheap; Don't use the 3M ones as they suck serious ass.
If you notice the microcontroller resetting often, change C2 to 4.7uF or higher - This is recommended either way, as the transformer generates a fair bit of noise.
If you intend on (re)programming the microcontroller in-circuit, be sure to lift the MCLR pin (pin 4) away from the PCB. MCLR is tracked to VDD on the PCB. If you don't lift the pin, you'll always get an "Invalid Device ID" error
The transformers in these units are designed for very low duty cycles, and can be damaged if you insist of setting fire to shit repeatedly.
Apologies if the instructions seem a little anaemic, but there isn't really much to guide you through this time.
Remove the single retaining screw from the bottom of the unit
Slide the internal assembly out of the casing
Gently unwrap the tape to extract the PCB and battery
Gently unwrap the tape to expose the PCB & components
Remove the old micro using psychokinesis
Place the new micro onto the PCB and feed it 48 volts, it'll solder itself
Attach the ICSP header/wires (skip if using a programming clip)
Attempt to flash the firmware in MPLABX and fail
Well, Shit.
After checking and re-checking connections for a few minutes, then discovering that the microcontroller had no power, PodeCoet realised that he's a fucking idiot.
The power button on the lighter needs to be held down prior to programming, otherwise there's like, no power, man.
Trying again after holding the power button:
Wow... I sure showed me
Detach the ICSP wires and wrap the PCB in Kapton
Place the PCB into the chassis, tape again, and slide into the case
Replace the single screw that you totally didn't lose
Test fire (but keep your pants on)
I hope you've had as much fun reading this page as I had writing it (also I'm not wearing pants)
-PodeCoet
Click here to get in-touch or check out my other write-ups