Smart Ice Maker

Upgrade your ice maker with smart features using an ESP8266. Automate its operation, and get notifications for refilling the water tank. Enjoy cold drinks whenever you need them.

image

More details, Arduino code, and a bill of materials can be found in our blog Smart Ice Maker

1 Like

Hi

I have a similar Ice maker, why have you got a 100Ohm resistor between Red and digital pin? what are the voltages of each of the signal wires?

After reverse-engineering the original PCB, I discovered that the resistor is the key difference in enabling the toggle between SMALL/LARGE and ON/OFF. Without this resistor, you won’t be able to switch between ON/OFF modes.

Hey there, I love this idea and project and I’m trying to implement it as is. Would like to thank you for sharing the details and code.

I am having issues with it and I’m currently stuck. Was hoping you could point me in the direction.


Some info:

Different ice machine, but looks like the same control panels schematically. Probably just a remodeled chinese ice machine.

Control panel has 5 leds, 2 buttons, 1 resistor, 6 cables.

The wiring harness (6 wires) is color coded the same as the article also.


Issue:

I can’t seem to be able to power on or off the ice machine using the wemos d1 mini.

I am able to turn it on / off if my wire (the one attached to the red one in the harness + 100 resistor touches ground for a second. But not via the d1 mini.

I see in the console publish off (meaning that state is set to off) and it receives the ‘ON’ command via mqtt. Everything seems to match what is in the if statement. Yet nothing. Quite frankly, I’m not sure I understand why we’re doing that with the code and how I’m able to trigger the on/off via the steps above.

I’ve tried different combinations, to no avail.

I’d appreciate some guidance! :slight_smile:

Thanks

Great project and a most welcome addition to our kitchen! In addition to not being able to turn it on / off via the d1 mini as Orion333, a couple of other quirks:

  1. My Wemos D1 mini will not boot with the green wire attached to the D4 (GPIO2) pin. After boot the wire can be attached to the D4 pin without a problem. Have added a switch to the rear casing temporarily, but would like to have a cleaner self-contained solution.

  2. The sensors state for Empty fluctuates between 1110 (Empty) and 0101 (On) and 0100 (not assigned). This causes multiple notifications to be sent until the machine is refilled with water and returns to a steady On state. This is not going down well with the wife. Possible work around is automating an input boolean that is reset by turning the power button off. A steady “Empty” state would be preferable.

Any help improving this project would be greatly appreciated. Summer is coming and Daddy needs his ice, but can’t seem to figure this out. Thanks and good job!

Reverse engineering this machine without having it physically present and a multimeter at hand would be challenging. The codes you’re observing are simply the high and low readings from the connector’s ports. If a particular GPIO port is causing boot issues, a straightforward solution is to use a different port and adjust the corresponding GPIO settings in the code. This should fix the issue.

Thanks Freddie. By the way, have the exact same ice maker as you.

Swapping the D4 (GPIO2) wire (green) to D2 (GPIO4) pin solved the boot issue. D4 (GPIO2) is HIGH at boot and boot fails if pulled LOW. While I was at it and to be on the safe side, I swapped the D8 (GPIO15) wire (blue) to D1 (GPIO5) pin, as boot fails if it is pulled HIGH. No more boot issues.

Orion333 seems to indicate that D6 (GPIO12) wire (red) needs to be pulled to ground momentarily to toggle it on / off. I too don’t understand how get that to work. Would be great if someone has an idea.

Great project and am enjoying the ice!

Just a quick thought: The state for “Off” only lasts very briefly after pushing the On/Off button on the panel before being overwritten to “On” by fluctuating sensors values 0101 (On) and 0100 (not assigned) (see my point 2 above about the “Empty” state). It would seem that it is not possible to put the ice maker into the “Off” state (not making ice) or the “On” state (making ice) remotely via the firmware. Even if it is physically in the “Off” state (not making ice), the D1 mini will report the state as “On”.

My particular ice maker has a similar PCB to yours, but has one extra ice size LED, making it hard to detect when the water is empty.

Pins 4, 5, 6 in the image below are all on when either the water or ice M LEDs are on. How can I detect which of the 2 LEDs is actually on?

@fleeman I’m hoping you can help me :pray:

Connect each non-ground wire to a GPIO pin on your microcontroller. Concat the high (1) and low (0) signals to form a unique code representing each status. Any combination of signals, except all being low (OFF), indicates the system is ON.

By examining the Arduino source code, you can likely modify it to include additional signals, providing more detailed information about the device status.

I have connected wires 2,3,4,5,6 to the GPIO of my ESP. Wire 1 is connected through the resistor to another GPIO and is working fine. Wire 7 is connected to ground.

With this setup, I’m having the problem I originally described where the same combination of high-low signals are being detected when either the water LED or ice M LED is lit. They aren’t ever lit together, it’s either/or, but I’m unable to tell when the water is low if my ice size is set to M, since the same high signal is seen on wires 4,5,6 in both cases.

It looks like the polarity between wires 4 and 6 is being reversed to turn on the S and M LEDs independently, since the PCB layout suggests that both LEDs would light simultaneously, but in fact they never do. The polarity of the diodes themselves must be opposite each other for this configuration to work. I think this is causing my issue here, as I can’t figure out how to detect the LED states using this LED driving approach.

I managed to make this work by using an optocoupler (PC817) and some resistors, with wires 5 and 6 in my image above connected to the opto inputs, then connecting the output to the GPIO. Here’s a schematic of the relevant part: