Electronics & Maker Projects (page 15)

USB Power LED Indicator

(3DP, Electronics)

 

(CNC, Woodworking, 3DP, Gear Motors, Stepper Motor, Electronics, Software, Sound Editing, Artwork)

 

Our “Diner” is pretty full, with the air hockey table and arcade game taking up a lot of floor space. When I was a kid we were sightseeing in Japan and I remember playing  pachinko. I thought a machine mounted on the wall might be fun so I poked around the web checking them out. Owners tend to say, though, that they become kind of an art piece as there isn’t much interaction to the game beyond launching the ball. Even more important is that I want to design and build something! All these things put together led me to search for “vertical pinball”.

 

Surf And Ye Shall Find

 

After lots of web surfing, I stumbled across the 1983 Taito game “Ice Cold Beer” (ICB). Taito was well established making arcade games including Space Invaders (under Bally/Midway name in US). With ICB, they created an electromechanical arcade game. It has a telescoping “bar” on which a 5/8” chrome ball is balanced against a play field. The play field board has all these holes where the ball can drop through. You use the left and right joysticks to raise and lower the ends of the bar, trying to control where the ball goes. For any given round, one of the 10 Target Holes is flashing. You must maneuver the ball into that hole to earn points. If it goes through any other hole, you get no points and you are down a ball. You only have 10 balls (at first) to make it into all 10 target holes, so loosing a ball may make it impossible to get to the finish. The Target Holes start at the bottom where it is relatively easy, then go up into denser hole territory where it gets nearly impossible.

 

I watched videos of people playing it and decided this concept is exactly what I was looking for. It has massive player interaction like the best vintage video games. An actual ICB game is physically like a scaled back video arcade machine. Since it’s essentially a vertical game, unlike vintage video games like PacMan where the screen leans back at a severe angle, I thought I could design it more like a cross between an arcade game and a pachinko machine.  Making it will require CNC work, woodworking, 3D printing, DC gear motors and stepper motors with controllers, electronics & PCB design, software, audio editing and as it turned out artwork manipulation.

Closeup of a ball channel attached to the back of the play field board and wired.

Starting to fit the DC gear motors & lead screws.

PCB I designed & CNC’d that converts I2C serial to parallel I/O to drive the alpha-numeric VFD.

Finally have mock-up good enough where we can actually play the game. Up to this point there was no way to know if all the concepts I was coming up with would work together cohesively.

Text Box: Final assembly before the glass, including back light strips. Note penny-farthing bicycle symbols around each of the Target Holes done with “waterslide decal paper” with clear coat over everything. The alphanumeric VFD (Vacuum Fluorescent Display) is mounted on specially cut spacers to make it face directly forward rather than at the play field’s 15 degree angle. This make it easier to read from below.

Arrival

 

What really took me over the edge to commit to such a huge project was when I started to think of the ball as “Rover” from my favorite TV show of all times, “The Prisoner” (1968 in the US). I started thinking up a backstory for the game, where Rover (the ball) is searching for No6. He starts at residence No10 (Target Hole 10) at the bottom, then each round the target hole moves up through No9 etc to No1. If Rover searches all the way to residence No1 and goes through the hole, No6 has escaped, or “Fall Out!”.

 

This premise also opens up the whole world of The Prisoner’s music and sounds. The theme and incidental music are incredible, as are the sound effects such as Rover barging through. I immediately planned to incorporate two serial interfaced mp3 player modules into my design/PCB so I could have simultaneous music and sound effects.

 

So Many Holes

 

The first development challenge was the play field’s hole pattern. There were other people on line that wanted to build the game, most by duplicating Ice Cold Beer exactly and others like myself that wanted a different theme. Everyone said they were happy to share their information, such as measurements from an actual game, but when push came to shove they never provided the files. Very few of the threads ended with people actually building a real game. One guy who duplicated ICB exactly ended up using an actual replacement Taito PCB.

 

