Posts with «pulse sensor» label

Boxing Band Counts Punches and Analyses Them in Real Time

A boxing band that counts your punches and analyses them as you throw them. Manivannan’s project brings together an Arduino Nesso N1, a Pulse Sensor and a machine learning model trained in Edge Impulse. The built-in 1.14-inch touch display shows the count and changes colour according to heart rate. That way the athlete immediately knows whether they are working in the rest zone or at peak intensity, without looking at an external app.

The Nesso N1 is the board that carries the whole system. The ESP32-C6 microcontroller mounts two 32-bit RISC-V processors, with an HP core up to 160 MHz and an LP core at 20 MHz. Memory amounts to 16 MB of NOR flash and 512 KB of SRAM, figures that leave room for the model and the firmware. On board there is also an SX1262 LoRa module in the 850-960 MHz band, useful if you later want to send data to a second device. The dimensions are 18 mm x 45 mm, so the band stays compact. Power comes from an integrated lithium-polymer battery, with a nominal 5 V input.

From the Nesso_IMU.ino firmware to the four punch classes

The Nesso_IMU.ino firmware initialises the Nesso N1’s IMU, configures the sampling pipeline and sends the readings from the 3-axis accelerometer over the serial port. The serialised motion frames are then acquired by Edge Impulse through the data forwarder. Here the work moves to Edge Impulse Studio, where the frames are segmented and labelled into four classes: Idle, Hook, Jab-Cross and UppeCut.

The preprocessing block is Spectral analysis, the learning block is Classification. The analysis window is 1200 ms and the stride is 750 ms, so the system looks at a little over one second of movement at a time and advances by three quarters of a second. The neural network is trained with 100 training cycles and a learning rate of 0.05. The stated result is 100% accuracy in both the training and the testing phase.

The trained model is exported as an Arduino library and imported into the IDE. From that point on, inference runs locally on the device, with no cloud dependency. The results update the punch count variables, while the Pulse Sensor continuously reads heart rate. Anyone who wants to retrace the path will find the full account of the workflow, from data collection to library export, on Manivannan’s project page on Hackster.io.

The Pulse Sensor on pin GPIO5 and the backlight colours

The pulse sensor must be connected to pin GPIO5, not to the default pin. The PulseSensor Playground library therefore has to be modified: inside PulseSensor.cpp the InputPin variable goes from 7 to 5. The sensor sits on the tip of the index finger and is secured with a hook-and-loop strap, so it stays in contact during the punches.

Heart rate sets the colour of the LED backlight, which becomes an intensity indicator you can read out of the corner of your eye:

  • Below 100 bpm the backlight turns green, rest zone or low intensity.
  • Between 100 and 140 bpm it turns blue, moderate activity.
  • Between 140 and 160 bpm it turns yellow, high intensity.
  • Above 160 bpm it turns red, peak intensity.

Rebuilding the band takes only a few parts: the Nesso N1, a Pulse Sensor, hook-and-loop tape and a 5 cm jumper wire kit. Assembly requires no special soldering, because the connections go through the jumpers. What is more, the hook-and-loop strap holds sensor and band together without 3D printing. Anyone looking for a board from the same family for other IoT experiments will find the board with Matter and Bluetooth LE in the catalogue, intended for home automation rather than for sports wearables.

The delicate point is calibrating the heart-rate thresholds. The four ranges on the board hold true for this project, but every athlete has different maximums. So it is worth recording a few rounds and comparing the colours with the real values before trusting the feedback. Sensor position matters too: if it shifts even slightly, the reading wobbles and the colour changes for no good reason.

Punch counting relies on the model’s four classes. Idle increments nothing, while Hook, Jab-Cross and UppeCut push the counter up. Consequently the number on screen is not a simple accelerometer peak, but the result of a classification. The limitation is that the model was trained on one person’s movements: with a different boxer, or with the opposite hand, performance can drop.

Source: https://www.hackster.io/manivannan/smart-ai-boxing-band-bddc39

Related products

The post Boxing Band Counts Punches and Analyses Them in Real Time appeared first on Open Electronics.

Arduino Polygraph Shows How It’s Done

Sometimes, a project comes along that makes a good reference design for anyone doing similar work. In this particular case, it’s a DIY USB polygraph-like machine by [Juangg] using an Arduino and sensors on the hardware side, and a Python front end for data visualization. It’s even complete with 3D printed enclosure and sensor elements.

[Juangg] designed it to use three sensors: a pulse sensor, a breath sensor, and one to measure Galvanic Skin Response (GSR). The pulse sensor uses a piezo element pressed against a fingertip to detect changes in pressure resulting from blood flow. It can be picky about placement, but finding sweet spot can yield remarkably good readings. The breath sensor works on a similar principle but uses a 3D printed fixture to hold the sensor between a strap and the subject’s chest, so that breathing in and out can be detected. The GSR sensor is a voltage divider used to measure small changes in skin conductivity. How well does it all work? That depends on what one is looking to get out of it, but the documentation and design files are available from the project page and the GitHub repository if anyone wants a reference for similar work.

The polygraph may have a mixed reputation, but it makes a good project that demonstrates just how messy biometrics can be from an engineering perspective. And in case you missed it, here’s a reminder that Wonder Woman and the polygraph have much more in common than you might realize.

Theater Safety Glasses

Watch horror movies without the fear of having to cover your eyes when things get scary with these ingenious Theater Safety Glasses created by Aisen Caro Chacin in collaboration with Shawn Lauriat.

Read more on MAKE

Portable and cloud-based heart rate tracker

In his blog, Charalampos describes his experience with SeeedStudio’s Grove Ear-clip Heart Rate sensor and Cosm (former Pachube) cloud service. The employed sensor is quite cheap and can detect heart pulses from the ear lobe, by measuring the infra-red light reflected by the tissue and by checking for intensity variations.

By connecting this sensor with an ADK board and, in turn, with an Android smartphone, Charalampos implemented a portable heart-rate tracker, which is used to send the recorded data to Cosm cloud service.

For more information and sample code, see here.

[Via: Building Internet of Things]