Motion Sensors

Motion Sensors
KiCAD 3D Visualization of the final PCB

For HfMDK I designed a motion sensor PCB in cooperation with Prof. Orm Finnendahl. The PCB is based on previous work done by Roosna & Flak. Kenneth Flak prototyped the wireless motion recording system with Adafruit hardware and ready made breakouts for the motion sensors. Our goal was minimization so we decided to design a carrier board for an ESP32C3/C6 with the identical motion sensors from Kenneth's system. The choice for the Seeeduino XIAO ESP32C3/C6 microcontrollers was easy. They come with an integrated ceramic antenna, ESPNow compatibility, LiPo charging and a very small footprint. Exactly what you want when you want to strap multiple battery operated sensors to your body.

Overview

One ESP32 acts as a receiver for a number of sender ESP32s. The sender is soldered to one of our motion sensors and gets access via i2c to a magnetic field sensor, a linear and angular acceleration sensor and also a light sensor, which is a nice to have for experiments.

The whole system consists of the pcb, the receiver firmware, the sender firmware and some arbitrary software on the computer where the receiver is attached. The data is sent as json strings for compatibility and ease of use.

Hardware Design

The sensors for motion detection are the great LIS3MDL for magnetic field sensing and the LSM6DOX for linear and angular acceleration. Both are from STMicroelectronics. Added for fun is an LTR-303ALS ambient light sensor from LITE-ON and a common WS2812B led. Good stuff for remote optical feedback loop experiments.

The main challenge was to make the board as small as possible, with all components on one side. We decided to it that way so the board has a clean underside which makes it easier to attach it to a wristband for example. The board's dimensions including the USB port of the ESP32 are 39mm long by 22.5mm wide. It has notches on the side of the narrow part that can be used to attach it to something by sewing or maybe screwing.

Another challenge was to find a good way to solder the board to the battery pads on the backside of the ESP32C3/C6. We decided to put rather large through holes next to the pads. It worked ok in the first version but we decided to enlarge them a bit in the final version. Soldering them worked really well even for people that had never soldered before.

The design was done in KiCAD and then panelized with KiKit.

Firmware

The firmware follows a minimalistic approach and sends only slightly filtered data when a value changes. It uses platform.io for development and just works. All sensors are attached via i2c to the ESP32 and existing libraries are used.

Software

Orm did everything on the receiving end in Lisp and also created a second firmware for the sensors with support for motion tracking.

Results

The sensors were used for a combined composition and dance performance at HfmdK which was a cooperation of Prof. Orm Finnendahl and Prof. Hannah Shakti Bühler.