[Interaction 1] Prototype: Heartbeat Sensor
Initial Experiment [Stage 1]
Based on the initial experiment, the heartbeat sensor is affected by outside factors and pressure which cause the LED to blink randomly even though there's no heartbeat. Thus, I start to look for code sources that measure a more accurate detection of heartbeat & BPM.
I have experimented with 3 different codes from 3 different sources. However, the number of BPM values is not stable as it will jump from 0 to 300 randomly. Another problem is that when I place my finger on the sensor, it should detect my BPM which ranges between 60- 78, however, the BPM value doesn't change as well when I monitored through the serial monitor.
Source 1:
Darrah, K. (2013) HowTo: Heart Beat Monitoring! Arduino/Processing. Youtube. Aug 24. Available at: LINK
I try to implement the code and modify based on my heartbeat condition. The results seem doesn't work in my case. The BPM will jump randomly and the LEDs blink randomly even though the heartbeat is not in ranged. I also find it hard to understand the code here, so I'm not going to further amend the code.
Result
Source 2:
Result
Source 3 (Reliable):
Yury & Joel (2018) Pulse Sensor Amped. Available at: LINK
Challenges
I'm more familiar with this source as it has a very detailed explanation from Yury and Joel (2018). The code utilizes interrupt() to replace the data once new data has been detected. I understand better on this as my previous project had worked on something which is related to receiving coming data and replacing it using the interrupt. However, there are some problem is that the BPM value is not stable when the code is running. I tried to debug it but it's very weird that the BPM value keeps jumping randomly as there is nothing wrong with the code.
Problem Solved
Initially, I thought the problem is due to the code or the function of the heartbeat sensor. The problem ended up was due to the wiring and stable placement of Arduino Uno and the heartbeat sensor. I have sticked the heartbeat sensor and Arduino Uno on the table with tape and changed all the wires that connect the Arduino and heartbeat sensor. In the end, the code works fine after testing it out with my own modification.
Comments
Post a Comment