KIL’N IoT

“Kil’n It” or “Kiln Iot” (Kiln Internet of Things)

A friend of mine throws a little clay (does pottery) and has a used electric kiln with an analog meter on her thermocouple (device used to measure temperature in the kiln).

Based on my tinkering hobby, I thought a great project would be to build a digital, WiFi enabled, temperature sensor that could be plugged into the kiln’s thermocouple so she could have a digital display and be able to monitor it on her phone.

In my home automation projects, I’ve used inexpensive sensors (DHT11, HT221D, BME280, etc.) to monitor temperature and humidity in different areas of my house, patio, and shed

Photo of different temperature and humidity sensors.

using NodeMCU and D1 Mini microcontrollers.

Based on my home monitoring I knew a kiln monitor could be done, but I’m measuring temps in livable environments (though it does get hot here in Texas!).

The challenge is that the sensors I use would burst into flames if you put them in a kiln! That’s why thermocouples are used in kilns… they can handle a couple thousand degree (oF) temps.

I learned that you need an amplifier to pick up this signal from the thermocouple and transform it into something a controller (with the right firmware (software)) can interpret into a temperature reading.

There are different types amplifiers (just google something like “thermocouple amplifier board”), but I went with the MAX31855. You can find breakout boards with this chip on them from a few different suppliers on Amazon.

The one I went with is from Adafruit, a NYC-based company that was only a couple of bucks more expensive than the others from companies I don’t know by name. Side note, I often buy electronics components from these unfamiliar companies on Amazon, including the controller I used in this project and the quality is often good enough for my tinkering, but if you want definitive quality, go with Adafruit.

For this project I went with Adafruit because I knew the quality of this new-to-me board would be excellent and well worth the couple of dollars more.

In the first iteration of this project, I soldered female headers to a printed circuit board so I could mount the controller (NodeMCU) and MAX31855 breakout board.

I then soldered the pins from the controller to the header for the amplifier board and connectors for the OLED display (SSD1306) (soldered wires are on the underside of the board in the pic below). I wired a thermocouple wire to the amp and was ready to program the controller.

At one point in my home automation adventures, I had the wild idea of learning to code so I could write my own programs. Through google and YouTube, I learned enough to put together some rudimentary programs that kinda worked, but I quickly realized that I was more interested in making things that work rather than getting behind the curtain and making the stuff (software) that makes stuff work. That’s when I discovered Tasmota, an excellent open source software that works with the controllers I use and can be customized for different applications. I’ve been using it almost exclusively in my projects since.

I downloaded Tasmota 8.1 for this project (the newest version at the time). In many cases, you can just flash the the precompiled binary (bin) file to the controller using a flashing tool like NodeMCU Pyflasher or Tasmotizer, but displays and the Max31855 aren’t supported in the base bin file (tasmota.bin).

This leaves a couple of options. You could flash the base bin file and then the sensors bin file and and then the displays bin file. The problem is these bin files can be pretty large (relatively speaking) and may not flash properly. You could try the lite version of the base bin file, which is pretty bare bones, and then try flashing the other two, but you may run into problems with that too.

That’s why I prefer to go a different route. I download the full Tasmota program and edit it in Arduino IDE (more recently PlatformIO). Though I’m no programmer by any stretch of the imagination, I have picked up just enough to understand a few things when looking at the Tasmota code (which is well documented throughout!).

