BruControl: Brewery control & automation software

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

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

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Is it possible to hook a thermometer up to ESP-32 and send its info to BC through wireless?

Our cold storage is going to be at opposite end of brewery where BC panel will reside. I'm thinking this may be better than a 70' cord for thermometer? Tho, I prefer a cord for simplicity...

I also never completely eliminated these in my setup at the brewpub. Sometimes when my walk in cooler or furnace blower kicked on in the basement, I see spikes in the rtd values upstairs. I also found I could only ground the shields of my rtd cables at one end. When I had the shield connected at both the kettle and the panel I would get a lot of reading anomalies when the heating elements were switched on and off.
Ok, thanks for the tip.

Are you seeing the spikes on the RTDs closest to the load?
 
Is it possible to hook a thermometer up to ESP-32 and send its info to BC through wireless?

Our cold storage is going to be at opposite end of brewery where BC panel will reside. I'm thinking this may be better than a 70' cord for thermometer? Tho, I prefer a cord for simplicity...


Ok, thanks for the tip.

Are you seeing the spikes on the RTDs closest to the load?

Yes, the ESP32 can be an interface over wifi. You just add a new interface and use network instead of serial.
 
All interfaces support 1-wire, RTD, and thermistor. They support analog sensors like the LM's but nobody uses those really.

1-wire and thermistor don’t require the amplifier like the RTD does correct?
 
No amplifier, just a 4.7k pull up resistor (to 3.3V for the ESP32). I have several of these ESP32 1-wire combinations running. Mine are all wired on GPIO5, but you can use other GPIOs now as well. Super simple and flexible.
 
Updated the FW to v45F for the ESP8266 and 85 on the site. Don't want you to think we are slow to respond.

Please report results!
I tried the v45F on a new TH10 just now, it has a ESP8266EX chip , and I can get it to flash, but no response to network setup. I can flash v43 and get to network setup, and set it up, and it is on the network but BC1.1 doesn't like staying connected to it.
v45B - flash, cannot get to network setup using any version of tool
v45C - flash, cannot get to network setup using any version of tool
 
1-wire and thermistor don’t require the amplifier like the RTD does correct?

1-wire is great if 1 degree is all you need... RTD is great if you want to be accurate to a tenth of a degree.. here is a chart with a comparison of probes in similar locations, but not exactly next to each other... all on the same little ESP32 NodeMCU.. notice how much smoother the blue line of the RTD is...
upload_2020-1-4_9-47-0.png
 

Attachments

  • upload_2020-1-4_9-45-21.png
    upload_2020-1-4_9-45-21.png
    93.8 KB · Views: 91
@clearwaterbrewer, I've run several water brews since replacing the three CCS PT-100s that I originally built my rig with. I used stubby little Auber probes mounted in a ½" NPT housing. The thing I did differently is that I ran the leads directly into my enclosure, and made sure that they don't run parallel to high voltage cables anywhere. I also didn't shorten the leads, but coiled the excess out of the way.

Since doing that, I've not had a single EMI spike with pump or element starts/stops. The leads aren't even shielded.
 
@clearwaterbrewer, I've run several water brews since replacing the three CCS PT-100s that I originally built my rig with. I used stubby little Auber probes mounted in a ½" NPT housing. The thing I did differently is that I ran the leads directly into my enclosure, and made sure that they don't run parallel to high voltage cables anywhere. I also didn't shorten the leads, but coiled the excess out of the way.

Since doing that, I've not had a single EMI spike with pump or element starts/stops. The leads aren't even shielded.
The fact that your leads arent sheilded might be helping you based off my experience. if I ground my shielding at both ends its spike city.

I will try moving the wiring for my rtds to not be run with my power cables, but honestly my spikes these days after adding the diodes on the contactor coils and snubbers, and removing the ground to one end of my rtd cables, are not coming from the elements or pumps turning on or off but rather other larger appliances elswhere in the building like our electric convection oven in the kitchen and our furnace blower and cooler compressors... Those are powered off a different electrical sub panel in some cases and even on a different floor. These are the random spikes along with the occasional spikes I sometimes get when only turning on my HLT elements. I do not get them with my BK or Rims.

Dont Get me wrong here this is a minor issue and not a problem with my fermenter panel since I use thermistors there. I'm still running an old version of brucontrol and am very happy with its performance. I am just pointing out my experience here to share in hopes folks like myself with this can get to the bottom of the cause and stop it some day. Im very thankful For the support Brundog is providing as well as others here in the community.
 
Last edited:
1-wire is great if 1 degree is all you need... RTD is great if you want to be accurate to a tenth of a degree.. here is a chart with a comparison of probes in similar locations, but not exactly next to each other... all on the same little ESP32 NodeMCU.. notice how much smoother the blue line of the RTD is...
View attachment 660201

To add to this, the biggest advantage IMO of the ds18b20 is no calibration needed. They are spec'ed out of the box to be accurate within +\- 0.5c in the range of -10 c to 85c.
 
My spikes are caused by power surges most likely, although things are getting better since they found a loose connection on the transformer on the pole... I was wondering why I was getting phase imbalance errors on VFD's, and those seem to have stopped... still waiting on my meter to be replaced outside(not sure if 'Fat Error' on the display means 'fatal' or 'file allocation table').

I still have some issues when powering off the MKII pumps that are on a different interface (SonOff Dual). The temps surge to -410 degrees F or so... No HV cables anywhere near the RTD cables, ESP32 is in a plastic box and only has a usb cable going to it for power thinking a small capacitor on the 5v of the ESP32, this would help the ESP32 and MAX and SPI bus in my opinion... The USB power supply for the ESP32 is plugged into the same outlet as the SonOff Dual, so think that is the path of the surge... I could get the feather esp32 and a LiPo battery, but we are talking $30 vs $5... for the board, and after 3-4 boards, it adds up..

I am not completely confident we have verified if it is an analog or digital problem... Is it the analog signal from the probe to the RTD amp that is getting the spike or is it something on the SPI bus? I am sure there are thoughts, I lean towards the SPI bus, since it affects all RTD's at the same time and nearly equally, not just the one connected to the same fermenter as the MKII, but until there is some pretty hard evidence to one or the other, we are kind of stabbing in the dark..
 
To add to this, the biggest advantage IMO of the ds18b20 is no calibration needed. They are spec'ed out of the box to be accurate within +\- 0.5c in the range of -10 c to 85c.

I will say that you will do yourself a HUGE favor if you buy 2-3x the qty of DS18B20's you think you will ever need need then use a breadboard and sort them from highest to lowest and mark them in order, with tape or something.. I do this and when I make a 1-wire cable with 2-8 DS18B20's on it, I put them in order and sharpie the code, so that I can program BC with that index.
 
I will say that you will do yourself a HUGE favor if you buy 2-3x the qty of DS18B20's you think you will ever need need then use a breadboard and sort them from highest to lowest and mark them in order, with tape or something.. I do this and when I make a 1-wire cable with 2-8 DS18B20's on it, I put them in order and sharpie the code, so that I can program BC with that index.

Yeah, I have done this. They are so cheap, I bought 10 when I need 4 for now.

Also, you can buy a cheap lipo board module to convert the ESP32 to battery of you want. Would prob cost like 2 dollars shipped. eBay or AliExpress has plenty.

Are your DC and mkii ac gnded together? Have you tried bypass caps on the DC power?
 
My experience with the RTD amplifier boards is similar to @clearwaterbrewer in the fact that I suspect SPI bus or general chip power issues can also cause these spikes. I built a panel to use 4 amplifier boards and soldered up some headers on a perf board to mount the amplifier boards. I also had a local LCD display on this panel. When I powered all the 5V components from the mega's onboard LDO I would get similar temp spikes when I enabled and wrote to the display. I got similar spikes when one of my fridges would turn on/off in the garage. I changed the power for the amplifiers to a separate 5V supply and that fixed the LCD issue, but not the fridge spikes.

My main brew panel that is also mounted in my garage does not have any of these issues, but I use thermistors in that panel. I have found that as long as you use a 1% or better 10K reference resistor and some caps for filtering that thermistors are accurate within their 1% specification without having to individually calibrate each sensor/circuit. The biggest ***** is calculating the steinheart coefficients, but I found a small script in the interwebs that will calculate those for you from the resistance/temp table in the thermistor's datasheet.
 
I haven't used RTDs at all, but are they all 1% accurate without calibration?

If so, I don't see the reason to use that over the 1-wire (at least for slow applications). By default they start up into 12-bit mode with a resolution of 0.0625% and an absolute accuracy of 0.5%.

It seems to me, if I didn't care about speed there isn't much reason to deal with the hassle of the RTDs given I'll have to calibrate stuff anyway to get down to <1% anyway. If I needed more speed though, then RTDs are where it is at.
 
I haven't used RTDs at all, but are they all 1% accurate without calibration?

If so, I don't see the reason to use that over the 1-wire (at least for slow applications). By default they start up into 12-bit mode with a resolution of 0.0625% and an absolute accuracy of 0.5%.

It seems to me, if I didn't care about speed there isn't much reason to deal with the hassle of the RTDs given I'll have to calibrate stuff anyway to get down to <1% anyway. If I needed more speed though, then RTDs are where it is at.

For the ds18b20 1wire temp sensor the 12 bit resolution is 0.0625 C step size and the accuracy is +/- 0.5C.
 
My bad on v45F... it loads and works on the TH10, I should have read my own post from back in September and realized you had to flash and program using native power of the TH10, and just use gnd/tx/rx to the CH340... doh...

and it reads the thermometer! (but the combo thermo/hydro for the Th10 no workey, but that is very low priority...)
 
For the ds18b20 1wire temp sensor the 12 bit resolution is 0.0625 C step size and the accuracy is +/- 0.5C.

for F, that is .13 degrees, so you really do not get good 0.1 degree accuracy... for things like mash temp and a PID, the RTD works much better... for things like cooling water, ambient, etc... and you have a bunch in one location, the one wire shines... I use both and will continue to do so... now if we could get the tilt hydrometer folks to make that thing read in more than whole degrees!
 
for F, that is .13 degrees, so you really do not get good 0.1 degree accuracy... for things like mash temp and a PID, the RTD works much better... for things like cooling water, ambient, etc... and you have a bunch in one location, the one wire shines... I use both and will continue to do so... now if we could get the tilt hydrometer folks to make that thing read in more than whole degrees!

For 1-wire, your sensor readings will be within 1F of the actual temperature at the probe location (if mash temp at that spot is 150F, you will read between 149.1-150.9F. out of the box). Now, regardless what probe you are using, move the location by 6 inches and you have a different temp. For most set-ups, your mash temp will vary by a couple degrees just due to stratification/eddy currents, so if you are using only one probe its "wrong" anyway (even with recirculation). You should empirically determine your settings for your system using multiple thermometers and comparing that to your end results. Also, for a PID on a liquid heating system (RIMS/HERMS/BK) the 1 reading per second rate of the 1wire sensor is going to be fine due to the slow changing system and slow PID. The 0.1F resolution should also be fine due to the inherent errors within the total system. For example, if you are using duty cycle to switch an SSR, you do not have 255 steps of the PID output, you are limited by your AC cycle 60hz because of the zero cross switching.

That said, there is no wrong answer here. Its up to the end user to determine what is necessary for their personal goals. That is what makes this hobby so great.
 
I haven't used RTDs at all, but are they all 1% accurate without calibration?

