Networked ambient temperature and humidity sensor for <$7

Discuss roast levels and profiles for espresso, equipment for roasting coffee.
luma
Posts: 77
Joined: 10 years ago

#1: Post by luma »

I've attempted to post this project and questions to the Artisan mailing list but apparently that technology is too advanced for me to figure out...

I'm new to Artisan and have been getting started with a new HotTop 2K+. Previously I had been using a Behmor along with the Roastmaster software on IOS. I love Artisan's flexibility with devices and data collection, so one of the first things I've dug into is utilizing the external program feature to bring additional data points into Artisan.

As a starting project I've created a web server that will report temperature and humidity readings via HTTP. The only parts required are a WeMos D1 Mini ESP8266 development board available for < $3 and a DHT22 sensor shield for the D1 mini available for < $4. Download the Arduino sketch in the GitHub repo, modify Wifi and network settings near the top of the code, and flash the sketch to the board with the Arduino studio (see GitHub repo for details on setting up the Arduino IDE to work with ESP8266).

The device will then connect to your WiFi network and will respond to HTTP requests with the current sensor readings like this:

Command: curl http://192.168.0.200
Return: 78.9,56

The device+sensor is USB powered and roughly the size of a pack of matches. Place it somewhere in your roasting environment and you can collect the current ambient temp/humidity from any device on your network. It should be noted that mating these two devices does require soldering pin headers to each, so you'll need an iron and a few minutes. Good news is that it's a dead-simple soldering job with no sensitive parts nearby so it should be an easy and quick job even for a novice.

DHT22 datasheet: https://www.sparkfun.com/datasheets/Sen ... /DHT22.pdf

And now for my questions! I'm running Artisan v1.0.0b1 on a Windows 10 laptop. Under Config > Device > External Program I've entered "curl.exe http://192.168.0.200" for the input program. Under Extra Devices, I've created a device of type "Program" with Label 1 set to "Ambient Temp" and Label 2 set to "Humidity", and I've checked LCD1 and LCD2.

First issue: it appears that the Label 1 and Label 2 values are transposed. When the program returns 78.9,56, Label 1 is assigned "56" while Label 2 is assigned "78.9". I'm not sure if this behavior is intentional or a bug. Swapping the labels around works fine so this isn't a big issue.

Second issue: when data collection is enabled on Windows with an external program defined, the application brings up a console window every collection interval. The result is a big black box flashing on the screen on top of Artisan every second which is problematic. It might be a good idea to offer a "hide" option, or at least to run the program in the background, as it makes Artisan almost completely unusable while collecting data due to the screen being covered by a black box and user input focus being stolen every second.
Alternately, would it be possible to use the running python interpreter in some way so that a new process would not need to be launched?

Feature request: I would like to utilize this sensor to automatically populate the temperature under Roast > Properties > Ambient Conditions. Under "Ambient Source" I've selected "1xT2: Ambient Temp"
and the temperature is populated as expected. Could we also populate the Humidity field with the Update button?

Finally, a somewhat-related feature request: Artisan looks to support the Acaia scale by way of a dongle which, to my knowledge, has never been publicly released. The other option is a several-hundred-dollar lab scale from Kern. Would it be possible to add External Program support (or something like it) for the scale to collect weight data?

There are a lot of options out there for digital scales and none of them appear to conform to any particular standard. Giving us a way to read data from a particular scale with a user-provided script in a standard format similar to the External Program feature would be great.

edit: here's the assembled device next to a demitasse for scale. It's pretty small.

btreichel
Posts: 141
Joined: 8 years ago

#2: Post by btreichel »

Cool, maybe a future upgrade once I learn the new roaster.

SJM
Posts: 1822
Joined: 17 years ago

#3: Post by SJM »

Your post to the Artisan User Archive seems to have appeared just fine
http://lists.mokelbu.de/pipermail/artis ... 01163.html

User avatar
happycat
Posts: 1464
Joined: 11 years ago

#4: Post by happycat »

Thanks for sharing. Great to see people using ESP8266 with coffee... Still waiting for 3 from China but i have been playing with Arduino mini and iOS IOT app/server Blynk.

Re Acaia... An alternative is to build your own scale. I bought a 5kg load cell and HX711 amplifier board for cdn$6 run on an Arduino min (cdn$2.60 on ebay). Bolted it onto an ABS pipe section with a couple brackets. I have a serving plate from dollar store as its platter. It's a prototype now and when i get esp8266 i can hide the electronics inside the pipe. It's heavy duty to accommodate 5lb coffee bags I buy from Seb at Cafe Crema,



I now have an internet operated scale accurate in grams. Without ESP8266 I temporarily run internet access through my mac using TTL to USB module. I can operate the scale and tare and see measures on my ipad wirelessly.



I plan to integrate the scale into an inventory system... Greens in, greens out to roast, roasted amounts with moisture loss, consumption.... All data will be stored probably on SD card module and served up to web for monitoring.

I am thinking the inventory system is managed by the ESP8266 with inputs from other systems (vs using a pc as the hub)
LMWDP #603

luma (original poster)
Posts: 77
Joined: 10 years ago

#5: Post by luma (original poster) »

That is a fantastic project, and man Blynk makes knocking together these sorts of things super easy. How is the accuracy and repeatability on that device? I already own an Acaia lunar which really is a brilliant device but they promised a lot in the way of SDK and PC access that never materialized and I'm a little irritated at this fantastic device that can't be connected to anything but a cell phone. Building my own would for sure solve that problem, and your setup there looks like it'd be easy to implement with the 8266.

luma (original poster)
Posts: 77
Joined: 10 years ago

#6: Post by luma (original poster) »

happycat wrote:Great to see people using ESP8266 with coffee...
While I'm at it, I posted another ESP8266 project a while earlier that you might find entertaining (and maybe even useful).

User avatar
yakster
Supporter ♡
Posts: 7344
Joined: 15 years ago

#7: Post by yakster »

I've enjoyed reading this thread, I'm planning on using an ESP8266 with Blynk to monitor the temp and humidity of a wine fridge.
-Chris

LMWDP # 272

User avatar
happycat
Posts: 1464
Joined: 11 years ago

#8: Post by happycat »

luma wrote:While I'm at it, I posted another ESP8266 project a while earlier that you might find entertaining (and maybe even useful).
I saw that one. I ordered a k type thermocouple and amplifier and plan to wire up a kettle of my own with some PID magic. Cost maybe 10$ instead of 130$ for a bonavita. Great project
LMWDP #603

User avatar
happycat
Posts: 1464
Joined: 11 years ago

#9: Post by happycat »

yakster wrote:I've enjoyed reading this thread, I'm planning on using an ESP8266 with Blynk to monitor the temp and humidity of a wine fridge.
Great idea. Why just monitor when the controller can also maintain temps for you by interacting with the system? :D
LMWDP #603

User avatar
happycat
Posts: 1464
Joined: 11 years ago

#10: Post by happycat »

luma wrote:That is a fantastic project, and man Blynk makes knocking together these sorts of things super easy. How is the accuracy and repeatability on that device? I already own an Acaia lunar which really is a brilliant device but they promised a lot in the way of SDK and PC access that never materialized and I'm a little irritated at this fantastic device that can't be connected to anything but a cell phone. Building my own would for sure solve that problem, and your setup there looks like it'd be easy to implement with the 8266.
I hacked it together in a couple hours and still havent permanently fixed the platter on top... It semed very repeatable with the platter temporarily fixed. I compared wights from a kitchen digital scale for a can of corn. I will have to test more esp after i do a better job soldering the fine wires from the loadcell to the amplifier pins. Theres a bit of jitter in numbers below the decimal point but it may be due to my prototype assembly with crap temporary wiring thrown together.
LMWDP #603

Post Reply