O Raspberry Pi Pico, um microcontrolador de $ 4 feito em Raspberry!
ⓘ Cet article peut avoir été partiellement ou totalement traduit à l'aide d'outils automatiques. Nous nous excusons des erreurs que cela pourrait engendrer.
Em 21 de janeiro de 2021, a Raspberry Pi Foundation apresentou sua própria placa de microcontrolador, a Raspberry Pi Pico, anunciada por US $ 4!
Depois de mudar a indústria de computadores de placa única (ou computadores de placa única em bom francês), a fundação pretende lidar com a indústria de microcontroladores.
Neste artigo veremos como obter o Raspberry Pi Pico, a diferença entre microcomputador e microcontrolador, o que o Raspberry Pico tem em sua barriga e, finalmente, como usá-lo e onde encontrar documentação para começar.
Where can I buy the Raspberry Pi Pico?
As often with the release of a new product by the Raspberry Pi foundation, stockouts are to be expected for at least a few days.
As with the more classic versions of the Raspberry Pi, you can find the Raspberry Pi Pico at various online vendors.
More generally you will find it on Amazon.fr , the price being variable, it should nevertheless also stabilize around 4 € in the days or weeks following the release, once the stocks return to normal. .
Moreover, it would not be surprising to find this microcontroller in the future on the sites of retailers specializing in electronics.Compre o Raspberry Pi Pico na Amazon
Microcontroller VS microcomputer, what’s the difference?
If you have, without a doubt, already used a microcomputer (in the strict sense of the term you currently use one if you use a smartphone for example), there is a good chance that you have never used ( at least knowing it), a microcontroller.
To summarize roughly, a microcomputer is generalist. It is based on the use of a general purpose microprocessor and is capable of performing multiple tasks: graphic display; Internet connection ; management of peripherals and above all use of an operating system. So it’s a computer like any other, it’s just very small.
Conversely, a microcontroller is usually quite specialized. It does not allow you to perform multiple tasks, but essentially to control peripherals by using programmable electrical inputs / outputs. Unlike the microcomputer, therefore, the microcontroller does not run an operating system and only runs one program, which is loaded into memory before startup.
The microcontroller is therefore much less flexible and powerful in terms of calculation capacities, etc., but on the other hand it consumes much less current and is more suitable for reading probes, controlling electrical peripherals (LEDs, motors, relays, etc. etc.), or the reading of analog rather than digital electrical signals.
Microcontroller or microcontroller board?
For the sake of precision, it should be noted that a microcontroller in the strict sense of the term designates only the electronic chip grouping together the memories, the processor and the input / output lines.
The Raspberry Pi Pico is therefore actually a microcontroller board. It adds power management, connectivity, etc., to the microcontroller as such, which is the RP2040 chip. Likewise, if we are talking about the Arduino Uno, probably the most famous of the microcontroller boards, the Arduino is a microcontroller board, and the microcontroller itself is the ATmega328P chip.
The technical characteristics of the Raspberry Pi Pico.
Let’s talk, let’s talk numbers, and see what this newcomer has in the belly. On the program, technical characteristics of the microcontroller, and format of the Pico card.
The RP2040 microcontroller.
The Raspberry Pi Pico is therefore based on a brand new microcontroller, directly created by the Raspberry Pi Foundation, the RP2040.
We should note here the ambition of the foundation. Indeed, where the ease would have been to use an already existing component, or to ask a specialized company to adapt a component and affix the Raspberry Pi brand, the foundation preferred to create entirely its own component. A bold choice that allows it to offer impressive performance at an unbeatable price.
At the technical level this microcontroller indeed seems quite impressive.
- Dual-core Arm Cortex-M0+ @ 133MHz
- 264KB (remember kilobytes?) of on-chip RAM
- Support for up to 16MB of off-chip Flash memory via dedicated QSPI bus
- DMA controller
- Interpolator and integer divider peripherals
- 30 GPIO pins, 4 of which can be used as analogue inputs
- 2 × UARTs, 2 × SPI controllers, and 2 × I2C controllers
- 16 × PWM channels
- 1 × USB 1.1 controller and PHY, with host and device support
- 8 × Raspberry Pi Programmable I / O (PIO) state machines
- USB mass-storage boot mode with UF2 support, for drag-and-drop programming
Without going into technical details which will only speak to those who do not need any explanation anyway, let’s quickly come back to these characteristics.
For the processor we have dual-core, which should therefore allow parallel programming (solve two different operations with two different cores at the same time)
Regarding the on-board RAM, we have 264 kilobytes. While this may not seem like much to you, it should be borne in mind that we are talking about a microcontroller here and not a computer. By way of comparison, an Arduino Uno only offers 32 kilobytes, or about 8 times less… In addition, this memory is expandable up to 16 megabytes, via a dedicated QSPI bus, which then becomes very respectable.
Finally, in terms of connectivity, we have 30 GPIO lines, 4 of which can be used as analog inputs, with UART, SPI, I2C and PWM communication support.
The Raspberry Pi Pico board, power supply and format.
The Raspberry Pi Pico board therefore embeds the RP2040 microcontroller to offer a format that is easier to use, integrated power supply management, extended RAM, and a few other features.
The Raspberry Pi Pico, a very small card and 26 GPIO pins.
At the physical level, the Raspberry Pi Pico looks like a 21 × 51 mm board.
The Pico exposes 26 of the 30 GPIO ports of the RP2040, in the form of drilled and weldable pads at the standard 0.1 ″ spacing and which will remind you of those of the Raspberry Pi Zero, with an additional part which allows direct soldering on copper contacts.
The card also has an integrated LED. A push button to activate the USB storage mode (used to copy your program to the Raspberry Pi Pico), and which will also be usable as a classic push button. As well as a mini USB port, used to connect the Pico to your computer in order to copy your code from your PC to the Pi, and which can also serve as a classic USB port, for example to connect a probe to the Raspberry.
Finally, it should be noted that the Pico has been designed so that its underside is perfectly flat, allowing it to be integrated into a “host” card directly by soldering it, which is a huge plus for production. of embedded products.
Powering the Raspberry Pi Pico, nothing could be simpler!
The Raspberry Pi Pico has been designed for use specifically oriented towards on-board computing, which often involves power sources with voltages that are sometimes not very standard or unstable.
The foundation therefore integrated power management via an circuit RT6150B switching , thus allowing a very wide power supply range, going from 1.8V to 5.5V.
This integrated power management should allow the Pico to be powered with a large number of different sources (AA batteries, a lithium-ion battery, or a conventional power supply), all without the need to stabilize the power supply. Huge gain in simplicity for many projects.
2 additional megabytes of RAM.
In addition to the 264 kilobytes of RAM built into the RP2040, the Pico includes an additional 2MB flash memory, which should suffice for most on-board uses.
How to program the Raspberry Pi Pico and where to find documentation?
But then, finally, how is a Raspberry Pi Pico used? Well there are no secrets, we will have to put our hands in the code!
How to program for the Pi Pico?
As we explained earlier, a microcontroller just repeats the same program over and over again, and that program… it’s up to you to write it! Want to flash an LED? We’ll have to write a program for that :). Want to control an engine? The same !
To program the Raspberry Pi Pico you can use two different languages, either the C language , or the Python language with its implementation MicroPython , which has the advantage of being much simpler than C (really much simpler).
Once your code is written and compiled, all you have to do is copy it to the Pico by plugging it in USB to your computer :).
Where can I find documentation to learn how to use the Pi Pico?
Apresentado assim, usar o Pi Pico pode parecer opressor e complicado e, sejamos honestos, essa impressão não é totalmente injustificada. A boa notícia, no entanto, é que a fundação sempre considerou a educação em programação sua prioridade. Constante na sua vocação, já produziu abundante documentação sobre o assunto.
Assim, você encontrará uma documentação completa para começar a usar o Raspberry Pi Pico , um livro “Comece com MicroPython no Raspberry Pi Pico” , bem como projetos passo a passo para aprender como usar o Pi Pico.
Um produto interessante, mas destinado a um público menos generalista.
Com o Pi Pico, a fundação pretende inserir-se no mercado de microcontroladores, um mercado direccionado principalmente para um público menos generalista e potencialmente mais orientado para os profissionais.
Graças à forte ambição e aos recursos, a fundação está entregando aqui um produto estimulante e promissor.
Se o Raspberry Pi Pico afeta menos pessoas, deve, por outro lado, revelar-se muito interessante para os fabricantes e abrir novos usos, ao mesmo tempo que é pensado para ser perfeitamente adaptável em produtos profissionais, em particular através de um formato muito bom . pensamento.
Além disso, os esforços de documentação feitos pela fundação são impressionantes e devem permitir a criação muito rápida de uma comunidade extremamente ativa, que permitirá que mais pessoas descubram a programação on-board.
De nossa parte, estamos prontos para apostar que a fundação Raspberry Pi terá sucesso em revolucionar o mercado de microcontroladores como fez com o de computadores de placa única no passado!