WiFi Temp Controller with ESP8266

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.

jimmayhugh

Turgid Member
HBT Supporter
Joined
Feb 6, 2011
Messages
1,003
Reaction score
237
Location
Las Vegas
I've been playing around with the Adafruit HUZZAH ESP8266, and the ESP8266 Arduino IDE add-on package, and it's pretty darned slick. :ban:

As an exercise, I threw together a fairly simple WiFi Temperature Controller that uses Avahi for network discovery, 1-Wire DS18B20 Digital Thermometers, DS2406+ Digital Switches, and an I2C-controlled 20x4 LCD. Here's a photo:

wifitempcontroller-65694.png


The code is at my github, let me know what you think.
 
Whoa - all the control is by the ESP? That's incredible! Too bad they are (temporarily) sold out of the Huzzah - it looks much nicer to work with than the bare-bones ESP.
 
Whoa - all the control is by the ESP? That's incredible! Too bad they are (temporarily) sold out of the Huzzah - it looks much nicer to work with than the bare-bones ESP.

I've ordered some of the ESP-12 and ESP-07 boards from e-bay, along with the 2mm pins and sockets, and will probably make my own board with on-board level converters.
 
With these 3$ ESP8266 boards (i mean the ebay stuff, not the huzzah) i think we are pretty close to have something like an affordable DIY Beerbug.
On the other hand i have no idea how could we measure gravity. I am thinking about something like a gas flow meter which could measure how much CO2 left the fermenter but i am a bit tipsy now so i have no better ideas.
 
I've updated and added some software at my github that controls the two available DS2406+ Switches.

I've also added a short PHP utility that will communicate with the UdpTempController and allow the state of the chips to be monitored and set.

To use it, you'll need PHP5 and avahi-resolve installed.

On the command line enter
Code:
php TestUdpTempController.php esp8266.local

The program will attempt to locate the UdpTempController, and if successful, will display the IP address of the UdpTempController, and prompt for input.

Any input other than 'A', 'B', "AN" or "BN" will display the current state of the chips in a comma delimited string:

Code:
ccc, fff, a, b

Where "ccc" is the temperature in degrees Celsius, "fff" is degrees Fahrenheit, while 'a' and 'b' is the o(N) or o(F)f state of the respective switch.

"AN" turns the first switch discovered ON, 'A' turns it off
"BN" turns the second switch discovered ON, 'B' turns it off

Let me know what you think.
 
Lots of updates...

Manual or Automatic:
If the board is set to manual, you can manually control the switch settings as outlined here. If set to Automatic, the switches are controlled by the Automatic Temp Control settings as set below. If you have an LCD attached, the current state is displayed.
The command is:
Code:
MA = Automatic Mode
MM = manual mode

Automatic Temp Control:
You can now set an upper and lower temperature that will control the two switches. If the temp exceeds the upper setting, switch 1 will turn on, if it goes below the lower setting, switch 2 will turn on.
The command is
Code:
UC"temp" = sets the upper temperature to "temp" in degrees Celsius
UF"temp" = sets the upper temperature to "temp" in degrees Fahrenheit
LC"temp" = sets the lower temperature to "temp" in degrees Celsius
LF"temp" = sets the lower temperature to "temp" in degrees Fahrenheit

There's currently no delay available before turning on the switches, so care should be used if you are thinking about using this to control a device that can't be constantly recycled, such as a fridge.

Everything is also now save in EEPROM, and is read when the ESP8266 powers up.

The updated code is as my github.
 
I'm trying to piece together my own arduino fridge temp controller. It looks like we have the same LCD screen, do you ever have issues with the display corrupting when your fridge turns on? Mine either starts displaying a bunch of gibberish or blanks out entirely.
 
I'm trying to piece together my own arduino fridge temp controller. It looks like we have the same LCD screen, do you ever have issues with the display corrupting when your fridge turns on? Mine either starts displaying a bunch of gibberish or blanks out entirely.

Yeah the HD44780 controller is sensitive to power spikes, especially if you are using I2C to control it. It's a common problem, and there's no hardware reset input.
 
I picked up a ESP8266-EVB and ten DS18b20's from Amazon. I figure with the onboard relay, the OLIMEX EVB is worth something in this application. I wish I would have seen the HUZZAH sooner as I like supporting adafruit.

Thanks for your github repo!
 
I picked up a ESP8266-EVB and ten DS18b20's from Amazon. I figure with the onboard relay, the OLIMEX EVB is worth something in this application. I wish I would have seen the HUZZAH sooner as I like supporting adafruit.

Thanks for your github repo!

I have one of the Olimex EVBs as well, but I'm going to design my own board with level convertersm :ban:

There's plenty of code room for expansion on the ESP8266, so use my repo as a starting point, and show us what you do with it here.
 
Lots of stuff added.

You can set manual or automatic mode, add a delay in seconds before the switch is turned on, set debug values on the fly, and initially set the ssid, password, and UDP port via the Serial monitor.

It's all at my github
 
I've been watching all along, just haven't found a fit for it, yet.

I was running multiple BrewPi controllers over Bluetooth for months before this little wifi widget had garnered any real inertia, so it kinda got preempted...

Cheers!
 
I've created a new board that connects directly to the back of a standard 20x4 LCD display:
UDPTemp01.png


The board uses mostly through-hole components, for easy assembly, and can run the software mentioned above.

I've also written a program that will simply monitor 4 DS18B20s:
UDPTemp02.png


and can be accessed and graphed via a local web page.
 
hi
great project. i want to built it for me. do you have the Eaglefiles for the newest board"directl connectet to the LCD"

thank you

remo
 
hi
great project. i want to built it for me. do you have the Eaglefiles for the newest board"directl connectet to the LCD"

thank you

remo

I have, but I'm not happy with it yet. The LCD display locks up or garbles occasionally, and I haven't pinned down the problem yet.

I'm also playing with a very inexpensive 2.2" graphical display that is giving very good results, pictures to follow in the near future.
 
Finalized the board for the Color 320x240 TFT Display, ILI9341 Controller Chip display. Here's a couple of screen shots of the programs I've written for them.

Wifi GLCD Temperature Controller:
This one uses one DS18B20 Digital Temperature Sensor and two DS2406+ Digital Switches to control both heating and cooling.

WiFiGlcdTempController.png


Wifi GLCD Temperature Monitor:
This one monitors four DS18B20 Digital Temperature Sensors.

WiFiGlcdTempMonitor.png


Both communicate via UDP to some PHP-based software to display a webpage on a LAMP Server:

ESP8266Net1-WireTemperatureStatus.png


ESP8266Net1-WireTemperatureSwitchStatus.png


The bare boards are available here, the boards use SMD to minimize the board size. The software and eagle files will be posted shortly.
 
I'm a software engineer. I'll be monitoring this thread. I have a HUZZUH on my desk, collecting dust.

Currently, I use an STC100+ to control the temperature my keggle, and another STC1000+ to control a friend's garage fridge for fermenting lagers. It'd be nice to be able to monitor the fermentation and adjust the fermentation profile via wifi.
 
Could you please share more information (schematic, BOM, code) about Wifi GLCD Temperature Controller? I'm so close to order boards :)
 
the Boards are ordered and since two days also shipped. Do you habe some Updates to build the controller like BOM, please.
thanks remo
 
Bill of Materials for the ILI9341-Based GLCD Temp Controller / Monitor

WiFiGlcdTempMonitor source is here

WiFiGlcdTempController source is here

You'll need to download and install and Arduino IDE (I'm currently using Version 1.6.5, newer versions are seriously buggy), and install the ESP8266 Board Manager.

You'll also need to download and install the Adafruit GFX Library, the Adafruit ILI9341 Library, and my I2CEEPROMAnything Library.

In order to install / monitor / setup the GLcd, you'll need a simple USB to TTL converter cable (it doesn't get good reviews, but it works just fine in my application).
 
Last edited by a moderator:
Thank you. I have ordered boards and details.
Can you share schematic? And how do you connect relays or ssr's to DS2406+ ?
 

This is terrific! I picked up an ESP8266 01 about a year ago thinking about creating a temperature monitor but only got so far as being able to get it to show up on my network and report pin status before I got sidetracked. Your newest configuration with the display and temp controller is exactly what I'm looking for, thanks! Can't wait to get more detail.
 
Very cool.

But...I've lost track of all the ways I've created one-off pcbs over fifty years of messing around, but at the end of the day, no matter what process I've used, vias remain the killer.

At this point in my life it's a low-cost QTA shop or forgetaboutit ;)

Cheers!
 
Thank you. I have boards and parts ordered, will post here feedback when controller is built.
 
Jim,

Is there a BOM for the combo action board? I can't find it on your website. The PCB silkscreen has most of the parts but I'd like to double-check.

Thanks,
Mack
 
Back
Top