Raspberry Pi PCB
|
The Raspberry Pi PCB can support several different methods for controlling servo motors and the components and GPIO connections used in a populated PCB set out in the table below can be used to illustrate these methods:
Component | GPIO pin(s) |
directly connected servo on the S1 servo connector | GPIO #24 plus 5V and GND connections all provided on the 3 pin male S1 connector |
if a 2nd directly connected servo is needed the S2 servo connector can be used | GPIO #25 plus 5V and GND connections all provided on the 3 pin male S2 connector |
Tactile button (1) | GPIO#07 and GND connections across the button |
Tactile button (2) | GPIO#26 and GND connections across the button |
PCA9685 PWM control board | GPIOs SDA & SCL plus 3V3 and GND connections all provided on the PCB's dedicated 6 pin female connector that 'matches' the 6 pins on the PCA9685 board |
The set of components tabulated above allows many different movement control to be programmed and example 'starter' code has been developed in Python. The details below summarise just some of the options that are possible and all the currently available example software and documentation is available here.
Servo Motor control and rotation example methods:
1 |
Simple button controlled single servo: a single servo is connected to the 3 pin male connector labelled S1-5V-GND and therefore powered direct from the Raspberry Pi. Python software has been developed that uses button 2 to trigger a set series of servo movements.
|
|
2 |
I2C button controlled one or two servos: this demonstration can use one or two servos connected to a PCA9685 PWM control module, with external power supplied from a 4xAA battery pack connected to the JST power bus on the PCB. The I2C controlled PCA9685 is inserted into the dedicated 6 pin female connector on the PCB with its external power lead also connected to the JST power bus on the PCB. Python code using buttons 1 and 2 has been developed to trigger a set series of servo movements for either of the two servos connected to the PCA9685. More specialised Python code is also available for a simple 2-servo semaphore demonstration which may also be further developed with a Python/Flask web interface that could be used to operate the semaphore demonstration. |
The simple control examples profiled above can be used to develop more advanced projects as shown here and as shown in the images below, with the use of some custom 3D printed 'connectors', servos can be added to LEGO constructs so that they can have moving parts.
The 3D print designs for the 'connectors' shown above can be downloaded at the Prusa site here.
Electric motor control:
The following links provide more details on various aspects of this evolving PCB project development:
Details for all the Maker PCB projects:
All the currently available maker project information: