Brewpi help - relay won't open?

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk:

specialkayme

Well-Known Member
Joined
Jul 26, 2015
Messages
430
Reaction score
164
Location
Central North Carolina
I'm hoping someone can help me get my Brewpi remix working.

I got all the hardware listed here: https://www.brewpiremix.com/brewpi-hardware/
I wired everything according to this: https://www.homebrewtalk.com/attach...wpi-fermentation-controller-cheap-arduino.gif
I then installed the software from here: https://www.brewpiremix.com/brewpi-remix-install/
It took me a little while to rework some of the settings for the temp sensors, but I eventually got everything working. I checked it out, everything was working great for a week.

Last week I woke up and the brewpi was saying the temp of the beer dropped 20 degrees below where it should be. When I checked the brewpi, one of the wires going from the "hot" electricity into the relay that controls the heater fell out (I guess I didn't screw it in tight enough). I screwed it back in, but now there's no power on either the heat outlet or the fridge outlet. As far as I can tell, the relay isn't opening anymore.

I fiddled around as much as I could with the brewpi software, but couldn't get it to work. I uninstalled the software and tried to reinstall it. Still didn't work. Figuring the relay must have gone bad, I ordered a new relay and plugged it in yesterday. It still won't work. Brewpi runs, sensors are fine, but relays won't open. The brewpi says it should be heating, but no power is going to the outlets on the outside of the relays (the wires are sensing hot going into the relays, just not going out). I tried doing a complete unstall and a complete reinstall, and still no go.

When I go into the brewpi to the maintenance panel, in the tab marked Reprogram Arduino, I'll try uploading a hex file and programming the arduino, and it just says "Programming ... keep an eye on the output below to see the progress." The black box below it just says:
2019-12-02 05:57:11 Starting BrewPi.

Then nothing else.

Not much of a programmer, and not sure how to fix this. Also not sure why it was working before, but now won't. Can anyone help me?
 

day_trippr

"This Space For Rent"
Joined
May 31, 2011
Messages
38,192
Reaction score
21,231
Location
Stow, MA
When you set up your Devices, note that relay modules almost always require "low active" signaling. Meaning, when BrewPi wants to turn on the Fridge, it sends a "low" signal to its side of the relay board; similarly, when BrewPi wants to turn on the Heater, it sends a "low" signal to that side of the relay board.

To make that all work, you have to set up both of those Devices as "inverted":


brewpi_config.jpg



If you've already done that, something else is wrong. Follow up here and we'll work through it...

Cheers!
 

day_trippr

"This Space For Rent"
Joined
May 31, 2011
Messages
38,192
Reaction score
21,231
Location
Stow, MA
Ok, a bunch of questions:

- is the script running and all of your devices (probes and relays) installed via Device manager?
- do you have the relay module connected to 5V, GND, and GPIO 5 & 6 (for Cooling and Heating, respectively)?
- if your relay module has a 3 pin header with the pins labeled something like "JPVCC - VCC - GND" either stick a 2-pin jumper cap on the JPVCC to VCC pins or run a wire from JPVCC to RPi 5VDC.
- does your relay board have a pair of LEDs (typically red) one per each channel?
- at this time is BrewPi calling for either Heating or Cooling?
- if either, is the corresponding relay board LED lit?
- if not, double-check your wiring. If you've set both relay channels to Inverted and BrewPi is calling for action, there should be an LED lit.

Backing up: if BrewPi isn't calling for either Heating or Cooling:
- go into Device Manager, and change the Cooling pin type setting to "not inverted".
That should immediately light up the LED for the Cooling relay channel. If not, check your wiring.
- repeat for the Heating channel, make sure the LED for the Heating relay channel lights. If not, again, check your wiring.

For each case, if the LED lights the corresponding load should turn on. If not, check your AC wiring through the corresponding relay. You should have 120VAC hot on the Common relay pin and the switched wire to the load on the Normally Open ("NO") pin.

Check back once you've sorted through the above...

Cheers!
 
OP
OP
specialkayme

specialkayme

Well-Known Member
Joined
Jul 26, 2015
Messages
430
Reaction score
164
Location
Central North Carolina
- is the script running and all of your devices (probes and relays) installed via Device manager?

Yes.

- do you have the relay module connected to 5V, GND, and GPIO 5 & 6 (for Cooling and Heating, respectively)?

Yes.

- if your relay module has a 3 pin header with the pins labeled something like "JPVCC - VCC - GND" either stick a 2-pin jumper cap on the JPVCC to VCC pins or run a wire from JPVCC to RPi 5VDC.

I believe the relay module came with the jumper. It's a blue thing wrapped over the JDVCC to VCC pins.

- does your relay board have a pair of LEDs (typically red) one per each channel?

Yes.

- at this time is BrewPi calling for either Heating or Cooling?

It was calling for heat 20 min ago. It's Idling now.

- if either, is the corresponding relay board LED lit?

When it was calling for heat, no LED was lit.

- if not, double-check your wiring. If you've set both relay channels to Inverted and BrewPi is calling for action, there should be an LED lit.

Double checked the wiring, can't find anything that's wrong.

Backing up: if BrewPi isn't calling for either Heating or Cooling:
- go into Device Manager, and change the Cooling pin type setting to "not inverted".
That should immediately light up the LED for the Cooling relay channel. If not, check your wiring.

While idling, when switched to "not inverted" both heat and cool came on. LED was lit as well.

- repeat for the Heating channel, make sure the LED for the Heating relay channel lights. If not, again, check your wiring.

For each case, if the LED lights the corresponding load should turn on. If not, check your AC wiring through the corresponding relay. You should have 120VAC hot on the Common relay pin and the switched wire to the load on the Normally Open ("NO") pin.

I'm not sure what you mean here. The LED light isn't coming on when the brewpi is calling for either heat or cool. The center screw on each side of the relay when connected to the neutral registers 120V power.
 

day_trippr

"This Space For Rent"
Joined
May 31, 2011
Messages
38,192
Reaction score
21,231
Location
Stow, MA
Ok, so you've pretty much checked out everything from the Arduino to the relays.
Only thing unclear is what happened here:

While idling, when switched to "not inverted" both heat and cool came on. LED was lit as well.

- Did the fridge come on with its LED?
- Did the heater come on with its LED?

If they did then it appears everything from the two GPIO inputs through the relays including the AC paths is checked out.

So, only thing left: why isn't BrewPi calling for either Cooling or Heating?
I mean, have you literally never seen it go into either Cooling mode or Heating mode since you reinstalled everything?

Cheers!
 
OP
OP
specialkayme

specialkayme

Well-Known Member
Joined
Jul 26, 2015
Messages
430
Reaction score
164
Location
Central North Carolina
- Did the fridge come on with its LED?

Sorry for the confusion. Yes. When I switched the cooling to "not inverted" the LED on one side lit on and the power started flowing to the freezer outlet.

- Did the heater come on with its LED?

Same as with the freezer outlet. When I switched the heat to "not inverted" the LED on the other side lit on and the power started flowing to the heat outlet.

So, only thing left: why isn't BrewPi calling for either Cooling or Heating?
I mean, have you literally never seen it go into either Cooling mode or Heating mode since you reinstalled everything?

The interface says that it's calling for heat. The LCD in the top left corner will say that the heat is on. But no power is flowing to the heat outlet, and no LEDs are lit on the relay.

I have not seen either the heat or the cooling (we haven't needed any though, it's in the 30's-60's here the past few weeks) physically come on since last week when everything went crazy and I reinstalled everything. I've gotten the Brewpi to call for cooling and heating by adjusting the temp setting, but I haven't been able to get power to flow from the relay to the outlet (other than marking it as "not inverted" as you showed me yesterday). I don't understand why either. The hot wire from the wall to the relay fell out (I'm assuming, I didn't see it fall out of course). I stuck it back in, and it's never worked since. I didn't change any wiring on anything between two weeks ago when it was working and today (other than replacing the relay, thinking it's faulty, but even then I replicated the wiring to the new relay exactly the same as the last one).

Would pictures help? It sure doesn't look pretty, but I'm not sure what else to do. Does the Arduino need to be reprogrammed or something? I know I flashed the Arduino the last time I did a full install, so I'm assuming not.
 

day_trippr

"This Space For Rent"
Joined
May 31, 2011
Messages
38,192
Reaction score
21,231
Location
Stow, MA
You have already eliminated the relay board and the AC feed through it as issues by toggling the gpio inversion and having the actors (cooler and heater) turn on and off.
And by virtue of using the BrewPi Device manager gui to invert the gpios, that covers a lot of Arduino territory as well: those gui commands were processed by the Uno correctly so it says most of its functionality is working and you have your GPIO connections correct.

So, here's a specific test: With both GPIO 5 & 6 set to "inverted" via the BrewPi Device manager gui (ie: their normal setting), if you lower the temperature set point right now to where BrewPi indicates Cooling mode, and then you check your relay board LEDs, do either of them light?

If not, I suggest re-flashing the UNO - and clearing its eeprom - and trying this all again...

Cheers!
 
OP
OP
specialkayme

specialkayme

Well-Known Member
Joined
Jul 26, 2015
Messages
430
Reaction score
164
Location
Central North Carolina
So, here's a specific test: With both GPIO 5 & 6 set to "inverted" via the BrewPi Device manager gui (ie: their normal setting), if you lower the temperature set point right now to where BrewPi indicates Cooling mode, and then you check your relay board LEDs, do either of them light?

I'll try again when I get home tonight, but when I tried last week with the old relay, or earlier this week with the new relay, dropping the temp to trigger the cooling mode made the LCD indicate cooling was active, but no LED would ignite on the relay, and power wouldn't be flowing.

But I'll confirm it's still the case tonight and report back.

If not, I suggest re-flashing the UNO - and clearing its eeprom - and trying this all again...

How is that done?
 

day_trippr

"This Space For Rent"
Joined
May 31, 2011
Messages
38,192
Reaction score
21,231
Location
Stow, MA
In the BrewPi Maintenance Panel under Advanced Settings, scroll the lower Control Constants panel to the very bottom...

Cheers!
 
OP
OP
specialkayme

specialkayme

Well-Known Member
Joined
Jul 26, 2015
Messages
430
Reaction score
164
Location
Central North Carolina
So I think I figured it out. Under installed devices, there are 6 available spots. Two are temp probes, and four are open. One should be assigned to the heater, and one to the freezer. Two slots ended up getting assigned to the heater. I guess I accidentally assigned it twice, but didn't notice because I didn't scroll down that far.

I only found out by pushing the Brewpi to move to cooling. The LED never lit for the heater, but did for the cooling. Confused, I reviewed the installed devices, seeing if I switched the heater and cooling spots if it would change things. That's when I noticed two "heaters" assigned. Apparently the Brewpi would send a signal to "heat" and would activate both "heaters". I assume one would turn the heater on, and the other would immediately turn it off.

I corrected it, and now it appears to be operating correctly. I'll continue to monitor for the next day or so.

Thank you so much @day_trippr for walking me through this!
 

day_trippr

"This Space For Rent"
Joined
May 31, 2011
Messages
38,192
Reaction score
21,231
Location
Stow, MA
lol! In all the years I've been running and tutoring BrewPi that's the first time I've heard of that.
I guess I assumed the gui wouldn't allow that conflict to be created, but there you are.

I'm not sure how that revelation squares with the debugging I thought we were doing as the whole Cooling side (relay board LED and the compressor) would seem to have been offline the whole time, but I'm not going to worry about that, and just be happy you're squared away :)

Cheers!
 
Top