Headless HeaterMeter


 

KennyDado

TVWBB Member
So I've figured out a way to detach the heatermeater AVR board from the raspberry pi. In other words the raspberry pi is inside the house running the server while the arduino is outside running the grill. The avr and arduino are linked wirlessly through your wifi.

A few benefits of this approach might be
1) much smaller space requirements for the outdoor heatermeter enclosure. Might make for an easier combined damper and enclosure design.
2) simpler hm board design
3) easier to build
4) my heat sensitive rpi is sitting in the house in the A/C during the summer, leaving the simpler/cheaper avr to endure the weather
5) no need to modify the pi.


I used an esp8266 wifi module (~$3) to do this. Without writing a detailed step-by-step I'll just try to go through rough outline of what I did and if anyone wants further detail please don't hesitate to ask.
I'm using a $2 arduino pro mini from ebay, a $3 esp8266 (version 03) from ebay, and an old rpi B I borrowed from another project.
1) Load and setup the esp-link firmware onto the esp to turn the chip into a "transparent wifi serial bridge". Note that this is capable of wirelessly reflashing an attached arduino. Take note of the IP address that you set up for the esp, you'll need it later.
2) Wire the esp to the arduino's tx/rx. Be carefull of voltages if using a 5v arduino.
3) Modify the AVR's hmcore.h to use 57600 baud instead of 38400. The esp-link software doesn't use a baud as low as the heatermeter's default 38400 so this had to be changed. It would be most conveinent to change this to what ever the reflashing baud rate is of the avr you're using.
4) compile and flash the avr with this new serial baud settings
5) In the rpi modify /usr/bin/linkmeter.uci-defaults to also use the 57600 baud rate (or what ever you canged it to in step 3)
6) install socat on the pi
Code:
opkg update
opkg install socat
7) use the ip address you set up for the esp-link in step 1 to get the pi to talk to the arduino through your wifi. In your heatermeter UI go to configuration -> sytem -> startup and in the local startup textbox add the following before the line that says 'exit 0'
Code:
socat pty,link=/dev/ttyAMA0,raw,echo=0,waitslave,mode=777 tcp:<ESPLINKS IP ADDRESS>:23

And that's pretty much the gist of it.

A few drawbacks
1) lost (unrecorded) data if the wifi connection is poor
2) setting up the esp's firmware can be a pain
3) probably more, you tell me
 
Last edited:
This is neat, and in no way am I trying to diminish the work and effort you put into this, I just have a hard time understanding the real benefits. I would argue that it's easier to build or that your raspi is as heat sensitive as you think it is. Also, the assembled cost of the HM board is actually more than a RasPi, and you can probably source and replace a raspberry pi in a much shorter timeframe compared to the HM board.

That being said, I think there's potential in terms of being able to decouple the hardware. For instance, I have a RasPi at home that runs 24x7 to perform data logging, runs some "IoT" stuff and a bit of home automation. Making it also run linkmeter would be another great use for it, but I can't do that right now without fully booting openwrt + linkmeter. This is where something along the lines of Docker makes sense. Create a linkmeter docker container, provide it access to /dev/ttyAMA0 and now you've got linkmeter running, communicating with a remote HM board.
 
I would argue that it's easier to build or that your raspi is as heat sensitive as you think it is. Also, the assembled cost of the HM board is actually more than a RasPi, and you can probably source and replace a raspberry pi in a much shorter timeframe compared to the HM board.

I think the point is that you don't build the HM board, but instead build a minimal "Headless" version of it. Just enough to connect the probes and the fan/servo.

I have made something similar before (well the headless part of it, not the wireless part of it).
 
This is neat, and in no way am I trying to diminish the work and effort you put into this,
Please don't overestimate the work I put into it ;) I've been down a similar road with other projects in the past.

...I would argue ... that your raspi is as heat sensitive as you think it is.
I've had really bad luck with the wifi dongles specifically. I made my own rpi/arduino bbq controller when the pi B was released, I burned through 3 dongles before I switched my project to jeenodes. The rpi was put into service in an indoor project a few years ago havn't had to replace any more dongles. If you get a chance, with a rpi that's even sitting indoors put your finger on the dongle/usb port... mine is hot. Maybe I have a lemon.
Anyway, the heatermeter is a much better product than what I had hacked together so I wanted to give it a shot.

Also, the assembled cost of the HM board is actually more than a RasPi, and you can probably source and replace a raspberry pi in a much shorter timeframe compared to the HM board.
That depends on the features you want. A scrap piece of protoboard, a few components, and some time with the soldering iron can get you there pretty cheaply. If you strip it down this is essentially all you need: http://hruska.us/tempmon/images/schematic.png (give or take). Again, I'm repurposing materials I have on hand.

That being said, I think there's potential in terms of being able to decouple the hardware. For instance, I have a RasPi at home that runs 24x7 to perform data logging, runs some "IoT" stuff and a bit of home automation. Making it also run linkmeter would be another great use for it, but I can't do that right now without fully booting openwrt + linkmeter. This is where something along the lines of Docker makes sense. Create a linkmeter docker container, provide it access to /dev/ttyAMA0 and now you've got linkmeter running, communicating with a remote HM board.

Nail on the head, this would be ideal for me! It's exactly what I found to replace the rpi in the project I just took the rpi from.
 
Last edited:
As with any piece of software or hardware, the logic and components to make it work is generally much simpler than the surrounding software and hardware to keep unwanted noise out. There's a reason that the heatermeter board has plenty of noise and power filtering on it.
 
As with any piece of software or hardware, the logic and components to make it work is generally much simpler than the surrounding software and hardware to keep unwanted noise out. There's a reason that the heatermeter board has plenty of noise and power filtering on it.

Yeah, that's why I mentioned it's a matter of what features you want. You can add HM's hardware filters for no more than a couple dollars, right?

I guess my point is that to enjoy a heatermeter you don't have to buy a heatermeter! :confused:
 
Last edited:
Anybody else get a chuckle about a guy in Texas and a guy in Canada having a discussion about what is heat sensitive when placed outdoors?
 
Anybody else get a chuckle about a guy in Texas and a guy in Canada having a discussion about what is heat sensitive when placed outdoors?

Ha! I trust in the collective experience of the HM community. I have no doubt plenty of folks have had better luck than me in similar or warmer climate. I've only played with one rpi, it may just be a lemon.
 
Last edited:
You must think we still live in igloos and take our dog sleds to work...

I always thought that Canadians have pet polar bears instead of cats.;)

But I suppose that most Americans think that we all live in windmills and wear wooden shoes.... But that's not true, I wear 3D printed bamboo shoes:cool:

colorfabb-bamboofill-plain-1024x584.png
 
I'm curious... had you considered not using the Arduino Mini at all, and instead just using the ESP8266 in conjunction with something such as the ADS1155 ?

I am a Pellet Grill guy, looking to do something similar to the heatermeter... Now, before I go any further let me state that the Heatermeter is a rather wonderful project, however in some ways I think it's too complicated. At least for me, I have a very hard time following all code and when I try, I see so many 'features' that are wonderful, but just seem to make things a bit more complicated then they need to be at some level. Also, me being a pellet grill person, ultimately the Heatermeter doesn't really do what I need, it does 90% of what I need and a whole bunch of stuff I don't need.

I recently was going down the opposite path, thinking of doing everything with a Raspberry Pi 3 and a ADS1115 breakout board. I haven't gotten very far, but in part because I don't really know python and barely know anything about Raspberry Pi... I just stumbled upon a Raspberry Pi 3, the day that my local MicroCenter got their first shipment of them in, I bought one... just because I could. ( also bought a Raspberry Pi Zero )... So anyway, using nothing more then a single resistor, the ADS1115, a few wires, the rPi3 and a Thermoworks 'pro series' NTC Thermistor and some borrowed knowledge about the steinhart hart coefficients for that thermistor, I managed to be able to accurately read the temperature from the probe, wirelessly... While this isn't much of a accomplishment in the grand scheme of controlling a pellet grill, I was happy to get that far.

Now, while at Microcenter, I also picked up a Arduio Pro Mini, a ESP8266 Huzzah , a FTDI interface and such... Now, I also started buying things from banggood ( ADS1115 boards for like $4 each, small OLED displays cheap, etc.. ).

Back to the reason I post and/or what I've been thinking about...

I've been lead to believe ( by reading around the internet a bit ) that you can do most anything Arduino like with a ESP8266 alone, other then just having one low resolution analog input. Assuming all you really need are a few analog to digital inputs to go with the ESP8266, just throw on a ADS1115 and you have four 16bit AD channels right there. So now, for under $15 you have WiFi, Arduino like capabilities, and four AD channels.

Why not run the Raspberry Pi as a sort of server... have ESP8266/ADS1115 device(s) all send their data to the rPi, wirelessly? Now, maybe you all don't have a need for more then one cooker going at once, but I know there are competition guys out there who do run more then one cooker at one time... you could have a small army of the ESP8266/ADS1115 devices doing the grunt work, controlling pit temperatures, sending their data to the rPi for viewing or remote control... the rPi acting sort of like the general to this small army( maybe just a army of one ).

If, there was a somewhat standard way for the rPi to talk with the ESP8266/ADS1115 devices, those devices could actually be more generic... some running a pellet grill, some running a big ugly drum, some running a weber, some running a big green egg... you get the picture.

So... my dream would be to see a generic cheap wifi device that could read temperatures, control a simple cooker, report temperatures to the server and accept instructions from the server, wirelessly... Anyone besides me see the value in something like this?
 
I'm curious... had you considered not using the Arduino Mini at all, and instead just using the ESP8266 in conjunction with something such as the ADS1155 ?
I did! But that would have required me buying stuff I didn't already have and coding the esp. The idea of rewriting/porting code to the esp didn't seem appealing. And I didn't much feel like writing my own code (again) and reinventing the wheel. I'm still new here my self but I can see that the HeaterMeter has a great community, is actively developed, and is proven.

I am a Pellet Grill guy, looking to do something similar to the heatermeter... Now, before I go any further let me state that the Heatermeter is a rather wonderful project, however in some ways I think it's too complicated. At least for me, I have a very hard time following all code and when I try, I see so many 'features' that are wonderful, but just seem to make things a bit more complicated then they need to be at some level. Also, me being a pellet grill person, ultimately the Heatermeter doesn't really do what I need, it does 90% of what I need and a whole bunch of stuff I don't need.

I recently was going down the opposite path, thinking of doing everything with a Raspberry Pi 3 and a ADS1115 breakout board. I haven't gotten very far, but in part because I don't really know python and barely know anything about Raspberry Pi... I just stumbled upon a Raspberry Pi 3, the day that my local MicroCenter got their first shipment of them in, I bought one... just because I could. ( also bought a Raspberry Pi Zero )... So anyway, using nothing more then a single resistor, the ADS1115, a few wires, the rPi3 and a Thermoworks 'pro series' NTC Thermistor and some borrowed knowledge about the steinhart hart coefficients for that thermistor, I managed to be able to accurately read the temperature from the probe, wirelessly... While this isn't much of a accomplishment in the grand scheme of controlling a pellet grill, I was happy to get that far.

Now, while at Microcenter, I also picked up a Arduio Pro Mini, a ESP8266 Huzzah , a FTDI interface and such... Now, I also started buying things from banggood ( ADS1115 boards for like $4 each, small OLED displays cheap, etc.. ).

Back to the reason I post and/or what I've been thinking about...

I've been lead to believe ( by reading around the internet a bit ) that you can do most anything Arduino like with a ESP8266 alone, other then just having one low resolution analog input. Assuming all you really need are a few analog to digital inputs to go with the ESP8266, just throw on a ADS1115 and you have four 16bit AD channels right there. So now, for under $15 you have WiFi, Arduino like capabilities, and four AD channels.
That's true, but you'll still have to port some code or write your own. And if I need more analog pins for the esp I might just use the arduino anyway since I have a dozen of these minis on hand. Also wifi + arduino for less than $8.

Why not run the Raspberry Pi as a sort of server... have ESP8266/ADS1115 device(s) all send their data to the rPi, wirelessly?
This is what I'm doing! (except swap ads1115 for arduino)

Now, maybe you all don't have a need for more then one cooker going at once, but I know there are competition guys out there who do run more then one cooker at one time... you could have a small army of the ESP8266/ADS1115 devices doing the grunt work, controlling pit temperatures, sending their data to the rPi for viewing or remote control... the rPi acting sort of like the general to this small army( maybe just a army of one ).
Exactly! But like you sort of alluded to it's a very small number of users that would benefit from this.

If, there was a somewhat standard way for the rPi to talk with the ESP8266/ADS1115 devices, those devices could actually be more generic... some running a pellet grill, some running a big ugly drum, some running a weber, some running a big green egg... you get the picture.
The heatermeter implements a very simple, human readable, serial protocol to communicate with the linkmeter. Check this out starting at line #46: https://github.com/CapnBry/HeaterMeter/blob/master/arduino/heatermeter/README.txt. Designing a piece of software on a server to communicate with multiple cookers is already half way done as the AVR side is 'generic'. As it is the heatermeter AVR saves all its own settings and runs its cooker all by it self, the rpi is only used to relay info to and from the user... In other words none of the actual logic to control the cooker is done by the rpi, it's all already in the AVR (except for the ramp function I think, I could be wrong). That said, it's already generic enough to run a big ugly drum, a weber, a komado, etc (no experience with pellets). The server side would just need to be setup to handle multiple cookers. This is why I was exploring virtualization options last week, that didn't pan out.

