This project was not about perfectionism but rather using/recycling materials I had with minimal new orders. Here are the items I had and was able to use:
- ESP8266 (I am trying to use existing ones to switch to ESP32 or alternatives for more serious projects)
- LCD 16x2 display. It is nice for such robust applications but this bulky display takes space in my drawer
- A left over 5V power supply
- Left over wood screws and bolts from assembled furniture (they include extra pieces)
- A piece of acrylic sheet
I had to 3D print case for the electronics, buy
- left-over wood from hardware store (they are much cheaper)
- 50 kg load sensors (a pack of 3x4 for future projects)
These 4 sensors can be hooked to weigh her up to 200 kg! (overkill but these sensors are quite cheap)
The project should fulfill the following requirements (most urgent to least urgent):
- Weigh Milli whenever she lies on the bed and display it on the LCD display, without causing discomfort
- Easy to use, somewhat requiring almost no manual interaction
- Some network connectivity
- IoT function to report the weight to a server (e.g. via MQTT to Home Assistant)
I realized that the bed must be as flat as possible. I was scared that she would be easily scared of any wobble or topple. For instance, if the load cells are not at the edge, then she could step on the edge tilt the bed with her weight. This could (and was) enough to scare her. She gets scared very easily. That would mean that she would lie on her bed anymore 😢. Also, if the "ground" under her soft bed would have large gaps, she would not like this either (and she didn't). Imagine stepping on a soft yoga mat without knowing, if the there are pot holes underneath. It would be uncomfortable. Your feet would have to bend in unpredictable ways. Milli had the same issue.
With these in mind I managed to build something which worked!
How is LCD backlight controlled? I hope it's off when the dog is sleeping or going to sleep, because I think that light (reflected from near surfaces) could disturb their sleep. Especially that's blue light, so it controls circadian rhytm the most, at least for humans, so probably for dogs it's similar.