Quantcast

[email protected], no need of RPI and Arduino.

HomeBrewTalk.com - Beer, Wine, Mead, & Cider Brewing Discussion Community.

Help Support Homebrew Talk:

Mylo

Active Member
Joined
Sep 24, 2008
Messages
40
Reaction score
5
Location
Phoenix, AZ
Do you mean connector for external antenna? OK - ESP32 WROOM-32U

View attachment 706154

Yeah, that would probably work. Again, I am just not sure that it’s worth the additional work - just to have on/off control of the LEDs that illuminate the fridge. Actually, I was just thinking of putting a separate 8266 in the control box and running something like WLED to drive some individually addressable LED strips for illumination in the final product. Home Assistant will be able to change the colors based on certain fermentation events - assuming I can get all the BPL over via MQTT.

Sorry for the flood of questions. I just finished all 27 pages of this thread...

The Hardware Example #1 doesn’t seem to have any diodes / resistors / caps on the outputs to snub any transients when the relay coil collapses. I think that suggested relay boards for Arduinos from Amazon have opto-isolated inputs. Is that enough to prevent EMI from getting back to the 8266? Is it safe to just wire up a dumb breadboard type of proto-board without any snubbing? I use a fermwrap for a little bit of heat (if I am doing ales in the wintertime). I think they are only 15watts or something. Is that OK to run off of mechanical relays? I have some logic level shifters kicking around. Should I pass the SCA and SDL through one on the way to the LCD backpack? How about the one wire data line? I think on the BrewTroller those are fed 5v instead of 3.3v.

I see that several people like @Thorrak have created some PCBs for the Wemos Mini. Is that a better, more protected solution that would mean a more stable end product? Are any available for purchase? If protection is not needed, I can probably whip up a proto board in the next few days...

Thanks!

Mylo
 

LBussy

A Cunning Linguist
HBT Sponsor HBT Supporter
Joined
Jan 19, 2013
Messages
2,776
Reaction score
988
Location
Kansas City
Having some decoupling caps on there definitely helps. The latest boards Thorrak shared should have a couple of them on the power side where they can do some good. That said, there's a lot of people who just wire up the bare dev boards. I made the mistake of purchasing a scope for my projects recently, and then the HORRIBLE mistake of actually testing things that I thought were ok. Yeah, don't do that if you have any obsessive-compulsive tendencies. :p I have Dave to thank for my nightmares now.

Yes to the logic shifter, unless you find a 3V3 LCD. No need for a shifter on the OneWire. OneWire is pulled up with 3V3 which is safe for the ESP8266 logic. It can be powered by 3V3 or 5V safely, although my experience is that the 5V is more reliable, especially with longer leads.

No worry about the heat wrap and relay. 15W is only 0.125A or so. The relays are "rated" at 10A. Whatever they are really capable of, they seem to work fine for most refrigerators which draw much more. You can also use an SSR if that makes you sleep better at night.

I don't think anyone is selling those boards, but if you tell us where you are, someone may be close and have an extra board laying around.
 

Mylo

Active Member
Joined
Sep 24, 2008
Messages
40
Reaction score
5
Location
Phoenix, AZ
Certainly dry. Dangerously so, this year... However, I'll take a try heat any day over hot and humid.

So I see that both you and Thorrak have a "door" pin marked on your boards. I haven't dug through the source code yet - and I don't see anything about it in Vito's Wiki. My assumption is that it's just informational? Does it appear on the the graph or logs? Does it temporarily suspend cooling when the door is open? What about the chamber fan and chamber light pin types?


Mylo
 

LBussy

A Cunning Linguist
HBT Sponsor HBT Supporter
Joined
Jan 19, 2013
Messages
2,776
Reaction score
988
Location
Kansas City
So I see that both you and Thorrak have a "door" pin marked on your boards. I haven't dug through the source code yet - and I don't see anything about it in Vito's Wiki. My assumption is that it's just informational?
I *think* the original BrewPi had a means to turn the heater on when teh door was opened. The functionality there was using a 60w bulb to heat the chamber, and the same bulb for lighting it. I've never seen it work myself, and I've never looked for the code in the original controller sketch.
Does it appear on the the graph or logs?
It does have a report in teh logs. Can't say what BPL does with it. My shoddy memory is telling me I think @pocketmon may have removed door functionality.
Does it temporarily suspend cooling when the door is open?
Not natively. It may be used for something else in BPL - as I hsared privately, the boards that Thorrak and I did are specific to BrewPi Remix and Fermentrack implementations, but I understand they work with BPL.
What about the chamber fan and chamber light pin types?
Going to give a big shrug there and refer you back to the BPL experts. :)
 