If so, I don't see the reason to use that over the 1-wire (at least for slow applications). By default they start up into 12-bit mode with a resolution of 0.0625% and an absolute accuracy of 0.5%.

It seems to me, if I didn't care about speed there isn't much reason to deal with the hassle of the RTDs given I'll have to calibrate stuff anyway to get down to <1% anyway. If I needed more speed though, then RTDs are where it is at.

I thought 1-wire is more susceptible to EMI? I have really long runs of wire, I’m looking for the best wire for long runs. I don’t really need the speed for fermenting. Maybe on the hot side
 
If you have really long runs, the best thing would be 4-20mA loops. Something like this would give you the PT100 functionality but also the long range / EMI robustness of a 4-20ma current loop system.

https://www.amazon.com/Temperature-Transmitter-Integrated-Resistance-Thermocouple/dp/B07NNVDCZM/ref=sr_1_1_sspa?crid=1132ZNXF55HLO&keywords=4-20ma+temperature+sensor&qid=1578166280&sprefix=4-20ma+temper,aps,145&sr=8-1-spons&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUExUUszUTg3REo4M1cmZW5jcnlwdGVkSWQ9QTA0Mjc2MzUzTzdOM1lIWUhOMEc4JmVuY3J5cHRlZEFkSWQ9QTAxMDk5ODgzT0lORUFRVDMyUDEmd2lkZ2V0TmFtZT1zcF9hdGYmYWN0aW9uPWNsaWNrUmVkaXJlY3QmZG9Ob3RMb2dDbGljaz10cnVl&th=1&tag=forumyield-20

That said, if the network reaches there you could put a WiFi micro with a 1-wire for each thermal reading for almost the same price.

All of my stuff is within 20 feet, so it isn't a problem for me at all.
 
Last edited:
Feature request: I know at one time you said you had the x y axis for any element. That would be nice again and also a property to fix that location, locked or unlocked workspace. I keep having elements move by accident, especially when I have the Script window up. It happens on a regular basis.
 
I thought 1-wire is more susceptible to EMI? I have really long runs of wire, I’m looking for the best wire for long runs. I don’t really need the speed for fermenting. Maybe on the hot side
I had some issues with Probes and EMI.

Some Standard things regarding Temp Probe wiring:

Connections to a minimum. One long contentious shielded twisted pair cable if possible.
Use Metal Conduit in EMI Enviroment.
Do Not share the "Ground Wire" of the Probe between Probes except at the Board. Home Run all three wires on a 3 wire sensor.
Use Metal Boxes.
Try different Grounding Options. It is easy to create a ground loop. (My conduit, shield and Boxes are NOT connected to ground)
Avoid Solder Joints if possible.
Make sure any unavoidable solder joins are done well.

Do not run next to house wiring. 4 foot min if parallel run. If you cross any house wiring, do so at 90 degrees. Try to avoid running near any power wires.

While 22 awg is adequate, I once read some robotics blog that 18 awg twisted pairs should be the minimum size used.

These are some general considerations and the longer the run, probably more important.


I am not an Electrical engineer or expert, just rules I have come up with after tracing the issue on the internet and blogs.
 
1-wire is great if 1 degree is all you need... RTD is great if you want to be accurate to a tenth of a degree.. here is a chart with a comparison of probes in similar locations, but not exactly next to each other... all on the same little ESP32 NodeMCU.. notice how much smoother the blue line of the RTD is...
View attachment 660201

I think we are seeing that RTD is not (yet) that accurate depending on the implementation. I also wouldn't sweat smoothness... that is a function of a lot of things line insulation, noise, averaging, etc.

BC has 1-wire resolution at 11 bits... there is a tradeoff between resolution/accuracy and reporting time. This is indeed the issue with 1-wire - the protocol is slow and being a single line bus, can be prone to noise.
 