I finally found a file of the hole pattern, one that is supposedly very close to the original. This is more important than it sounds. If the pattern has the holes too closely spaced, no one will ever get the ball into the more difficult target holes. If the spaces are too large, the game would be too easy. I’m assuming lots of trial and error went into creating the hole pattern in the original game in order to strike the right balance. I used the pattern I found on line and by counting pixels from ICB photos decided it was indeed close enough to the original. My CNC can only cut within certain limits, so I rearranged some holes at the left and right edges to save an inch of width overall so it could be milled.

 

 

I Did It My Way

 

The game concept and hole pattern are all I really used from ICB. They have this pulley system that uses rubber tubing for belts. They rely on the bar to physically actuate the bottom ball release. They used red 7-segment displays for scoring. They have µswitches behind each target hole mounted on a huge vacu-formed “backplane” along with the hole’s light bulbs. These µswitches had to be adjusted perfectly so they would have enough contact to actuate yet not impede the ball as it went by. I found lots of people recalling going into arcades at the time and ICB would have an ‘Out Of Order” sign on it.

 

None of this suited me so I designed my game from scratch. I used DC gear motors facing up driving 8mm lead screws on each side. I created small elaborate 3D printed pieces which interface to delrin nuts on the lead screws and provide a pocket for a tiny bearing. The bearing allows easy rotational coupling to another 3D printed piece which is the interface to the bar and also creates the ball stop.

 

When a ball goes through a Target Hole, I have to detect it quickly as it goes by. I designed what I call a Ball Channel which looks kind of like a small plumbing elbow. It has a flange with two holes at one end where it gets screwed to the back of the play field board at each of the 10 Target Holes. I’m using a device new to me called a Magnasphere. It’s a ferrous metal proximity sensor in what looks like an old TO18 small metal transistor can. It has a tiny magnetic sphere inside which normally is drawn to the bottom of the can but when ferrous metal is present it goes to the top of the can. When it’s at the bottom it shorts two contacts, so it’s a normally closed device. It’s packaging and small size let me embed it just inside the entry of my Ball Channel which gives it maximum exposure time as the ball rolls through.

 

In addition, I had to have a place to mount a bright white LED behind each Target Hole. I centered a round recess into the back of the Ball Channel for a T1 3/4 LED which pushes right in and gets glued. To have the light illuminate the ball opening, I 3DP’d the Ball Channel in clear, which in reality is translucent. Then I plugged the holes and asked Linda to paint the outsides with BIN Primer, which sticks to plastic and is essentially white. When that dried, she painted the outside with a coat of black. Since there’s no paint inside and the first outside coat is white, the LED illuminates the entire interior of the Ball Channel. Since the whole thing is painted black on the outside, no light is emitted into the game’s interior which would have shown through other holes. Due to the passive nature of the metal detector, each Ball Channel only needed a 3-conductor cable for ground, LED drive and ball detection. I had some small 3-conductor cables in stock with a nice jacket, so I 3DP’d tiny custom cable clamps to hold all the cables to the back of the playfield board.

 

 

 

 

OK, so the ball goes through a hole, target or otherwise. I had to design an internal structure that channels the ball into my “Ball Setup Mechanism” (BSM). This was one of the hardest parts of the project, where I made various panels out of thin 1/4” plywood in combination with various aluminum angle pieces to direct the ball, no matter where it landed, into the opening of the BSM. I had to make a mechanism which would push the ball out a hole located near the bottom of the playfield board and drop onto the bar at the beginning of each round. I used an unusual “Non-Captive Linear Stepper Motor”. It has a small 3.5mm diameter lead screw which goes right through the motor. The inside of the motor has female threads which turn. If you drive the motor to make it turn, but don’t hold the lead screw, minor friction will just make the lead screw turn. But, prevent it from turning and the motor’s internal threads make the lead screw travel. I took a small 1/4” square slippery HDPE plastic rod, put a hole at one end and threaded the small lead screw into it. This square rod then goes through a square hole at the back of the BSM’s “cup”. Now when the motor turns, since the lead screw can’t turn, it thrusts outward and the other end of the square plastic rod pushes the ball out onto the bar. I have a µswitch positioned to detect when the pusher rod is at the home position, so all I have to do is give the stepper a specific number of pulses and I know it will deliver the ball. Then I just have it retract until it hits the µswitch. I have a short video where I’m bench testing it.

