Connect with us

Wifi on my coffee machine

Discussion in 'Radio and Wireless' started by sweben, Jul 3, 2015.

Scroll to continue with content
  1. sweben

    sweben

    18
    15
    Jul 3, 2015
    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.

    [​IMG]
    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
     
  2. HellasTechn

    HellasTechn

    1,523
    212
    Apr 14, 2013
    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 ?
     
  3. sweben

    sweben

    18
    15
    Jul 3, 2015
    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.
     
  4. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    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.
     
  5. sweben

    sweben

    18
    15
    Jul 3, 2015
    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?

    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: Jul 4, 2015
    Gryd3 likes this.
  6. sweben

    sweben

    18
    15
    Jul 3, 2015
    Success!
    Testing the buttons
    [​IMG]

    Solder wires to each button
    [​IMG]

    Connect to the ribbon that will go to the control board (pretty close to each other, but no contact :) )
    [​IMG]

    Testing functionnality with serial module connected to the ESP8266 (great to have the debug menu on the machine)
    [​IMG]
    [​IMG]


    Put everything back together
    [​IMG]
    [​IMG]

    The module is perfectly invisible and the machine can be operated normally with the buttons
    [​IMG]

    The interface on the home automation system (Domoticz) - my goal is now to merge all these elements into one.
    [​IMG]
     
    Gryd3 and Supercap2F like this.
  7. Gryd3

    Gryd3

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

    Good job.
     
  8. sweben

    sweben

    18
    15
    Jul 3, 2015
    Gryd3 likes this.
  9. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-