Tools – The Raspberry Pi Pico

Normally, the Raspberry Pi Pico might not be thought of as a tool for professional embedded software developers. The Pico is a low-cost development board, not what we might consider to be a tool; However, the Pico offers a wide range of capabilities and a rich ecosystem that can provide developers with rapid prototyping capabilities, which are an important tool in every developers toolbox. In this post, we will explore the Raspberry Pi Pico, its ecosystem, and how developers can leverage it.

The Raspberry Pi Pico

The Raspberry Pi Pico is a development board based on the RP2040 dual core microcontroller. The development board is low cost, typically costing between $4 – $6 USD from companies like Digikey or Mouser. Despite the chip shortage, the Pico along with its RP2040 have remained in stock.

Raspberry Pi Pico

The Raspberry Pi Pico development board can be directly soldered onto a PCB or headers can be added to connect it to a breadboard or other expansion boards. Overall, the board has 28 general purpose input / output pins (GPIO), any of which can be configured to be a pulse width modulation (PWM) pin. In general, the Pico has:

  • GPIO (28)
  • UART (2)
  • I2C (2)
  • SPI(2)
  • Analog (3)

The Pico has plenty of peripheral depth to allow rapid prototyping for a wide range of applications including machine learning. The general pin-outs for the board can be seen in the below image:

Raspberry Pi Pico Pinout

Image Source: Raspberrypi-spy.co.uk

The onboard microcontroller, the RP2040, is quite interesting in that it includes a dual core Arm Cortex-M0+ processor running at 133 MHz. The RP2040 has 1 MB of flash space on-chip and 264 kB on-chip RAM. In addition, developers can add up to 16 MB of off-chip flash! With all this memory and processing power, it makes the Pico a great tool for rapid prototyping and proof-of-concepts.

Raspberry Pi Pico Rapid Prototyping

So far, I have found that the Raspberry Pi Pico is great as a rapid prototyping tool. The ecosystem supports provides two different software development kits (SDKs), a C SDK or a MicroPython SDK. For rapid prototyping, I highly recommend using the MicroPython SDK. MicroPython is a lean and efficient implementation of the Python 3 programming language. It is a subset, but provides all the language capabilities to easily program the Pico and build applications.

The software SDKs come with a wide range of examples that allow developers quickly get up to speed on how to interact with the peripherals. Since MicroPython is just Python running on a microcontroller, it is very easy to integrate existing open source libraries for sensors and other devices in a short period of time. For example, I recently integrated an inertial sensor, several analog sensors, and an I2C time of flight sensor and it only took me a couple of hours. I was then able to code several test examples that allowed me to prove out several concepts with the sensors.

Raspberry Pi Pico Hardware Ecosystem

There are a lot of great hardware expansion boards and sensors in the Raspberry Pi Pico hardware ecosystem. The one that I’ve been using the most is the Grove Shield for Pi Pico (PN: 103100142). The Grove Shield comes with headers to mount the Raspberry Pi Pico, which is helpful; However, the best part is that it also includes ten expansion headers to connect a wide variety of sensors!

As part of my free DesignNews CEC course, Developing Machine-Learning Applications on the Raspberry Pi Pico, I used the Grove Shield to connect inertial sensors, range sensors, and a variety of other devices to the Pico. As you can guess, there are a bunch of break-out boards for sensors that meet the Grove Shield pin-outs. (Not advocating for any vendor, just telling you what I’ve used and what I think is cool).

There are more sensors out there than I can list, and certainly you could interface your own sensors to the headers. Worst case, the Pico headers allow for jumpers or wire to be inserted so that you could jumper the pins you need to a breadboard or your own custom expansion board or prototype.

Conclusions

The Raspberry Pi Pico can be an excellent tool for professional developers looking to create prototypes and proof-of-concepts. I’ve often used it to interface a new sensor and get it up and running. Once it’s running, I can probe and interact with the sensor to understand how it works before writing a driver for it in C. The Raspberry Pi Pico is a great tool, and at its low cost, it doesn’t hurt for every developer to keep a few around for those inevitable debug and prototyping sessions that pop up.

Going Further

If you would like to learn a bit more about the Raspberry Pi Pico, I have a free CEC DesignNews course on Developing Machine-Learning Applications on the Raspberry Pi Pico. I highly recommend that you check it out!

Share >

2 thoughts on “Tools – The Raspberry Pi Pico

  1. You state “The RP2040 has 1 MB of flash space on-chip and 264 kB on-chip RAM”. I don’t believe this is the case, the RP2040 has no on-chip flash and it’s the Pico board that provides this externally.

    • Ah yes. The RP2040 uses external memory with XIP and supports up to 16 MB flash. The specs there are what one can expect on the PICO, just with 2 MB flash.

      Good catch!

Leave a Reply to Jacob Beningo Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.