Sonntag, 1. Mai 2016

Fan-Tas-Tic Pinball, Part 6, EMI trouble!

This is going to be a little story about electromagnetic interference (EMI). The good thing is: there will be a happy end :)

Having installed all the WS2811 LEDs, I decided to play a quick game to see if everything is still working. It was quite surprising to see the LEDs flicker like a Christmas tree, even though they should have been dark. This happened everytime the flipper coils actuated. Clearly there was some kind of EMI problem, inducing noise on the data line of the LEDs.

A quick scope measurement on the solenoids revealed the issue:

Note that at this time I still had some random PN diode directly across the solenoids terminal.

I saw > 60 V voltage spikes when the coil was switched ON. Note that this pulse happened 20000 times a second, with the PWM frequency.

Then I measured right on the solenoid driver board. At this point there was no recovery diode here at all.

Again I measured 60 V spikes and strong ringing. Clearly this was the reason my LEDs freaked out.

To get rid of those spike, I tried various combination of putting components across the solenoid or the solenoid driver outputs:
  • Fast Schottky diode
  • 4.7 nF Capacitor
  • 4.7 nF Capacitor + 47 Ohm resistor in series (snubber circuit)
 Adding the capacitor changed the resonant frequency of the ringing, but not the amplitude. The snubber circuit helped slightly. The Schottky diode had the most positive effect, especially if put on the solenoid driver board.

So what was going on? I think the problem was the parasitic inductance of the cables to the solenoid. The cables themselves also act like an inductor, hence also have a freewheeling current when switched off, and having installed the freewheeling diodes on the solenoid itself, there was no path for this current to go.

I got rid of the spikes by changing 3 things:
  1. I installed the diodes right on the solenoid driver board. This way they also provide a path for the freewheeling currents of the cables
  2. I installed Schottky diodes (1N5822), which do not have a reverse recovery time and hence switch much faster and cleaner.
  3. I changed the gate resistors on the mosfets from 47 Ohm to 200 Ohm. Before they were driven much to hard, switching with < 10 ns and hence producing plenty of EMI in the MHz range. Of course, making them switch slower is a trade-off, reducing EMI but increasing switching losses. In this case there is still plenty of margin though and there is still no need for a heatsink so far.

The Mods were directly hacked onto the board. As a nice side effect, it's not necessary anymore to solder a diode across each solenoid.

Waveform at the solenoid driver after modification. Now all LEDs work as expected and without any glitches, even when flippering like crazy.


Left: Current state of the playing field. All basic LEDs are installed. 
Middle: Closeup of the solenoid for the gate closing the right outline.
Right: Closeup of the trough ball eject solenoid.

Samstag, 16. April 2016

Fan-Tas-Tic Pinball, Part 5

Adding some LEDs

I did a quick test with the WS2811 LED strand and I'm quite satisfied with the results. They are slightly brighter then the original bulbs, consume far less power and hence don't get hot. Especially under the white playfield inserts, the RGB colors look fantastic. The red inserts filter out all the other colors, so it only makes sense to have these LEDs configured for red only -- but that's not a big problem, considering how cheap those LED strands are.

I started to work on a platform driver for the Mission Pinball Framework v30. There is some basic functionality already -- but still some bugs need to be resolved.

Donnerstag, 3. März 2016

Fan-Tas-Tic Pinball, Part 4

 Rewiring the switches

There are around 40 switches on the playing field which were originally wired in a point to point fashion -- the cable management was quite impressive.

With the new electronics, switches are arranged in a 8 x 8 matrix. The row and column wires are tied together in two strands, which are routed in a serpentine fashion below the playing field. Finding a good way to keep the wires in order and organized took some time.

Some pics of the cabling `making-of` ...


The flipper buttons on the cabinet and the tilt switch (lead blob on a pendulum) was wired to a I2C port extender. The shielded white cable for the I2C is visible in the last picture.


The initial test look promising. The Fan-Tas-Tic controller scans the switch matrix and reports input changes to the PC.

Sonntag, 28. Februar 2016

Fan-Tas-Tic Pinball, Part 3

Some impressions from the cleaning process

State of the playing field Before / After

I used white spirit and spot eraser pads for cleaning and automotive wax for sealing it.

The insides Before / After

The playfield has been stripped and all cables removed. I kept the leaf-switches but will read them in a matrix configuration.
It was possible to take out the relay based control board in one piece. The new ARM based control board is already in place.

In its original configuration, the pinball contains only one single transistor which is part of a delay circuit. All the other functions were done electromechanically.


Sonntag, 7. Februar 2016

Fan-Tas-Tic Pinball, Part 2

The Fan-Tas-Tic controller

The new homebrew controller board for the pinball machine. It's general job is to read a lot of switches and drive a lot of solenoids. 

The game logic runs on a Raspberry pi, which communicates over a USB-serial connection with the controller board.

Mainboard, as rendered by KiCad

Mainboard, getting CNCed

Mainboard, tested and working
Unfortunately there was a glitch during toolpath generation of the second layer, which we only noticed very late in the milling process. While the board was functional, the high current traces for the solenoids turned out much more narrow than intended. They instantly burned up during the first test with a real solenoid (24 V, 3 Ohm, 8 Amps peak.). As a workaround I soldered thick copper wire on-top of these traces.

High current traces fixed

Driving WS2812 LED strings. Check of timing.

Samstag, 6. Februar 2016

Fan-Tas-Tic Pinball, Part 1

Refurbishing and upgrading a electromechanical pinball machine from the seventies.

Right: How it looks like now. Left: How it might end up

Taking the monster apart

Under the hood. This thing is full of relays and mechanical switches -- a lost art.
Underneath the playfield, showing the solenoids for the flippers.

At this point, the machine is in quite a bad state. All the rubbers have turned into brittle plastic, many lamps are blown, the playfield is a filthy mess and the playfield window is cracked.

We took a last video of the machine with its original electromechanical brain, before we have teared it completely apart:

Turns out it almost works. The score counting wheels have some issues. Sometimes they get stuck, sometimes the reset process never finishes.

Dienstag, 11. November 2014

Electric longboard

A large RC car brushless motor + huge Lipo batteries + a rather smooth to ride longboard = a lot of fun :)

Pictures and comments of the construction progress here:

The whole design is based on the experience from the endless-spheres forum: