Bring WiFi & Bluetooth to your MicroPython projects with the Pyboard D - STM32F722
The pyboard D is the new MicroPython board series offering lot of power into a compact and low-power microcontroller board. This board runs MicroPython and allow you to write Python scripts to run on the Microcontroler.
The SF2W model (product line entry) has a 216MHz CPU, 256K RAM, SINGLE-precision floating point and integrated WiFi/Bluetooth.
Disclaimer: At this stage not all hardware features are available from the software side. Mainly Bluetooth (both classic and BLE) that must yet be made available in the software. These features will be added over time.
The concept behind the Pyboard D-series is to offer a miniature DIP-style form factor and an WBUS connector (on the back).
DIP is useful as both standalone/prototyping board and an embedded component (in final products). WBUS header (on the underside) offer a 40+40-pin bus connector giving access to all power and IO ports in a highly compact form factor. WBUS is great for highly integrated projects, ambitious prototyping (with the WBUS-DIP68) and protection os intellectal property (see further).
As said, the WBUS can be used to breakout I/O lines for prototyping, as well as providing a way to integrate the board into a larger system. The WBUS-DIP68 or WBUS-DIP28 breakout boards would help a lot during prototyping stage .
The pyboard also provides native USB connectivity to get a convenient access to the python script files and software running on the microcontroler. Connect your Pyboard D to a PC and the board show himself as a USB flash drive where Python scripts and data files can be manipulated with file browser. In parallel, the board also opens a USB/Serial connexion offering a terminal access (the famous REPL) to the Python command line interpeter running on the board. It is a great way to inspect the running program, doing instant programming or testing devices.
The pyboard runs MicroPython, It is a version of Python (3.4) programming language completely rewrited to run on restricted ressource machines like microcontrollers. MicroPython includes many optimisations to runs efficiently and uses very little RAM.
MicroPython runs bare-metal on the board offering a Python operating system for your project (including a filesystem). The built-in pyb and machine modules contain functions and classes to control the peripherals available on the board, such as UART, I2C, SPI, ADC and DAC. Watch this video for an overview of the original pyboard.
The X & Y positions have a 1.27mm spacing that can be used with 1.27mm male pinHeader and/or with 1.27mm female connector.
The Pyboard D requires a micro USB cable.
It works with Windows, Mac and Linux.
- STM32F723IEK microcontroller
- 216 MHz Cortex M7 CPU with SIMPLE-precision hardware floating point
- 512KiB internal flash ROM
- 256KiB internal RAM
- No advanced features like double-precision floating point unit (SF6W) or High Speed USB (SF3W).
- 2MiB external QSPI flash (with execute capabilities, it extend the internal flash)
- Additional 2MiB external QSPI flash (for storage and user filesystem)
- WiFi and Bluetooth 4.1 (classic and BLE)
High performance Murata 1DX module with CYW4343
- TCP/IP and Bluetooth stacks run on the main microcontroller, fully customisable
- On-board fractal chip antenna (WiFi & Bluetooth)
- µFL connector (for external antenna, selectable via RF switch)
- Micro USB connector: power & serial communication
- Micro SD card: supporting standard and high capacity SD cards
- Real time clock: highly accurate pre-calibrated external oscillator
- Physical electrical connectivity via 24 through holes,
- and 40+40 pin WBUS connector
- 46 independent GPIO (24 available via through holes)
- Additional 11 GPIO shared with SD card, USB, USR button, BT audio
- 2x I2Cs,
- 4x UARTs,
- 3x SPIs,
- 1x CAN interfaces
- 3x ADC ( 12-bit analog to digital converters, available on 16 independent pins )
- 2x DAC ( 12-bit digital to analog converters, available on 2 independent pins )
- 1x RGB LED
- 1 reset and 1 user button
- Two onboard LDO 3.3V voltage regulators
- One regulator to supply main microcontroller
- A second regulator, user switchable, to power SD card and external components
- Custom DFU bootloader for easy upgrading of firmware
- 2 mounting points
- Schematic (pybd.io, pdf)
- Pinout reference (pybd.io)
How to interact with the Pyboard
- REPL: when connected via USB to a computer, the board appears as USB Serial communication port (CDC VCP). This comm port can be used via any serial program/terminal software a Python REPL prompt (python command line on the microcontroler). REPL allows type and execute Python commands in instant matter (like python does on you PC but on the microcontroler).
You can also redirect the REPL to any of the UARTs on the pyboard.
- From file: The pyboard and MicroPython have built-in filesystem (it is stored in the external flash memory). The Pyboard-D has a SD card allowing to extend the available storage. When the board is connected to your PC, it appears as a USB flash storage device and you can access (mount) the internal filesystem and the SD card this way. When a Python script is copied to the filesystem and named main.py then the board will automatically execute it at startup. This way it is possible to run script without being connected to a computer. Note: Python scripts can also be pre-compiled in bytecode (.mpy files) for faster loading at runtime.
- Remote script : You switch mode from "REPL" to "raw REPL" by sending CTRL-A, and then in "raw REPL" send an arbitrary Python script (copy/paste) to the board for it to execute immediately. The pyboard.py script can be used to simplify the usage of this "raw REPL" mode: you just run python pyboard.py script_to_run.py and this will execute script_to_run.py on the pyboard, returning any output.
- Via frozen code: Once an application has been developed it can be pre-compiled and frozen into the main firmware. This gives minimal overhead for RAM usage and start-up time. This is an advanced feature and requires you to recompile the C-based MicroPython firmware.
Intellectual property saving
Using a Pyboard D series will protect the intellectual property of your project.
Indeed, Pyboard D are manufactured in Europe and only your final project board interface (without its beating PYBD earth) would have to be manufactured in facilities. As result: no code, no binaries, no sensitive details about your project, no Microcontroler pinout and details are shipped to the production facilities while producing your interface boards.
When received your manufactured interface board, plug yourself the Pyboard D, Flash it with your software and screw it on the interface board. Voila!