Iteration 2 Emma Nolan

 


Breathing Pacer:


When you press Button A on the micro:bit, the code runs a loop three times ( three cycles of a breathing exercise)

Inhalation Phase:

It plays a noise sound and displays a visual representation of a "breath" using LED lights.
The LED lights create a pattern resembling a '#' symbol.
It pauses for 500 milliseconds (half a second).

Hold Breath Phase:

It shows a small diamond icon on the micro:bit's LED matrix.
Pauses for another 500 milliseconds.

Exhalation Phase:

It shows a diamond icon, creating a visual cue for exhaling.
Pauses for 2 seconds (2000 milliseconds).
Plays a square wave sound.
Hold Breath Again Phase:

Displays a small diamond icon.
Pauses for another 2 seconds (2000 milliseconds).
Rest Phase:

Clears the LED matrix, giving a pause before the next cycle.
Pauses for 4 seconds (4000 milliseconds).
Overall Breathing Exercise:

The entire sequence above repeats three times due to the outer loop.

Audio Feedback:
During inhalation and exhalation phases, it plays different sound effects using the micro:bit's built-in music capabilities.





Video of HRV:







Output for HRV microbit


 when button B is pressed. The code  will execute when the button is pressed.
The code maps a Heart Rate Variability (HRV) value (delta_t) from the range 0 to 1000 to a new range, 0 to 4. This mapped value is stored in the variable barHeight2.
for (let y = 0; y <= 4; y++) {
    for (let x = 0; x <= barHeight2; x++) {
        led.plot(x, 4 - y)
    }
}
These nested loops go through each row and column of a 5x5 LED matrix. The code lights up LEDs in the shape of a bar graph based on the mapped HRV value. The higher the mapped value, the taller the bar.

- pressing button B takes an HRV value, converts it to a height for a bar graph, and then displays the graph on the LED matrix. The taller the bars, the higher the HRV value.

Bio Feedback

LED Ball Color Changes:

Utilize an LED ball capable of changing colors.
Assign different colors to represent HRV ranges (e.g., green for normal, yellow for moderate, red for high).

Pulsating LED Light:
Make the LED ball pulsate or beat in a heartbeat-like pattern.
The intensity or frequency of pulsation can reflect HRV levels—steady and smooth for good HRV, irregular or rapid for lower HRV.

Audio Feedback:
Integrate a small speaker to provide auditory feedback.
Play soothing sounds or music that corresponds to the breathing rhythm.



Hoberman sphere:

Creating a Hoberman sphere that expands and contracts in sync with the user's breathing can be a visually engaging way to guide breathing exercises.
Control the Hoberman Sphere:
Connect to a motor or a servo motor that controls the expansion and contraction of the Hoberman sphere.
Program the motor to expand the sphere during inhalation and contract it during exhalation. (Maybe with a balloon)



Battery:

Current battery:

Voltage (V):
The battery supplies 3V, which is within the typical operating range of the micro:bit (2V to 5V) and the pulse sensor.
Capacity (mAh):

The battery has a capacity of 500mAh. For low-power devices like the micro:bit and a pulse sensor, this capacity should provide sufficient runtime.
Energy (Wh):

The energy capacity of the battery is 1.5Wh, which gives you an indication of the total energy stored in the battery. This value, along with the voltage, helps estimate the runtime of your system.

Maximum Discharge (A):
The battery can discharge a maximum of 2.5A. This should be more than enough for low-power devices like the micro:bit and a pulse sensor, which typically have low current requirements.

- since the project involves continous monitoring the expected runtime is based on the capacity of the battery and the current consumption of the microbit. So we may need to increase the capacity of the battery. Continuous operation at or near the maximum discharge rate may impact the overall lifespan of the battery. 

Self-Discharge Rate:

The self-discharge rate of a battery determines how quickly it loses its charge when not in use. For long-term monitoring projects, a battery with a low self-discharge rate is desirable to maximize stored energy.

Potential Issues of Using 5V Instead of 3.3V:

Component Damage:
Many components on the micro:bit, including the microcontroller, are designed to operate at 3.3V. Supplying them with 5V may exceed their voltage limits, leading to potential damage.

Increased Power Consumption:
Arduino boards may consume more power compared to micro:bit, affecting battery life. Ensure that your power source can provide sufficient current for the Arduino and connected components.

Advantage:
Increased Signal Range:
Some sensors may benefit from an extended voltage range, providing a wider signal range and potentially improving the accuracy of measurements.











Comments

Popular posts from this blog

Iteration 2 | Jack | HRV Micro:bit Research

Iteration 5.2 | Lock In | Jack

Week 1: HRV Review