I have some nice scales from Marsden, their M-125 column scales. I know they are not cheap (£235+VAT) but they are very good. If you are ordering for home you can ask them to allow stone/pounds as well as kg, which they seem happy to do. They work at 100g steps and can weight up to 250kg. What is nice is how consistent they are - none of this "best of three" effort on cheap bathroom scales.
But I wanted to get data out of them, and like proper scales they have a serial port (though it is a USB port). I was going to connect to a Raspberry Pi, and even have a Pi and a case, but I now realise I can WiFi connect them easily.
Using an ESP8266 in an ESP-01 package, I can receive the serial data and send over MQTT over WiFi, simple as that! It actually works out about half the cost of the USB cable alone - with the ESP-01 costing a whopping £2.75 from Amazon (more like 50p if you order from China).
It does involve adding a header to the main PCB, sadly (no doubt voiding any warranty). It would be nice if Marsden had a header on the board and did WiFi as an option. I am sure we (A&A) would be happy to provide some consultancy and custom firmware for such a project, just ask...
As for the software, well, I was actually able to use the Tasmota software as it will serial bridge to MQTT, but I then wrote my own (on GitHub). It sends via MQTT and/or via HTTP(s). It is a bit of a work in progress at the moment, but works well even so.
Here is how it is done...
Subscribe to:
Post Comments (Atom)
Fencing
Bit of fun... We usually put up some Christmas lights on the house - some fairy lights on the metal fencing at the front, but a pain as mean...
-
Broadband services are a wonderful innovation of our time, using multiple frequency bands (hence the name) to carry signals over wires (us...
-
For many years I used a small stand-alone air-conditioning unit in my study (the box room in the house) and I even had a hole in the wall fo...
-
It seems there is something of a standard test string for anti virus ( wikipedia has more on this). The idea is that systems that look fo...
That's a nice little framework you've created. Always useful to offload the boilerplate out of the main sketch.
ReplyDeleteYou may wish to investigate the "ESP8266WiFiMulti" library alongside "ESP8266WiFi" - it allows the pre-loading of three SSID/PSK combinations and will fall back through the SSIDs until it finds one it can connect to.
Perfect, I was going to code that myself if I did not find a solution. Thanks for the tip.
DeleteApparently WiFiMulti does not like hidden SSIDs, so I have made it do one or the other way or working depending on whether one or more SSIDs set.
DeleteDo you find hidden SSIDs worth it any more? Given that if you have anything connecting to them it'll broadcast the SSID itself while looking for it, so anyone listening in can still trivially pick it up…
DeleteJust to avoid clutter on wifi list, that is all.
Delete