Maker Pro
Maker Pro

Wifi on my coffee machine

sweben

Jul 3, 2015
18
Joined
Jul 3, 2015
Messages
18
Hello!

I'm very interested in home automation, and I'd like to add WIFI to my coffee machine :) In order to minimize my chances to destroy it in the process, I'd need your help.

image_func.php

The machine

The idea

I would like to be able to press the buttons from my computer, and determine if there's an error that requires my attention on the machine.

I think the easier way (and not too invasive) would be to plug a small circuit on the ribbon going to/from the keypad/screen combo that you see on the front, that way I don't need to alter anything on the PCBs.

This little circuit would basically act as another keypad, running side to side with the original one.
I'm planning on using an esp8266 WIFI module to do the handling.
Of course, the machine needs to work in the same way as before, so the keypad needs to be still fully functional.

Where I'm at

I started testing what is going on the lines of the ribbon, here is what I found (ribbon have 16 lines):
- Three of the buttons are simply pulling the line from 5V to GND when pressed
- Two buttons share a line, which is 5V at rest, 3.5V when button1 is pressed and 2.5V when button2 is pressed.
- The last two buttons use the same principle as the ones above (tristate on the line)
- Two lines are the serial communication with the screen (not planning on using these)
- Two lines are for the screen LEDs, one to switch the red LED, one for the green. (one line/LED, 5V when ON, 0V otherwise)
- Power (5V + GND)

About the LEDs:
The screen backlight allows you to know the status of the machine easily, if it's green everything is OK, yellow (both LEDs ON) is warning and red is an error that requires user input (no water in the tank for example). By determining which LEDs are ON, my program can know the machine status.

Where I need help

So, there are three modules that needs implementation:
- Regular button (line to GND)
These should be the easy part, I was thinking about simply having a transistor (2n2222?) that would short the line to GND when activated by my MCU's GPIO.

- Multiplexed buttons (tristate on the line)
This one I have no idea, and it's the one scaring me most (I'm afraid of sending current in the wrong way, towards the keypad instead of the mainboard). I need to put the line from 5V to 3.5 or 2.5, depending on which button I want to activate.

- LED detection
Would it be enough to connect the line directly to a GPIO and read the value in software? do I need components in between to protect my MCU?

Thanks!
Benoit
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
I have a silly question. The machine needs your presence in order to refill with cofee and place the mug on the holder. What is then the point in remotely accessing it ?
 

sweben

Jul 3, 2015
18
Joined
Jul 3, 2015
Messages
18
Well, it's an automatic coffee machine that holds a fairly large amount of coffee grains, it grinds, presses, makes the coffee and dispose of the leftovers once the cycle is done.

So the only thing I need to be careful about is to always have a ready cup under the dispenser, which should not be an issue.
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Hello!

I'm very interested in home automation, and I'd like to add WIFI to my coffee machine :) In order to minimize my chances to destroy it in the process, I'd need your help.

image_func.php

The machine

The idea

I would like to be able to press the buttons from my computer, and determine if there's an error that requires my attention on the machine.

I think the easier way (and not too invasive) would be to plug a small circuit on the ribbon going to/from the keypad/screen combo that you see on the front, that way I don't need to alter anything on the PCBs.

This little circuit would basically act as another keypad, running side to side with the original one.
I'm planning on using an esp8266 WIFI module to do the handling.
Of course, the machine needs to work in the same way as before, so the keypad needs to be still fully functional.

Where I'm at

I started testing what is going on the lines of the ribbon, here is what I found (ribbon have 16 lines):
- Three of the buttons are simply pulling the line from 5V to GND when pressed
- Two buttons share a line, which is 5V at rest, 3.5V when button1 is pressed and 2.5V when button2 is pressed.
- The last two buttons use the same principle as the ones above (tristate on the line)
- Two lines are the serial communication with the screen (not planning on using these)
- Two lines are for the screen LEDs, one to switch the red LED, one for the green. (one line/LED, 5V when ON, 0V otherwise)
- Power (5V + GND)

About the LEDs:
The screen backlight allows you to know the status of the machine easily, if it's green everything is OK, yellow (both LEDs ON) is warning and red is an error that requires user input (no water in the tank for example). By determining which LEDs are ON, my program can know the machine status.

Where I need help

So, there are three modules that needs implementation:
- Regular button (line to GND)
These should be the easy part, I was thinking about simply having a transistor (2n2222?) that would short the line to GND when activated by my MCU's GPIO.

- Multiplexed buttons (tristate on the line)
This one I have no idea, and it's the one scaring me most (I'm afraid of sending current in the wrong way, towards the keypad instead of the mainboard). I need to put the line from 5V to 3.5 or 2.5, depending on which button I want to activate.

- LED detection
Would it be enough to connect the line directly to a GPIO and read the value in software? do I need components in between to protect my MCU?

Thanks!
Benoit
Sounds like the buttons use a simple voltage divider... If you can determine how they are wired there should be no need to be concerned with sending voltage into it. You may need to concern yourself with inadvertently interrupting the buttons normal operation though... So, poke and prod some more to determine a basic wire diagram for it.

Using a microcontroller and an ESP8266 will solver most of your requirements.
You just need to study your device more to make sure you can tap into the lines. Worst case, if you can't have the microcontroller and the original button on the same wire, your microcontroller will need to be a 'middleman' which will sit between the button and the coffee maker.
 

sweben

Jul 3, 2015
18
Joined
Jul 3, 2015
Messages
18
If you can determine how they are wired there should be no need to be concerned with sending voltage into it. .
I'm not really concerned about sending voltage into the buttons, it would be more about sending voltage back into the mainboard. (maybe I should be concerned about it?)
I'm not sure this is what you proposed, but now I'm considering pulling cables from the buttons directly to short them to ground with transistors, that way I don't need to worry about the circuitery between the buttons and the ribbon. Would that work? Should I take any particular care or just putting the transistor across the button pins is enough?

You may need to concern yourself with inadvertently interrupting the buttons normal operation though... So, poke and prod some more to determine a basic wire diagram for it.

I'll give it a shot.

Concerning the LEDs, can I plug the 5V line directly to my microcontroller? or do I need some protection of some sort?

EDIT: Alright, I tried putting a transistor directly between the buttons pins, and that is working fine.
EDIT2: Put a transistor on the LEDs lines, with the base on the line, I manage to turn on LEDs on my breadboard correctly like that, So I think everything is falling into place :) Now I'll start wiring everything up to my esp8266, I don't think I'll even need a microcontroller.


Cheers,
Benoit
 
Last edited:

sweben

Jul 3, 2015
18
Joined
Jul 3, 2015
Messages
18
Success!
Testing the buttons
eKpQvfq.jpg


Solder wires to each button
hqNCnDy.jpg


Connect to the ribbon that will go to the control board (pretty close to each other, but no contact :) )
Wcpotts.jpg


Testing functionnality with serial module connected to the ESP8266 (great to have the debug menu on the machine)
fcFRpSa.jpg

kprywxh.jpg



Put everything back together
iwzW4LI.jpg

xqrXk9h.jpg


The module is perfectly invisible and the machine can be operated normally with the buttons
jREQZ29.jpg


The interface on the home automation system (Domoticz) - my goal is now to merge all these elements into one.
FgvgXkF.png
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Very nice!
I'd love to see this as a detailed write-up in 'Project Logs'.

Good job.
 
Top