0

Is there a way to read the values from a standard digital scale via raspberry pi ?

what I'm trying to do is, to get my kettle to work via raspberry pi. My however I need to come up with a way to check if the kettle has water or not. Depending on the water level, I'll be making the switch on or off.

For the switch, I'm planing to get a tp link smart plug (HS110),

I'm thinking to have a kitchen scale and leave the kettle on top of it. If I can get the weight readings I can then decide what is the next step.

So, my questions are,

1 - Is this possible (reading values from a standard digital scale) 2 - If there a better way to do this (coz this scale idea sounds bit stupid ;))

cheers,

closed as too broad by Milliways, joan, Ghanima Apr 28 '18 at 12:19

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What is "a standard digital scale" ? Mine just display on a LCD. – Milliways Apr 27 '18 at 12:42
  • any connection can be a switch. I would bend some conductive wire and provide enough resistance to the kettle to match your liquid weight requirements. Resistance could be provided by springs, more wire, foam etc. But then I do not have a spare digital scale unit – rob Apr 27 '18 at 14:01
  • Obviously, I don't know what kind of kettle you have, but mine is an el-cheapo that was supplied with the flat :) But here's the thing: If I turn the kettle on, and there's no water in it, then it shuts itself off right away. I'm sure this behavior must be required in the code for such appliances. Anyway, that being the case, perhaps you could simplify things, and just turn it on? If that doesn't excite, perhaps monitor the current your kettle is drawing, and if it goes to zero immediately after turning the switch on, then call your FillKettleWithWater library to deal with it :) – Seamus Apr 27 '18 at 17:45
  • There is likely no such thing as a "standard" kitchen scale (and if there were a few I guess this would apply). To have this answerable the questions should be narrowed down to specific components. – Ghanima Apr 28 '18 at 12:22
1

Weighing water doesn't sound like the "right way" somehow. I noticed after posting my comment, that you're using something called the HS110. I looked it up, and it says you can "Analyze a device’s real-time and historical power consumption." Without knowing precisely what that means, I feel reasonably certain that you could do something like this pseudo-code:

turn kettle on with HS110 

read power consumption from HS110

set timer

wait 10 seconds

read power consumption from HS110 (again) 

if power consumption "near" zero, then: 
   turn kettle off, and 
   send an alert to refill kettle with water 

Again, this depends upon your kettle having the built-in, universal protective feature that my "el-cheapo" kettle has; that is, the kettle turns itself off if there's no water in it. But of course, that's easy to check . :)

  • thanks @Seamus, I had a look and it seems like my kettle has that heat cut off option, I have a Breville. So, I decided to go ahead with adding hs110 and see how it goes. :) – sameera207 Apr 29 '18 at 8:00
  • Great! Will look forward to hearing how this turned out in a follow-up post :) – Seamus Apr 29 '18 at 21:47
  • hey @Seamus, UPDATE: so , I got the hs110 and got this github.com/adumont/tplink-cloud-api library to work with (also it has direct Alexa integration via their Kasa app). So the process now is, I'm filling the kettle , put the kettle on and plug it in, and via Alexa, make the plug switch on. Plan is to extend the setup to check the energy consumption and send me a message once its done :) – sameera207 May 5 '18 at 22:23
  • Sounds like you're on your way! :) – Seamus May 8 '18 at 1:09
1

A not so stupid idea is to use a cheap HX711 based break out module from eBay, AdaFruit, or Sparkfun.

HX711 24-Bit Analog-to-Digital Converter (ADC) for Weigh Scales

http://www.datasheetcafe.com/hx711-datasheet-converter/

file:///C:/Users/user/Downloads/HX711-Avia%20semiconductor.pdf

https://media.digikey.com/pdf/data%20sheets/sparkfun%20pdfs/load_cell_amp_hx711_hookupguide.pdf

You can also get a 1kg to 5kg load cell, kit from AliBaBa or TaoBao.

(search keywords = 压力传感器, 压力传感器套装, 称重传感器, 电子秤模块)

https://item.taobao.com/item.htm?spm=a230r.1.14.26.426250fdjwVh77&id=564420062717&ns=1&abbucket=14#detail

https://shop33817767.world.taobao.com/search.htm?userId=&shopId=33817767&view_type=&order_type=&spm=0&search=y&keyword=%D1%B9%C1%A6%B4%AB%B8%D0%C6%F7

The most interesting is the Alibaba's USD20, made in Shenzhen Robotlinking AE064:

Newest DIY 5kg Precision Jewelry Electronic Scale Suite With HX711 + 1602 IIC + Uno R3 + Dupont cables

https://www.alibaba.com/product-detail/Newest-DIY-5kg-Precision-Jewelry-Electronic_60670179666.html?s=p


Perhaps you can connect all three together: HX711, HS110, and Alexa!

TP-Link Kasa Smart Wi-Fi Plug with Energy Monitoring HS110 (USD30)

https://www.tp-link.com/us/products/details/cat-5516_HS110.html

Kasa app smartphone, Scheduling (automatically power on off) , Energy Monitoring (real-time and historical power consumption report), Amazon Alexa or Google Assistant compatible

Not the answer you're looking for? Browse other questions tagged or ask your own question.