Join the Ben Heck team every week for amazing hacks! Watch them build and mod community-inspired projects using electronics! | Mini Pinball Kit | |
Community Feedback | ||
See All Episodes |
Felix populates the board and makes bodges for the mistakes. Once corrections have been made they can send away for a new one. Meanwhile Ben makes a laser paint of a new circuit for the inserts and the IR emitter detector. The PCB does two different things, it can either see the ball or can light something up. Once done, they'll be able to send off for some small PCBs of that design as well. |
Ben and Felix resume work on the mini pinball machine. Felix populates the pinball boards that came in. If there are any mods they need to do he’ll go ahead and do that and then update the schematic if necessary. While he’s working on that Ben’s going to be doing some sensor work. Previously, they considered a target that gets hit and has a microswitch which might have a pop bumper with a little ring around it that conducts electricity. Now, Ben is thinking it will be a rollover switch that’s infrared. When the ball rolls over the emitter detector it bounces IR light back down into the sensor and gives a signal back when the ball is detected. Small mechanical switches are expensive so they should use as few as possible. Ben’s got some new surface mount parts to do a test circuit on and will design a PCB around it. Once they have the switches done they can hook them up to Felix’s wired board and see if it gets the data properly.
The PCB design was laid out fairly quickly so there were some mistakes made. They'll need to put in some bodges onto the board. While Ben has been working on other projects, Felix has been slowly bodging the board into a working state. First thing Felix did was check the GPIO and the LED. He realized that the GPIO needed to have pull ups on them and a number of LEDs weren’t receiving power so he linked them over to the power connection. After testing the LCD, he discovered that it uses a different power supply voltage for the backlight. It takes between 6.2 – 6.8 volts and they forgot the potentiometer for the contrast. Without a contrast knob you won’t see anything on the display. Felix uses a variable power regulatorvariable power regulator to get the 6.5 volts to turn on the LCD. He noticed that the 5 volt linear regulator, to knock down 12 volts to 5 volts, is getting pretty warm. When you have a linear regulator, any power difference is basically turned into heat, so if you have a lot of surface area on your board or a lot of copper for the heatsink, it’s not a big deal. A better way to do it is with a switching power supply which Felix put into the schematic. A switching power supply is more expensive and uses more parts, but it runs cooler and is more efficient.
The big changes are done to the power circuitry and some bodges for the screen, such as adding a switching regulator. Switching regulators turn on and off very rapidly to create lower voltages, making them more efficient as you’re not wasting voltage potential as heat. The audio amplifier has been tested and is working. Ben’s soldering the emitter to a board before he goes to design a board. He’s using all surface mount parts for this test. They should be able to see if the emitter is working using a cell phone. He’s using a Google Pixel which doesn’t’ have an IR Filter. Some phones like the iPhone use IR Filters so you can’t do it with every phone. Ben hooks up two different voltages to the test circuit, 3.3 volts on the phototransistor and 1.6 volts going into the emitter, and uses his multimeter to check the readings. The numbers he’s getting are within tolerance of a TTL high or low signal. If you turn the power up you get cross contamination between the emitter and the detector, if you turn it down the surface of the pinball is too random to reflect light back consistently. He adjusts the voltages accordingly until he gets a good result. Once he gets the result he’s looking for its time to hook it up to the oscilloscope. By putting it on an oscilloscope you can see where your peaks and valleys are. He checks the trigger time, if the event length is too short the switch scanning code might miss it. Their software scans the switches constantly using a timer interrupt. With the proper voltage and isolating lock between them, they get a pretty good result. They have close to zero volts when inactive and the three volts when active. Anything past 1.5 volts should trigger as a 1 on the microcontroller.
Ben uses Eagle version 8 to design a test PCB. It’s a small two-sided circuit board. On the top it has a 1206 surface mount LED, further down is an emitter detector pair with the appropriate resistors around the bottom. There is also a place for a three pin header like a servo. He then goes into Adobe Illustrator to get started on the laser paint. He’ll use a CNC machine to get a perfect 5x5 square. Since its double-sided they can laser etch one side in a jig on the laser cutter, flip it over and then laser etch the other side. He cuts a cardboard jig for PCB alignment in the laser. Once the PCB is painted, they do laser etching to remove paint where they want the copper to be removed. Felix uses a chemical bath of ferric chloride to remove the exposed copper. He then uses acetone to remove the paint to reveal the remaining copper. Ben wires up a light board example. Once the test boards are laser painted, Ben begins stuffing them. The idea is to send 5 volts to the modules and return the ground of the LED into the Texas Instruments LED controller chip. Once it sinks the ground for a certain light the light will turn on. Meanwhile, Felix wires up the emitter detector board. They are designing their board to have two uses, as an IR switch, and a general purpose light. He’s wired up the laser paint board with their infrared emitter and infrared detector. It’s been connected to their prototype pinball board.