Hearbeat Monitor With XIAO NRF52840
by TiagoSantos in Circuits > Arduino
1179 Views, 3 Favorites, 0 Comments
Hearbeat Monitor With XIAO NRF52840
Today we are testing the Seeed Studio XIAO nRF52840 and make a heartbeat monitor. Seed Studio send me me this microcontroller to test and apply to a project. First lets see what this microcontroller is.
The XIAO NRF52840
The XIAO nRF52840 is a microcontroller based on Nordic nRF52840 CPU. Is a ARM Cortex-M4 32 bits CPU with support for bluetooth 5.0 and NFC. It has an ultra small size with 21 mm by 17.5 mm, ideal for projects with little space like wearables. Besides bluetooth and NFC also supports ZigBee.
Is has multiple interfaces like UART, I2C, SPI, ADC, multiple GPIO and a three-in-one led. It also has a nice characteristic. Is breadboard friendly because theres no componet in the back.
On the power field it only consumes 5uA in deep sleep and has a built in lithium battery charger.
Bitalino
For this heartbeat monitor project i'll use a part from another microcontroller. This is the Bitalino. The Bitalino is a biomedical microcontroller similar to Arduino. It has a microcontroller, a bluetooth module and some general modules like led, buzzer, digital to analog converter, lux sensor button and a protoboard. Then has a very specific medical modules to perform functions like ECG, EMG, EDA and EEG.This was developed in Portugal by Hugo Silva. You can check more info in this page.
Diagram
For the project i'll use as base a sketch created by Hugo to read the rhythm and electrical activity of the heart. Then this info will be translated to a set of leds. The XIAO receive the info from the ECG sensor, connected on pin D1, translate and send to pin D9.
The ECG sensor needs to connect to VCC, ground, the XIAO receive pin and a reference value. This is made conecting the pin with two 10k parallel resistors, one connected to VCC and the other to ground.
After connecting, all the leds blink with the heart rate. We can see on Arduino Plotter a graphical display of the information received from the ECG sensor.
The PCB
For the project i'll use a perfboard. The first step is place the components on the perfboard and apply solder flux to help the solder process. The first components to be place are the resistors, and the female pins for the XIAO. Using the female pins it's easy the reuse the microcontroller. Always use a fume extrator to ventilate the solder fumes. Mine is build with a computer fan, an active coal filter and a 3D printed part.
Next it's time to solder the ECG sensor. This uses four pins to connect to the perfboard and three pins for the electrodes. This ECG sensor user three electrodes on the chest. One on each clavicle and one on the left side, below on the lower chest.
After all the components are placed, it's time to cut the perfboard to the desired size. To do this, i'll use a box cutter. Just score the row of holes and snap it with the hands or plyers.
The Case
To make the case i use Fusion 360 and Creality Slicer to send it to the printer. This project has three printed parts. The led case, the main case and the chest part.
Connecting the Leds
For connecting the leds i use a piece of perfboard to join all cathode and place the ground connector. After all are solder, it's time to repeat the process on the anode. After all connections are made it's mandatory to check if the VCC is isolated from the ground and test it.
The Problems
Everything doesn't always go as expected. When checking the connections, place to much force on the vice and the perfboard break. So it's time to do all the solder again.
Finishing
In the end it's time to put the batery connections and isolate all to avoid short circuits. Idealy i'll use thermo sleeve but because i don't have the right size, thermo glue also works. This project is powered with a 3.7V, 1 cell lipo batery.
Assembling
Next it's time to place all on the 3D print parts and test it. To join the parts, because this is PLA, i use super glue.
Finally it's time to prepare the chest part. To do this, i place an elastic band glued on both sides. This part has a hole in the middle to pass the electrodes of the heartbeat monitor.
At the end i had to replace the red led with white ones and remove the 220ohm resitor for a more visible light.