Here on the bench experimenting with ball detection as it goes through a ball channel. Also note the VFD display being exercised on the Proto-Station.

Quick mock up connecting the joysticks through simple logic to control the DC gear motors driver board.

[2020-09] I recently bought a just released Ryobi accessory. It turns one of their tool batteries into 2 USB ports. I had actually designed almost the same thing back in 2015 (see page 4: “Ryobi Battery Adapter “). The only difference was my goal was to power an old Craftsman LED work light who’s internal battery had given out. The switching supply I made was set to 3V for that light. I could have just as easily made it 5V with a USB receptacle. In fact, I thought of it as I was finishing that project.

 

At any rate, rather than go back and rework it, this Ryobi USB Adapter was about $22 so I went ahead and ordered one. It only took a couple minutes to realize it had quite an oversight. It has a momentary button on top to turn it on or off, but there’s no indicator! You have no idea what state it’s in. Had it been a mechanical toggle or rocker switch, you would know just by looking at it.

 

At first I started to open it up to put in a power indicator. However, it would have destroyed the labels and ruined it’s aesthetic. Since it has 2 USB receptacles I decided to just make an external USB Power LED Indicator.

 

I used a chinese USB Type-A connector breakout board. The PCB has a USB plug at one end and a 4-way .1” spaced hole pattern at the other end. I just used these pads to solder on a SM LED and resistor.

 

Then I started to design an tiny enclosure. It would have been easy to just use a through-hole LED and make a hole in the lid. But, having not done a dual-extruder 3DP project for some time, I though this would be my chance. The enclosure would use black plastic. But, in the “lid” design, I specified an area that would use “clear” filament. That way the top surface would print with both black and clear, making one solid surface with an area for light to escape. In reality, “clear” results in “translucent”, which is perfect for this project.

 

The last photo shows it in action. I can really use it anywhere as a test on any USB port to check if voltage is present.

 

 

Here we see the 3D printed part with a U-shape that couples to the delrin lead screw nut below it which is dark and mostly hidden. To the right of the U-shape is a small box shape. This houses the tiny bearing. A small 3mm screw with nut goes through the bearing and is tightened. There are 2 or 3 tiny washers against the nut on one side and the back of the other 3DP element which captures the brass bar and creates the ball stop. The bearing lets this rotate up and down freely. See X-ray view below.

CNCing Playfield Board

Ball Setup Mechanism

Ball Setup Mechanism

I had made a temporary setup where I propped up the playfield and used simple logic to control the motor drivers. This allowed me to experimentally decide on the playfield’s angle and the optimum motor speed. It turns out that if the motors go too fast, you can’t control the rod’s position precisely enough to balance the ball. Too slow and it becomes too easy in some situations but makes quick changes more difficult. Fortunately I hadn’t ordered the motor’s power supply yet, and armed with this experience I ordered a variable one which I keep at 10V. For the +5V supply, I started out with a small 3A open frame switcher. Toward the end of the project, when I started experimenting with LED strip lights in order to backlight the graphics, it became clear that I needed one-LED granularity. Therefore I ordered LED strips that were designed for +5V, where each LED has it’s own current limiting resistor. The more common 12V or higher strips are a series-parallel arrangement where you can only snip them in increments of 3 or more. So I swapped in a +5V 10A supply.

 

With each mechanical part tested, it was time to design the electronics. I had already decided to use two mp3 player modules so I could have music and sound effects at the same time. These are controlled with serial commands. I spent a lot of time translating chinglish in order to get a cohesive command string list. The next section I worked on was the interface to the Ball Channel assemblies. I used an I2C 16-bit I/O expander to drive the Ball Channel LEDs. It delivers relatively good hi-side drive current so it can drive the LEDs directly. The whole design rests on detecting the ball going through the Ball Channel using it’s ferrous metal proximity sensor. The current Target Hole’s sensor has to be watched during game play. I used multiplexers to choose which sensor will be monitored. While I could have qualified/debounced the detection pulse in software, I decided to make a hardware qualification circuit that would look at the pulse and only accept it if it was a minimum of 30msec. If so, it would latch the result. This made the software much simpler, as I only had to look for the ball to have landed back in the Ball Setup Mechanism (which has it’s own magnetic sensor), then look at the latched Target Hole state. If it had been detected going through the Target Hole, you get the points and move on to the next round.

 

I used another multiplexer to select whether the lead screw motors would be controlled by the joysticks or the µC. After a round, control goes back to the µC which brings the bar to the bottom so the Ball Setup Mechanism can drop the ball onto it. When gameplay starts, control is given back to the joysticks. This multiplexed control goes through gating which takes into account upper and lower limit µswitches on each side, preventing the bar carriers from slamming the end of travel. These signals all end up creating the logic which drives the DC motor controller board. This is a purchased PCB, red in color near the power supplies in the photos.

 

Other µC I/Os are sent to the stepper motor controller. It too is a purchased PCB, very small, red in color and just visible behind the main Game Controller PCB. Control signals and pulses are sent to this controller which drives the Ball Setup Mechanism which drops the ball onto the bar.

 

The same I2C bus I used for the LED driver, along with +5V & ground, are sent up through a long cable to the Vacuum Fluorescent Display (VFD) at the top right of the game. I’ve had two of these sitting around for 30+ years, just waiting for the right application. I have to baby them, as there’s no way I could ever buy a replacement now. These are single line, 32 character dot matrix displays. They have a cool blue-green glow. At some point, I remember pinball machines were using these in their “backbox” as their points display, giving it precedent for use in my “vertical pinball” machine. The VFD has a parallel interface, so I designed a small PCB to use another I2C 16-bit IO expander and manipulated the outputs in software to drive the VFD. This board was a perfect candidate to CNC. It mounts on the back of the VFD.

 

I finished the Controller Bd PCB layout, but since there is so much circuitry and so many connectors, it ended up a little too big for my favored OshPark PCB house. I ended up sending it to China. It turned out perfect and I received it remarkably fast, but I hate all the business I end up giving to China.

 

I spent hours extracting audio from The Prisoner DVDs. I did a lot of editing, looping, etc. The idea was to play the show’s fantastic theme music on power-up and in-between games, but silent when the game is just sitting there idle. During the game, each Target Hole would get it’s own background music while you play. The show had all sorts to choose from, but needed a lot of work to make it useful. If you got the ball through a Target Hole, you would get that hole’s “reward audio”, like No6 saying “I am not a number, I am a person!”, or “be seeing you”. This is analogous to a classic video game playing a little “reward tune”. If the ball goes through any other hole, you get the audio from the show of cell doors slamming. This was at the end of most episodes where No6’s face comes at the screen and cell doors slam in front of him, as he is still a prisoner.

 

When the game was all done, I wanted the front glass to have Prisoner related graphics. I’m no artist, so I couldn’t just draw something. Spending hours on line, I found a fantastic Prisoner poster and other images that I downloaded in the highest resolution I could find. I spent days in the “paint.net” program pulling apart the graphics and distributing it around the perimeter of the glass dimensions. When done, I created a giant .bmp file, and took it to a sign shop. I had them print it in reverse on vinyl, apply it to the back of the glass, then put translucent / white vinyl on the back of that to disperse the backlight.

 

This is probably the biggest hobby/maker project I’ve ever done, a record previously held by the Star Trek doors. The game took about 20 weeks to make, concept to reality. Lots of that time was research. It’s now up in our “Diner” and looks pretty cool all lit up.

 

 

Prisoner Game, finished and placed in our “Diner”. We found this shelf / cube unit at Walmart that seemed like it was made to be the pedestal. Backlit graphics still bright in normally lit room.

Here’s the glass / graphics in a darkened room. I not only used LED strips to backlight the graphics, but I used two facing in to illuminate the play field.

Limit µswitches mounted to 3DP’d slotted brackets. These stop the motors when the bar ends reach their travel limits.