Hardware
The idea is to have a mainboard with parallel slots where cards can be placed. These cards can serve various purposes, such as including microcontrollers, sensors, storage, or other functionalities as needed.
For the next version (the first to use this approach), work is being done on the following modules:
- Main card for data processing with an STM32F103RBT6 chip.
- A module for storing data on an SD card and transferring it via WiFi (ESP8266MOD) to other devices, such as a Raspberry Pi.
- A user communication module with an LCD and four push buttons; the LCD adjusts its brightness based on ambient light.
- An acquisition card with four pulse counter inputs and two UART sockets.
Additionally, the mainboard exposes all STM32F103RBT6 pins, enabling the addition of new cards using GPIO, I2C, SPI, CAN, and other interfaces.
Due to the availability of low-cost, high-quality PCB manufacturing, home-etched PCBs have become largely obsolete. While the PCB design for this project may be difficult to etch at home, it is still possible. Subparts of the circuit can be assembled on a breadboard, making the process much easier, and the modular software design allows for easy reuse of these components.
- Circuit exported to .pdf is available here (this is circuit for latest version when all was on a single shield for NUCLEO devboard)
- Toolchain: KiCad
Software
STM32F103RBTx
The STM32F103RBTx serves as the main microcontroller, handling data acquisition, processing, storage, and user interaction.
- Toolchain: C++17, C, STM32 VS Code Extension, CMake.
- More info.
ESP8266
The ESP8266 is currently used for data transfer via WiFi and will support FOTA (Firmware Over-The-Air) in the future.
- Toolchain: TBD, currently using Arduino IDE.
- More info.
DevOps
It's good to let the machine handle the tedious work of checking code quality, freeing up more time for the useful and interesting parts of software development.
- Toolchain: Unit tests (Google Test, Google Mock), code coverage (LCOV), static code analysis (Cppcheck), Docker (for both local development and CI), GitHub Actions (CI).
- More Info
Simulation
Embedded development is cool, but constantly flashing the target device for non-hardware-related logic, like the human-machine interface, can be time-consuming and frustrating. To streamline this, a simulation was developed that isolates the firmware not directly tied to hardware, adds stubs for drivers, and includes a GUI. This allows all high-level aspects, such as what’s displayed on the LCD, user interaction via buttons, and data parsing, to be tested without the need for hardware.
While this simulation handles the firmware, speed of execution isn't a concern since it focuses solely on high-level logic. For hardware or driver-related issues, traditional methods like using an oscilloscope or logic analyzer are still necessary, as the simulation cannot be used.
- Toolchain: pyqt6, cmake.
- More info.
Below is a screenshot from the simulation. Note that this is from an earlier version when the device was designed to work exclusively with a Geiger counter. The current simulation doesn't work.
Documentation
UML diagrams were made using PlantUML.