Bigdaddyale

Well-Known Member
Joined
Aug 29, 2011
Messages
1,353
Reaction score
257
Location
Rowland Heights
Not natively. It may be used for something else in BPL - as I hsared privately, the boards that Thorrak and I did are specific to BrewPi Remix and Fermentrack implementations, but I understand they work with BPL.
You can run BPL on thorraks board with the proper .bin file. I have a board set up to run BPL with an OLED display
 

Lalo_uy

Well-Known Member
Joined
Jul 31, 2017
Messages
133
Reaction score
38
Location
Montevideo, Uruguay
Yes to the logic shifter, unless you find a 3V3 LCD. No need for a shifter on the OneWire. OneWire is pulled up with 3V3 which is safe for the ESP8266 logic. It can be powered by 3V3 or 5V safely, although my experience is that the 5V is more reliable, especially with longer wires.
Ther is a walk around to this, power the display with 5v and the I2C adapter with 3V3.
Just do not connect display Vcc to the adapter Vcc. Works like a charm.
 

Mylo

Active Member
Joined
Sep 24, 2008
Messages
40
Reaction score
5
Location
Phoenix, AZ
Is that the jumper found on many of these?
I'm not sure what he means here, either, as the i2C is a piggyback board. Maybe if you used a bunch of Dupont wires between the piggyback, you could break out the one pin for the LCD's Vcc and supply it separately from the 3.3 that you send to the backpack header. The jumper on the backpack turns off the backlight.

In any case, I've made some good progress modifying one of Thorraks' boards. But I have a few more details to implement. I don't mind adding the SparkFun logic shifter.


Mylo
 

BeardlessWhelp

New Member
Joined
Apr 30, 2020
Messages
4
Reaction score
0
You can use D5, D7, and D8. Use D8 for heating, I would suggest.
Or, you can try ESP32. It has more PINs available.
Ok, so I'm in the process of getting my window AC-glycol chiller/heating pad setup working. I have brewpiless built on two NodeMCU ESP8266's now. The original plan was to use one to run the glycol chiller (on beer constant mode, I think?) and one to run the pump and heating pad to control beer temp. I just saw in another thread in January 2019 you said you can run three actuators from one board — glycol chiller (AC unit), pump to cool beer, and heating pad/band to heat beer.

I've been reading all I can find through the git documentation and forum and I can't find any recently updated info on the setup for glycol. There's a lot of old information that I worry is leading me down the wrong path.

IS controlling the glycol temp AND the beer temp possible with one board? Or do I need to use one for glycol and one for beer?

If two, do I need to build both boards with EnableGlycolSupport uncommented? I know to reduce PID values to 0 and to match the fridge and beer filters — do I do this just on the glycol control board, just on the beer control board, or both?

There's also unclear info on which sensors to use for what. One sensor in the beer (assigned as beer temp), one sensor taped to the fermenter (as room temp? fridge temp?), one sensor in the glycol (as fridge temp? room temp?).

I know most people just default to using an Inkbird or something to control glycol temp, but I prefer having everything working together. If I can get this setup working properly, I'd be happy to suggest edits to the git wiki for anyone else like me trying to use this setup for glycol.
 

Mylo

Active Member
Joined
Sep 24, 2008
Messages
40
Reaction score
5
Location
Phoenix, AZ
Finally got the PlatformIO stuff setup. Starting to play around with the config options. I am not able to turn on DEBUG mode, though. When I do, I get a compilation error on line 46 of the OneWireTempSensor.cpp file: " 'class OneWire' has no member named 'pinNr' ".

Maybe the OneWire library has changed? Anybody know how to fix that one?


Mylo
 

LBussy

A Cunning Linguist
HBT Sponsor HBT Supporter
Joined
Jan 19, 2013
Messages
2,776
Reaction score
988
Location
Kansas City
I get a compilation error on line 46 of the OneWireTempSensor.cpp file: " 'class OneWire' has no member named 'pinNr' ".
This looks more like a typo or a missed config. I fight PIO on a daily basis. If you want to zip up your project directory and drop it in a PM, I'd be happy to look with you.
 

Mylo

Active Member
Joined
Sep 24, 2008
Messages
40
Reaction score
5
Location
Phoenix, AZ
Finally got the PlatformIO stuff setup. Starting to play around with the config options. I am not able to turn on DEBUG mode, though. When I do, I get a compilation error on line 46 of the OneWireTempSensor.cpp file: " 'class OneWire' has no member named 'pinNr' ".

Maybe the OneWire library has changed? Anybody know how to fix that one?


Mylo
I fixed those compliation errors, (and a broken link in the wiki). I guess I'll start submitting PRs. I still can't seem to get the debug, simulate, or emulate flags to do anything appreciable. Everything build now (with the exception of the ESP32).


Mylo
 

Mylo

Active Member
Joined
Sep 24, 2008
Messages
40
Reaction score
5
Location
Phoenix, AZ
I took some details from Thorrak and others and whipped up a through soldering variant for the people in my home-brew club with a bunch of screw terminals. Also left the RJ45 for installation versatility. Built in the recommended pull-up and pull-down resistors. Finally, broke out the terminals for the buttons. All the SMD versions are sexier and smaller, but the majority of the people in my home-brew club can't deal with them.
Screen Shot 2020-11-15 at 11.34.54 PM.png


I'm putting together an all inclusive kit that includes the LCD, buttons, Wemos D1 Mini Pro (with antenna), and all the other standoffs, screw terminals, 3 waterproof probes and the rest components necessary for about $45. Pretty much everything but the project box and outlets, since those will be very specific to your particular install.

I have 7 of the first 10 allocated already. If anyone wants a kit, shoot me a PM. Format will be PayPal pre-order, wait for the slow boat, and then I'll ship them out. Initial estimates show mid-December.


Mylo
 

LBussy

A Cunning Linguist
HBT Sponsor HBT Supporter
Joined
Jan 19, 2013
Messages
2,776
Reaction score
988
Location
Kansas City
The caps should be as close to the power/gnd as possible (like, under the controller would be ideal). What are the other resistors for, the buttons? You should be using 2K2 for the pull-up if that's what the 4K7 is.

ETA: If you "split" the power on the relay, you can power the relay with 5V and get a better pull on it. They are 5V rated relays. While tehey all seem to work with 3V3, you can definitely hear the difference in the weak "click" when using 3V3.
 
Last edited:

Mylo

Active Member
Joined
Sep 24, 2008
Messages
40
Reaction score
5
Location
Phoenix, AZ
Vito's wiki links to a doc that recommends pulling down GPIO15 and pulling up GPIO0 and the reset pin with 10k. The 4.7k is the pull-up for the OneWire data line. I've always seen that value used with the one-wire data line...? Thanks for the feedback. As far as the caps are concerned, are you saying that they should physically be closer to where the power comes into the board? I can see if I can rework that part.

EDIT: I just looked at the spec sheet for the relays. Yes, you are correct. They do have 5vdc coils. I have two more channels on the logic level shifter... Maybe I should pass the heat and cool actuator pins through it as well as the LCD i2C pins?


Mylo
 
Last edited:

Mylo

Active Member
Joined
Sep 24, 2008
Messages
40
Reaction score
5
Location
Phoenix, AZ
Ok. Just found a schematic for the relay boards. In order to benefit from the opto-isolation, you have to remove the jumper, and connect the JDVcc to 5v. So if I made that relay header 5 pins, and added a 5vdc, I can break it out at the relay board into a 4 pin and a 1 pin header...
 

Attachments

LBussy

A Cunning Linguist
HBT Sponsor HBT Supporter
Joined
Jan 19, 2013
Messages
2,776
Reaction score
988
Location
Kansas City
The 4.7k is the pull-up for the OneWire data line. I've always seen that value used with the one-wire data line...?
It's not a magic value. 4k7 is the "correct" value when pulled up with 5V. Since you are using a lower voltage data line, it would be recommended to use a stronger pull-up to get the same benefit. Some folks use 10K with decent results, although I have been seeing an awful lot of people lately (in this and other projects) getting drop-outs which are solved by stronger pull-ups and 5V sensor power (not pull up.)

As far as the caps are concerned, are you saying that they should physically be closer to where the power comes into the board?
Correct, for both 5V and the 3V3 that comes off the controller.

you have to remove the jumper, and connect the JDVcc to 5v. So if I made that relay header 5 pins, and added a 5vdc, I can break it out at the relay board into a 4 pin and a 1 pin header
Right. On my boards, I have a 4-pin and a 2-pin header for the same - to avoid confusion.
 

Mylo

Active Member
Joined
Sep 24, 2008
Messages
40
Reaction score
5
Location
Phoenix, AZ
Disregard my question about running the relay inputs through the logic shifter. I see that the pins are just sunk to ground to activate the emitter in the opto-isolator. In some of the videos available online, I see people are tying the Vcc pin (next to IN2 on the 4 pin header on the relay board) to the 5v reference on an Arduino. I think the ESP8266 are only rated for 3v3. I assume that should be plenty to operate the emitter in the opto-isolator. Maybe I should put 10k pull-ups to 3v3 on the heat and cool pins, too?

Mylo
 

LBussy

A Cunning Linguist
HBT Sponsor HBT Supporter
Joined
Jan 19, 2013
Messages
2,776
Reaction score
988
Location
Kansas City
I assume that should be plenty to operate the emitter in the opto-isolator.
Yep, works fine. Been using that for quite a few years on multiple projects.
Maybe I should put 10k pull-ups to 3v3 on the heat and cool pins, too?
No need, they have internal pull-ups and this is not a data line so much as a relay actuator.
I see people are tying the Vcc pin (next to IN2 on the 4 pin header on the relay board) to the 5v reference on an Arduino.
Same idea. Some folks using the parallel LCD screens and Arduinos experience some screen garbage. They have done all sorts of things inckuding a completely separate power supply for the relay. It's not an issue here.
 
OP
P

pocketmon

Well-Known Member
Joined
Oct 12, 2015
Messages
689
Reaction score
221
I *think* the original BrewPi had a means to turn the heater on when teh door was opened. The functionality there was using a 60w bulb to heat the chamber, and the same bulb for lighting it. I've never seen it work myself, and I've never looked for the code in the original controller sketch.

It does have a report in teh logs. Can't say what BPL does with it. My shoddy memory is telling me I think @pocketmon may have removed door functionality.

Not natively. It may be used for something else in BPL - as I hsared privately, the boards that Thorrak and I did are specific to BrewPi Remix and Fermentrack implementations, but I understand they work with BPL.

Going to give a big shrug there and refer you back to the BPL experts. :)
According to the code, when the door is opened, detected by the pin, the light, if assigned, will be turned on and an event will be logged. The log event is ignored by BPL, though. I just don't care about the door.
 
OP
P

pocketmon

Well-Known Member
Joined
Oct 12, 2015
Messages
689
Reaction score
221
Ther is a walk around to this, power the display with 5v and the I2C adapter with 3V3.
Just do not connect display Vcc to the adapter Vcc. Works like a charm.
ESP8266 is said to be 5V tolerant. I've connected my LCD to 5V power and direct to I2C pins for years, since the beginning of this project. It has been working fine so far. I might be lucky, but you might be as lucky as me.
 
OP
P

pocketmon

Well-Known Member
Joined
Oct 12, 2015
Messages
689
Reaction score
221
Ok, so I'm in the process of getting my window AC-glycol chiller/heating pad setup working. I have brewpiless built on two NodeMCU ESP8266's now. The original plan was to use one to run the glycol chiller (on beer constant mode, I think?) and one to run the pump and heating pad to control beer temp. I just saw in another thread in January 2019 you said you can run three actuators from one board — glycol chiller (AC unit), pump to cool beer, and heating pad/band to heat beer.

I've been reading all I can find through the git documentation and forum and I can't find any recently updated info on the setup for glycol. There's a lot of old information that I worry is leading me down the wrong path.

