Octopus Flex PCB (SulaJalmari)
An nRF52840-based desk toy where art and engineering collide.
Table of Contents
- Introduction & The Point
- Hardware Specifications
- Fun Features & Known Flaws
- Software
- Programming & Usage
- Open Source Resources
Introduction & The Point
The Octopus Flex PCB (SulaJamlari) is a desk toy intended to provide a hands-on learning experience with embedded systems, IoT technologies, and PCB design.
People often ask what the "point" of this project is, but there isn't a strictly functional one. It was created to see what happens when art meets engineering, to learn device development, and to be a challenge. The point was the journey—and, of course, because an octopus desk toy looks incredibly cool.
Hardware Specifications
This section covers the exact specifications of the third (and final) prototype:
- Board Structure: 2x Flex PCBs (acting as the octopus head and legs) and 1x FR4 PCB (acting as the base board).
- MCU: nRF52840-QIAA (soldered directly to the flex PCB with a stiffener on the reverse side).
- IMU: ICM-20602 accelerometer (shares an interrupt line with the light sensor).
- Light Sensor: XYC-ALS21C-K1 I2C ambient light sensor (shares an interrupt with the IMU).
- Leg LEDs: 8x Blue LEDs running at 2mA (LED0603-RD).
- Eye LEDs: 2x Addressable RGB LEDs (WS2812B-2020).
- Power & Battery: TP4054 50mA battery charger, ME6211C22M5G-N 3V3 LDO, and XC6206P362MR 3V6 LDO (dedicated to the addressable LEDs).
- Connectivity: Bluetooth with a minimal PCB trace antenna, USB-C for power/programming, and a 5V rail to chain multiple devices together.
- Audio & Haptics: Buzzer with a driving transistor, plus a footprint for a vibration motor (motor ultimately not installed in the final version).
- Interface: 2x tactile user buttons, 1x tactile reset button, and an on/off switch.
- Debugging: Base board debugging pins compatible with a standard ~$3 DAPLink debugger via pyOCD/OpenOCD.
- Aesthetics: Silkscreen suction cups and mouth.
Fun Features & Known Flaws
The Fun Things
- Wobble Physics: Because the assembled PCBs take the physical shape of an octopus, the whole device wobbles when shaken.
- Visible PWM: When the device is wobbling and the LEDs are running PWM, the movement actually allows you to see the PWM strobing with your naked eye.
- Tap-to-Click: The IMU is mounted in the very top of the head. This means you can tap the top of the device, and the accelerometer registers it as a physical button press.
The Flaws (Lessons Learned)
- Durability Limits: During "stress testing" (read: repeatedly slamming it against the base board), some of the MCU pins eventually detached. Please don't torture the electronics!
- Haptics: The vibration motor was mostly unnoticeable, leading to its removal from the final assembly. (Pins to connect a motor still exist)
- Logistics: Transporting an assembled, multi-layered flex-PCB octopus safely is tricky.
Software
Zephyr Framework
Initially, Zephyr felt overwhelming due to deprecated documentation and a steep learning curve with devicetrees. However, to get the Bluetooth functionality we wanted, we gave it another shot. Eventually ended up enjoying having "one framework to rule them all", plus gaining embedded Linux/devicetree experience was highly valuable. The custom board files use the nrf52840-dk as a template. Zephyr relies on MCUboot as its bootloader.
Arduino Support
For broader accessibility, the Adafruit nRF52 library and bootloader was modified to work with the Octopus Flex PCB in the Arduino IDE.
Programming & Usage
Development Prerequisites
If you want to build custom Zephyr firmware, you need the nRF Connect SDK, the Board folder from this repository, and your prj.conf file. The easiest way to start is by installing the nRF Connect for VS Code extension. The current project is verified to work with SDK version 2.6.1.
Building the Firmware
If you are modifying the code, ensure your prj.conf contains the following line so Zephyr generates the signed hex file required by the bootloader:
CONFIG_BOOTLOADER_MCUBOOT=y
You must also ensure a child_image folder exists in your project with an mcuboot.conf file containing:
CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x12000
Running a Build via the VS Code extension will generate the required file at: main_project/build/zephyr/zephyr.signed.hex.
Flashing via USB
- Open nRF Connect for Desktop and launch the Programmer app.
- Click SELECT DEVICE in the top left and choose the MCUBOOT USB device.
- Drag and drop your
app_signed.hexfile into the "File Memory Layout" section. - Click Write.
- The device is successfully flashed when the memory field turns green.
Open Source Resources
Hardware Files:
- EasyEDA project & Schematics
- Gerber files
- Pick and Place files
- Bill of Materials (BOM)
Software Files:
- MCUboot configurations
- Modified Arduino bootloader
- Zephyr board files and custom examples
Media & Gallery:
- Paper prototype concepts
- V1 (Yellow) & V2 (Black/Blue) prototype pictures
- "Finished" product glamour shots
- Eye LED tests and IMU I2C logic analyzer debug screenshots
- The "Army" (Multiple assembled devices together)