Sunday, November 16, 2014

High Voltage Keyboard

Every mad scientist type should have their own organ/keyboard.  This is necessary tool when contemplating 'evil'.  (at least, according to some classic movies)

Figure 1:  Capt Nemo's pipe organ from "20,000 Leagues Under the Sea" (from wikipedia)

Capt. Nemo's pipe organ is impressive.

My keyboard is not very loud and visually, it is a turd.

Figure 2:  The High Voltage Keyboard

One problem is that I have no musical ability, I don't play any instruments or have any vocals.  So, why build a keyboard?  'Cause I can!

This "musical keyboard" uses flyback transformers to create an audio modulated high voltage arc discharge.  Each key controls a driver board.  When activated, the key applies power to a high voltage transformer.  The transformer makes an arc, which is modulated at a set frequency.  This frequency produces audio.

    -This project deals with high voltage (greater than 3KV) at some significant current.  Do not die from this if you attempt to recreate the circuit.
    -I have never played a musical instrument and know next to nothing about any instrument.  The last musical thing I did was maybe 30 years ago, and that was choir.  Pianos/keyboards have black and white keys.  This keyboard has no keys you would consider "black".

Figure 3:  A better view of the keys

Why this project?:
I work for a company that manufactures neon power supplies.  We buy the high frequency (20KHz) transformer from a manufacturer in China and then stuff the PCB's domestically.  On one of the mid range power supply transformers, we were occasionally having the secondary wires burn out near the pin on the transformer that mounts into the PCB.  Before the problem was resolved, I ended up with several handfuls of units with slightly burned up secondary coils.  The coils were easy enough to repair by hand, but not acceptable to be sent to a customer.  So, I had roughly 50 of the coils and I asked myself:  "What could be done with these coils other than throwing them in the trash bin?"   This was how the High Voltage Keyboard project started.  However!  Since these coils were in the mid range power output, I was not able to get much of an arc from them.  So, I ended up using a higher power flyback transformer.

Figure 4:  A single driver board and flyback transformer

Before I decided on the higher power flyback transformers, a couple of other circuits/transformers were reviewed.  First, an automotive car ignition coil was evaluated, but it was found the car ignition coil would not create an arc when modulated above roughly 3KHz.  A high (20KHz), modulation rate is needed to create the audio tones in the arc.  Secondly, I at looked at several types of solid state tesla coils.  There are several fine examples of small sized tesla coils that create an arc of 3cm or less and have a very small footprint.  Since most of these tesla coils relied on feedback from the high voltage to find the resonance point, having several of these operating in close proximity to each other seemed like a bad idea.

Since a single arc is capable of reproducing music, is having 25 separate arc's with a set tone really necessary?   There are a couple of reasons I went with the separate notes for each key rather than just a single arc discharge.  Keep in mind, that I know next to nothing about music.

Keep it simple:
Whenever possible, I tried to use things I had on hand to keep costs down.  This had an impact on many parts of the design:   some components on the PCB, the wood used for the frame, the white paint, etc.

Circuit board hardware:
It was nice to work on a somewhat long term project that has no microcontroller.  A microcontroller could have been used to generate the audio modulation rates or to multiplex the keyboard keys.
The circuit is based around U2, an IR2153D.  This is a self-oscillating half bridge driver.  The front end oscillator of this IC is similar to the industry standard 555 timer.  D4 and C7 are a high side floating supply offset voltage.  (to turn on Q1)  The IR2153D drives two, n-channel MOSFETs.  These two FETs do the high current switching to the transformer.  There are four variable resistors on the schematic.  R4 and R5 control the roughly 20KHz frequency and pulse width of the transformer.  R8 and R10 control the audio range (100Hz to 600Hz) frequency and modulation.  Many more details are in the schematic.  Look up datasheets for further information.

Figure 5:  High Voltage Keyboard Schematic

keyboard frame:
The frame of the keyboard was built out of plywood and 2x4's.  I knew I wanted to have 25 keys on the keyboard, so I figured out how much area each circuit board and transformer assembly would take up.  With that info, I sketched a general outline of grand piano on the plywood and then cut it out with a jigsaw.

Figure 6:  The unpainted keyboard surface

Several small lengths of 2x4 were used under the plywood to make the plywood more rigid.  2x4's were also used as feet.  The edges of the plywood top seemed a little sharp, so I used a rounded over bit on the hand router.  Unfortunately, it seems like about half the time I use a router, I end up damaging or destroying the piece I'm working on.  The rounded over bit has a bearing on the bottom to set the depth.  This bearing lost contact with the plywood in two areas:
    1)  The plywood had delaminated on the bottom.  Damage shown:

Figure 7:  Hand Router mess up

    2)  The plywood had a knot in the wood on the bottom.  Damage shown:

Figure 8:  Grr, darn router

For item 1, the delaminating was glued back to the rest of the plywood and then the area was sanded down.  Item 2 was a little more difficult to repair.  A small block of wood was made with a rounded over edge.  The outline of the block was then traced onto the main sheet of plywood and cutout with the jigsaw.  The small block was then glued in place on the main sheet of plywood.

Figure 9:  The patch installed on plywood

After the small block of was installed, all of the holes for the circuit board holes, transformer holes, were drilled in the plywood.  The keyboard tray was installed and then the whole thing was primered and painted white.

System wiring:
To keep assembly simple, most of the wires were kept on the top side of the keyboard.  Running the wires on the bottom would have been much cleaner looking, but they would have been a headache to install.  The pair of wires for each key was twisted together using a drill.  This twisting helps to reduce any inference from other arc discharges on the assembly.

Figure 10:  The current meter, power switch and IEC connector

The push button switches for the keys use an elastomeric type of pad.  The original buttons had a really annoying loud click when they were pressed.

Figure 11:  Elastomeric pushbuttons under the keys

Follow up thoughts:
The keyboard turned out well.  Although it took way too much time to assemble.  It's nice to actually finish a project.