For some project we need to have contiuous measuring of the product quantity, Solution have to be mobile, wireless, low power, long service cycle, etc. Perfect scenario to use BigClown.
To check the solution is viable I created small prototype using 4 load cells for personal scales connected to wheatstone bridge. Voltage on bridge is measured using module with Avia Semiconductor HX711 A/D converter and read by BigClown core module..... and old plank is used as a platform.
The first challenge was prepare new scales. Fortunately I had old board (originaly kids slide). Sensors need any space to deflect - I found instructions how to create a holders on 3D printer - too simple :) I used drill to make "hollowed legs" and glued all it together. My sensors are 1/2 of Wheatstone bridge and can be simply connected to full bridge which is measured using the HX711 module... and some tape and scales are done.
Module with HX711 is an amplifier with 24 bit A/D converter. How to connect scale and how to read data from digital output is good explained in product sheet. On GIThub you can found some arduino based libraries for this module. For my test I had to rewrite one (think the best :) for BigClown which is based on SMT32 microcontroller. The speed of this microcontroller is bit different than Arduino's microcontrollers so I had to play with timing a bit.
The first test app was only sending measured value over serial port to my laptop. Then I extended the app to show measured weight on LCD display - good time to calibrate scale.
Finally I added simple menu to the application to allow measure, tare and calibrate scale from LDC panel. Using 4 not full batteries the scales work for more than week - could be better. I think there is possibility to modify the code to improve power management (turn off HX711 module) to extend the battery life.
At one moment the scale stopped to working - precisely it was when I add battery test to my code. The battery is measured by A0 pin. My first connection of scale was on P0 and I spent lot of time to find the reason the scale measure only once... so DO NOT USE P0 pin when you want to read battery voltage :)
The library for HX711 module and test app are available on GitHub for everyone.
Comments