Thanks, chairstacker! That would be a good way to notify what’s going on.
I’ve made some progress on this today. I successfully got the Sonoff 4ch Pro wired into the winch correctly to drop the winch. However, I have not found out how to wire another channel to raise the winch. Below is a diagram of the winch button. Wired R1-NO into #5 and R1-COM into #4 dropped the winch. In fairness, I did not get very much time to try any additional wiring combinations, so I’m sure I’ll get it.
The winch has a separate wire that comes out of the winch box (not the yellow controller) that plugs into the wall. So, I don’t think I’m actually dealing with live wires here. I forgot to test it. (Of course, I’m unplugging the winch at all times that I’m playing with wiring.)
I’ve followed the advice of Dr ZZs and Vicious to flash the Sonoff. I have not gotten HA to recognize it yet. But still trying.
It’s a 3 position switch. The left side and the right side can be thought of as separate switches. The middle connection connects to either the top or the bottom depending on which way the switch is pressed.
Pins 5, 1 and 2 are all looped together to the red wire, which presumably is the live wire. So pin 5, 1 and 2 are all the same connection. You have wired pins 4 and 2 (2 indirectly via the wiring loop to pin5 as they are the same) to the sonoff.
The brown wire (pin3) is connected to the red (via 1 and 5) whenever the switch is on in either direction. So basically the left side has been converted into a normal switch, just on and off.
From what I can see, you have wired your sonoff to pin 4 and 5, which could be changed to pin 2 and 5 and still function exactly the same and to reverse it I would wire pin 6 and 4 to the other sonoff relay.
But I can’t quite see where the black wire behind on the right side goes. Does it come in from the top and connect to pin6?
I tried wiring pin 6 & 4 and it didn’t work. I’m wondering if I need to connect 3 or 4 wires for it to reverse? The white thing is a capacitator. Model CBB60.
The only wiring schematic I’ve been at to find is the same one that nickrout posted above. I don’t know enough about wiring to know what any of that means. I do know that the switch is only connecting 4 wires at any one time. And, as RichEO pointed out, 1, 2, & 5 are looped together in the wires. When the switch is in one position it connects 3, 4, 5, & 6. In the other position, it connects 1, 2, 3, & 4. I’m fairly sure that 3&4 are always connected.
The winch is 15Amp and I have it on a 15Amp circuit currently. I think it can draw 15Amps when under heavy load, but I will never have it under a heavy enough load to see anything over 10Amps.
I got the winch at harbor freight, but I can’t find it on their website. This one on Amazon is basically the same one.
I’ve considered wiring the Sonoff the same, but it would require 4 channels and switching 2 channels at once. I’d prefer to find a way to do it with just 2 channels so the buttons on the sonoff can be used to run the winch manually.
I’ll add a post to the forum you linked to and see if I can get a response.
You probably need all 4 channels to make it work. But you can still program the buttons to activate multiple relays simultaneously with ESPeasy, which btw is the forum letscontrolit linked to above.
Startup current draw is likely to be quite high, a meter might help. If you are going over 10A, or there is a danger of doing so, you could add external heavy duty relays.
The guy on that forum said he needed three channels.
I didn’t know that about espeasy, but it is good to know.
I left the guy on Amazon a reply, hopefully I hear something.
I found out the winch is rated at 11.4 amps. I don’t think I’ll ever tax the motor enough to see that kind of load, but it would be safer to use high rated relays. I’ve never played with 110V relays. Do you have any recommendations for what to use? Would something like this work?
Harvest starts in two weeks, so I’m going to at least get something built that will drop the dyer (unspool the winch) which I’ve already figured out how to do. I may need to wait until the spring to figure the rest out.
I’m excited to say that I got the wiring figured out! Since I know there will be literally tens of people in the future that will also attempt to wire a Sonoff 4ch to a Harbor Freight (Pittsburgh) winch, here are the schematics.
First, a layout of the switch with the terminals numbered (I changed the numbers from what I had on post 21 to reflect what was written on the switch)
Wiring to Sonoff 4ch Note that plugs 1, 3, & 6 are the same circuit and interchangeable
R1 Com = 3
R1 NO = 2
R2 Com = 5
R2 NO = 4
R3 Com = 5
R3 NO = 6
R1 + R3 = Winch Out
R1 + R2 = Winch In
The white wire (5) is line in and the red wire (6) is neutral. If you need power for the sonoff you can get it there.
It seems like R1 is some kind of brake and should be turned on 1st, so set it first in the automation or put a small delay after it. If I had R2 on then pressed R1 the winch did not move, almost like a brake was holding it.
I plan to work on this throughout the week and hope to have it installed in two weeks. I bought an Economy Box to build all the wiring in and mount to the grain bin. I’ll also mount the winch rocker switch on the door so we can manually run the winch as well as put two LED lights on it. A green light to show the automation is on and an amber light to show the bin is dumping grain. Both lights will be controlled by a 2nd Sonoff 4ch and HA.
I’m now working on detecting AC Mains power so I know when the dryer shuts off. I built an Opto-isolated sensor using this guide but I couldn’t get it to work accurately with HA. While researching how the GPIO pins work it seems like they are just sensing 3.3v, right? So, in HA, if pin 5 sees 3.3V it says it is “on” and if it sees 0v it says “off”. Am I thinking about that correctly?
If that’s the case, could I just get a 3.3v power supply like this, plug it into the same circuit as the dryer then plug the ground from the power supply into GPIO ground and the 3.3v positive to a GPIO port? Then, when the dryer is on (and the light is on) HA would see 3.3V on GPIO pin 5. And when the dryer and light turn off it would see 0V. Is that correct and would that work?
Yes that is exactly what I said before, i think that’s the easiest way to monitor on/off for your situation.
Which GPIO are you referring to? Your raspberry pi? You could use the pi but I would connect it to a sonoff’s GPIO with ESPeasy firmware then you can put the sonoff and the 3.3v power supply somewhere near the light and not worry about it. You would just monitor the voltage on the GPIO by setting up a switch device inside ESPeasy
I ended up getting the opto-coupler to work. The wiring for the circuit I need to monitor is a couple feet from where I’ll mount my Rasberry Pi, so I’ll use the GPIO pins on the Pi.
I have all the hardware figured out. Now I’m just finalizing scripts, automations, and notifications!
That would be illogical. In normal electrical wiring, the white wire is the neutral. Why don’t you draw a schematic showing the wires from the cable and the switch connections? Specifically, where is the red wire connected?