Previous posts for this project:
- [CaTS] ForgetMeNot - Index
- [CaTS] ForgetMeNot - Week 0: Project Description
- [CaTS] ForgetMeNot - Week 1: EnOceanPi and Sensors
- [CaTS] ForgetMeNot - Week 2: Elro CoCo and Pi Cam with OpenHAB
- [CaTS] ForgetMeNot - Week 3: Data persistence and charts with OpenHAB
- [CaTS] ForgetMeNot - Week 4: Arduino-OpenHAB communication
- [CaTS] ForgetMeNot - 3D Printing: EnOcean sensor bracket
- [CaTS] ForgetMeNot - 3D Printing: EnOcean rocker switch and magnet holder
- [CaTS] ForgetMeNot - 3D Printing: Food dispenser prototype
Introduction
Even though I'm away and unable to work on my project, I still prepared some content beforehand to ensure you guys had something to read while I was away
To determine the quantity of food and water for my cats, and even how much is consumed, I intend to use load cells connected to an Arduino to weigh both bowls and their contents.
The load cells need to be mounted in a certain way, as sketched below:
I sketched a piece based on the dimensions of the load cell and sent it to the printer.
I printed the part twice to mount both bottom and top parts to the load cell. An additional two more will be needed for the second load cell.
The piece lifted a little during printing, I'll have to see if I can find a way to make it stick better to the platform.
This is the result:
Mount
Last step was to mount the printed parts to the load cell. Some screws needed to be shortened, but the pieces fitted together nicely.
Test
To quickly test the build, I hooked up the load cell to HX711 weighing sensor module, connected to a MicroView displaying a gauge of the measured data.
There is also an alternative circuit using an INA125P which I found on instructables. Not sure if this is a better alternative compared to the HX711 though.
Only a few lines of code were required to get the circuit up and running:
#include <MicroView.h> #include "hx711.h" MicroViewWidget *widget; Hx711 scale(A1, A0); void setup() { uView.begin(); uView.clear(PAGE); widget= new MicroViewGauge(32,30,0,1000); // draw Gauge widget at x=32,y=30,min=0, max=1000 } void loop() { int weight = scale.getGram() / 3.5; widget->setValue(weight); // give a value to widget uView.display(); // display current page buffer delay(100); }
And here's the scale in action:
I'll have to perform additional tests with different weights to verify the accuracy and consistency of the results. But for now, it seems to work!