The Cytron Maker Pi RP2040 Robotics Board
Last April, Cytron Technologies announced a new $9.90 US board build on the powerful Raspberry Pi 2040 chip called the Maker Pi RP2040. This board packed an incredible number of LEDs, buttons, a speaker, and easy-to-use Grove connectors. But most importantly, it was the first RP2040 based board to include motor drivers. And this makes it an ideal board for building educational robots! The low price point of $9.90 seems a bit hard to believe. But after using this board for about a month, we have become strong believers that this board has set a new standard for high-functionality and low price for our MicroPython robotics classes.
In this blog, we will review the key features of the Maker Pi RP2040 board and see how we have used it as the basis for a new curriculum for teaching Python, STEM, robotics, sensor, and computational thinking in our CoderDojo Twin Cities classrooms. We think other coding clubs around the world can benefit and improve on these base designs.
As a backstory, we decided in March of 2021 to migrate our CoderDojo Twin Cities labs to MicroPython on the RP2040. With a price point of $4 and an incredible 264K of RAM, we realized we could do so much more for our students with this low-cost hardware. We started to upgrade our old Arduino base robots and were pretty happy with our design. Then we started to hear about the new Cytron Maker Pi RP2040 board. It took us a while to get ahold of a board and evaluate them, but we think you will agree that this board really rocks!
Here are some of the details of what is on the board.
- Power status LED (green)
- On/off switch (A LiPo battery charges in either position when the USB is connected)
- Battery charging indicator LED (red)
- 13 blue LEDs to show status on GP pins 0,1,2,3,4,5,6,16,17,26,27 and 28
- 2 WS2812B RGB LEDs connected to GP18
- LiPo Battery Connector using a JST connector with positive on the left (Warning! many batteries reverse this polarity)
- Micro USB Port (use for powering and programming)
- Reset button and BOOTSEL button
- Momentary press buttons on ports GP20 and GP21
- 2 Motor drivers! GP9 and GP11 control motor A, and GP8 and GP10 control motor B. Both the motors use PWM signals for variable speed control.
- 4 motor test buttons for testing motors A and B, forward and backward. This makes it really easy to test motor connections and directions.
- 4 red motor status LEDs buttons for displaying motors A and B, forward and backward. This helps you debug your motor connections.
- 7 Grove Ports on GPs 1:0,1; 2:2,3; 3:4,5; 4:16,17; 5:6,26; 6:26,27 and 7:7,28
- 4 servo connectors on ports GP12, GP13, GP14 and GP15
- Piezzo buzzer on port GP22
- On/Off switch on GP22, which can be used to mute the sound
- Phillps head screwdriver that works on the header pins — really convenient for students!
- 4 Grove Connectors are included in the box
- Rubber mounting feet — convenient to keep the board stable and away from the surface under the board
- Pins numbers are clearly labeled both on top and bottom of the board. This is a huge improvement over the Raspberry Pi Pico!
- Large area on the bottom of the board for students to write their name and a clear link to the Cytron.io website.
This is a pretty long list of features! However, I have tested them all, and they all work as documented. I also had my technical support questions answered promptly by the helpful staff at Cytron.
The Maker Pi RP2040 Labs
We are in the process of migrating both our Arduino and Pico labs over to use the Maker Pi RP2040. You can see a list of the new labs emerging here:
Introduction - MicroPython for Kids
The Maker Pi PR2040 kit from Cytron Technologies is a $9.90 US kit that is designed to simplify learning robotics using…
We have tended to skip over some of the simple beginning labs like the Blink labs for now as we test out the advanced features of the board. But here is a rough list of our test labs:
MicroPython Robots Part I: No Accessories Required Labs
These labs don’t need anything except the Maker Pi RP2040 board.
1.1 Blue LED Lab — make the blue GPIO status LEDs show cool patterns
1.2 NeoPixel Lab — make the two NeoPixel each display many colors
1.3 Button Lab — make the two buttons change the state of the system
1.4 Sound Lab — make the Piezoelectric Buzzer create sounds
1.5 Up Down Mode Lab — make the buttons change the LEDs, NeoPixels, and Sound as you cycle through 10 different “modes” the robot can be in.
MicroPython RobotsPart II: Motor and Servo Labs
These labs require additional parts such as 3–6 volt DC hobby motors and servos.
2.1 Motor Connection Lab — make two motors turn forward and in reverse
2.2 Up/Down Motor Speed Lab — change the speed as you change the mode
2.3 Servo Lab — control the direction of 180% servo motors. Calibrate the end angles and sweep the direction back and forth.
MicroPython RobotsPart III: Sensor Labs
There are literally hundreds of sensors that used Grove connectors. In addition, we can purchase Grove connectors for as low as 30 cents each. Other sensors with male pins can be easily connected with these 38 cent connectors with female Dupont jumper connectors. Classrooms with a large collection of these sensors can allow students to try new sensors and outputs without a breadboard or soldering. We will focus initially on two sensors we will use for our collision avoidance robot. We prefer the Time-of-Flight sensor because it uses a standard I2C interface and thus could share the I2C bus with other devices. We are also looking into the newer 3.3-volt version of the ultrasonic Ping Distance Sensor.
3.1 Time of Flight Distance Sensor Lab — measure the distance to an object
3.2 Ultrasonic Ping Distance Sensor — the classic low-cost ultrasonic distance sensor, but now it works on a 3.3-volt power! (TBD)
3.3 Time of Flight Sound Lab — sound pitch changes with distance
Part 4: Collision Avoidance Robot
4.1 Collision Avoidance Robot — this lab joins our motor and sensor labs with a SmartCar chassis to create a robot that avoids collisions. We will have videos of them coming out soon.
4.2 Collision Robot with Modes — we use the onboard buttons to flip between modes and change the robot's behavior.
4.3 Adjustable Collision Avoidance — the adjusta bot! We use the buttons to change the parameters of the robot. By cycling through the modes, we can change individual parameters of driving.
4.4 Adding an OLED display to the robot — We are added an OLED on top of the robot to make it easier to change the modes and parameters.
The CoderDojoTC Maker Pi RP2040 Reference Robot Design
At CoderDojo classes, we encourage our students first to get comfortable with a base robot design. This has the basic parts for a simple collision avoidance robot with a single distance sensor. After they are comfortable with that design, they move on to whatever area inspires them. Sometimes they try different sensors, sometimes they add LEDs, and sometimes they add OLED displays to control the robot's parameters.
Our prior robot did use the Raspberry Pi Pico, but it placed it directly on a breadboard and the students had many breadboard wires to connect. When we combine the Maker PI RP2040 board with a standard low-cost ($10 US) SmartCar chassis, we get a robot with incredible ease of construction and value. Here is what got fixed compared to our original Pico based robot:
- The pin labels were not visible. On the Pico, the labels are printed on the bottom of the board. This was a huge pain for our students. We had to supply a laminated card with the connection labels.
- The power from the battery went through the motor driver board, which also had to travel through the power management of the Pico. This is because the Pico itself can’t take a 6V input supply.
- The base robot had no buttons, LEDs, and sound for feedback. These had to be purchased and connected separately by our students.
- There was no way to connect and recharge batteries for our advanced students with training in using dangerous LiPo batteries.
The Maker Pi RP2040 board solves all these problems!
Note that if you purchase the SmartCar kits in larger quantities, the cost per kit can come down to around $8/kit.
The Motor Connectors and Driver
The motor connections and driver circuit really are what make this a true robotics board. We will spend some time walking you through how the motor and power hookups work.
We use four AA alkaline batteries in our robot labs. These batteries are safe and low-cost. The battery pack usually comes with the SmartCar kits, and we mount the battery pack under the chassis.
The motor control chip on the board is not the standard L293D H-bridge motor controller chip. They have upgraded to use the MX1508 H-bridge chip which also has an internal temperature sensor. If the chip gets too hot the chip will automatically shut down preventing burnout of the circuits. One more little feature to make the board more reliable.
Charging a LiPo Battery
This section is only for advanced users with training in safe handling flammable LiPo batteries.
In the image above, we used two short cable ties to attach a 1,500 mAh battery to the underside of the robot chassis. We used a small screwdriver to raise the retraining pins and reversed the polarity on the battery so that the red wire went to the “+” side and the back wire went to the “-” side of the JST connector. Then we double-checked the polarity of the connection (we got it wrong the first time). The “+” and “-” are clearly printed on the top of the PC board.
After the LiPo battery is installed, we can connect any USB connector that will supply 1 amp of power. The LiPo battery will charge whenever the USB is connected, and a red “Changing” LED will be lit on the board.
The circuit in the Maker Pi RP204 will limit the charging current to about 550 milliamps during charging. In the image above, I am using a USB current meter that indicates that the current being drawn is 0.554 amps. The components behind the LiPo connector will be warm during the charging process. My battery got fully charged in about an hour, and the current dropped slowly to almost zero current.
We have only begun to really explore what the Maker Pi RP2040 board can do. However, we are very confident that few other robot boards on the market today come close to what the Maker Pi RP2040 can do. With a large amount of RAM (264K) and the ability to program in MicroPython, this really had been a fun project for many of us.
If you would like to help us build out the labs for our classes, please let us know. We would love your help and appreciate your feedback.
Note on Purchasing the Maker Pi RP2040
We purchased our boards in the US directly from DigiKey for $9.90 and paid $7 for two-day shipping for several boards. Most of the other suppliers were out-of-stock. Many suppliers are still charging close to $10 for the Raspberry Pi Pico alone due to lack of supply and high demand.