Feature request: I know at one time you said you had the x y axis for any element. That would be nice again and also a property to fix that location, locked or unlocked workspace. I keep having elements move by accident, especially when I have the Script window up. It happens on a regular basis.

Elements move by accident? This should not happen? Is this a touch screen issue?
 
Elements move by accident? This should not happen? Is this a touch screen issue?

I have had this happen when the workspace is unlocked and the elements are small, like a button. I'll try to press the button and instead "grab" the I icon and drag it, or grab the resize corner and shrink/grow it. I've never had that on large things but it happens frequently on small buttons. This is through a touch screen, I've never seen it happen with a mouse.
 
Dagum 8266! Will take a look.

Sorry guys... its impossible to check every function on every port for every micro-controller everytime we make changes.
Brundog can not do it all.

One of the strengths of BruControl that it can use multiple boards, some with unique characteristics such as the ESP 32 for a Tilt Hydrometer Bluetooth link.

But that is also a weakness when writing firmware. It is very easy to overlook something that could break a board. It is also very time consuming for Brundog and his core beta testers to do it.

I would suggest that some of the more experienced users who have specific interests in certain boards step up and offer to beta test any firmware updates.

I do not think I am qualified to be a "beta tester" for firmware because I do not know enough about boards. In fact, I do not even understand some of the lingo relating to boards. I could do the UI however because I like to see what is under the hood and how to use a program. I was a beta tester for Windows years ago and know that it is a chore, but also brings satisfaction if you find an error and it is fixed before the firmware is released.

I used to write some software and I had a few beta testers. Their rewards was to give input for further plans on process. That does not prevent any user from asking for a feature, just that a "beta tester" might move up the priority for being helpful.

I would suggest that any users who would like to be a beta tester contact Brundog.

As a minimum, you should know that:
1. A firmware may "break" a system so know how to restore a previous firmware.
2. Test the firmware quickly and be able to provide feedback to any issues.
3. Check out all features of a Board.
Example: An ESP 32 has the Tilt capability in addition to In/Outs/ and Probes. You would need to make sure all pins/ports worked. You might even want to write a special firmware testing configuration and scripts to be a beta tester.
4. Test any new features for a board.
 
Elements move by accident? This should not happen? Is this a touch screen issue?
I do not think so. I have a touch screen but rarely touch it except when the workspace is locked. It seems to be an issue when I have the script window open as you cannot move an element into the script window area. I enlarge the window and that maybe part of the issue as when I am moving the mouse, it may inadvertently grab and element. It will move the element outside of the Script Window area. It happens about 90% of the time when I am working on scripts.
 
While 22 awg is adequate, I once read some robotics blog that 18 awg twisted pairs should be the minimum size used.

With my day job hat on (electrical systems on superyachts), the smallest allowable wire size for carrying power is 16AWG, and the smallest for data/signaling is 18AWG.

FWIW, I've also seen some cables that are multiple individually shielded pairs of 18AWG conductors encased in a single jacket. I believe the description would be something like "4PAIR X .75MM IS + OAS" to describe a cable with an outer core, an overall shield ("OAS"), and four pairs of .75mm2 (roughly 18AWG) conductors with each pair individually shielded ("IS").

Please note that at no point did I suggest, infer, or otherwise aver that those cables' price per foot is anywhere approaching cheap.
 
I do not think so. I have a touch screen but rarely touch it except when the workspace is locked. It seems to be an issue when I have the script window open as you cannot move an element into the script window area. I enlarge the window and that maybe part of the issue as when I am moving the mouse, it may inadvertently grab and element. It will move the element outside of the Script Window area. It happens about 90% of the time when I am working on scripts.

I do see an issue where if the script window is closed, you move an element down, then re-open the script window, then vertical scroll bar pops up, then scroll down and try to move the element sideways, it only allows it to move up - kind of like the scroll window is forcing it up and out of the way. We can fix that. Is that what you are reporting?
 
Back
Top