Version 4

    element14's The Ben Heck Show

    Join the Ben Heck team every week for amazing hacks! Watch them build and mod community-inspired projects using electronics!

    Back to The Ben Heck Show homepage

    Mini Pinball Kit
    Featured Bonus Content
    See All Episodes



    Terry Denery, an applications engineer from MathWorks, meets with Ben and Felix to demonstrate how MATLAB and Simulink can be used for their mini pinball kit. Terry travels across the US to meet with engineers interested in using MATLab and Simulink. Because the mini pinball kit is an electromechanical system, it’s a good candidate for a demonstration on how this works.


    What pinball game would YOU want?


    Visit the MATLAB and Simulink group on element14


    Felix has the mechanical rig setup for Terry to demonstrate how to use MATLab and Simulink for their kit.  Ben provides Terry with a 3D CAD drawing of the pinball machine their going to build.  He drew it up using AutoDesk Fusion 360 and Terry returns back with simulation based on it.  MathLab and Simulink are essentially tools for analysis and simulation of electromechanical systems.  Terry explains how it’s possible to feed PWM signals from a microcontroller into the software using a process called hardware in the loop simulation.


    The processor is considered hardware from MathLab point of view, and has no choice but to run in real time.  In order to enforce real time the simulation needs to be timed by the board and not by its own processor. This isn’t something you can do with an operating system such as Windows or Linux.


    MathWorks its own Simulink real-time, a real-time operating system, and sells its own boxes that are suited to really employ it. The boxes are processors that have direct connection to the various hardware transmitters, things you can connect your devices to. They prototype the algorithms , hooked up to all your instruments such as actuators and motors.  In the case of mini pinball they can create an image system that’s going to track the ball and come up with an algorithm on how to move the flipper.


    Terry demonstrates some of the 3D modeling for Felix.  Step in AutoDesk Fusion 360 is a good format to use if you are using MathLab for a simulation.  One of the good things about this software is the three-dimensional user interface that allows you to zoom in, rotate the view, and point and click for joint placement. Mechanical connections are defined by point location as well as orientation so you need to be able to tell the direction of movement.  Felix is impressed by how the software is able to interpret location geometry. Terry also goes over using MATLAB script called get geometry 1:1.