Loading...
 
Skip to main content
structure
Elephant Mechatronic 20220206 100833954 1000w

Raspberry Pi PCB
Mechatronic projects

PXL 20201025 082325383.NIGHT Whitened 1000w

 

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.

Elephant Rear Servo View

 

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.

 

Servo Holders

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!
Connected Servos 20190904 090403 1000w The corner connector allows 3 dowels to be connected in the x, y, z directions.
Connected Servos 20190904 085942 1000w The cross connector allows up to four dowels to be interconnected at right angles in the same plane.
Connected Servos 20190904 090251 1000w The T-connector allows up to three dowels to be interconnected at right angles in the same plane
Connected Servos 20190904 085845 1000w The right-angled connector allows two dowels to be connected at right angles.
IMG 20191216 100450 1000w

IMG 20191216 101905 800w IMG 20191216 102130 1000w The 4x2 Lego brick right-angled connector allows one or two dowels to be connected to a standard Lego brick, which in turn can be part of an overall Lego built structure, which when used in conjunction with other connectors allows servo motors to be mounted in various ways as shown on the right. A similar 3x2 DUPLO brick right-angled connector is also available.

Connected Servos 20190903 182245 1000w

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.
As shown in the series of images below: first the horn is pushed firmly into the servo arm; then the servo arm can be pushed onto the splined drive of the servo (the exact rotational position will need to be adjusted for the specific mechatronic design) and the small screw supplied with the servo horns used to secure the horn to the servo – a small washer can be used as a spacer to make sure the arm does not tilt once fitted; then an appropriate length of 3.8mm dowel can be inserted into the arm to which a cardboard cut-out or flag etc. can be fixed.

Connected Servos 20190907 105903 1000w Connected Servos 20190907 105916 1000w Connected Servos 20190907 110029 1000w
Connected Servos 20190903 181906 1000w

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.
As shown in the series of images below: first the horn is pushed firmly into the main servo arm piece; the combined servo arm and horn are then pushed onto the splined drive of the servo (the exact rotational position will need to be adjusted for the specific mechatronic design) and the small screw supplied with the servo horns used to secure the horn to the servo; then the connecting piece of the servo arm can be glued to the cardboard cut-out and cut-out + connecting piece screwed to the main servo arm piece.

Connected Servos 20190907 104829 1000w Connected Servos 20190907 104912 1000w Connected Servos 20190907 105014 1000w Connected Servos 20190907 105307 1000w

 

Connected Servos 20190904 090541 1000w

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.
Connected Servos 20190904 090520 1 1000w 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.
Stand Up X6 Strip LEGO 2x18 Tile 04
Stand Up X6 Strip LEGO 2x18 Tile 03
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.
Stand Up X3 Strip LEGO 2x11 Tile 04
Stand Up X3 Strip LEGO 2x11 Tile 03
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.
IMG 20191218 114055 1000w 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
IMG 20191218 114043 1000w 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:

 

 


Page last modified on Tuesday 18 February 2025 13:53:50 GMT