Powering on/off Commercial coffee machine via home assistant

#1

I have a 2 group commercial coffee machine that operates at 220/240v 50Hz 20Amps.

I would like to be able to power the machine up and down using Home Assistant/Voice Control (say interfaced with Alexa). It takes approx 30 mins to preheat machine before you can expect a quality coffee.

I’d like to use an Arduino to control a relay (of a recommended type) to perform this switching function. The Arduino would need to be able to communicate over wifi with HA to understand the required switching operations.

Any suggestions as to the best approach would be gratefully received

#2

I’d say go with a Sonoff or something similar.

These only switch the mains on and off to the coffee machine so if your machine doesn’t require extra interactions to function, you’re good to go.

#3

The Sonoff would be a great option except that it is limited to 10 apps. To switch a 20 amp load, it will require a more robust relay or probably even better, a contactor. That takes this project more into the industrial world. There are lots of relays available that will work. I am at work and dont have the chance at the moment to look for suitable ones but will do so when I get home. The question in this is what to use for the HA and Alexa integration. I am not in that part of the automation learning curve yet so I am not sure what device to couple with the relay. Will see what I can come up with…

#4

Thank you.

I have quite as few Sonoffs and they would do well but was aware of the amperage limitation.

Getting the safe relay/switching option is what I’m stuck with at the moment - I can work out the automation to start up the machine 30 mins before alarm goes off or to start it up when up for a good cup of this coffee without having to physically go down stairs.

Always impressed with the collective knowledge of this group!

Kind regards
Geoff

#5

I was cruising around Ali Express looking at options and there are LOTS of them but this one looks pretty promising -
25a SSR

Also, if you wanted to simplify the automation and not have to do the coding for Arduino, I would use one of the Sonoff LV safe voltage units that runs off low voltage instead of mains as your trigger. You can connect the relays to your power cord for the coffee maker, then connect a 12v wall wart to the Sonoff. The Sonoff output will be 12v so that would be the coil voltage for the relays. It takes 2-25A relays (to cut both legs of the mains power) and a Sonoff LV. The Sonoff with Tasmota will integrate into HA. It can also be automated with Node Red and MQTT.

#6

That has me thinking… when I get home tonight i am going to take a standard Sonoff Basic and see what it takes to make it a LV model. Would probably take a little soldering to bypass the mains power regulation so that you could feed the thing 12v and have the 8266 in it get 3.3v. Hmmmm

Me thinks I have another thing to tweak! :thinking::crazy_face:

#7

Waiting with baited breath!

:+1::+1::clap::clap::point_down::point_down:

#8

That took longer than I figured it would but I think I sorted it out. There is a wiring schematic for the Sonoff Basic online HERE and I used that for reference. There are a couple routes you could go:

You CAN remove the rectifier, disconnect the transformer leads from the input to the low voltage side of the board and solder in a bridge. You could feed the board 5v and it would work just as before but with a 5v output. I took some video of my board and can create a tutorial of sorts on how to modify it (I so hate what the word ‘hack’ has become :unamused: ), if that is of interest to anyone. I have a Basic I wouldn’t mind trashing for the cause…

OR>>> and I really suggest this route…

You SHOULD just buy a Sonoff SV board. They are around $7 (US price onAliExpress) and they would allow you to supply it with 12v wall wart and have 12v output from the Sonoff to trigger the coils on the mains voltage relays I suggested previously. They can actually be supplied from 5-24v and still do their job. The pic is below…


AND

#9

After doing some digging, it looks like the SSR’s I listed above require a stupid large heat sink because they are solid state. You need to go with a more conventional SSR setup. The hitch in using these is that they are required to be connected to a heat sink of some sort. They are usually bolted on to a metal control cabinet panel or onto an aluminum plate in the machine they are controlling. So this would be a better option for you but you need to put them on a heat sink plate. If your coffee machine is on a metal cabinet, its a pretty easy install. If not, then you need to figure out how to dissipate some heat.
THESE

