Pimoroni Servo 2040 Review: Control up to 18 servos with RP2040
The latest board from Pimoroni’s studio is something of a labor of love. The £24 ($25) Servo 2040 is a Pimoroni product, but it’s really the work of Pimoroni roboticist and product engineer Dr Chris Parrott. Powered by the RP2040, a chip that beats the current chip shortage, Servo 2040 carries its purpose in its name. Designed to control up to 18 servos and work with up to six analog inputs, this is a serious board backed by a very well designed software library.
The Servo 2040 includes QWST, a connector compatible with Stemma QT and Qwiic (and Pimoroni’s own Breakout Garden boards via adapter). This choice of connector opens the Servo 2040 to a world of sensors and inputs, all easily connected via the dedicated connector.
In this board, the power of the RP2040 is harnessed to create precision in movement. So if you want to shake things up, in style, then the Servo 2040 should be on your shopping list.
Pimoroni RP2040 Servo Specifications
|system on chip||RP2040 (Dual Arm Cortex M0+ running up to 133 Mhz with 264 KB of SRAM)|
|Storage||2 MB of QSPI flash memory supporting XiP|
|GPIOs||18 servo header pins|
|6 analog sensor inputs|
|Qw/ST Connector Stemma QT / Qwiic|
|Unsoldered bases for|
|3 analog inputs, I2C, Debug, 5V, 3V3, Boot, Reset|
|Features||On-board voltage and current sensing|
|6 x WS2812 / NeoPixel|
|Screw terminals for external power supply with reverse polarity protection, continuous current 10 A max.|
Using the Pimoroni Servo 2040
We’ll start with the table layout. Being slightly longer and almost double the width of a Raspberry Pi Pico, Servo 2040 is a densely packed board. The 18 servo outputs have three pins for each output. The three pins are the Signal, Voltage and GND connection and servos tend to have color coded connectors to show orientation. If you’re wrong, that’s okay; they are designed for occasional accidents. The headers have a typical pitch of 2.54mm and we can easily connect 18 servos, creating servo cable noodles on your bench.
Six more headers are located at the end furthest from the USB-C port. These six headers are for analog inputs. Input, voltage and GND are clearly marked on the board silkscreen. On the side opposite the servo headers are unsoldered pins to access additional I2C, analog, and power pins, should you need them. Pimoroni has included a QW/ST connector (StemmaQT / Qwiic), which we will test later. There are six WS2181 “Neopixel” RGB LEDs which are easily controlled by code. These LEDs can be used to indicate errors, states or to create rainbows.
We tested the Pimoroni Servo 2040 using MicroPython and CircuitPython. Pimoroni has created a new version of its MicroPython build that supports Servo 2040, and it looks like roboticist and developer Chris Parrott has poured a lot of love into the software that supports this project. MicroPython modules for Servo 2040 are well documented and robust. We see quality hardware and software backed by excellent documentation.
For our MicroPython test, we chose to use the version of Pimoroni that also supports CircuitPython libraries. We wanted to test a few Stemma QT devices with MicroPython and this seemed like a good fit. We’ve gone through Pimoroni’s examples, testing single and multiple servos. Everything went extremely well.
We tested a series of inexpensive SG90 plastic gear servos and found that the Servo 2040 was able to control each of them with a high degree of precision. We also tested an MG90S servo, a higher quality metal servo that also performed well. These two servos only have 180 degrees of movement so we dug into our bit box and found two Lego compatible continuous servos. They operate similarly to a DC motor, but are much slower and more precise. We are happy to say that our continuous servos also performed without issue.
To take the testing further we connected a 10K Ohm potentiometer and one of the analog inputs and using a bit of math and the Servo 2040 API we created a raw speed controller for the continuous servos.
We also connected an Adafruit MPR121 capacitive touch board via the QW/ST connector and loaded the corresponding Python dependencies (Adafruit Bus and the MPR121 module) and changed the I2C pins to match those of the RP2040 Servo. Unfortunately we couldn’t get it to work and it looks like the I2C pins are not being detected. An issue has been raised and I hope this will be fixed in the future.
We went through the list of Stemma QT devices supported by Pimoroni’s MicroPython version and noted that the BME688 was there. We logged in and wrote a quick test script to confirm that we could indeed get the temperature, proving the QWST connector was working within specification.
This quick win fueled our need to prove that Servo 2040 could work with more Stemma QT boards, so we uploaded a CircuitPython 7 beta for the Servo 2040. The info page informed us that we could only control 16 servos, against 18 for MicroPython, an acceptable loss. We tested a series of CircuitPython examples and everything worked as expected. It wasn’t until we tested our continuous servos that we noticed they never stopped. CircuitPython handles this type of servo a little differently, and with a change to our code, we were good to go.
We tested the QWST connector with an MPR121, installing the dependencies and tweaking sample code so that touching the MPR121 inputs controls two servos. Everything worked and it looks like CircuitPython is a viable alternative to MicroPython for this board. Just note that the MicroPython version is from Pimoroni and as such has a much more granular level of servo control. CircuitPython is much more of a general purpose alternative. If you need Stemma QT/Qwiic and can afford to lose two servos, then go for it.
Pimoroni Servo 2040 Projects
As this board was designed by a roboticist, you can guess what projects they had in mind. As a robot platform, it’s ideal. Four continuous servos, a few sensors and a battery are all you need to turn the Servo 2040 into a competent robot. With all the additional servo options, we can easily turn the Servo 2040 into a small-scale industrial robot, think car assembly lines and you’ll get the idea.
Servo 2040 follows a trend that Pimoroni has really taken to heart: creating bespoke boards based on the RP2040, an abundant chip even in today’s chip shortage. Badger 2040, Interstate 75, PicoSystem, Plasma 2040 are all examples of the versatility offered by the RP2040 and the ingenuity of the Pimoroni team.
The Pimoroni Servo 2040 was designed to control servos, and it does so with ease and finesse. The hardware is bulletproof, well designed and thought out with a robotic mindset. Servo 2040 is niche in that it is primarily aimed at users who want to build robots or just move servos. However, if you need to use a lot of servos at once, it’s hard to beat the Servo 2040 in terms of price, functionality, and ease of use.
AFTER: Best RP2040 Cards
AFTER: Best Raspberry Pi Projects
AFTER: Raspberry Pi: How to get started