Beer lovers rejoice! [Mats] has reverse engineered a temperature controller and written new open source firmware for it. This effectively gives all us homebrewers a low cost, open source software driven controller. The STC-1000 is a cheap (under $20 USD) temperature controller mass-produced in the far east. The controllers do work, but have several limitations. The programming options are somewhat limited to basic set points for heat and cool. The controller also is only programmed for temperature display in Celsius, which is a bit of an annoyance for those of us who think in Fahrenheit. Under the hood, the STC-1000 utilizes a Microchip PIC16F1828 microcontroller. Unfortunately the PIC’s protection bits were set, so the original code would have been extremely difficult to extract. Not a problem, as [Mats] reverse engineered the hardware and wrote his own firmware. A 10k NTC thermister acts as the temperature probe. The probe is read by the PIC’s ADC. These probes are not very linear, so a look up table is used to convert from volts to degrees Celsius or Fahrenheit.
[Mats] new firmware allows for up to 6 profiles. Each profile has up to 10 set points and a time duration to hold each of the set points. Hysteresis and temperature offset values are also programmable via the front panel. PIC software is often written in C using Microchip’s MPLAB tool chain, and programmed with the PICkit 3 In Circuit Serial Programming (ICSP) tool. [Mats] decided to buck the system and wrote his C code using Small Device C Compiler. To keep things simple for homebrewers who may not have Microchip tools, [Mats] used an Arduino Uno for flashing duties. Thankfully the unholy matrimony of a PIC and an AVR has not yet caused a rift in time and space. The firmware is still very much in the beta stage, so if you want to help out, join the discussion on the homebrew talk forum. If you see [Mats] tell him we owe him a Haduino which he can use to almost open his beer.
[Thanks for the tip Parker!]
Already displays in Fahrenheit, has an adjustable range for temperature spread, also has a timer for refrigerator compressor thingies. Oh and a calibration feature. Will work off a 7.4v (2S) battery if you bypass the transformer and power directly after the rectifier. BUT only has one relay. I should of bought more than two. Using for activating a heat pad and another for activating a fan in an RC vehicle.
Oops,I meant to just leave a link, not have this picture show up and stuff. Delete if needed, sorry.
Since I’m swedish, the reason I’m doing this is to have profiles, as we use Celsius scale. Fahrenheit I added just because I can and it seems to be a feature quite a few ppl want.
So, yeah, that controller is a single stage, single setpoint termostat, that does do Fahrenheit… That is further from what I want, not closer.
Only three of almost 200 countries in the world left which didn’t adopt the superior SI unit system, still causing troubles for all the others … :-/
Now that’s an awesome hack, +1
Awesome!!! I made hackaday :) that is way cool!
Great job man!
This would also allow the controller hardware to be used for tasks more complicated than maintaining a fixed temperature eg. a reflow oven’s profile with soak times etc.
The thermistor will not work for reflow temperatures, and since code is written with fermentation in mind, time is measured in hours.
It’s open source. Swap the sensor for one designed for higher temperatures and modify the firmware.
Yeah I know. I’m the author :)
The problem is the the hardware is designed for NTC sensor, but I’m no expert on NTC’s, maybe there are thermistors that can handle the temperature.
You typically use a voltage divider for thermistors, feed that to an A/D and calculate for temperature. You might be able to find one for the high temperature.
A thermal couple such as a type K with a signal conditioner e.g. AD594/5 or discrete circuit would give you an analog voltage to an A/D (or use one with a digital interface.)
http://www.linear.com/solutions/1432 Discrete Type K signal analog conditioning.
Thermistors only go up to about 20C (400F).
http://www.epcos.com/epcos-en/530384/products/product-catalog/sensors-and-sensor-systems/ntc-temperature-measurement-sensors
2nd from the top, under “Glass-encapsulated sensors” G1550, G550
300C Glass encapsulated NTC thermistors
Sure, but the glass ones are a pain, too easy to break vs the usual beaded ones. Availability isn’t the best either.
Probably ok for an oven, though.
Way to go for using SDCC instead of taking the easy but proprietary route of using the Microchip Dev tools!
If PIC was better supported by open source tools I would probably actually use it again. As it stands I may never use anything other than ARM again…
Thanks! Yeah, I really wanted to use free tools if possible.
I never coded for PIC’s before and I got to say that it has been a somewhat frustrating experience. SDCC and GPUTILS are ok in my book, but the PIC itself is weird to me…
What kind of feedback loop is used to maintain a constant temperature? Can you set, or even better, calculate system parameters?
Simple thermostat control only. This should be good enough for fermenting beer, as the thermal mass is large, and some temperature swing is tolerable. You can set the hysteresis, heating and cooling delay (minimum off time).
More advanced control schemes could be implemented, but the hardware imposes serious limitations. As it is, my firmware pretty much use up most resources, so for this project, thermostat control it is.
A firmware that implements a PID controller (for a HERMS system, maybe) would be very cool!
That would be cool. You’d need to replace the relays with SSR’s, but that is not that hard.
Version 1.00 is now released.
Mats,
Thanks so much for the firmware hack! I have a question: can the firmware be modified to handle temperatures higher than 99.9 ^ C? This will be very useful for using a temperature probe that can measure higher temperatures, so that this PID controller can be used not only for brewing applications, but also other applications that requires controlling temperatures higher than 99.9 ^C.
Again, thank you so much for the great work!
John
In the Github Manual it is stated
“You will need the following equipment:
● An STC1000 (with the correct hardware revision, A400_P)”
How to know when ordering an STC1000 that it is the right one?
I am after 4 units in Romania and need them fast but cannot fund any locally, anyone know a source in EU.
Cheers
Andy
It is like a box of chocolades.
Any chance hacking something like https://www.aliexpress.com/item/1005001505356905.html
I could use diferrential thermostat :-)