In Tasmota, I can go ahead and set up my WiFi access (SSID and password to connect to a home network) and MQTT (so it can communicate with my home automation system (Home Assistant – another open source system that runs on a Raspberry Pi).

In Tasmota, I found the code for displays and uncommented those lines as well as uncommented the line for the MAX31855 sensor. Note: you’ll do most of the editing in the my_user_config.h file. See Travis’ (digiblurDIY) youtube video for an excellent tutorial. It is in PlatformIO rather than Arduino IDE, but the steps are basically the same, and he cleans the file up much better than I do to further reduce the size by disabling things he won’t be using. Note also that I did make one other change related to the SSD1306 display that I’ll explain in a bit.

I was then able to upload the firmware via Arduino IDE, and the controller was ready to set up.

I found the IP address of the controller since Tasmota made it discoverable on my home network. It’ll be in format of something like “192.168.1.12”, but the numbers from your network may vary. I use the Fing app, but you can log into your home router and find this too. Another way is to watch the serial monitor in Arduino IDE and it’ll show the IP address when the controller boots up.

I the put my controller’s IP address in a web browser and it connected to the controller via WiFi so that I could set up the display and temperature sensor (oh yeah, you have to first change the module type to “Generic” under the Configuration).

My SSD1306 display is an I2C device , so in the Tasmota web UI, I set GPIO4 to SDA and GPIO5 to SCL. Note that for my particular SSD1306, I had to go into the xdsp_02_ssd1306.ino file using the Arduino IDO and change the line “#define OLED_RESET 4” to “#define OLED_RESET -1” because Tasmota uses the Adafruit SSD1306 library which is designed for their SSD1306 that has the reset on pin 4. My particular display doesn’t use a reset pin, so I had to change it to -1.

The MAX31855 is a SPI device requiring three pins (Note: in Tasmota, it’s a softSPI rather than hardware SPI, so you don’t turn on (remove the backslashes before) SPI in the Tasmota code when editing it). In my application, I use GPIO12 for CS, GPIO14 for CLK, and GPIO15 for D0.

Once I set those up and restarted it, I was getting temperature readings through the Web UI from the thermocouple I had attached to the amplifier board. The pic below is a template and has a couple of of other features enabled.. read up on Tasmota if you want to know how to do templates, but the look is essentially the same as you’ll see using the Generic Module.

To get the display to work, you have to change some settings in Tasmota. Go to the Console in Tasmota and enter the following (without the quotation marks):

  • “DisplayModel 2”
    • This sets it up for a SSD1306 display
  • “DisplayMode 0”
    • So you can get the temperature reading as text to display
  • You’ll also have to adjust the size of the text, and I created this Rule in Tasmota to do that (use the console for this too)
    • Rule1 on tele-MAX31855#ProbeTemperature do DisplayText [f2p7x15y20]%value% F endon

Check out this link for more on Display commands in Tasmota.

From here, you can see the temperature on you computer or phone (I bookmark the Tasmota IP web portal for easy access) and turn the monitor on an off using the “Toggle” button. I’ve recently found the Tasmota command: WebButton Display On/Off (or whatever you want to call your web button instead of “Toggle”… just put the name after WebButton1 in the console command line).

Once I had the controller set up and working I designed an enclosure (pic at top of this blog) in Fusion360 and printed it on my Ender 5 3-D printer. This took me way too many prints to get it how I wanted it, largely because I was still relatively new to Fusion 360 at that time. I won’t go into detail on my enclosure design, but feel free to contact me and I’ll be glad to share it with you… I’m working on tweaking that currently.

I did take the finished project over to my friends house and got it hooked up to her thermocouple and see the temp on the display. Unfortunately I wasn’t able to get it to connect to WiFi since where she has her kiln is in a building away from the house and they use a WiFi extender that I haven’t figured out how to work with in Tasmota yet. Maybe set up as the second access point??… other Tasmota users let me know your thoughts if you know how to do this.

She was nice enough to set me up with some free home brew (she and her husband make great beer… that Quad was incredible!), and black garlic (check out her company The Black garlic Company).

I’m still pretty pumped about making this kiln monitor since it was more complex than my household sensors I’ve made in the past. The free beer and black garlic just put the icing on the cake!

Here are some things I’m working on for version 2:

  • Use D1 Mini instead of a NodeMCU.
  • Use mini connectors so it’s easier to connect and disconnect the thermocouple (or connect a different thermocouple (for brewing or monitoring fermentation temps for example (though there are different sensors that are less expensive and easier to set up than a thermocouple).
  • Use a printed circuit board with pin holes in parallel by row (makes soldering wires from controller pins to the display connectors and amplifier header easier). Ideally, I’ll put my big boy pants on someday and design a custom PCB.

I may update this blog post from time to time, but feel free to reach out if you have any questions I may be able to help with.

Origin (part deux)

So the Echo Dots and zigbee controlled lights were making my home smart, but I have a couple of lamps that were getting jealous.

I had picked up a couple of puck-style touch switches at Lowe’s a couple of years ago that I could plug the lamps into and turn them on and off using the pucks. Touch the puck for on, two more taps to increase the brightness, and one more for off. I couldn’t care less about dimming but it worked. The extra cords were annoying and I now knew that I could do better.

Did some Googling and found that Iris also made plugs. I was in business! Bought a couple and got them hooked up pretty easily to the Dots like I had with the smart bulbs. Problem was these plugs cost about $35 (got the a lot cheaper later on, but that’s another story I’ll get to).

Searched Amazon and found a Wemo plug on sale for $20. At the time that was a great price, so I got one. It didn’t require a hub so was slightly easier to set up than the Iris plugs. It worked like a champ and also gave me power readings (cool factor, but not really useful). Wanted more for my old-school, under-cabinet fluorescent kitchen lights, but even at the “low” price of $20, that was going to add up quickly.

Now that I had the basics of home automation. Could turn lights on and off with Alexa, could set timers for the lights, and could also do all of this remotely with the Alexa app. What’s next?

The price of the smart plugs was a real downer. Over time they got less expensive (even the Lowe’s Iris plugs) and I did add a couple more for some garage lighting.

I googled and did YouTube searches and came across some really inexpensive DIY WiFi devices called Sonoff. Basically, you cut a two prong extension cord in half, wire the ends into the Sonoff, download their app, set them up with your WiFi, and then connect them to The Dots in the Alexa app… all for about $6 each plus the cost of the cord if you don’t have any laying around (I did find some cords on clearance at Lowe’s after Christmas that we’re dirt cheap… normally about $12 for a 3 pack on sale for $2. I bought 3 or 4 packs.)

At that point, I didn’t have a need for the Sonoffs but ordered 6 for the cool factor and to play with. Got them in, hooked them up and ran a small fan in the garage with them. Kind of a pain in butt actually having a cord with a box (the Sonoff) in the middle of it but I was pretty pumped and wondered what I could use them for.

Then it kinda hit me, I had been wanting to start my own tomatoes and peppers for my garden, and I could use these to control grow lights. I bought grow lights, seed starter kits (peat pellets – awful things actually but they’re easy at least to get seeds going). Hooked up the lights to a couple of Sonoffs and set up a schedule in app. Worked well enough, but I was starting these in the garage where the temp wasn’t ideal. I bought some seed starter heat mats but was concerned about the higher current they may require and whether the Sonoffs could handle that. There was also the factor of having even more of the Sonoff cords cluttering things up.

Got back on Amazon and found another Sonoff model that could handle up to 16 amps (vs 10), had a ground, and even had a temperature sensor. I bought one, used a power strip as the cord, and got it set up. Worked great and I really liked the bonus of being able to monitor my garage temperature. Still use it to this day for many different applications.

One thing that always bothered me with the Sonoffs was that I had to use their app and cloud service. It was free, but I wanted more local control. I returned to google and found where these Sonoff devices could be reflashed (put different software on them) with open source software called Tasmota. I ordered an inexpensive tool to connect to my computer to install Tasmota on the Sonoffs, and after a lot of cussing, I got it figured out. Did this and got my stuff off the cloud.

Tasmota got easier over time and I discovered other inexpensive devices it could be used with. This was like going down the rabbit hole within the rabbit hole within the rabbit hole and I was getting even more addicted.

This is what eventually led me to expand my smart home to include temperature and humidity sensors in my house and automating my garden watering.

This blog post is getting pretty long, and you’re probably pretty bored if you’ve read this far so I’ll finish up the Origin story here. I may have left some things out (I know I did!) and got some things out of chronological order, but the idea was to tell you how I got started in this wonderful mess!

I’ll try to keep future posts shorter, more topic specific and include photos and links. This will let you follow what I’m doing, and have done, while also maybe filling in some gaps in the Origin story.

Origin

When I was a kid, I remember tying a string to a pair of finger nail clippers, making a loop in the other end of the string, and loosely taping the string to a couple of places on the wall (so it would glide through the tape without pulling it off the wall) above the light switch in my bedroom. The loop slid over the light switch toggle. The fingernail clippers acted as a weight – just enough to keep the string taught – and a “remote” “actuator” for my “automated” light switch. By changing the position of the pulleys (tape), I could lay in bed (after repositioning said pulleys), and pull the actuator to turn the light on or off without getting out of bed. Bit of a Rube Goldberg machine (look at me adding links to my blog so I can further educate the masses) though because I actually had to get out of bed after each use to enable the next change of state… could’ve just flipped the switch while I was up!

This is the origin of BrummBilt.

“Gadgets” have always caught my attention… sometimes leading me down a rabbit hole. Today’s IoT (Internet of Things) is exemplary of the rule and nowhere near the exception.

I joined the IoT cult by using Echo Dots from Amazon throughout my house to play music, set alarms and timers, get the time and weather, and pretty much just ask Alexa stupid questions. I then discovered “smart” light bulbs (these use zigbee… google it) and Lowes’ Iris System (wow, looking back, Iris was a real P.O.S.) to control them through an app and with the Dots. I mashed Iris and Alexa together (that sounds dirty) by brute force (knowing even less than I now know… yes, that is possible). All of a sudden, Eureka!, I had a “smart” home.

The hook was set.

… to be continued.

I once went a year without buying toilet paper

Well, in all honesty, it may have been a little longer, but who counts days?

In the fall of 2002 my company asked me to go work at our Chicago plant for 2 or 3 months. Turns out I spent a year in Chicago that winter, but that’s a whole other story… or three.

I was living in an Extended Stay America. The room was pretty basic. Bed, bath, TV, desk, and small kitchenette. As an extended stay place – more than a motel; less than a hotel – they didn’t have daily room service and there was no one at the desk 24 hours a day. I’d often get back from work after the desk staff had left for the day. The weekly tidying up they did included the basic cleaning and restocking toilet paper, but only if you didn’t already have at least most of a roll left.

It turns out that what I consider most of a roll and what the cleaning staff considered most a roll wasn’t the same thing. On Saturdays I’d make it a point to get down to the front desk to ask for an extra roll whether I needed it or not. Within a month, I had 5 or 6 extra rolls stowed away in a drawer in my room.

I also started stashing the new roll they left when the arbitrary “low” limit on the roll in the bathroom prompted them to leave a new one. I had learned to keep the one I used in a drawer by the crapper rather than replace the one on the TP holder. That way they always left a new one.

Between getting a roll every Saturday and stowing away what they restocked (less what I actually used) over the course of about 6 months I had filled almost two full drawers in my room with toilet paper.

When my stint was over and I was finally ready to leave Chicagoland, I had a very large duffel bag very full of toilet paper (I bought the cheapest, largest one I could find at Walmart just to pack it all up).

This bag accompanied me on my 10 hour drive back to NW Arkansas in the spring of 2003.

It wasn’t until about a year later that I finally ran out and had to go down the toilet paper aisle when doing some shopping.

Those of you toilet tissue connoisseurs reading this may say, “yeah, but was it good quality paper?”, and my response… for the price, it couldn’t be beat.

It all started when…

I bought the house I currently live in in 2016. Day one that I moved in I had friends over and a garden planted… was waiting on movers with furniture, nothing I had brought myself unpacked, and not even sure I had toilet paper in the bathrooms yet (toilet paper will likely be a recurring them in this blog). However, I had a couple of friends over, beer in the fridge, and one sorry raised bed that came with the house.

Hope you enjoy following my antics and maybe see something cool.

Blog at WordPress.com.

Up ↑