Hello everyone,
I was wondering if anyone could help me troubleshoot one of my projects that involves developing a rodent exercise tracking device (on wheel running) using a hall sensor.
So the way I have it set up and running is using a Hall sensor that comes soldered on a small pcb with 2 LED lights. One is constantly lit up while the other is off by default until the hall sensor senses a magnet in proximity. I am using a power supply module (2 sides) that outputs 3.3 v or 5 v and have it on a breadboard. I am currently running 6 rodents with this and have divided the 6 sensors into groups of 3 each powered by one side from the power supply module to avoid overloading the current.
I then am using an IoT service to display their parameters each minute. Thankfully, it works. However, the issue is that the data (speed, acceleration, speed, rotation) I'm seeing works for a couple of days then starts to decline in efficiency. For example, the Hall sensors are detecting them run (and thus the 2nd LED is blinking when a magnet passes it) but the program starts to miss multiple rotations significantly. My question is, could this be more of a problem in how I set up the wiring of the sensors (If so, how?) or how I have written the code that it struggles to keep up with tracking 6 sensors independently from each other all at once or maybe memory leaks are an issue?
The code I have written (on top of the IoT stuff) also includes a way to save the unpublished data in JSON file just in case it fails to upload the data within that minute. I'm not sure if removing this would solve any issues that I have because it seems to be running just fine beginning from days 1-4 then it just progressively declines. I am also running it through Thonny and was wondering if running the code directly through the terminal would make any difference?
Let me know if there are any more details you guys need... Any suggestions are appreciated
I was wondering if anyone could help me troubleshoot one of my projects that involves developing a rodent exercise tracking device (on wheel running) using a hall sensor.
So the way I have it set up and running is using a Hall sensor that comes soldered on a small pcb with 2 LED lights. One is constantly lit up while the other is off by default until the hall sensor senses a magnet in proximity. I am using a power supply module (2 sides) that outputs 3.3 v or 5 v and have it on a breadboard. I am currently running 6 rodents with this and have divided the 6 sensors into groups of 3 each powered by one side from the power supply module to avoid overloading the current.
I then am using an IoT service to display their parameters each minute. Thankfully, it works. However, the issue is that the data (speed, acceleration, speed, rotation) I'm seeing works for a couple of days then starts to decline in efficiency. For example, the Hall sensors are detecting them run (and thus the 2nd LED is blinking when a magnet passes it) but the program starts to miss multiple rotations significantly. My question is, could this be more of a problem in how I set up the wiring of the sensors (If so, how?) or how I have written the code that it struggles to keep up with tracking 6 sensors independently from each other all at once or maybe memory leaks are an issue?
The code I have written (on top of the IoT stuff) also includes a way to save the unpublished data in JSON file just in case it fails to upload the data within that minute. I'm not sure if removing this would solve any issues that I have because it seems to be running just fine beginning from days 1-4 then it just progressively declines. I am also running it through Thonny and was wondering if running the code directly through the terminal would make any difference?
Let me know if there are any more details you guys need... Any suggestions are appreciated
Statistics: Posted by ChickenMilkMan — Tue May 21, 2024 10:25 pm