So... my dream would be to see a generic cheap wifi device that could read temperatures, control a simple cooker, report temperatures to the server and accept instructions from the server, wirelessly... Anyone besides me see the value in something like this?
Your dream is a reality!

DavidNP has a project that uses the arduino+esp and drops the rpi all together. He coded the esp to take the place of the LinkMeter software. To that end you could have an army of these things without worrying about purchasing a rpi for each cooker. https://github.com/nailbuster/EspressModuleHM
http://tvwbb.com/showthread.php?630...ter-Module-(wifi-with-no-Pi-Linkmeter-needed)
The thing is you wont get a centralized UI for all of your cookers.

[Edit]
*To avoid confusion and for the sake of discussion: Arduino = AVR = HeaterMeter, Raspberry Pi = rpi = pi = LinkMeter
 
Last edited:
Yeah, I was already aware of the Heatermeter's use of the simple serial protocol... it's in part how or why I had already been thinking about doing something like you've done. I guess more then anything I was just trying to indicate to you that I too feel there is value in keeping the rPi separate from the microcontroller side of things. Now that wireless is so cheap, it makes perfect sense to me. I may try and duplicate what you've done, if for no other reason then to just get more experience with all this.

The main and/or biggest difference between a pellet grill control and what the heatermeter does , is that it needs to be able to turn a auger on then off, increasing the on time to increase temperature, decreasing the on time to lower temperatures, while never dropping bellow a low end threshold. The cycle times would be in the neighborhood of 30 to 60 seconds... Minimum duty cycle of about 12%.
 
Yeah, I was already aware of the Heatermeter's use of the simple serial protocol... it's in part how or why I had already been thinking about doing something like you've done. I guess more then anything I was just trying to indicate to you that I too feel there is value in keeping the rPi separate from the microcontroller side of things. Now that wireless is so cheap, it makes perfect sense to me. I may try and duplicate what you've done, if for no other reason then to just get more experience with all this.
I apologize if I seemed dismissive of your idea before, it's a good idea I was just rambling on why I went in the direction I did. Yeah, dive into it if you feel like geeking out!

The main and/or biggest difference between a pellet grill control and what the heatermeter does , is that it needs to be able to turn a auger on then off, increasing the on time to increase temperature, decreasing the on time to lower temperatures, while never dropping bellow a low end threshold. The cycle times would be in the neighborhood of 30 to 60 seconds... Minimum duty cycle of about 12%.
Ah I see. Has the heatermeter been put on a pellet grill before? Off the top of my head you would need to add a relay in place of a blower. You would need to tweak a few things in the AVR code. But I think it's doable.
You might try adjusting the TEMP_MEASURE_PERIOD (Line 24 here) to something like 60000 and writing a new function that turns on the relay for [output]% of the 60000 microseconds. As is I think the minimum duty cycle can already be handled with min output.
The custom relay code would be called from GrillPid::doWork (Line 747 here).

This is really a discussion for Bryan Mayland as I don't know what the adverse effects might be to changing TEMP_MEASURE_PERIOD.
 
Last edited:
I wasn't offended... not in the least.

As far as I know, no one yet has modified the heatmeter to work with a pellet grill. You are correct, that at a minimum , you would need to attach a relay to the normal fan output of the heater meter. After that , or before that, you'd have to come up with a way to cycle the 'fan' output on and off in a pattern that worked well for driving the auger of the pellet grill... It really shouldn't be that hard. However once you get beyond the basics of just making it work... then your at a point where it really doesn't work REALLY well and has a lot of parts and features that aren't being used, because it wasn't designed to drive a pellet grill. :(

For full blown pellet grill control, you would want a method to turn on the pellet ignitor ( at startup ) and to turn the fan on, in addition to controlling the auger feed. At some level, you'd just start to be cobbling things together at a level where it might be better just to start from scratch. As I have said before, I believe it's actually possible to do with little more then a ESP8266, if it weren't for the fact that the ESP8266 has just one 10 bit AD converter. To control the outputs for Fan, Auger, ignitor I'd use a four channel SSR. As for display... well , once you get it connected to WiFi, display screen is just a 'frill'. :). Anyway... I keep coming back to this idea that I just want some really simple hardware/software that does the bare minimum...

I also like the idea of being able to build a multiple probe temperature reading device, with no ability at all to control anything, and doing it as cheaply as possible. If the 'server' end was easily ready to accept/listen to a variety of devices, this would be trivial with the kind of hardware that's out there now days.

My problem is... that at this point in time, I don't have enough of a skill set to make it all happen myself.
 

 

Back
Top