UbiOne is a Raspberry Pi HAT that combines an STM32F411, a set of sensors, and a Mini-PCIe socket to provide LTE connectivity to your RPI (through USB and via an LTE card).
It includes an IMU (BMI270), a pressure sensor (DPS310), an I2S microphone (SPH0645), a magnetometer (QMC5883L) and a small passive buzzer (KLJ-4020).
Furthermore, it manages the RPI power supply, which means you can completely shutdown the RPI and have a true long-term sleep mode.
UbiOne was designed having in mind the use of ubiquo.net, a web application that allows you to control your DIY bot remotely via web browser (currently as a demo only).
IMPORTANT: UbiOne is not yet in production! I have a working tested prototype, and I plan to start crowdfunding (e.g., Indiegogo) to fund the production. If you are interested, please fill out this form with your contact, and I will notify you about the campaign.
UbiOne | UbiOne + RPI | UbiOne + LTE + RPI + Camera |
---|---|---|
You can use Arduino IDE to program and upload sketchs using Arduino Core for STM32. You can follow these steps to install the STM32 libraries or, very shortly:
- Open Arduino "Preferences" and add the following link to "Additional Boards Manager URLs":
https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
- Go to "Tools > Board > Board Manager" and search for "STM32"
- Install the package "STM32 MCU based boards"
- Install STM32CubeProgrammer
Select the STM32 board type and respective configuration:
- Go to "Tools > Board > STM32 Boards groups > Generic STM32F4 series"
- Select the board part number "Tools > Board > Board part number" and select "Generic F411CEUx"
- Enable serial to be able to print to the Serial Monitor: "Tools > U(S)ART support: Enabled (generical 'Serial')"
- Enable "USB support (if available): CDC (generical 'Serial'...)"
In the end, you should have the following configuration:
You can upload sketches from three different ways: DFU, SWD, or Serial.
To compile and upload in DFU mode go to "Tools > Upload method > STM32CubeProgrammer (DFU)".
Now, follow the next steps:
- Connect your PC to UbiOne through the STM32 USB-C port.
- Put the STM32 MCU in programming mode by:
- pressing and holding BOOT
- press and release NRST
- release BOOT
- Arduino IDE is now ready to compile and upload (click upload in Arduino IDE)
To compile and upload in SWD mode go to "Tools > Upload method > STM32CubeProgrammer (SWD)". To program via SWD you need an ST-LINK/V2, that can be the official or a smaller (and cheaper) version like this one:
When uploading via SWD, you don't need to put the STM32 in any particular mode. All you need is to connect the pins:
- GND
- SWDIO
- SWCLK
- 3.3V (optional: you should connect only in case you are powering the UbiOne through the ST-LINK/V2)
A third option is to program through Serial, using, for example, an FTDI USB UART converter like this one:
To compile and upload in UART mode go to "Tools > Upload method > STM32CubeProgrammer (Serial)".
Next, follow the steps:
- Connect the pins:
- RX to A9
- TX to A10
- GND to GND
- 3.3V to 3.3V or 5V to 5V (it depends on the option you have selected in the FTDI converter).
- Put the STM32 MCU in programming mode by
- pressing and holding BOOT
- press and release NRST
- release BOOT 3 Arduino IDE is now ready to compile and upload (click upload in Arduino IDE)
The following pins are available through the pin headers: PB7, PB6, PA4, PA5, PA10, PA9, PA0, PA1, PA6, PA7, PB0, PB10, B13, PB15, and PB1. You can find more details about each in the datasheet. You can also use STM32CubeMX (search for STM32F411CEU).
UbiOne can be interfaced with the 40-pin RPI header.
STM32 | RPI GPIO | RPI Pin | Function |
---|---|---|---|
PB9 | GPIO2 (SJ1) | 3 | I2C_SDA |
PB8 | GPIO3 (SJ2) | 5 | I2C_SCL |
PA3 | GPIO14 | 8 | UART2_RX |
PA2 | GPIO15 | 10 | UART2_TX |
PA10 | GPIO8 (SJ10) | 24 | UART4_TX |
PA9 | GPIO9 (SJ11) | 21 | UART4_RX |
SJ* means a solder jumper. By default, they are not connected, and therefore you need to solder it in case of use.
As the table shows, UbiOne can communicate directly with the RPI via UART pins (GPIO14 and GPIO15 or GPIO8 and GPIO9). Please note that to do so, you need to first to configure the RPI:
-
Go to the RPI system configuration menu by typing
sudo raspi-config
in a terminal. -
Go to "Interface Options > Serial Port"
-
Select "No" to the first question (related to login)
-
Select "Yes" to the second question to enable serial
-
If you want to use RPI's UART4 (RPI4 makes available aditional UART ports) available at GPIO8 and GPIO9, add
dtoverlay=uart4
toboot/config.txt
file.
UbiOne can fit a Mini-PCIe card based on the pinout of a Quectel LTE EC25 Mini PCIe. In case you use any other card, you should pay attention if it respects the same pin configuration.
STM32 | mPCIe function | mPCIe pin |
---|---|---|
PA10 | TX | 13 |
PA9 | RX | 11 |
PA8 | RI | 17 |
PA15 | DTR | 31 |
PA4 (SJ3) | WAKE | 1 |
PA5 (SJ4) | W_DISABLE | 20 |
PA13 | W_RST | 22 |
If you need to use WAKE and W_DISABLE functions you must solder SJ3 and SJ4.
You can reset the LTE module by pressing the W_RST or drive PA13 pin low between 100 and 500 ms. Also, please note that PA13 is also SWDIO pin, which means you should not have the LTE module connected if uploading the STM32 via SWD.
UbiOne incorporates an I2S microphone. The setup is the same as the I2S MEM Microphone board from Adafruit, where the mic is directly connected to RPI through GPIO pins GPIO18, GPIO19, and GPIO20. To use with the RPI just follow the Adafruit guide.
NOTE: for some reason, the file ~/.asoundrc
keeps getting deleted (related to this issue). So if you notice any problem with the microphone, please first check if the file is there.
RPI | Microphone |
---|---|
GPIO18 | BCLK |
GPIO19 | WS |
GPIO20 | DATA |
Since UbiOne has a microphone, it would be nice to have a speaker. However, we think we can agree it would be pretty challenging to add a speaker to this little board. Even so, we added a small buzzer to pin PB13 that allows playing a simple buzz and some nice tunes. Try, for example, this one! 😉
The IMU sensor (ICM-20689) is by default connected to the STM32F411 through an SPI connection:
IMU | STM32 |
---|---|
MISO | PB4 |
MOSI | PB5 |
SCK | PB3 |
CS | PB12 |
INT | PC14 |
If you want to use I2C instead, you must solder SJ5, SJ6 and SJ7. You should also remove resistors R38 and R39 to release SCK and MOSI connections from the STM32F411. In this scenario we have the following connections:
IMU | STM32 |
---|---|
SDA | PB9 |
SCL | PB8 |
You can also make readings from the RPI using its I2C port. For such scenario you must use RPI I2C pins GPIO2 and GPIO3, and solder SJ1, SJ2. If you ask why it isn't everything connected, the RPI can only behave as master and does not support I2C multi-master. When connected, you lose the possibility of using the STM32 as a master in an I2C communication.
The pressure sensor (DPS310) is permantly connected through a I2C connection. Again, if you want to read from the RPI you must solder SJ1, SJ2.
DPS310 | STM32 |
---|---|
SDA | PB9 |
SCL | PB8 |