This is the Raspberry Pi Pico microcontroller which was released by the Raspberry Pi Foundation
back in January of 2021.
Back then everyone was excited about this little board because it was the first microcontroller
from Raspberry Pi and not a single board computer for what they're usually known for.
And since my viewers know that I love microcontroller projects and also “reviewed” a couple
of Arduino alternatives in the past, the comment section underneath my videos were flooded
with requests to make a video about the Pico.
So I had a look at the main specs of the board, compared it to my previously featured Arduino
alternatives and came to the conclusion that it is really nothing special.
And worst of all I would have to use Micro-Python to program it which I am not a fan of.
That is why I ignored the board back then and truly thought it was overrated.
But now one and a half years later I have to say that things changed and now I think
it is a pretty good Arduino alternative.
So in this video I will not only show you how to use this board; but also tell you the
good stuff, the one bad thing and the really great stuff about the board which made me
change my mind.
Let's get started!
This video is sponsored by the Altium Designer and their newly acquired electronics parts
search engine OctoPart.
With it you can find the components for your next projects easily and compare different
sellers while also getting the most up to date data like specs, datasheets, cad models
and so on.
So why not give it a try today as well as of course Altium Designer by simply following
the link in the description.
To properly use the Pico I of course firstly threw it onto a breadboard with two male headers
and soldered those in place.
Afterwards I dug through the documentation of the board in order to find this pretty
much mandatory pinout diagram.
It is Mandatory because there are no pin labels on the front side of the board unlike every
other microcontroller board I know.
But anyway while studying the datasheet of this board and examining the pins I found
out that the Pico offers a total of 30 GPIO pins of which certain ones have a special
function on the board and 3 can be used for Analog Inputs with a 12-bit resolution.
Other than that it seems like every pin can be used for creating PWM signals and external
interrupts; we got the usual communication interfaces like I2C, SPI and UART; the board
works with 3.3V instead of 5V like the Arduino does and there are some power saving modes
included, but those still draw quite a bit of current.
I think when only comparing these specs then a standard Arduino is honestly not far behind.
The only major advantages this board offers at first sight is its Big Memory and its fast
speed.
And that basically begged the question for me why to switch over since I would have to
get comfortable programming in Micro-Python or with the C/C++ software development kit
they offer.
But I wanted to continue programming with the Arduino IDE because I am comfortable with
it and coded all my previous projects this way and here actually starts the good parts
of the pico.
Because as it turns out there now exists a Raspberry Pi Pico Arduino Core which you can
easily integrate into the Arduino IDE by just adding one URL under preferences and then
simply searching for the Pico through the boards manager.
After installing it, you can choose the Pico board, keep all the standard settings in place,
hook up your actual board to the computer and click upload.
After a few seconds the empty upload should be done and your COM port should now be able
to successfully detect the Pico board.
Now after I did this the first time I started trying out all the common Arduino functions
everyone is familiar with.
I began with a digital read input through a push button and a digital out through an
LED.
And as you can see that worked out perfectly fine and the board even includes built in
pull up and pull down resistors for the inputs and the serial write function also worked
just like usual.
Next I tried creating a PWM signal the classic way which did also work but the frequency
with 1kHz was quite low.
So I did a bit of digging through the documentation of this Pico Arduino Core and found out that
you can actually set the frequency and resolution by yourself which allowed me to reach a pretty
high frequency with an still OK resolution.
Then I of course also tried out an Analog input to obviously read an analog voltage
which seemed to work at first sight but there certainly was some noise in the measurement
about which I will talk about later.
Before that though I also tried out external interrupts which as you can see worked like
a charm.
The only thing that was a bit more complicated was utilizing the timers of the Pico which
is exactly why I made my life easier by just using a premade timer library.
So all in all the basic Arduino functions which are important to me do all work just
fine and best of all many Arduino libraries already received an update to also be compatible
with the Pico.
For example lighting up addressable LEDs is easily possible with the help of the Adafruit
Neopixel library.
Or displaying a bit of text onto an SSD1306 OLED was also no hassle after updating the
fitting library.
So that basically means that a lot of the code I created for previous Arduino projects
should be compatible with the Pico which is great news and makes it a good replacement.
Now of course the Pico also comes with some small extras as well like an integrated Temperature
Sensor; you can use the two cores to let two tasks run simultaneously and you got an integrated
Real Time Clock.
That means all should be good, right?
Well, there is one bad thing and that is the noisy analog input for which the reason is
not the Analog to Digital Converter but instead the power supply of the board.
It is a switching power supply which initially sounds great because it is more efficient.
But if we inspect the power line then we can see that there is quite a bit of switching
noise which after a bit of filtering is also the reference voltage for the analog to digital
converter.
Now one way to decrease this noise is to pull this GPIO 23 High through the help of code.
And as you can see this truly does make things a bit better because now the switching regulator
continuously pulses its internal MOSFET instead of only occasionally pulsing it to top up
the output capacitor voltage.
It is still not ideal though because for that we would have to desolder a resistor and insert
our own reference voltage which is a bit of a hassle.
And with the negative stuff out of the way let's get to the truly great stuff; once again
starting with the Switch mode power supply which is actually a buck boost converter.
Because of that the pico works with an input voltage between 1.8V to 5.5V which is great
news for battery powered projects.
The next great thing are the PIOs of the PICO which are programmable inputs/outputs that
can only do 9 instructions but that is more than enough to emulate certain interfaces
like I2S, DPI or VGA.
I even found a very promising looking VGA project on the internet and replicated it
to show you what this small Pico is all capable of.
And I think if you are a better microcontroller programmer then me you will see many more
power/speed advantages of the pico because there are already people out there building
oscilloscopes with it and even arbitrary waveform generators.
So yeah it seems like the pico can be a power house for those who are a bit more advanced.
But for all of us who are not that skilled there is still the fantastic documentation
the Raspberry Pi Foundation did for this in which they even admit their own flaws like
with the Analog Reference voltage I told you about earlier.
And the last great thing about the board is that even in times of semiconductor shortage
you can still get it easily and for a fair price.
So all in all I think that the Pico truly became a good Arduino alternative over time
and you might actually get to see it more often in future videos.
I mean the only thing missing is WiFi capability to replace my ESP boards from projects but
as you probably already heard there is a new version of the Pico available with built in
WiFi.
So I am very excited to hopefully use that very soon.
Until then as always don't forget to like, share, subscribe and hit the notification
bell.
Stay creative and I will see you next time.