The other option is an industrial “contactor” which is just a relay in sheeps clothing. These don’t create the heat BUT they usually have 24-36v coils so a wall wart is out of the question.
THESE

#10

@Hardergm The amperage situation didn’t even cross my mind. I’m glad you and @Guru_Of_Nothing have your thinking caps on straight :slight_smile:

1 Like
#11

Thank you for all the thought you have placed into this so far. To give you an dear if the nachine, here is a similar picture

.

Whilst is has a metal chassis, that you may be able to attach a heat sink, I was aiming to have any switching/smarts external to the machine so that I wanted to change it over or to otherwise replace it, I just needed to plug in the new machine and plumb the water components etc.

Seems every time a solution is within reach there is a “gotcha” in the wings - like the bigger coils needed. I really do appreciate the effort and thinking that generates from this group.

#12

A Solid State Relay is how I’ve controlled my 15Amp wall shaker for the last 6 or 7 years. Inside is a 5 volt power supply to drive an ESP8266 (Wemos D1 Mini), a 12 volt power supply to drive the SSR and a small relay to switch the 12volt supply on and off. I did try a small DC - AC SSR, chained with an AC-AC SSR early on, failing to realise you actually need a reasonable load before an SSR will bias itself on. I also used to run the SSR straight off the 3.3volts of the D1, but that’s technically only just in spec and eventually it stopped triggering it.

Here’s a shot of the built device. I’ve got some build pics somewhere.

1 Like
#13

Exactly! It isn’t a complicated device really. The “gotcha” in this is the amperage. If it were slightly less, a Sonoff alone would do it. But the amperage requires a much more robust device for the power switching and that kinda goes outside of the average DIY or techy automation project. Not a lot though. It just needs a little more ooomph to get it done. An SSR like @techman83 is showing is the answer, but it requires a heat sink of some sort. A ‘contactor’ doesn’t. Either way, the job is easily accomplished but takes a little amount of jiggering to accomplish. BTW… you can get away with doing only one SSR. I just prefer to cut power to both legs of a 240 circuit. Not totally necessary though. The contactor option does that by default as it is a 3 pole relay in which both legs go through it by design. So that only requires 1 anyway.

The “controller” can be an ESP of some flavor with some code or it could be a Sonoff SV allowing you to use only one power supply at 12 volts. But again, it is a simple and not expensive endeavor. Just ‘some assembly required’! And none of it has to be attached directly to the coffee machine and doesn’t need you to modify an outlet. Just build your module, cut the cord, wire it inline and plug the cord back in. Or, do like shown above and wire it all with it’s own outlet to plug the coffee maker into and it is effectively a power strip with one outlet.

I started building the video on modifying a Sonoff Basic to turn it into a kind-of-Sonoff SV. It was a challenge I had to rise to :upside_down_face:

1 Like
#14

If I were to build it now a SonOFF with a 240v contactor would be high on my option list to tackle it. sick it all in a sealed box with a plug going in and a socket going out. No need to mess with multiple power supplies, relays and anything that requires a heat sink to ensure it doesn’t overheat.

The one pictured is not something I’d install inside a house. It’s out in my locked shed, up out of reach of any young inquisitive hands and the shed is not anywhere near the house if it decided to let out the magic smoke in a spectacular way.

1 Like
#15

I agree. The SSR path is far sketchier than the contactor route.

HOLD ON JUST ONE DANGED MINUTE!!!
I just realized I had a brain fart!!! Use a Sonoff Basic and just get a contactor with an AC coil!!! How in the heck did I miss that? They make them with 120 and 240 volt coils. Sheesk, I have low voltage on the brain. Feed your Basic as usual, use the output power to run the contactor. Easy!

Ha! Another gotcha defeated.

3 Likes
#16

That was what I was implying :wink: Though I could have been far clearer :smile: (almost time for another coffee I think!)

1 Like