• 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.
I really like this idea. I have 4 STC's and would really like to set profiles.:rockin:
 
Very excited about this; very. I have a question. Pg1 has "...the code running on the STC-1000 is protected, that means, once you reprogram, you cant go back...", as well as "...or simply thermostat mode". Are you saying there was both enough room to add 6-10 step profiles, Farenheit conversion, and still keep the standard STC-1000 heating/cooling/compressor-delay mode? Why *WOULDN'T* someone want to flash? Thanks for the effort; STC ordered; researching Arduino.

Thank you! That is very much reaction I was hoping for :)
In fairness, there is either Fahrenheit OR Celsius. Same code, different lookup tables and limits. While it would be possible to actually have both and choose, data is stored as actual temperatures, so switching would mess things up. But I think most will be fine with choosing one.
The basic function is pretty much the same I think, and the profiles actually set the setpoint, that the thermostat is working towards. Pretty much exactly like if you were to press the buttons. So the profiles are sortof added on top of the basic functionality.
Why someone wouldn't want to flash?
Well, so far it is largely untested (well, from what I know, I am the only one yet) and between work, my one year old and improving on the firmware and the Arduino upload, I simply dont have much time to test. So, I can understand if people want to want for the rough edges to smooth out.
However, with the price of an STC-1000 being what it is, I'd really like help in testing, if there are any early adopters...
 
Yeah I'm a little curious about that as well.

Alphaomega, so is the code encrypted or something, to the point where there's no way to rip it and re-flash it back? Not even with a rip of just a raw binary?

That kinda sucks, but let's be honest -- this is a $20 temp controller. I might as well just order another one right now and have it ready. This is turning into the Linksys WRT54G of homebrewing.

Also, any update on a video? I'm going to see about flashing my STC this weekend, so I may try to make a video once I get familiar with it all.
 
Yeah I'm a little curious about that as well.

Alphaomega, so is the code encrypted or something, to the point where there's no way to rip it and re-flash it back? Not even with a rip of just a raw binary?

That kinda sucks, but let's be honest -- this is a $20 temp controller. I might as well just order another one right now and have it ready. This is turning into the Linksys WRT54G of homebrewing.

Also, any update on a video? I'm going to see about flashing my STC this weekend, so I may try to make a video once I get familiar with it all.

No it's not encrypted, its protected. It's a feature of the controller itself that you can enable to protect proprietary code. It disables reading back the binary. It makes sense, for example to protect encryption keys, or even code. If you could rip the binary out, you could flash it on a new chip. So protecting the code could be a way of not having your product copied.
 
Good news!
A guy in a swedish forum is the first to successfully flash his!
He had a lot of problems and it was all my fault, I had mistakenly switched the lines in my images... I have updated the images, so smoother sailing ahead :)

Next order of business.
Since EEPROM (that stores all user data) must be wiped during (at least the intial) programming, I'm now researching the possibility of initializing the EEPROM with sensible defaults.
What would sensible defaults be for the profiles?
There are as previously stated 6 profiles with ten steps each, but the last step being switch back to thermostat mode with that temperature.
You could of course set your very own, but it is kind of frustrating entering a lot of numbers by the keypad... So sensible defaults might be good.

Please chime in if you have any ideas. Or maybe this is just to personal of a preference and they should just be set to 'middle of the road' all around? Or maybe I should work on including something in the sketch that allows it to be set easier?
Ideas?
 
I've been following this thread in awe and admire your dedication to create customizable firmware for such a nifty little and affordable device. I don't doubt you have quite a few hundred hours in this already.

I looked at UNOs already to be able to do the flashing in the near future.

Aside from the handy Fahrenheit readout, the ability to program several profiles make it very enticing.
Thank you for thinking outside the box and interrogating the controller's workings. I'll stay tuned to this channel. :mug:
 
What should each of the steps for the profiles look like?

Stairstepwise:
Set Temperature for Step > Set Duration (hours) of Step >
Set Temperature for Step > Set Duration (hours) of Step > ... etc.

Or can we define slope, ramp up or down x Degrees over y Time?
 
I'm realizing just how bad I STILL am at trying to solder. Gave up on that for now, and am trying to hot glue each wire down to each point.

I don't get it -- I've watched soldering videos a thousand times and always follow proper form, yet it never works out for me. Most of the time I just never get the solder to melt unless I use direct contact, or else I'll end up burning something.
 
I don't get it -- I've watched soldering videos a thousand times and always follow proper form, yet it never works out for me. Most of the time I just never get the solder to melt unless I use direct contact, or else I'll end up burning something.

What is the problem you keep running into? Make sure you clean the tip of your soldering iron with sandpaper and wipe off any excess solder with a wet paper towel. Don't forget to use flux and use isopropyl alcohol to clean it up when you're done.
 
What is the problem you keep running into? Make sure you clean the tip of your soldering iron with sandpaper and wipe off any excess solder with a wet paper towel. Don't forget to use flux and use isopropyl alcohol to clean it up when you're done.

Man, I dunno what I've done wrong here. I finally got the balls to actually do the soldering and here's the job. Yeah, it ain't pretty, but it powers on the controller, and from what I can tell, it SHOULD be able to communicate with it.

I connected everything according to the diagram in the pictures on page 2 of this thread, but it simply doesn't find the STC-1000.

Steps I took:

1. Solder and connect everything
2. Open the program, compile/verify, and upload to the programmer (I tried both usb interfaces)
3. ctrl-shift-m, select 115200 baud, no line ending, and type d, press send
4. STC-1000 not found, check wiring.

Also, when it says it can't detect it, I can hear a very faint clicking noise, and the controller resets. What's going on there?!?!

It's frustrating as hell because I hate soldering, and I feel pretty damn sure that i got it done right, esp considering it's powering up and registering 17.2C which is the temp inside the house right now.

Thoughts?

RhCC7hx.jpg


P.S. I've made sure that none of those wires are crossing each other or touching, so I don't think there's an issue there. I'm baffled. And yeah, I know -- the colors of the wires makes no sense, but I don't really care. They're one-time use, and are what came with the Arduino starter kit I got.
 
FIXED!

The picture on page 2 is STILL incorrect. He updated the readme, but not the image on page 2.



Rely on this:
k970o7.jpg


All is well! Thank God. I was getting so pissed, lol. Also, be sure to recalibrate your thermometers!
 
OK, I know I've got a lot of posts here, but it's late and I'm wide awake cuz I'm super excited about the fact that I got this thing flashed, config'd, and up and running! I thought it would be end of the weekend or later til I'd get it going, but I lucked out.

So anyways, there's all the notes I put in the previous 2 posts that are worth reading, but in this post, I'd like to comment on the new system.

The learning curve is steep at first, and it seems like it was programmed by an insane person. But you slowly start to realize that there's not much better way to code it, and that it's actually done pretty well. However, I've got some suggestions that I'd like to run by:

1. Temperature polling -- this is probably not as big a deal in Celsius, but in Fahrenheit, the screen is going nuts, due to the slightest change in temp. So, for example, my IPA is currently fluctuating at 67.9-68.0, and the screen is going crazy showing it. Is there a way to get it to slow down the polling a bit, to say, maybe every 2-3 secs? It looks like it's doing it multiple times per second. I'm guessing if I look in the code, I'll find it somewhere, but I thought it's worth mentioning.

2. Profiles -- I'd like to trim the number of profiles down a bit, as 9 is excessive. Again, I'm guessing this is relatively easy to find in code, but if you know and can quickly point it out, that'd be great.

3. Thermostat mode -- can you explain this a little bit better? So when the profile that's current active (by choosing "rn" to a profile via the "set" menu) expires, what does thermostat mode do?

4. Hysteresis setting -- so is this the exact same as the temp swing setting? I know it's a swing setting, but I guess my question is, if hysteresis is set to 2F on a 75 setpoint, at 77.1, it will cut on and run to......75?? I just want to make sure that it does indeed run back to setpoint. One interesting feature that would be cool to customize is to tell it to NOT go all the way quite back to setpoint, as our freezers/chambers typically overshoot their target temp. It'd be cool to tell it to cut off a tad early, but that might present issues or just be a hassle with guessing.

That's all I've got for now. Man, alphaomega, I gotta give it to you -- this is some serious kickass software you've made for this controller. I don't think people really realize what they're getting into until they've actually installed it. I know I sure as hell didn't. I encourage all of you to install this, and read the User Manual VERY carefully!
 
Oh, nickmv... I completely forgot about those. I'm so sorry for that. I removed the images from page 2 also.
And don't feel bad about the soldering. I've been into hobby electronics for 20 years and I also have trouble with soldering. It is an art and a science.
I'm really glad you got it working though, please report issues and I'll try to fix them as soon as I can (I already know of a few).

@IslandLizard: That is correct temperaturen x1 for y1 hours, ..., x8 for y8 hours, x9 indefinitly.
Ramping would be nice, but I am afraid that it might not be possible.
 
Good news!
A guy in a swedish forum is the first to successfully flash his!

That is me ;) Happy to be Nr2.. Hope to get some more time to test this today!
So much fun and I really like that it is in a such nice package and now we can
make it do whatever we want! (almost).

Cheers!!
 
OK, I know I've got a lot of posts here, but it's late and I'm wide awake cuz I'm super excited about the fact that I got this thing flashed, config'd, and up and running! I thought it would be end of the weekend or later til I'd get it going, but I lucked out.

So anyways, there's all the notes I put in the previous 2 posts that are worth reading, but in this post, I'd like to comment on the new system.

The learning curve is steep at first, and it seems like it was programmed by an insane person. But you slowly start to realize that there's not much better way to code it, and that it's actually done pretty well. However, I've got some suggestions that I'd like to run by:

1. Temperature polling -- this is probably not as big a deal in Celsius, but in Fahrenheit, the screen is going nuts, due to the slightest change in temp. So, for example, my IPA is currently fluctuating at 67.9-68.0, and the screen is going crazy showing it. Is there a way to get it to slow down the polling a bit, to say, maybe every 2-3 secs? It looks like it's doing it multiple times per second. I'm guessing if I look in the code, I'll find it somewhere, but I thought it's worth mentioning.

2. Profiles -- I'd like to trim the number of profiles down a bit, as 9 is excessive. Again, I'm guessing this is relatively easy to find in code, but if you know and can quickly point it out, that'd be great.

3. Thermostat mode -- can you explain this a little bit better? So when the profile that's current active (by choosing "rn" to a profile via the "set" menu) expires, what does thermostat mode do?

4. Hysteresis setting -- so is this the exact same as the temp swing setting? I know it's a swing setting, but I guess my question is, if hysteresis is set to 2F on a 75 setpoint, at 77.1, it will cut on and run to......75?? I just want to make sure that it does indeed run back to setpoint. One interesting feature that would be cool to customize is to tell it to NOT go all the way quite back to setpoint, as our freezers/chambers typically overshoot their target temp. It'd be cool to tell it to cut off a tad early, but that might present issues or just be a hassle with guessing.

That's all I've got for now. Man, alphaomega, I gotta give it to you -- this is some serious kickass software you've made for this controller. I don't think people really realize what they're getting into until they've actually installed it. I know I sure as hell didn't. I encourage all of you to install this, and read the User Manual VERY carefully!

Thanks for some excellent feedback! Please don't hesitate to report any issues. I don't think I'm insane, but if I was would I know it? :)
You are correct in that there are not a whole lot of ways to this, and yeah (not to toot my own horn) I kind of also think I done a pretty decent job, with the resources at hand. Documentation still is suffering. The user manual is a rush job... Hopefully I can work on that at some point as well.

1. Oh no, it jitters a lot in celsius as well. That is a good point, I'll see if I can fix that at some point, but the issue is really only cosmetic. Bottom line is that, sampling buttons, sampling temperature and running regulation runs off a very carefully selected timer. The timer needs to be fast enough so sampling buttons is responsive, but not to fast to overflow the 1 hour counter. Running counters needs static variables, that eats away at very precious RAM, So, while the thermostat runs at 1 sec (well almost, 960ms) intervals, display runs at full speed (16.6ms). I don't want to add a counter just for display, and I cant run display until buttons are checked.
This is technical stuff... But know that there is a reason. If I can rearrange code, so I can slow down display without it costing RAM, I might get it fixed. Excellent point though. I'll look into it.
EDIT: Ok, I have refactored. Display now updates every second instead.

2. There are actually 6 profiles (0-5), but with ten temperature steps each. That is what fits in EEPROM. Setting profiles is frustrating with keypad, so I'd rather have a few, so you could program the 'usual suspects' only once.

3. From technical point of view, thermostat is really all there is, profiles just sets the setpoint for the thermostat at given times. The last step in each profile (or the first step with a 0 duration), will just set a flag in the EEPROM that profile is not active and setpoint won't be updated automatically anymore.
In the code, profile and thermostat could theoretically be separated, but they do run from the same counter (millisx60), saving RAM.
I don't know if you have noticed, but the 'set' LED on the display is lit when a profile is active.

4. Yes, that is right. Temp swing might have been a better name. It does run back to setpoint, then cuts out, when setpoint + or - hysteresis (or temp swing) is exceeded heating or cooling starts (if delay since last cooling/heating cycle has passed).

Hope, that helps.
And please, do continue the suggestions and observations. I'll keep working on it, but I do have work and family obligations as well... So please have patience :)

There probably a bug also when trying to set temperature < -99.9 or > 99.9, you will still increment in 0.1 steps even though decimals needs to be dropped from display.
 
There probably a bug also when trying to set temperature < -99.9 or > 99.9, you will still increment in 0.1 steps even though decimals needs to be dropped from display.

Quite the ego to quote myself, but it was actually worse than I thought. There also was a bug in displaying temperatures over 99.9 or under -99.9. I think I've fixed it now though.

I've also added ability to upload EEPROM data. I think I will leave it at that for now.
I still need to add the actual default values to the code.
Edit: I added some defaults. But not very good ones for profiles, but at least data in EEPROM should be valid.
 
Quite the ego to quote myself, but it was actually worse than I thought. There also was a bug in displaying temperatures over 99.9 or under -99.9. I think I've fixed it now though.

I've also added ability to upload EEPROM data. I think I will leave it at that for now.
I still need to add the actual default values to the code.
Edit: I added some defaults. But not very good ones for profiles, but at least data in EEPROM should be valid.

Uploading EEPROM via a customizable document where you set your profiles on the computer -- that would be VERY good! It's a tad bit annoying setting the temps from 0.0 to something like 70 degress, by increments of 0.1, but once it's done it's done.

Considering that it sounds like I'm going to be reflashing this when I get home for the screen polling changes (I kept the wires attached, and used a Dremel tool to file down the back casing to fit them out the back), it'd be nice to not have to set everything via the controller itself, instead configuring a file and uploading.
 
Might it be possible to link End-Of-Profile-N to Beg-Of-Profile-N+1, thereby essentially making more steps to a profile? I'm thinking of ramping. I mean, as it stands you have already essentially provided a way to make 10 changes like a degree a day over 10 days. Maybe even go 1 profile, 60 steps instead of 6 with 10. And it looks like you've already looked at ramping since the code has "PROFILE_RAMPING" populating a profile, but I'm just skimming the code at this point, itching for the device to arrive to start playing.
 
I am going to give this a shot this weekend. I already had a spare STC-1000 and an Uno laying around anyway.

Are the numbers in parenthesis on the picture of the STC-1000 header the corresponding pins on the Arduino?
 
Are the numbers in parenthesis on the picture of the STC-1000 header the corresponding pins on the Arduino?

Correct.


Also, alphaomega, can you compile a list of current bugs you know of? And better yet, is there anything that's keeping this from actually being used to ferment a batch? As in, critical bugs in normal operation that will either reset the device, or incorrectly manage the temperature?

I'd like to get a batch of beer brewed with it in use soon.
 
I actually have a spare dorm fridge that I was going to build this STC-1000 into (the original thermostat failed).

If we can come up with a decent testing protocol, I'll be happy to implement it on this fridge.

I can come up with something to log the temps independently, which probably means I need to go ahead and throw my BrewPi together this weekend.

Any ideas? Should I start with a fixed temp in thermostat mode and see if it can hold it for a week? Then start with steps?
 
Regarding testing.
I'm quite sure if it can hold a temp for a day it should be able to hold it for weeks.

One of the biggest bugs I can foresee is the STC not resuming where it left off after a power outage or brief power glitch and going to some arbitrary or off-kilter default setting.

I don't think it's that hard to program a ramp and won't take that much data storage. Again it should resume the correct setting (or program) and point in ramp after a power glitch.

A ramp can exist of a start point (given t, T, or both), a T rise over t hours until a given end point (t, T, or both) and hold there. Intermediate tracking data (for resume purposes) can be stored in a small EEPROM location.

Application of ramp/program:
Typically after some steady temp fermentation time we raise the temps gradually from say 68°F to 76°F over 2-3 days, then hold there for a period of time (say a week), followed by a fast as possible cold crash and held there for a few days, until pulled.

For lagers it is a bit more complex. Not my beer of expertise.

Being able to upload updated or customized firmware easily is a definite plus. Maybe a modified USB socket can be used. It has 4 prongs plus the ground shield.
 
Might it be possible to link End-Of-Profile-N to Beg-Of-Profile-N+1, thereby essentially making more steps to a profile? I'm thinking of ramping. I mean, as it stands you have already essentially provided a way to make 10 changes like a degree a day over 10 days. Maybe even go 1 profile, 60 steps instead of 6 with 10. And it looks like you've already looked at ramping since the code has "PROFILE_RAMPING" populating a profile, but I'm just skimming the code at this point, itching for the device to arrive to start playing.

Yeah, I would very much like to have ramping between steps. But I don't know if it is at all possible. The resources are extremely limited.
It would certainly not be impossible to have one profile with many steps instead. For me, I'd rather have a few profiles, that I don't need to change a lot. Ten steps is plenty for me. I'd like to start coldish, raise to fermentation temp, raise to diacetyl rest, then cold crash. This leaves enough room to actually have a few inbetween steps.
Look at it this way, having the thermostat setting the temp 10 times for you, is at least 10 times better than stock firmware.
The reason for exactly ten steps is because of the display. If I were not to make this project public, I might have gone 16 and used hex. And 6 profiles is what fits in the EEPROM at 10 steps.

Correct.


Also, alphaomega, can you compile a list of current bugs you know of? And better yet, is there anything that's keeping this from actually being used to ferment a batch? As in, critical bugs in normal operation that will either reset the device, or incorrectly manage the temperature?

I'd like to get a batch of beer brewed with it in use soon.

The issues I have to work with now are mainly improvements, I know of no critical bugs, but there probably ARE bugs, and they may be critical. I have no idea if it even works :) During development I don't even power feed the relays, so...
I'd be happier if it could be tested at least a few days (I mean try running a few profile steps at least) over a period of at least a few hours each...
I dont know if timers are correct or stack overflow can occur...
I mean, I'd hate to see you ruin a perfectly good batch of beer over this. Could you try a 'dry' run possibly?
 
Great work, this would be perfect for ramping up/down temperatures automatically!

Is there by any chance a serial interface on the PIC, and could the firmware be written small enough to use it?
 
I'd be happier if it could be tested at least a few days (I mean try running a few profile steps at least) over a period of at least a few hours each...
I dont know if timers are correct or stack overflow can occur...
I mean, I'd hate to see you ruin a perfectly good batch of beer over this. Could you try a 'dry' run possibly?

Yeah, I'm looking into how I'd do this, since just putting water in there isn't going to generate heat that requires control, like a fermentation does. I could possibly add hot water to a vessel to slowly drive temp up and test it.

At this moment, my IPA is sitting at home, running on Profile 1, Step 1, 72.5F, with a 2F hysteresis, and it's doing nothing --- as I want it to.

My controller does not have heating hooked up, due to the climate I am in. I only use cold, which works well for me, so when it turns heat on, nothing happens. I have my top outlet wired to cold, and the bottom wired to always on for my fans.

But anyways, yeah, I'll see what I can do this weekend, and possibly give it a go. I can atleast test to ensure that the setpoint-over-time logic works correctly, so that I don't have to worry about issues there. I'll do some testing.....keep at 70F, then after 1 hr, cool to 65, then after 2 hrs , to 60, etc.

That all being said, I do have the balls to brew a batch and use it. This firmware doesn't scare me so far, and I've got some brews I've GOT to make over the next couple weeks. Since I work so close to home, I have the luxury of keeping a close eye on them. I'd probably just set all the steps in a profile to the same temp, in order to keep it from crashing (if that potential was there), in order to ensure a good brew.
 
I would love to dry run it ASAP with my temp datalogger--just waiting on the unit and device to flash it.
 
Back
Top