2019-04-17

Upgrading my Marsden M-125 scales to WiFi

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...


5 comments:

  1. That's a nice little framework you've created. Always useful to offload the boilerplate out of the main sketch.

    You 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.

    ReplyDelete
    Replies
    1. Perfect, I was going to code that myself if I did not find a solution. Thanks for the tip.

      Delete
    2. Apparently 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.

      Delete
    3. Do 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…

      Delete
    4. Just to avoid clutter on wifi list, that is all.

      Delete

Comments are moderated purely to filter out obvious spam, but it means they may not show immediately.

Hot tubbing...

I have a hot tub, it came with the house over 3 years ago. Managing a hot tub is complicated, and expensive. The expensive part is the power...