Wired Arduino Nano BLE Sense Rev2 speed/odometer + environment logger with storage (i.e. Arduino Cloud with a WiFi enabled Arduino. If you want, ask me and I'll clean up/post the code that does this. The bin opening can also be triggered through Arduino Cloud)
Results:
I get to make sure my hedgehog is healthy! Plus, I can learn various tips to improve his health:
He responds to getting rewarded with treats for running, but doesn't really care to run more to get more treats
It needs to be quiet and lights have to be off for him to come out
He doesn't seem to care about temperature as long as it's above 70 °F / 21 °C
He seems to be insensitive to humidity/pressure and whether his house is shaking/resonating.
His food consumption is constant! He seems to eat more Tunachovy
Conclusions:
My wife and I live in darkness and quiet. We also wake up every day to see how much the hedgehog has run! Our current hedgehog isn't a runner, but our first hedgehog used to run ~15 miles a night!
Example Data:
Hedgehog running on a wheel with a bin opening up. He usually waits a minute to go eat it, though he knows the bin opened:
Chart of miles + speed for each night in this year (no outlier cleaning)
Overview
My spouse and I have a lovely hedgehog (our 3rd). They are nocturnal, so it's hard to understand and observe them. Since 2015, we have been tracking our hedgehogs in many ways to help improve their life. A subset of this includes:
BLE wireless “controller” that has an odometer + speedometer, along with environmental loggers
BLE wireless mini bins that open up every ¼ mile (400m) the hedgehog runs.
BLE wireless food scale
Models & Devices
The model has three devices:
An Arduino Nano BLE Sense Rev2 mounted on the Nano Screw Terminal Adapter logs Hedgehog wheel odometer and speedometer by using the gesture sensor's IR diodes, with retro-reflective tape on the wheel. Comparing the left vs right diode output peaks is calibrated to get exact speed + direction (CW or CCW)! Please see github link and the modifications needed to the original library to allow this!
The above Arduino also logs environmental observations (House shaking, noise levels, light levels, temperature, humidity)
A food-scale model with battery powered Arduino Nano BLE Rev2, connected to a load cell/HX711 sending data back to the BLE Sense
A bin-dispenser model uses a battery powered Arduino Nano BLE Rev2, connected to six servo motors, that can open individually open 12 bins. Each bin contains a reward!
Printing, Assembly, and Wiring Instructions
Odometer/Speedometer:
To the wheel, attach a high quality retro-reflective tape that reflects in the IR region
Attach the Arduino Nano BLE Sense Rev2 such that it generally points towards the wheel and can “see” the retro-reflective tape.
This Arduino will always be on. Connect it to a machine to monitor the data! Software below!
Scale:
Materials: Arduino Nano BLE Rev2, a strain gauge, HX711, a AA battery holder, and a Li-Ion 10440 battery.
Print the scale_*.stl files. I did not use supports. It's vanilla PLA. You may need to adjust sizes to fit the strain gauge you have. I harvested mine from a old scale.
For battery power, remove the Schottky diode on the Arduino BLE Rev 2. You will lose reverse polarity protection. Remove the LEDs as well.
Assemble electronics. I used plastic piercing screws to attach the boards. The wiring is as follows:
Wiring: (I didn't have success illustrating this clearly so I'm writing it out) Strain sensor's {red, black, white, green} to HX711's {E+, E-, A-, A+} HX711 {GND, DT, SCK, VCC} to Arduino Nano BLE's {GND, D5, D4, and 3V3} Arduino Nano BLE's {GND, VIN} to Battery's {GND, V+}
Finish assembly! I had a metal plate that interfaces between the strain gauge and the top so I had to tap holes.
Print the bin_*.stls. Use supports everywhere. It's vanilla PLA. You will need to clean up the prints!
Assembly the servo, servo arm, base, and adjustable “spokes” as follows. Use M2 nut on the other side
Attach the bins to the base with 2x M2x10mm screws on the front side.
Attach the lids to the bins with 1 M2x20mm screw for each lid
Thread the servo arm to the bins as follows in the picture, and attach the assembly to the bottom plate with M2 x 22mm screws on the rear of the bin. Rotate the spokes to adjust tension.
Continue 6x and populate/wire the electronics. Don't forget to remove all LEDs and remove/short the Schottky diode on the Arduino BLE Rev2 to enable battery power and reduce power draw.
Wiring: (I didn't have success illustrating this clearly so I'm writing it out) Battery's {GND, V+} to PCA9685's {GND, V+} PCA 9685's {GND, V+, VCC, SDA, SCL} to Nano BLE's {GND, VIN, 3V3, A4, A5}
Optionally, to prevent mealworms from escaping, place a steel ball in the printed ball_cap.stl and glue it to the top of the lids. I use dichloromethane to solvent-weld PLA.
Programming/Code/Software
Place the code from this repository onto the Arduinos. I still need to add in sleep to preserve battery life. I used Arduino IDE v2 and custom wrote a data plotter (available at the repository). Currently, I'm logging wheel rotation data from the described gesture sensor, with a ground-truth-magnet-based sensor, to aid in training a tinyML model for gesture-sensor based wheel revolution detection.
Demo and Usage instructions:
You need to bring a place to store data. Arduino Cloud is one place.
Something that tells the “controller” Arduino Nano BLE Sense Rev2 to trigger a servo opening (write “s” to serial) or get data from the scale (write “w” to serial).
Model origin
The author marked this model as their own original creation.