The Raspberry Pi Pico W
Easy-to-use and low-cost wireless microcontroller comes to IoT and STEM curriculum developers
On June 30th, 2022, the Raspberry Pi Foundation (RPF) finally plugged a massive hole in its product line. The RPF announced the new Raspberry Pi Pico W — the "W" is for wireless. In the spirit of the original $4 Pico, RPF announced a retail list price of only $6! Although similar price points have been available in the ESP microcontrollers in the past, this product will make these features wildly accessible to our community of people building low-cost STEM devices that teach computational thinking.
In this blog, we will:
- Review the specifications of the "Pico W".
- Describe the RPFs hardware and design choices and explain the tradeoffs.
- Review the new applications that STEM students can easily build using Pico W.
- Get our first impressions of the new device and describe the first test programs we have included in our new CoderDodo MicroPython lesson plans.
- Speculate on what the Raspberry Pi foundation needs to do next to keep our IoT STEM kits parts both fun and low-cost.
The Specifications of the Raspberry Pi Pico W
The Internet of Things (IoT) is a vision we use to connect many of the devices in our environment to the Internet. The internet can now connect not just laptops and desktops but ordinary things in our homes. This means we can gather sensor data, process it on a local device and communicate key insights back to the cloud through a local WiFI access point. Now every $10 device in our environment can "phone home" if there is any interesting news.
Here is the core specification of the Pico W at is enabling the IoT:
- Just like the original Pico, the microcontroller is based on the same RP2040 (multi-core ARM processor). With 264K of RAM, that gives us plenty of room to build awesome display-rich applications. See my prior blog on this topic and note the almost 200x price/RAM ratio increase from the Arduino Uno.
- The pinouts are almost identical to the original Pico. The only change is the requirement to use pin "alias" names like "LED" rather than the hard-coded numeric pin names like "25" for accessing the onboard LED.
- There is now an additional wireless chip: the Infineon CYW43439, which supports both WiFi and Bluetooth, although the runtime software currently only supports WiFi. We expect Bluetooth support via a runtime upgrade soon.
The choice of the CYW43439 chip is a logical one. The CYW43439 also runs the ARM processor and is used in other Raspberry Pi products. So the Raspberry Pi Foundation engineers are familiar with it and understand the supply chain logistics for building the new Pico W boards.
It is interesting to note that this chip is only rated up to 2.4 GHz to keep costs reasonable. There are faster WiFi chips on the market that go up to 5 GHz. But these chips cost more and draw more power. It makes perfect sense to use the lower-cost WiFi chips here.
Another trivia fact. There is actually 512K of onboard RAM on the CYW43439 chip! This is almost double the RAM on our main RP2040. This shows you how memory-intensive wireless signal processing can be. It is too bad we can't use some of this RAM for our own applications in the main RP2040 microcontroller!
The CYW43439 Architecture
If we look at the overall block architecture of the chip, we can see extensive support for both 802.11n (top row) and Bluetooth (bottom row), so you can see why we expect the support for the Bluetooth runtime to be available soon. This should just require a new runtime image with the added Bluetooth libraries.
You might be wondering why we are so excited about the Pico W. The bottom line is that there were a large number of STEM applications that we couldn't easily add to our CoderDojo classrooms. Although there were some ways to integrate the $4 Pico with a WiFi chip, they were hard to wire up and hard to program. Here is my list of new cool STEM applications:
- Notifications — special events should be able to send a text or e-mail message if specific events occur. For example, if the temperature in your fish tank gets too cold or too hot, you should be able to get a text message.
- Web Control — we would like to control our microcontroller from a web page. Here is some sample code. This application turns the built-in LED on and off as you click the links on the web page. Imagine a web page to control all your holiday lights!
- LED Costume Synchronization — we would like our microcontrollers to synchronize the colors of our Halloween costumes. Could we do this without being near a central web server? For dance teams near a central server playing music, a central web server sending out clock synchronization signals should work. For groups of kids wandering the neighborhoods, a method of electing a master clock device is a little more challenging.
- Robot Control — We would like to be able to remotely control the parameters of our collision avoidance robots. A cell phone application should be able to change the speed, distance, and other parameters of each of our $20 robots.
The Need for Sample Programs
Because the Pico W is so new, there are very few lesson-plans that target junior and senior high-school students. To help with that, I would like to ask each of my readers to consider helping us by writing some sample programs. In order for you to get started, we have the following samples:
- The code to reliably connect to a local access point and provide debugging.
- A sample program that calls an unencrypted REST web service with HTTP GET. This means you can quickly look up things like temperature and rainfall in your area. Note we don't yet have a sample program that supports HTTPS (encrypted transmissions) so let me know if you can get one working!
- Sample programs that turn your Pico W into a little web server. This allows us to turn lights and motors on and off by clicking on the links on the web pages.
- Tools to automate the installation of Python libraries directly from the Internet. We have an example of upip running.
- Some more advanced tools to measure networking performance such as network latency and bandwidth.
What's Next for the Raspberry Pi Foundation?
Getting a low-cost microcontroller with built-in networking was an obvious choice for the RPF. The Pico W fills a big gap in their products. Here are a few ideas for the next steps:
We hope to find ways to add low-cost displays to our projects. Our students love the bright 128x64 OLED displays that are 2.42" in diagonal. These displays are large enough to read a sensor value even when you are standing five feet above a robot on the floor. Our students love drawing faces and making the robots show emotions as they drive around. But the 2-inch size OLEDs have been stuck at $20/device for the last several years. We have seen nice LCD displays for under $5, but they are not bright and don't have the right MicroPython drivers. Producing a low-cost display that integrates with the Pico W would be a fantastic next step.
The Pico has plenty of power to read and play .wav files from either static RAM or SD cards. However, there are no integrated MicroPython libraries that reliably use DMA and the other cores without causing problems with other devices. I hope all our Pico-based projects can play high-fidelity sounds soon in our projects.
Pico W With Cameras
We would love to be able to hook a low-cost camera to our Picos and do some basic image processing and transmit these images to a remote web server. There are other ESP-based devices that are doing this today. The challenge is to keep the prices down and make the devices easy to manage.
In the long term, we would like to teach our students how we can classify signals using machine learning. This includes basic image processing, sound processing, and signal processing. Right now, there are very few examples that run on the Pico. I hope that in the future, we can include machine learning inference in our projects.
All in all, the $6 Raspberry Pi Pico W will have a massive positive impact on our ability to get fun IoT projects into classrooms at an affordable cost. Despite the challenges of lack of sample libraries, we are looking forward to some really awesome projects for our CoderDojo students! Keep an eye on this blog for future developments.
Thank you, RPF!!