RoadTest: Sign Up to Roadtest the Cytron MAKER PI RP2040
Author: work14
Creation date:
Evaluation Type: Development Boards & Tools
Did you receive all parts the manufacturer stated would be included in the package?: True
What other parts do you consider comparable to this product?: Romeo V2 from DF Robot
What were the biggest problems encountered?: No issues found. This board is very compact, robust and practical.
Detailed Review:
Cytron Maker Pi RP2040 features the first microcontroller designed by Raspberry Pi - RP2040, embedded on a robot controller board. The board comes with dual channel DC motor driver, 4 servo motor ports and 7 Grove I/O connectors. The Cytron MAKER PI RP2040 is an out-ofthe-box platform for easy robot applications. Some links to key information regarding this RoadTest follow.
The contents of the box are shown below. The screwdriver was a welcomed addition to the kit since not everyone will have one readily available. The Grove cable connectors are also a very practical and fundamental addition to the kit. Without the cables new users may have a hard time finding what would be needed to connect to sensors and actuators. Well done by Cytron.
The Cytron MAKER PI RP2040 is an affordable entry level compact development board ready to use without requiring complex hardware and/or software integration knowledge. The board is user friendly and easy to use for all levels of robotics experience. The MAKER PI RP2040 is highly recommended for any project that requires to integrate sensors and drive a motor. The board has great support from industry and documentation is easy and readily available.
The results and take away of the Cytron MAKER PI RP2040 for this RoadTest are itemized below:
Appreciation to Cytron and element14 for providing the opportunity to review the Cytron MAKER PI RP2040. The RoadTest review program experience allows individuals to learn about new hardware and software solutions, and to provide service to the community by submitting a review of various products.
The RoadTest program is the element14 community’s flagship product review program. Testers obtain a product to experiment and to provide element14 a written review of their experiences with the product. The following are important points pertaining to this program.
RoadTesters have 60 days from the receipt of the product to complete testing and review writing on element14.
The review must be filed on the special element14 Roadtest form.
Roadtesters who do not complete their reviews will not be eligible to participate in the program in the future.
Test the out-of-box experience of the product.
Experiment with the capabilities of the product.
optional -- produce an unboxing video.
This particular RoadTest relates to the Cytron MAKER PI RP2040 (see figures below). This board intends to make robotics application development easily done with little out-of-the-box effort. The initial goal of the out-of-box experience is to get applications up and running in under one (1) hour, with no robotics experience needed. This is easily achieved.
This MAKER PI RP2040 is a ready-to-use hardware board with easy to master CircuitPython software with on-target development. CircuitPython firmware developed by Adafruit does provide tight integration with the board.
Cytron and Adafruit along with some community users provide a plethora of readily available documentation and example programs for the MAKER PI RP2040 and CircuitPython. Some of those links are summarized below for easy find and access. Documentation is satisfyingly easy to access and easy to read.
Simplifying Robotics with Raspberry Pi RP2040. Cytron Maker Pi RP2040 features the first microcontroller designed by Raspberry Pi - RP2040, embedded on a robot controller board. This board comes with dual channel DC motor driver, 4 servo motor ports and 7 Grove I/O connectors, ready for any robot / motion control project. The board is compact, robust and easy to use. The board layout is well thought out and practical. The exposure of GPIO in the form factor of groove is very functional and practical. The hardware works well, and is well integrated with CircuitPython development tools.
The figure below shows all the GPIO and other features for the board. This layout is well thought out. The engineers responsible for this layout did think of just about every need that arises when developing robotics applications. Of particular practicality are the motor test buttons. The availability of GPIO via grove ports is highly practical. It is what is needed for a lot of sensor and actuator integration for any robotic application. The Gove port also make it very practical in a classroom environment when students need to interact with robust hardware. The Grove ports provide this robustness out of the box.
The video below shows the out-of-the-box software behavior for the MAKER PI RP2040 integrated with a simple robot.
Raspberry Pi documentation for the Pico board is widely available.
The board layout is well done. Servo connectors are a time saver, and the presence of DC motor quick test buttons sets this Maker Pi RP2040 board sit on top of the heap. These test buttons are very practical when troubleshooting initial wiring connections to the hardware, and then when troubleshooting the software itself. This feature all by itself makes this specific board more attractable than most other. All things being equal, this feature alone would win easily.
Having a number for ways to power the board makes the board very user friendly. This saves a lot of development time.
Buttons and LEDs are always welcomed. These features make the board suitable for a classroom environment where students can easily experiment with their software and hardware integration.
The Grove ports are an excellent addition to the board layout. These ports make this board very robust. The ports are very practical in the way that wires the signals. For example, the two serial port GPIO signals are conveniently routed to the Grove ports.
CircuitPython is an easy to use development environment suitable for all levels of robotics expertise. CircuitPython is tightly coupled with the Maker Pi RP2040. This combination makes the Maker Pi RP2040 and CircuitPython a good choice for students and new robotic enthusiasts.
It would be fun to integrate the Maker Pi RP2040 to a lego creation.
Cytron Maker Pi RP2040 is basically the Raspberry Pi Pico + Maker series' goodness + Robot controller & other useful features. Therefore this board is compatible with the existing Pico ecosystem. Software, firmware, libraries and resources that are developed for Pico should work seamlessly with Cytron Maker Pi RP2040 too.
CircuitPython is preloaded on the Maker Pi RP2040 and it runs a simple demo program right out-of-the-box. Connect it to your computer via USB micro cable and turn it on, you will be greeted by a melody tune and LEDs running light. Press GP20 and GP21 push buttons to toggle the LEDs on/off, while controlling any DC and servo motors connected to it to move and stop. The demo code allows to test the board out-of-the-box. This is a very practical software/hardware integration feature. All of the before here mentioned software/hardware features do work out-of-the-box. Excellent work.
While connected to your computer, a new CIRCUITPY drive appears. This allows the user to explore and edit the demo code (code.py & lib folder) with any code editor, save any changes to the drive and see changes in action in the next auto-reboot. This is a nice feature that new roboticist will like since it does not require to compile and upload code. It is the reason why Cytron embraces CircuitPython - it's very easy to get started.
The following links provide a reference to some of the documentation used in to develop software for this review.
The latest firmware update can be found in the following link:
https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython
This site includes a description of the steps needed to update the firmware. This is done easily.
Most CircuitPython boards ship with a bootloader called UF2 (USB Flashing Format) that makes installing and updating CircuitPython a quick and easy process. The CircuitPython firmware file is in the form of a .uf2 file. For RP2040 boards such as the MAKER PI RP2040, the bootloader on an RP2040 board starts by pressing down the boot select button, and while continuing to hold it, pressing and releasing the reset button. Continue to hold the boot select button until the bootloader drive appears. See figure below.
Once successful, the RGB status LED(s) on the board will flash red and then stay green. A new drive will show up on your computer.T he drive will be called RPI-RP2 on all RP2040 boards (see below)
Drag the file to the boot drive on your computer. An example of a file name is shown below:
adafruit-circuitpython-cytron_maker_pi_rp2040-en_US-8.1.0.uf2
When the user drags the CircuitPython UF2 file to the boot drive, it seems to disappear, and the drive disconnects. This is normal. Once the firmware has been successfully installed, the RPI-RP2 boot drive will disappear and a new drive will show up on your computer called CIRCUITPY.
The following are two of the most important omissions in CircuitPython pertaining to the development of real-time robotics applications.
1. threads
2. interrupt handling
Threads often allow for concurrent execution of blocking and non-blocking of tasks. There is no threading in CircuitPython. Given the wide variety of hardware CircuitPython supports, there is not user controlled threading of specific code.
It is possible to use interrupts directly in some situations. CircuitPython countio
module uses actual interrupts to count rising/falling-edge pin transitions. This could be used to see if a button has been pressed, but its use is very limited. The following link has an example of how to use this limited interrupt a
Cooperative Multitasking: Handling Interrupts
A frequent scenario for the use of interrupts is to guarantee that a task is executed precisely at a known interval. This is important for the implementation of data acquisition schemes, digital filters and control laws that require prices timing. It appears that CircuitPython does not currently implement interrupt handling that is able to provide this service.
The following link provides an overview to multi-tasking for CircuitPytnon:
Multi-tasking with CircuitPython
Python Asyncio: The Complete Guide
The last link above provides a Python approach to multitasking. CircuitPython does not implement all elements of the asyncio
library.
The Maker Pi RP2040 was installed in a small robot as shown below:
The Maker Pi RP2040 is well designed and integration with any robot is very straight forward. The test buttons for the motor interface are particularly practical since they allow for direct electrical troubleshoot without the need to develo or run any code. All thins being equal, this simple interface makes this board stand on its own in terms of ease of integration. As a proof of concept and for the purpose of this review, the author engineer integrated two sensors to the board:
1. GPS module TEL 0132
2. Ultrasonic Distance Sensor UMR 37
The
Maker Pi RP2040 Datasheet specifies the grove port assignment and the GPIO functionality for each pin as shown in the table below:
The TEL 0132 GPS unit integration to the Maker Pi RP2040 is done via serial interface UART 0. The reason for this integration is to integrate GPS information into a navigation solution for the robot. The line of code used to start the UART i/o follows:
uart0 = busio.UART( tx=board.GP0, rx=board.GP1, baudrate=9600, timeout=10)
The RX and TX port assignment are taken from the table above. The following code snippet illustrates the CircuitPython concurrent task code used to read data from the GPS:
async def readGPS( dDat ):
while True:
# --- read GPS data
# -----------------------------------------
data = uart0.read(32) # read up to 32 bytes
# ---
await asyncio.sleep(0.003)
# convert bytearray to string
dDat.gpsData_string = "".join([chr(b) for b in data])
# --- never returns
await asyncio.sleep(0.1)
A short example of the raw GPS data read follows
$GNGGA,1xx52.000,3xx5.29xx90,N,08xx2.5xx6,W,1,10,1.4,349..58xx6,W,1xx452.000,A,A*58
$GPG,10,11,66,313,,12,51,283,,17,22,152.5xx66,W,1.14,95.32,20xx23,,,
$GNGGA,19xx3.000,3xx.29xx01,N,0xx52.5xx438,W,1,10,1.4,349.9,M,0.,,,,2.3,1.4,1.8*38
$BDGSA,A,3,1PGSV,3,3,10,20,56,207,1x,25,23,xx7,N,2.17,K,A*1D
$GNZDA,1xx53.
$GNGGA,1xx54.000,3xx5.29307,N,08xx52.5xx4,W,1,10,1.4,349.6,M,0.4,1.8*26
$GPGSV,3,1,10,04,06,049,172,23,20,51,109,17,30,29,088,
$GPTXT,01,01,01,ANTENNA OK*35
$GNGGA,1xx5.000,3xx5.29302,N,080,M,,*68
$GNGLL,3xx5.2xx2,N,08,042,30,09,18,076,19*7A
Some extra code processes the GPS information and passes the GPS data onto a navigation routine that performs sensor fusion via Kalman filters. In this review GPS data was not used in the final autonomous robot application below. The inherent lack of multithreading and interrupt support in CircuitPython makes real-time sensor data fusion somewhat meaningless. After some work to overcome some obstacles, the author decided not to pursue this effort further since the results wold not add much value to the hardware review.
This particular ultrasound has a number of ways to interface with the microcontroller. The author engineer chose serial port interface to attempt to assess the Maker Pi RP2040 performance of two simultaneous serial port interface to interact with sensors in real-time. The code snippet to setup the second serial port is below:
uart1 = busio.UART(tx=board.GP4, rx=board.GP5, baudrate=9600, timeout=10)
A relevant code snippet that reads the ultrasound data is shown below:
# --- ask for distance data
# -----------------------------------------
uart1.write(umrCmdDst)
# ---
await asyncio.sleep(0.001)
# --- fetch distance data
# -----------------------------------------
nbytes = uart1.readinto(urmDataDst) # read ultrasound data
Data is processed and passed onto a control task that computes throttle commands based on distance to obstacles. After some work to overcome some obstacles, the author decided not to pursue in-depth effort to further process ultrasound sensor information since this would not add much value to the hardware review.
CircuitPython lacks two important features discussed previously in the review:
1. threads
2. interrupt handling
Lack of threads makes concurrent programing difficult. CircuitPython does have a mechanism in place for the implementation of concurrent task execution, but this is not predictive nor deterministic. Lack of interrupt service takes any deterministic behavior out of the application. Signal processing, navigation, guidance and control applications usually require some deterministic operating behavior which is why real-time operating systems (RTOS) do exist. Based on these limitations, the best that could be done was to implement concurrent task execution via the asyncio
library. This solution is not predictive nor deterministic.
As a consequence, the robot control implementation for this application was based on simple emerging behaviors. That is, a series of independent behaviors execute concurrently and asynchronously in some fashion such as hierarchical or presumptive or preemptive or any combination thereof. The advantage of this emerging behavior control scheme is that it works with uncertain and incomplete data and requires no predictive or deterministic execution. A disadvantage is that behavior control is not predictive nor deterministic. That is, you get what happens when it happens. In addition, in behavior based control, if data is not present or of poor quality, then you get no behavior. These type of emerging behaviors are regularly seeing in nature and is the essence of pray-predator interactions: if pray does not sense a predator, then it becomes lunch.
For the purpose of this review two simple emergent behaviors where implemented:
1. deep forward motion
2. obstacle avoidance motion
Deep forward motion behavior is simply to run as fast as possible when there is no forward obstacle. In the presence of a forward obstacle, then implement some degradation of forward motion based on available sensor data. There is no knowledge of or attempt to predictive behavior. Obstacle avoidance motion behavior is simple to implement with some kind of differential motion in the presence of side obstacles. This behavior implements two independent commands for left and right sensor inputs that compete with each other. The objective is to be able to autonomously navigate any environment by some random walk in the presence of minimal information and limited processing of that information.
The two behaviors are superimposed and executed simultaneously. The overall result is a motion that is unpredictable but smart in some sense. This is kind of fun to see in the two videos below.
The Maker Pi RP2040 is a compact and robust hardware suitable for all levels of robotics expertise.
Some of the documentation used in this review are listed below.
The review engineer had no previous experience with CircuitPython. It took some time to the engineer to realize that some of the limitations of the development software. The decision to not setup and use C/C++ was to help review the Cytron Technologies Maker Pi RP2040 as most users will experience the kit. There was some learning curve, but the available documentation is superb. The number of examples and libraries are plentiful with lots of how-to tutorials.
Worthy of note is that Adafruit provides a plethora of hardware that are easy to integrate with CircuitPython. This makes both CircuitPython and Cytron Technologies Maker Pi RP2040 very attractive choice for a classroom environment, but also to any engineer that wants to integrate readily available hardware to this board.
The Maker Pi RP2040 offers a compelling platform ready for robotics applications right out-of-the-box. The following are some of the reasons why this hardware offering is good.
The RP2040 CPU is powerful in its own right. It offers two serial ports, USB support, 30 GPIO, and a number of other features. The Maker Pi RP2040 exposes all of those features to the user in a robust platform. The word robust means that this platform will survive students and new as well as old robotic engineers.
The DC motors quick test buttons are a plus. These allow to troubleshoot motor electrical hookup very easily.
Having a number of ways to power the board is both convenient and practical. Again, this add to the robustness of the board. It makes using the board very easy.
The LEDs are always a great addition that aid with real-time software troubleshoot. The Piezo buzzer with a mute switch is a great addition to the board. Very useful in a number of ways.
Push button integration are practical and functional. The board has them which means the user does not have to do the integration. Adds to design robustness.
Fun to program. Useful in some ways.
The Grove ports and the included cables are a great addition. A multitude of sensors and actuators can integrate via these very easily. This engineering design is well thought out.
CircuitPython is an easy development environment for many engineers. The integration with CircuitPython makes code development very easy to do.
It would be fun to integrate this board in some lego application.
The following are results and take away of the Cytron Technologies Maker Pi RP2040 RoadTest:
readily available
CircuitPython development software is effective and error free.All the RoadTest objectives were met satisfactorily and are summarized in the Results section above this one.
The Cytron Technologies Maker Pi RP2040 board is a capable compact and robust hardware that can be the starting point for any number of embedded robotic projects, and it is highly recommended. Existing documentation is ample and comprehensive. We recommend the Maker Pi RP2040 and the available CircuitPython development software as an efficient starting platform for Robotics applications.