IS controlling the glycol temp AND the beer temp possible with one board? Or do I need to use one for glycol and one for beer?

If two, do I need to build both boards with EnableGlycolSupport uncommented? I know to reduce PID values to 0 and to match the fridge and beer filters — do I do this just on the glycol control board, just on the beer control board, or both?

There's also unclear info on which sensors to use for what. One sensor in the beer (assigned as beer temp), one sensor taped to the fermenter (as room temp? fridge temp?), one sensor in the glycol (as fridge temp? room temp?).

I know most people just default to using an Inkbird or something to control glycol temp, but I prefer having everything working together. If I can get this setup working properly, I'd be happy to suggest edits to the git wiki for anyone else like me trying to use this setup for glycol.
Glycol chilling is a secret function I've used for myself.
To use it, you need to assign a PIN, or actuator, to "PTC Cooler", which will used to control the relay for the glycol cooling. Then, you will find the glycol setting on "Control" page. Room sensor is used for glycol temperature.

To control glycol cooling and fermentation temperature, you will need TWO relays and TWO sensors.

Assign one sensor to beer sensor. Don't assign room sensor.
Assign the other sensor to room sensor, and place it in the glycol solution.

Assign one Pin for pump, as beer cooling or heating.
Assing the other pin for "PTC cooling", the power control of the AC.

That's what I had done for about two years, before my modified fridege died.
 

LBussy

A Cunning Linguist
HBT Sponsor HBT Supporter
Joined
Jan 19, 2013
Messages
2,776
Reaction score
988
Location
Kansas City
ESP8266 is said to be 5V tolerant. I've connected my LCD to 5V power and direct to I2C pins for years, since the beginning of this project. It has been working fine so far. I might be lucky, but you might be as lucky as me.
I have personally smoked a couple of controllers by forgetting and applying 5V pull-ups to data lines on an ESP8266 in a breadboard. I've certainly read as many Internet reports as anyone else about how they are 5V tolerant. If these are 5V tolerant, it's news to Espressif who states "Operating Voltage 2.5 V ~ 3.6 V."
 
OP
P

pocketmon

Well-Known Member
Joined
Oct 12, 2015
Messages
689
Reaction score
221
I seldom visited this forum since the mobile version died. Sorry if i missed some of your questions.

