Raspberry Pi PCB
|
The word ‘mechatronic’ is used to mean any structure where the movement, and sometimes sound generation, is managed by a computer such as a Raspberry Pi.
The structure could be anything from a 2D animal outline (sometimes called an ‘animatronic’) through to a complex 3D Lego structure.
A Raspberry Pi + an assembled PCB ‘mechatronic’ build uses 3D printed servo connector components and Lego adaptors to assemble a 2D or 3D ‘structure’ of servos or a structure with a rotational element driven by a stepper or drive motor, that may also then be ‘clad’ with a ‘skin’ to provide a reasonable representation of the intended ‘moving object’.
Each of the motor types (servo, stepper or drive) can then be connected to an assembled PCB along with appropriate power sources to drive the motors.
Raspberry Pi software
Python software has been developed for a Raspberry Pi that uses a Flask web server to provide a browser interface to control the movement of the various motor types as well as sound.
The sound could be played from a connected HDMI screen or from a stand-alone 'powered loudspeaker' connected to the analog sound port of the Raspberry Pi (no longer fitted to a Pi 5!).
The movement/sound sequences for an individual mechatronic build are 'programmed' by an action control file which is a .TXT file with a structured set of parameters on each line of text.
At present the structure/format of these controlling parameters are different for each motor type so for this project development a mechatronic build can currently only be built with one type of motor where the maximum number of each type of motor is constrained by the PCB connection limitations, i.e.
- servo motors: maximum of 16, constrained by the maximum number of connections on a PCA9685 control board
- stepper motor: maximum of 1, constrained by the PCB connectors
- drive motors: maximum of 2, constrained by the number of spare GPIO pins on the PCB that are needed to manage a L298N motor controller
Work is being considered to 'rethink' the structure/format of the controlling parameters of an action control file so that a mechatronic structure can be built with a mixture of motor types.
Some early, but stable, software has now been completed and is available for download along with documentation and other support resources at this GitHub address.
Example mechatronic
A simple elephant animatronic has been built from cardboard cut-outs of the 'separated' body, head and tail of an elephant - as shown in the image at the top left of the page - with two servos, connected to a PCA9685 control board inserted into an assembled PCB, and used to move the head and tail.
The servos and cardboard cut-outs are 'mounted' using various 3D printed connector components, as shown in the 'rear view' image shown on the right.
Individual servo movement sequences with sounds that can be played are 'programmed' by a simple action control file as shown in the video below
|
elephant animatronic demo |
3D printed connector components
To enable the design of whatever creative 'moving object' the user wants to build, a set of 3D printed components and Lego adaptors (examples shown below) have been developed that allow a number of servos as well as stepper and drive motors to be assembled into 2 or 3-dimensional structures using 3.8mm (5/32‑inch) wooden dowel and standard Lego bricks.
These 3D printed servo 'connection' components and Lego adaptors will be developed/extended further as the need arises and the currently available parts are described in more detail in the table listing that follows.
The main servo case allows a small, lightweight SG90 servo to be provided with dowel fixing points on four sides. The SG90 servo is held in place in the case by the 2 self-tap screws that are supplied with the rotor ‘horns’ of the SG90 or by other 2mm self-tap screws . The single sided rotor ‘horn’, used in various ways as described below, is attached to the SG90 with the very small screw supplied with the SG90 ‘horns’. Take care when trying to screw this into the splined hub of the servo since it is very easy to drop it onto the floor where it will get lost and there is only one supplied with each servo horn! |
|||||
The corner connector allows 3 dowels to be connected in the x, y, z directions. | |||||
The cross connector allows up to four dowels to be interconnected at right angles in the same plane. | |||||
The T-connector allows up to three dowels to be interconnected at right angles in the same plane | |||||
The right-angled connector allows two dowels to be connected at right angles. | |||||
|
|||||
A servo arm + wooden dowel shaft allows smaller/lighter items, such as a thin animal tail or the flags used in a semaphore messaging servo structure, to be attached to a servo. |
|||||
The 2-piece servo arm allows large mechatronic cardboard cut‑outs to be attached to a SG90 servo using the single sided rotor ‘horn’ supplied with the SG90.
|
|||||
The 6-point screwed-down base bar/card slot allows several upright dowels that support a set of interconnected servos to be attached to a base behind a card image. The 6 dowel fixing points are at a small angle to the vertical in order to compensate for dowel bending due to the offset weight of the attached servos. The base bar has 2 fixing holes so that it could be screwed to a larger wooden block to provide a suitable weighted and stable overall base, or sticky foam pads could be used to adhere the bar to a base instead. If screws are used, as the base bar fixing holes are also at an angle, the fixing screws will need to be screwed into the wood at an angle. |
|||||
The 3-point screwed-down base bar/card slot provides the same function as the 6‑point screwed-down base bar/card slot but can be used in multiples to achieve different upright dowel spacings or offset positioning if the overall servo structure needs this. | |||||
The 6-point LEGO compatible base bar/card slot provides the same function as the 6‑point screwed-down base bar/card slot but instead of through holes for fixing screws the base is a LEGO compatible 2x18 tile. | |||||
Similarly the 3-point LEGO compatible base bar/card slot provides the same function as the 3‑point screwed-down base bar/card slot but instead of through holes for fixing screws the base is a LEGO compatible 2x11 tile. | |||||
The longer card slot bar matches the length of the 6-point screwed-down base bar/card slot above for arrangements where the card image needs to be set further away from the servo dowel fixings | |||||
The shorter card slot bar matches the length of the 3-point screwed-down base bar/card slot above for arrangements where the card image needs to be set further away from the servo dowel fixings | |||||
Full detail on the 3D print designs for the various connector/adaptor components can be found at the Prusa web site here, here and here.
The following links provide more details on various aspects of this evolving Maker PCB Project development:
Details for all the Maker PCB projects:
All the currently available maker project information: