• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

Stc-1000+

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
This is insanely cool. I'm just about to start a 3 chamber fermenter and I was considering whether it would be worth getting three brewpi's. This solution is exactly what I need! Thank you so much for your work on this!
 
If you really want to support a temperature schedule, you are going to need a better
way to specify a temperature ramp.

Here is a typical lager profile

1. ferment at 52 for 8 days
2. ferment at 67 for 1 day (diacetyl rest)
3. ramp down to 40 over 14 days (2 deg/day)
4. lager at 40 for 28 days.

If you made a profile with a tuple of (temp, time, #steps) then you could specify profiles
that are flat, steps and complex (like the lager above).

The 3rd parameter is the number of steps to repeat. I.e.
when steps is >0, the temp is a delta temp to apply to the current temp level.
Then wait the # hours specified.
Repeat until steps is zero.

If you implement this, the typical profiles get one more argument instead of the current
two (temp,time). The complex profile would use 12 arguments:
(52, 192, 0) [192 hrs is 8 days]
(67, 24, 0)
(-2, 24 14) [ramp down 2 degrees per day over 14 days]
(40, 224, 0)

Thus your submenus would have support for 6 steps with 2 left over (for maybe a final (temp, time) setting)

Thoughts ?
 
Wow, Fella's !

Still, all Greek to me, ( 'cept for the soldering part), but it's bad ass to see this taking off so, and the brainstorming and networking going on to customize the profiles, and to work out all the bugs.

Amazing!........The help and knowledge available to this hobby's community!
 
This is insanely cool. I'm just about to start a 3 chamber fermenter and I was considering whether it would be worth getting three brewpi's. This solution is exactly what I need! Thank you so much for your work on this!

So to be clear, you're gonna get 3 STC-1000's, not just 1?

Just want to make sure. If so, I think you're gonna find that you're gonna save a TON of money! This is a great project to get involved with, and I think it's about to really take off.
 
If you really want to support a temperature schedule, you are going to need a better
way to specify a temperature ramp.

Here is a typical lager profile

1. ferment at 52 for 8 days
2. ferment at 67 for 1 day (diacetyl rest)
3. ramp down to 40 over 14 days (2 deg/day)
4. lager at 40 for 28 days.

If you made a profile with a tuple of (temp, time, #steps) then you could specify profiles
that are flat, steps and complex (like the lager above).

The 3rd parameter is the number of steps to repeat. I.e.
when steps is >0, the temp is a delta temp to apply to the current temp level.
Then wait the # hours specified.
Repeat until steps is zero.

If you implement this, the typical profiles get one more argument instead of the current
two (temp,time). The complex profile would use 12 arguments:
(52, 192, 0) [192 hrs is 8 days]
(67, 24, 0)
(-2, 24 14) [ramp down 2 degrees per day over 14 days]
(40, 224, 0)

Thus your submenus would have support for 6 steps with 2 left over (for maybe a final (temp, time) setting)

Thoughts ?

That is not a bad idea at all, something simpler like this could work.
Right now, I'd be glad to get the current functionality working, but I would consider something like this for future improvement.
In fact I could go so far as to only use delta temperatures to keep it simple, you'd prolly have to plan it out on paper before programming, but personally I could live with that.
As I've said before, there are extremely limited resources to work with. So keeping things simple is not only key to success, there just is no other way to do it...
 
These are all great ideas, which is a great thing for this project.

Perhaps multiple versions can be created here? That would be ideal.


alphaomega, I've shared your project with both my local brewclub mailing list, as well as posted it to Reddit under /r/homebrewing, with all credit due to you of course.
 
So I just got done flashing the latest code, and I decided to calibrate my thermometer, since I didn't get a chance last night. A couple things:

1. I was surprised to find that my probe appears to be off by more than it used to be when I ran the stock software. AlphaOmega, does this make any sense? Perhaps the look up table you created isn't 100% accurate, and requires calibration for all users? It would make sense if you created that table from scratch. My setting was always -0.6C on the old setup, and now it looks like it's reading 34.8 when both of my Thermoworks thermometers read 31.8 in a glass of crushed ice + water (the standard test). 0.6 C is just over 1 degree of adjustment in fahrenheit, so I was a bit surprised to find ~ 3F difference. Either way, I'm adjusting it since I can only rely on what the device says, so I'm not THAT worried about it, especially if my theory about the lookup tables is correct.

2. Under the settings menu, how does the setpoint and other settings work,in relation to profile? Are those specifically for "Th" thermostat mode only, or what? It's a bit confusing, so I always use a profile, and run that profile, instead of messing with setpoints within the settings menu.

3. You reworking the screen refresh rate helped greatly. My SS Brew Bucket is now pretty stable at 68.0, and occasionally goes to 68.2, but no seizure-inducing back-and-forth flashing anymore.

4. Last thing -- does the power button not work to turn the controller on or off? It doesn't appear to serve this purpose anymore, as I've found that it appears that there's no way to turn the device on or off. It's jut on when plugged in, an==of mj

One last thing -- what's your actual name? I feel better calling you by your name. Is it Mats? I'm not good with Swedish names, but just going by your github ID.
 
So I just got done flashing the latest code, and I decided to calibrate my thermometer, since I didn't get a chance last night. A couple things:

1. I was surprised to find that my probe appears to be off by more than it used to be when I ran the stock software. AlphaOmega, does this make any sense? Perhaps the look up table you created isn't 100% accurate, and requires calibration for all users? It would make sense if you created that table from scratch. My setting was always -0.6C on the old setup, and now it looks like it's reading 34.8 when both of my Thermoworks thermometers read 31.8 in a glass of crushed ice + water (the standard test). 0.6 C is just over 1 degree of adjustment in fahrenheit, so I was a bit surprised to find ~ 3F difference. Either way, I'm adjusting it since I can only rely on what the device says, so I'm not THAT worried about it, especially if my theory about the lookup tables is correct.

2. Under the settings menu, how does the setpoint and other settings work,in relation to profile? Are those specifically for "Th" thermostat mode only, or what? It's a bit confusing, so I always use a profile, and run that profile, instead of messing with setpoints within the settings menu.

3. You reworking the screen refresh rate helped greatly. My SS Brew Bucket is now pretty stable at 68.0, and occasionally goes to 68.2, but no seizure-inducing back-and-forth flashing anymore.

4. Last thing -- does the power button not work to turn the controller on or off? It doesn't appear to serve this purpose anymore.

One last thing -- what's your actual name? I feel better calling you by your name. Is it Mats? I'm not good with Swedish names, but just going by your github ID.

Yet more constructive feedback nickmv! It is really appreciated! Thanks!
I'll try to answer as best I can.

1. It is very possible that the lookup table is a bit off. After I had the LED display working, what I did was write some code to simply display the raw AD value on the display. I then used my glass thermometer (that I usually use for brewing and is pretty much the only one I got at this point as I have managed break the digital ones) and put both in icy water and slowly raised temperature to about 70 deg C, noting both values along the way.
From the AD values I assumed that the NTC was connected as a voltage divider that is centered at 25degC. I calculated the resistance at different temperatures and went online to try and find if I could match this to some known type.
I eventually found this Vishay NTC 10K that seemed to match my data.
I then went the other way and used that table to calculate AD values for the different temperatures. I needed to interpolate a little where the AD values didn't exactly match the values needed for the lookup table. I then also made the conversion to Fahrenheit.
This was the best that I could do.
Now, there are a lot of possible sources of error here. I've made a few assumptions (like I don't know of that table REALLY matches the actual probe, but it at least seemed correct over the range I tested 0-70 deg C) and I may have made mistakes along the way. And even if all that is correct, I am no expert in thermistors, I don't really know what deviations you'd might expect from one to another.
Finally, measuring accurate temperature is not all that easy. I'd say that the resolution is sufficient in this application (i.e there are enough bits in the AD conversion that actually hold data), but to achieve accuracy is another thing. Even with a perfectly calibrated lookup table, I would suspect that 0.1 degree (in deg C) accuracy is not going to happen, best thing you can do is calibrate around your working point. Even the STC-1000 manual states 0.1 deg C resolution 1 deg C accuracy (that would be ~2 deg F).
Sorry for the painfully long answer, in short. Yes, it is very likely that there could be improvements to the lookup table that would improve accuracy. If you can provide data, that would be helpful (temp vs resistance) or even if you have insights to the specs of the actual probe. But we also need to be realistic as to what can actually be achieved.

2. Setpoint will always be what the thermostat strives for. You can set the setpoint even during a profile, and it will change. Only, once the profile reaches a step, it will be overwritten with the new value from the profile. The best way to think about it is as I have described it previously. There really only is thermostat mode and it uses setpoint. Profiles are built on top of that, to automatically set the setpoint at given times (instead of having to actually punch it in yourself). I realise it is not so easy to know how it works, as documentation is so lacking. If the firmware reaches something that we all can feel is good enough (you know, the infamous version 1.0) I hope to be able to spend some time improving documentation. In the meantime please bear with me and don't give up :)

3. I'm glad to hear! I've been pondering moving the millisx60 counter to the main loop, and maybe split the code up a bit more, so it will be easier to both read and maintain. Right now I'm not really happy with the solution, but at least it seems to work.
Also, one of the features I would really like to add is oversampling and at least averaging the AD value, that would also aid stability. I would want filtering, but let me tell you, I cant even get averaging working at the moment since it adds 2 more bytes of RAM. That is how close to the limits of the hardware that we are...

4. No right now it only functions as back/cancel in the menu. I do want to add the functionality (for v1.0), but I don't feel it is a show stopper, as I said before, power off does not actually power off... It pretty much just clears the display and disables relays. To power really off, you'd need to cut power.

Again thanks for the work you do! Please keep it up!
 
If you can provide data, that would be helpful (temp vs resistance) or even if you have insights to the specs of the actual probe.

This is all way over my head and I really don't know if this helps but here is a lookup table we use on some equipment in our lab. It on pg 26 of this manual.
It varies from the Vishay one you posted a little bit. To calibrate the probe, the monitor allows you to adjust the resistance using a multiplier to dial in the proper temp (pg 41).
 
Ya know, it's possible we could email Elitech, saying we're an engineer, and ask them what probe/thermister is used in the STC-1000. It's a shot in the dark, but surely wouldn't hurt.

We need to be careful not to link them in any way to the project, should they happen to get irritated at it.

Unfortunately, the big issue is trying to figure out WHERE to send an email. My searches for Elitech so far have not yielded the company that I think manufactures this controller. Theres http://www.elitechgroup.com/ but I don't think that's them.
 
This is all way over my head and I really don't know if this helps but here is a lookup table we use on some equipment in our lab. It on pg 26 of this manual.
It varies from the Vishay one you posted a little bit. To calibrate the probe, the monitor allows you to adjust the resistance using a multiplier to dial in the proper temp (pg 41).

While that table has numbers that seem pretty close, by my calculations, they would put the test nickmv did at around 36F, so even more off. Without data for the actual probe, it is pretty much guesswork.
 
Huh...
I just found this
Which temperature probes work with ATC800+
, where they mention the probe is a 'thermistor type NTC (10K / 3435)'. Googling for that I found a table that at least initially looks promising.
I'll check it out more this evening at home, would be cool it I could find verified data on the probe :)
 
Huh...
I just found this
Which temperature probes work with ATC800+
, where they mention the probe is a 'thermistor type NTC (10K / 3435)'. Googling for that I found a table that at least initially looks promising.
I'll check it out more this evening at home, would be cool it I could find verified data on the probe :)

Solid. I look forward to hearing about it.
 
You're speaking Greek (Swedish?) to me with the firmware stuff, but I would pay for one of these!
 
You're speaking Greek (Swedish?) to me with the firmware stuff, but I would pay for one of these!

It's not really THAT difficult to actually get one of these flashed. Now, understanding the code and design that goes into -- that's the mind blowing stuff.

First, there's the Arduino board -- it's a basic beginner's project programming board, that allows you to do all kinds of cool stuff with it. It's highly expandable, and the limits are practically endless with what you can do. The Raspberry Pi, for example, has a project on HBT that allows you to display digitally what's on tap on your keezer, as well as add flow meters to display how much of your beer is left in the keg. Again, endless possibilities.

Then you've got the STC controller. THis is obviously what you're working on. You're going to be doing some soldering, which, to a beginner and even some very experienced folks, is the hardest part. I dread soldering and I've done it several times before.

Once you've got your wires soldered to the controller, you're simply hooking it up the Arduino, then hooking the Arduino up to your computer. You then launch a program that the author included, you press compile, you press Upload (to send to the Arduino), then you open up a window, type d, then type a or f.

It's that simple. Really not a ton of stuff to do. You've just gotta have some patience and work carefully at it.
 
Ok. I'm in.

I just bought 2 STC-1000s off of ebay. Shipping from China so should be here in a couple of weeks and I can help test code.

My background is in Electrical Engineering and I've written assembler code, PHP and javascript. I downloaded the pic data sheet from here and have started reading through it.

Just finished converting a side-by-side refrigerator to a combo fermentation chamber/keezer. I used two controllers similar to the STC-1000, but with single relays and displays in F. Want to convert at least one of them to a dual relay STC-1000 so I can run heating and cooling (I can only run heat OR cooling now, but not automatically switch).

My plan for my current build was to get a Raspberry Pi and make it into a temperature monitor using the GPIO and a couple of thermistor probes. Then take the collected data and display it via web server from the R PI running linux. I was planning to do three (or maybe four) temperature probes. One each for the fermentation chamber/keezer ambient temps, plus a couple of probes to directly measure the carboy/wort temps. Then also monitor the compressor and circulation fan on/off status.

You guys are doing great work and I don't want to hijack this thread, so can start a new one if needed.

What do you think about interfacing the R Pi to the STC-1000 to create a controller to make the step/profile changes dynamically, controlled from a web page? This might solve the limited memory issues you're facing trying to cram all that code and variables into a couple of bytes of RAM.

-gary
 
Subbed... I've also played around a little with MPLAB and Pic's I think I'll order a non-production STC-1000 and play a little before implementing this in the brewery - Looks like great work though!
 
So far it's been running great for me, however I must admit, I have NOT yet tried the stepped functionality. Instead I've been leaving it on a profile that has the first step at well over 100hrs, to simply keep it on the same setpoint.
 
Awesome work AlphaOmega!

I just reprogrammed mine and it worked perfectly the first time. Is that the relays chattering when the programming is being done? (weird)

I had to adjust the STC-1000 down by 2.6*F to match my Thermapen at 56*F. Then I tested it in some water that the Thermapen said was 76.4*F and the STC was reading 0.2* lower. So, it's pretty close.

I'll do some more testing this weekend.
 
What do you think about interfacing the R Pi to the STC-1000 to create a controller to make the step/profile changes dynamically, controlled from a web page? This might solve the limited memory issues you're facing trying to cram all that code and variables into a couple of bytes of RAM.

-gary


I'd love to see a project like this!
 
I was slacking while my code was compiling, came to HBT and...ended up reading more firmware.

Seriously, though, I am impressed. Great job on the reverse engineering, and the comments in the code make it easy to follow what's going on. The only part that confused me on a cursory look through the code were the magic numbers in the button_menu_fsm function. One could figure it out with the info at the top of page0.c, if necessary, though.

Nicely done! I'm sure the simplicity of the code belies the amount of reverse engineering involved.
 
I'd love to see a project like this!

Check out http://www.brewpi.com/. If you already have a Raspberry Pi, I don't see much sense in trying to interface it with a limited capability controller like the STC-1000. Just hook up an SSR and control it directly. Adding extra features in a fully-supported OS is probably going to be a lot easier than cramming them into the limited firmware of the STC-1000 or reconfiguring the STC-1000 to be interrupted and controlled by an external device. That said, it would be fun to do this, just not very practical.
 
Adding extra features in a fully-supported OS is probably going to be a lot easier than cramming them into the limited firmware of the STC-1000 or reconfiguring the STC-1000 to be interrupted and controlled by an external device. That said, it would be fun to do this, just not very practical.


Couldn't agree more. These are great ideas, but some of them are totally impractical and just not worth attempting, given the reward or lack thereof.
 
Awesome work AlphaOmega!

I just reprogrammed mine and it worked perfectly the first time. Is that the relays chattering when the programming is being done? (weird)

I had to adjust the STC-1000 down by 2.6*F to match my Thermapen at 56*F. Then I tested it in some water that the Thermapen said was 76.4*F and the STC was reading 0.2* lower. So, it's pretty close.

I'll do some more testing this weekend.

Most calibration techniques would suggest preparing a crushed ice/water bath to test and/or boiling water.
 
If you can, it is best to calibrate in the temperature range that you will be using the device.

I don't plan to freeze or boil my beer, so I think somewhere in the 60*F range is good.

The crushed ice mixture and boiling is good if you don't have a thermometer with a known good calibration to use as a comparison. The Thermopens are certified.

I will check it at both extremes though. It'll be interesting to see if it is very far off at those ends of the range.
 
If you can, it is best to calibrate in the temperature range that you will be using the device.

I don't plan to freeze or boil my beer, so I think somewhere in the 60*F range is good.

The crushed ice mixture and boiling is good if you don't have a thermometer with a known good calibration to use as a comparison. The Thermopens are certified.

I will check it at both extremes though. It'll be interesting to see if it is very far off at those ends of the range.

That seems like pretty sound logic there. Let me know if you find there to be a big difference, so I can recalibrate mine if needed before my first brew with it. I've got a Thermapen along with an RT-600C that's identical in accuracy and calibration. That's what I used to calibrate mine the other day.
 
So I just want to update on what's going on. I have just updated github with latest changes.
I have refactored and cleaned up the code. This might induce bugs, but I think in the long run, it is better to refactor early. I feel pretty good about the changes made, so hopefully there won't be need for many larger changes down the road.

I have updated the lookup table with new data that I found for NTC thermistor (10k 3435). The old data is very similar to the new data for temperatures above room temperature, but start to deviate some below. This would account for nickmv's observations. Still, looking at the specs for the sensor, there is a fairly large tolerance, so calibrating the sensor around your working point would still be a very good idea.

I have managed to cram in oversampling and averaging of the AD, which is also a really good thing.
I have had problems with sensor alarm, somehow it interferes with the cooling relay, (this is driving me nuts... I had a helluva time locate what was causing the problem, and now that I found it, I cant for the life of me understand why it could be an issue). So, until I can figure out what the issue is, I have disabled the alarm for now.
 
The new code isn't working for me. It will display a temperature, but none of the buttons work, so I can't get into set mode. The best I can get is an occasional blink in the display that seems associated (delayed) with a set button press.
 
Back
Top