How to make a weight sensor that turns off a pump at a very precise weight?

Hi everybody! I'm building a coffee maker, well trying to at least, and one of my goals is to have it be that that placing your cup on a sensor pad will read the weight of the cup and then activate a pump to pour in the appropriate amount of coffee to top it off. My thought was that the user would set up a profile when they set up the coffee maker so it knows how much their cup weighs, and this would be stored on a small inboard computer like the raspberry-pi, then placing the cup on the weight sensor would measure the weight of the cup and run a simple equation to determine how much coffee is needed and how long to run the pump to dispense that amount. Unfortunately i'm really new to all of this and at a loss for where to start with programming the raspberry-pi and how to connect it to a pump or a weight sensor, any advise or tips on where I can learn some of these skills would be appreciated! Thanks!

sort by: active | newest | oldest
rickharris24 days ago

This may be hard to do your way involving fairly complex electronic or software systems to deal with all eventualities.

Normally in process control you try to minimise the options so they are easily controlled.

Weight may not denote volume.

Height may not be = to volume either it depends on the shape. Tall & Thin or Tall and wide.

You could do this mechanically as in the diagram. (click for full size)

You could use a light sensor, proximity sensor, contact sensor to detect the liquid is at the top of the cup.

To drive things with the PI your going to need an interface board that can handle the load of the pump. Look around the Pi has a number of shields.

Draw up a flow diagram of your system. This will help enormously with writing the programme.

START SMALL - Test out principles before you start building, that way you understand how the parts all work. DON@T start by trying to build the entire thing you will spend a lot of time redesigning things.

https://www.instructables.com/id/Starting-programm...

https://www.instructables.com/id/Reading-Sensors-W...

https://www.instructables.com/id/Lets-Program-a-PI...

spring weigh.jpg
Guy8 (author)  rickharris24 days ago

Thanks for the advice! I've read about the Arduino platform also, I figure my two main problems will be temperature regulation and pouring the correct amount of coffee. For temperature regulation my idea was to use a 10k thermistor connected to the arduino that would turn on the heating element at a certain temperature and then stop power from flowing at a certain temperature. My worry is that the heating element would draw too much power and would fry the whole board, is there a way to prevent that?

rickharris Guy822 days ago

IF your going to control high current device you need to get hold of a relay shield. The relays act as a switch.

You also need to be able to programme the thing, As I have alreadt said start SMALL practice and build skills.

iceng22 days ago

All of the good automatic coffee makers use the strategy of 3 fixed volume ie time duration BIG MEDium SMAll Cups with an overflow catcher. These timed flows allow different size and weight cups..This strategy also allows froth milk to be p preloaded in a cup to add coffey later...

Why not use a capacitive sensor to check the water level from the outside?
Keeps weight out of the problem and brings it back to normal and easy to handle stuff ;)

Oh, and use standardised cups for everyone ;)