• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

BrewPi@ESP8266, no need of RPI and Arduino.

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
The relays claim they have 5 volt coils so you need to hook the DC+ to +5VDC, the DC- to GND, and the IN1 and IN2 to your cool/heat or heat/cool GPIO, whichever way you go, making sure the relay outputs go to the corresponding actors. That dual relay module is still using opto-couplers on the control inputs, and they typically will work fine using the 3.3V GPIO pins provided on ESP controllers...

Cheers!
 
It would be very odd if there were not a rudimentary schematic on the listing.

Dave’s note is what I would try - but there are jumpers there too.
 
Didn't actually notice the jumpers before but it appears they may set the GPIO operating polarity.

Typically these relay modules use "low asserted" GPIO inputs to cause the relays to select their NO outputs, but it's possible the jumpers can enable either low or high assertion levels. Of course, that's a bit of cruft, because one can simply swap the relay output connections from the NO to NC pins instead of fiddling with input polarity 🤷‍♂️

Cheers!
 
Thank you for this, I did connect the GPIO pins D5 and D7 to the IN1 and IN2.
Also connected 5V + supply to DC+ and -ve / gnd of 5V supply to DC-.
With the gnd tied / common to the D1 and to the relay DC-.

With the jumper on HI and com when powered up both lights for relay red come on after a few seconds and the other hi volt side is live.
Changing control settings in brewpiless has no effect.
Swapping the jumper to lo and com the lights don't come on spontaneously and don't get affected by the brewpiless setting.

The D1 webpage and interactions to it are as before.
 
Make up a wire jumper so you can put 3.3V or GND on either of the input pins and use that to see how the channels behave.
Also, do you have a link to where you purchased that relay module?

Cheers!
 
That helps.
- "High and Low Level Trigger Relay Control" confirms my expectation wrt those S1 & S2 jumpers.
- 5ma input "trigger current" shouldn't be an issue for an ESP GPIO.
- the only thing lacking is a spec for the opto-couplers used to determine what the input thresholds actually are...

Cheers!
 
The GPIO pins are 3.3 V and touching either of the wires ( D5 or D7 ) to the IN1 or IN2 causes the light to come on the relay to work with jumpers on low and Com.
 
Okay put it all back together, as my original wiring and as suggested by @day_trippr .
Moved the jumpers onto hi and common.
Relays went straight on both of them.

I then went into the menu and in devices could see all the sensors and the heater and cooler.
So deleted eeprom, refreshed and reinstalled the devices. Swapped the pins from inverted to not inverted and low and behold just doing this turned the relays off.

Then all appeared to be working fine, power to the heat socket when needed. But then no heating although the socked that the heat belt plugged into was working with another device. Then I tested the cable to the heat belt and found a failure in it.
I've cut out the bad bit of cable, rejoined it and now it's all working.
Now I'm wondering if the esp8266 development board I had before had broken or if it was this heat belt having an intermittent problem.
I'll now need to test the old board and relay to see if they work together
 
Testing with BrewPiLess, as it seems to be one of the projects that is still actively developed and I have a couple of questions.

I intend to use a floating hydrometer for temperature measurements and control. I have a Tilt, but the BPL docs make it sound like Tilt is not recommended. Is an iSpindel a better option?

Second question - Beyond the screen support, is there any difference between BPL and BPLGX? Is one going to be deprecated over the other?

Thanks all!
 
Testing with BrewPiLess, as it seems to be one of the projects that is still actively developed and I have a couple of questions.

I intend to use a floating hydrometer for temperature measurements and control. I have a Tilt, but the BPL docs make it sound like Tilt is not recommended. Is an iSpindel a better option?

Second question - Beyond the screen support, is there any difference between BPL and BPLGX? Is one going to be deprecated over the other?

Thanks all!

1. ESP8266 doesn't have bluetooth capability, and only ESP32 works with Tilt. I don't have a Tilt, and I used iPhone to simulate Tilt while testing. It is difficult, if not possible, to test things that I don't have or don't use. By the way, after breaking three iSpindel, I am using a Pill over bluetooth now.

2. The cores of BPL and BPLGx are basically the same, except that BPLGx requires ESP32. However, having another GitHub resposity is easier instead of using a lot of #ifdef's. Having different repositories means they are different projects.

I don't think are many features to be added to these two projects. In fact, there are already too much for me to handle. People are still using classic/original BrewPi@Arduino that was developed like a decade ago, and they are happy. Just pick one that fits your need. If you don't already have a device, my recommendation is an ESP32S3 device, like WT32 SC01+.
 
Back again with another question or two.

Which GPIO pins do i connect a DHT22 humidity sensor to?
Also wanting to connect a heat pad via a relay ( planning to use the same pin as for my brewing setup)
Temp Sensor as per the brewing setup or is there a temp sensor in the humidity sensor?
I have a humidifier that requires 5 V, can this be run and controlled off the 5v outputs of the esp 32 or should I wire it into the relay?


I've got one of these expansion boards for the ESP 32 and wonder how it may change the way I do the wiring.

https://www.cytron.io/p-nodemcu-esp32-with-expansion-board

Can i use the jumper to set the V pins to 3.3v but the pins at the bottom left for anything needing 5V?
 
Okay think I've answered most of my questions.
I set the jumper on the expansion board so that the Voltage is 3.3 for the pins.
I have a DHT11 humidity and temp sensor ( not a DHT22 ). I connected this to pin 19, in devices I assigned this as Slot 2 and chamber humidity sensor then option to choose humidity sensor type occurred. I left it on DHT11 as that was autodetected. Then applied and refreshed devices, now further chamber heater temp sensor appeared. Selected chamber temp and slot 4 for this. Then applied and refreshed.
Strangely now have a further humidity sensor on pin 19 and slot 6 with a humidity reading of 255%. This doesn't affect the humidity sensor reading from the " first " humidity sensor on pin 19. I can't seem to get rid of it.
Heating works fine off the relay. The relay is powered off the 5 V pins on the expansion board.
The humidifier has 5 V from the expansion board going to COM1 on the relay, out of NO1 it goes to the humidifier positive, ground from the humidifier goes to G on the 5 V part of the expansion board.
This doesn't work when the control for humidity is set to a higher level than the measured value and applied.
The humidifier does get powered if I set the device to non inverted but no control through the relay possible. I will try it with com1 and NC1 and see if that changes behaviour.
Heater is on Pin 26 and humidifier on pin 27.

I have a 1.3 OLED but need to adjust this
" To use SSD1306, add -DOLED_LCD=true to build_flags " how do I find where this is to adjust it please. Display scrambled at present, I have installed the latest OLED compatible firmware.

Final task to set up a fan which should be a piece of cake!

Thanks for any advice and hope this helps someone. Plan is to use this for a mushroom fruiting chamber.
 
Seems the second relay on the board to control the humidifier is broken. It only works if set to not inverted and then it's just continuously on. So placing order for a new 2 way relay.

Still not sorted out why the OLED not working correctly.
 
Some updates.
Both channels working fine on relay now ( so possibly a loose wiring error ).
OLED I used platformio on VSC and made a mistake by loading the zip of all of brewpiless and had multiple failures when trying to build and upload.
Then realised I needed to use the zip for the brewpiless 4.4 oled and edit the build_flags.

Still no success the OLED continued with corrupted display.

Then I found out that the larger display ( 1.3 inch ) was not the 1306 but the other option an 1106. Adding the correct option
to build_flags -DOLED_LCD=true -DBREWPI_OLED_SH1106=true

then the display works fine.

The relay does turn the 5V supply to the humidifier on and off.


Fitted all into a small case, just need to wait for the next stage of mushroom development.
 
Hi!
I have this "interruptions", is there a solution for that? Not that I can't live with it. :D
screenshot-1140.jpg
 
@DuncB Don't you mean the pullup resistor for the DS18B20 ?

I found that using a 4k7 pullup resistor was not reliable at 3.3 volts,dropping this value to 2k2 resolved all issues.
 
@DaveS
Sorry meant pull up resistor.

The trace seems very regular for that blue lines " wiggles ".

I suppose if the software is up to date then it's a hardware issue that has developed.

Anything in the log untoward?
 
B stands for "Beer constant" function and fridge temp is positioned - in the fridge od the right side which has a fan inside for more even hot and cold air distribution.

Today I had almost 6 hours of "interruption" but temperatures are OK.

screenshot-1141.jpg
 
Because there isn't one. Outside temperature is above 20 these days...
 
For some reason, I lost communication with BPL, something strange happened and I don't know what. This is what I get.
screenshot-1143.jpg



And 1-2 minutes later this
screenshot-1145.jpg


And zero communication over the local network. Screenshots above are from ddns.net site.
Internet works just fine for all other devices.

Is there a way to reflash it to some older or more stable version?


EDIT: it seems that everything works after reflashing with Brewflasher. Will see in the future.

EDIT 2: everything is just fine, few hours later.
 
Last edited:
I sometimes get this problem of no data and turning the brewpiless off and then back on again it works fine.
Something to do with the interaction with the network I'm pretty sure. Although I'm not savvy enough to work this out.
 
The most important thing is that, after reflashing, everything works just fine.
 
Unfortunately, it's me again. Now I have another issue with my BPL controller. A lot of restarts (I presume) and a lot of "10 minutes waiting to cool" situations...
Is there any solution for this or I have to switch to something else? Maybe there is more stable version out there?
screenshot-1151.jpg
screenshot-134.png
screenshot-135.png
 
Last edited:
Yes I noticed this with one of the versions.
I think there is an advanced or expert checkbox in one of the options.
That has all kinds of settings to adjust and I expect that interval can be adjusted.
I've noticed it for waiting to heat as well.
It might be a fridge compressor protection feature, but doesn't apply for heating.
I can have a look when I get home in a few hours to find the option I mention.
 
For now, it seems that something is related to logging. After I turned of and deleted log, everything is fine for almost 20 minutes...

EDIT: nope, still the same... :confused:
 
Last edited:
For now, it seems that something is related to logging. After I turned of and deleted log, everything is fine for almost 20 minutes...

EDIT: nope, still the same... :confused:

1. make sure your power supply is large enough. greater than 2A is recommended.
2. make sure your WiFi signal is reasonable. Constantly searching for networks seems to cause troubles all the time.
3. re-wire your temperature sensor connections. Or, rewire your power supply.
4. Format the file system. It might help if your controller has run for a while, like a year or two, and the file system has fragmentation.
 
How to do number 4, I'm not sure so it's better to ask?
I've changed power supply, it's maybe little bit better now bot still restarting.

But, something new happened a moment ago, when I tried to check what is going on, I saw that I lost all graph curves. After refreshing, curves came back and BPL started to count idle time from the beginning like it was reset somehow.

One more question, what about "write on buffer full" option in log settings? Is it better to use it or not?
screenshot-1152.jpg
 
Last edited:
How to do number 4, I'm not sure so it's better to ask?
I've changed power supply, it's maybe little bit better now bot still restarting.

But, something new happened a moment ago, when I tried to check what is going on, I saw that I lost all graph curves. After refreshing, curves came back and BPL started to count idle time from the beginning like it was reset somehow.

One more question, what about "write on buffer full" option in log settings? Is it better to use it or not?

To format the file system, access
http://[IP of your controller]:8008/exeformat-spiffs

although it's LittleFS instead of SPIFFS.

If "write on buffer full" is enabled, the log is stored in buffer, which is in RAM, and written to FLASH only when the buffer is full. It usually takes a few hours before the buffer is filled. If the controller is rest before the log is saved, the log data will be lost. I had found that frequent writing resulted in heavy system loading which might be a sign of fragmentation of file system. However, the file system, LittleFS, seems to improve over versions. It seems to work fine with this DISABLED.
 
@pocketmon, thank you, I will try that later today and let you know the result.

This is my little bit more than 4 hours log from earlier today. Something is not right here. :D

screenshot-1153.jpg
screenshot-1154.jpg
screenshot-1155.jpg

Unfortunately, no changes after cables check, Internet check, PS change and file system format...
Will try to flash it again, I can't see nothing further...
 
Last edited:
OK, I really give up now.

Could someone recommend me a new board so I can start from the beginning?
ESP32, the old one again, something else?

Thank you in advance.
 
Back
Top