Some updated regarding BPL project.
1. Spunding control "seems" to work. Yet, I haven't built the hardware myself.
2. TILT with ESP32 seems to work. I don't have a TILT to verify, yet.
3. Humidity recording by DHT21/DHT22 is almost done, and humidity controlling is a step away. (but it's kind of boring to implement.) I am currently planning using the temperature reading as fridge temperature sensor.
 
OP
P

pocketmon

Well-Known Member
Joined
Oct 12, 2015
Messages
689
Reaction score
221
I have personally smoked a couple of controllers by forgetting and applying 5V pull-ups to data lines on an ESP8266 in a breadboard. I've certainly read as many Internet reports as anyone else about how they are 5V tolerant. If these are 5V tolerant, it's news to Espressif who states "Operating Voltage 2.5 V ~ 3.6 V."
I forget where I read it, but here is my google result:
 

Ronny Rusten

Active Member
Joined
Nov 27, 2019
Messages
40
Reaction score
4
Location
Ålesund, Norway
It's not a magic value. 4k7 is the "correct" value when pulled up with 5V. Since you are using a lower voltage data line, it would be recommended to use a stronger pull-up to get the same benefit. Some folks use 10K with decent results, although I have been seeing an awful lot of people lately (in this and other projects) getting drop-outs which are solved by stronger pull-ups and 5V sensor power (not pull up.)
Interesting. I'm experiencing some drop outs of the room temperature on my latest build. I have 3v3 on the sensors. Are you saying that this might get better with 10k pull-up? How do you calculate this anyway?
 

LBussy

A Cunning Linguist
HBT Sponsor HBT Supporter
Joined
Jan 19, 2013
Messages
2,776
Reaction score
988
Location
Kansas City
If you look at the datasheet you will see that the IDD is 1mA at 5V. Ohms law tells us that requires 5K Ohms (4K7 is "close enough.") If you drop that to 3V3, the theoretical need is 3K3 ohms. Longer leads and questionable ower mean we likely need a little more for both.

The 4K7 is a very commonly used value for 5V systems. If you factor a 4K7 by 66% (3.3 is 66% of 5,) you end up with ~3200. Common resistor values are 33, 27, 22 so any of those would work. If you have multiple sensors on a single one-wire, then leaning towards the higher side is likely safer.

To try to address your drop-outs, I would go to a stronger (lower number) resistor like the 2K2, power the sensor with 5V, and leave the pull-up voltage at 3V3. Sometimes that's confusing, so for anyone not completely following:

Data Lead: Pull-Up with a 2K2 resistor to 3V3 power
Power Lead: Power with 5V
 

Mylo

Active Member
Joined
Sep 24, 2008
Messages
40
Reaction score
5
Location
Phoenix, AZ
It's not a magic value. 4k7 is the "correct" value when pulled up with 5V. Since you are using a lower voltage data line, it would be recommended to use a stronger pull-up to get the same benefit. Some folks use 10K with decent results, although I have been seeing an awful lot of people lately (in this and other projects) getting drop-outs which are solved by stronger pull-ups and 5V sensor power (not pull up.)
Re-reading this again. I have a jumper-configurable voltage to the Dallas chips. I was planning on running them at 5v anyway. The data line is still at 3v3. I could run that through one the remaining sets of pins on the logic level shifter... better or no benefit? If it is beneficial, then I suppose I can keep the 4.7k on there - but if not I should go up to 10k?

Mylo
 

LBussy

A Cunning Linguist
HBT Sponsor HBT Supporter
Joined
Jan 19, 2013
Messages
2,776
Reaction score
988
Location
Kansas City
I was planning on running them at 5v anyway. The data line is still at 3v3. I could run that through one the remaining sets of pins on the logic level shifter... better or no benefit?
I would not change the data line, but the jumper looks to be on the supply voltage so that's good. The power requirement for the sensor is 3v - 5.5v so powering it with 5v makes sense given the inevitable voltage drop. There's no benefit to, and potential damage from using 5v on the data line pullup.

If you want to be thorough, you could sacrifice a probe to see the actual supply voltage at the end of a sensor lead.

if not I should go up to 10k?
A 10k is really "down" in terms of pull-up strength. A lower number is a stronger pull-up because it allows more power to the line. So a 4k7 is good on a 5v line (such as when using an Arduino.) I'd use a 2k2 (or 2k7 or 3k3 if that's what you have) with 3v3 on the data line. That's just some dude's opinion on the Internet though. The only way to tell for sure is to test and measure.
 

Lalo_uy

Well-Known Member
Joined
Jul 31, 2017
Messages
133
Reaction score
38
Location
Montevideo, Uruguay
I have had many problems with longer lines with many DS18B20.
The best solutions was to go down with the pullup.
Datasheet states the Vout low at 7mA, so you can go as low as 820 ohms on 3,3v
 

Ronny Rusten

Active Member
Joined
Nov 27, 2019
Messages
40
Reaction score
4
Location
Ålesund, Norway
I have had many problems with longer lines with many DS18B20.
The best solutions was to go down with the pullup.
Datasheet states the Vout low at 7mA, so you can go as low as 820 ohms on 3,3v
Sorry, probably a stupid question, but... What is considered long for a sensor line? 2 meters? 5 meters?
 

Lalo_uy

Well-Known Member
Joined
Jul 31, 2017
Messages
133
Reaction score
38
Location
Montevideo, Uruguay
Sorry, probably a stupid question, but... What is considered long for a sensor line? 2 meters? 5 meters?
I have 4 fermenters in the basement, so there is a 15m line to the first sensor connector , and 2 m between the next and so on. Eache sensor has a 1m o 1.5m line to the line connector.
The brewing sensor are next to the controller.
 

day_trippr

"Feeling much better now, thanks"
Joined
May 31, 2011
Messages
33,845
Reaction score
15,088
Location
Stow, MA
~22 meters to the furthest sensor and using a bit of treed topology is a lot of capacitance on the shared data line.
I'd go with a low resistance value pull-up resistor to help with rising edges...

Cheers!
 
Top