I have a problem with device constructed using RaspberryPi and a set of different sensors such as: pulse sensor, ultimate gps, temperature and humidity sensor, display and buzzer. I'm writing about sensors, becouse I guess that it may be too much load for my battery supply, but I'm not sure, becouse I don't have knowledge about electronics ... maybe some basic knowledge about it.
My problem concerns pulse beats per minute measurement. I have simply module, which have +/- pins and one pin which sends digital HIGH signal, when heart beats. To measure the time between beats I have simply algorithm written in C, which measure time between one HIGH signal and second HIGH signal.
When device is supplied directly from power supply from socket, than algorithm works perfect and time measurement between signals does not have any wrong times.
Problem is when my device is turned on from battery supply (Li-Pol 2200 [mAh] 3.7 [V]). To increase voltage I used Adafruit PowerBoost 1000C with battery charger. When I'm running my small program, than my time measurements are terrible. When I'm at rest than time between signals should be around ~600-700 [ms], but measurement error is very large and maybe sometimes in range of +/-200-600 [ms] and only one of four measurements is correct... I don't know what is reason of this. Maybe too much load? Maybe operating system (Raspbian lite in my case)? Or something else? I would like to ask You to help me with that, becouse I wasted much time to write filtering algorithms, but it's not effective when an error of measurement is large and occurs so often...