Happy HolidaySs Giveaway - Winners Re-Re-Re-Drawn - 24 hours to Claim!

Get your HBT Growlers, Shirts and Membership before the Rush!


Home Brew Forums > Home Brewing Beer > DIY Projects > Fermenters > Stc-1000+
Reply
 
LinkBack Thread Tools
Old 03-09-2014, 08:23 PM   #1
alphaomega
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2013
Location: , Sweden
Posts: 461
Liked 183 Times on 91 Posts
Likes Given: 153

Default Stc-1000+

Hi!

I'm very pleased to announce the inital release of my project for the last few weeks, STC-1000+.

I have reverse engineered the STC-1000 and reprogrammed it with new firmware that is specifically made for beer fermentation. What that means is that I have added possibility to run temperature profiles (i.e. change setpoints at given times). And yes, I have also made it possible to use Fahrenheit scale (why anybody would want that beats me, but as I understand that is a pet peave for you guys).
Moreover, as I realize most of you (including myself) dont have the programmer needed to perform the upgrade, I have designed a sketch targeted for the Arduino UNO, to do the actual flashing of the firmware. All you need (in addition to the UNO) are a few pieces of wire (and maybe some soldering skills, I guess you could use hot glue or tape or something in a pinch).

It is all released as open source, so feel free to modify, but please contribute if you can.

Now, here's the downside, I've been working my ass off on this project for a week or two now and finally have something to present, but it is not 'done' yet. It is not production ready so to speak.
I would like all the help I could get, please try it if you can and report bugs. Don't try it on beer though, if you do and fail, don't blame me.
Also, the code running on the STC-1000 is protected, that means, once you reprogram, you cant go back. They are pretty cheap though...

If you are experienced in PIC programming, please have a look at the code. I would consider myself experienced in embedded programming, but not so much towards the Microchip line of MCU's.

With the source I provide, it is also possible to repurpose the the STC-1000 pretty much any way you'd want if you are cool with some coding. It could be a PID for example if you exchange the relays for SSRs. The PIC fairly puny though, so you will need to be careful when coding, especially RAM is very tight.

The firmware I provide, features 6 programmable profiles, 10 setpoints each with 1-999 hours between setpoints. You can also set hysteresis, temperature correction offset, cooling delay, you can change current step and duration in the running profile and you can set current setpoint, finally you can choose and run profile or simply thermostat mode.

Right now programming is made by sending the HEX file through the Arduino usiing a serial terminal emulator that supports sending files (I use CuteCom in GNU/Linux). But once I reach something that I feel is good enough I'll provide the option to embed the HEX in the sketch and you'll just need the Arduino IDE to (user friendlier to the non-developer).

The programming header ont the STC-1000 is a bit difficult to reach from the top, you might have better luck on the bottom of the board. I have provided a picture of my dev board, but in it I have already soldered in a pin header.

So, again, if you can, please contribute and maybe soon enough everyone can run a slightly better STC-1000.

Lastly, documentation is suffering right now, I'd like to improve it as well, but I feel like I want to get this project 'out there' as soon as possible.

Find the source here.

Cheers!
//Mats

Edit: Update 04-04-2014, v1.00 now released. This is the first version that should be good enough for actual use

alphaomega is offline
24
People Like This 
Reply With Quote Quick reply to this message
Old 03-09-2014, 10:26 PM   #2
Brumateur
HBT_SUPPORTER.png
Feedback Score: 0 reviews
 
Brumateur's Avatar
Recipes 
 
Join Date: Jan 2014
Posts: 411
Liked 49 Times on 47 Posts
Likes Given: 20

Default

Wow! You did a great job Alpha!
Do you have a reverse engineered schematic of the STC?

__________________
Brumateur is offline
 
Reply With Quote Quick reply to this message
Old 03-09-2014, 10:38 PM   #3
alphaomega
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2013
Location: , Sweden
Posts: 461
Liked 183 Times on 91 Posts
Likes Given: 153

Default

Thanks a lot!
Well no, not the schematics as such. I've reverse engineered the function of buttons, leds, relays and how they are used by the MCU.

alphaomega is offline
 
Reply With Quote Quick reply to this message
Old 03-09-2014, 10:43 PM   #4
Brumateur
HBT_SUPPORTER.png
Feedback Score: 0 reviews
 
Brumateur's Avatar
Recipes 
 
Join Date: Jan 2014
Posts: 411
Liked 49 Times on 47 Posts
Likes Given: 20

Default

Could you explain how that ADC to temperature conversion works? I don't quite understand meaning of number in ADC look up table and how exactly you do an interpolation. And what does exactly represent an ADC reading? Is it proportional to probe resistance?

__________________
Brumateur is offline
 
Reply With Quote Quick reply to this message
Old 03-09-2014, 11:04 PM   #5
alphaomega
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2013
Location: , Sweden
Posts: 461
Liked 183 Times on 91 Posts
Likes Given: 153

Default

Yes, the NTC probe is very nonlinear. Linearization is not feasible by mathematical function on this tiny MCU, so instead a lookup table is used and interpolation between points in the LUT.
Yes, the reading is the voltage on the AD pin. The NTC is connected as a voltage divider. Voltage is proportional to resistance and resistance to temperature.
The numbers in the LUT is the temperature in C or F respectively multiplied by 10 for every 32nd possible AD value.
Edit: Interpolation is done by adding x times the value that matches top 5 bits read by AD in the LUT and 32-x times the next value in the LUT. Then divide by 32. X is the lower 5 bits read from AD.
Edit2: The values are multiplied by ten in the LUT as floating point arithmetics is of course out of the question also. And I want one decimalpoint to be presented to the user. If Fahrenheit is used, then decimalpoint is dropped from display over 99.9 deg.

alphaomega is offline
IslandLizard Likes This 
Reply With Quote Quick reply to this message
Old 03-09-2014, 11:44 PM   #6
Brumateur
HBT_SUPPORTER.png
Feedback Score: 0 reviews
 
Brumateur's Avatar
Recipes 
 
Join Date: Jan 2014
Posts: 411
Liked 49 Times on 47 Posts
Likes Given: 20

Default

I see.

Looks like you have a typo at your Celsius table - there is a mismatch between C and F tables. C table value shifted right by adding "0" value to first element of the LUT array.

__________________
Brumateur is offline
 
Reply With Quote Quick reply to this message
Old 03-10-2014, 12:36 AM   #7
centex99
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Dec 2011
Location: Buda, TX
Posts: 214
Liked 4 Times on 4 Posts

Default

nice job, subscribing and will look over the code later and am willing to help if possible... One thing having his also allows us to do is reprogram the LUT for different sensors...

__________________
In Primary: Nothing
In Keezer: Nothing
Up Next: TBD

My Keezer Build
centex99 is offline
 
Reply With Quote Quick reply to this message
Old 03-10-2014, 07:41 AM   #8
alphaomega
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2013
Location: , Sweden
Posts: 461
Liked 183 Times on 91 Posts
Likes Given: 153

Default

Quote:
Originally Posted by Brumateur View Post
I see.

Looks like you have a typo at your Celsius table - there is a mismatch between C and F tables. C table value shifted right by adding "0" value to first element of the LUT array.
Great catch! I think it is Fahrenheit table that is missing a value. I'll fix that asap. Thanks!

Regarding different sensors, I think we'll still be limited to 10k NTC sensors (because the voltage divider is designed for that), but it may be possible to use other 10k NTC sensors with different curves.

Edit: Ok, I have checked the LUT, and Fahrenheit table was indeed missing the initial zero. I have fixed that, and pushed the chages. Thanks again Brumateur! Very good catch!
__________________
STC-1000+ (improved STC-1000 firmware for fermentation)
My dirt cheap RIMS heater
alphaomega is offline
 
Reply With Quote Quick reply to this message
Old 03-10-2014, 10:03 PM   #9
alphaomega
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2013
Location: , Sweden
Posts: 461
Liked 183 Times on 91 Posts
Likes Given: 153

Default

Ok, I have now fixed the sketch so that flashing new firmware is pretty much as easy as it can be.

Just download the sketch, open it in the Arduino IDE and upload to the Arduino.
Make the 5 connections needed from the STC-1000 to the Arduino board AFTER the upload.
Then use the the Arduino IDE serial monitor at 115200 baud to send a 'd' to check that the STC-1000 is detected (checks that it is the MCU that is expected).
If all is ok, send an 'f' to flash the fahrenheit version (or 'a' for celsius version).

Please see GitHub page for latest info STC-1000+

__________________
STC-1000+ (improved STC-1000 firmware for fermentation)
My dirt cheap RIMS heater
alphaomega is offline
 
Reply With Quote Quick reply to this message
Old 03-11-2014, 12:49 AM   #10
nickmv
HBT_SUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Mar 2010
Location: Memphis
Posts: 777
Liked 60 Times on 48 Posts
Likes Given: 4

Default

This is some beautiful work here man. Congrats and hats off to you, this is GREAT!

Anyways, do you have a video you could put up on YouTube of it in action, and also, which UNO do I need?

Will this one work?

__________________

Primary #1 (SS Brew Bucket):
Primary #2 (SS 7G Chronical):
Primary #3 (Better Bottle): Rye Saison
Secondary #1: Pinot Grigio Kit
Secondary #2: Pinot Grigio Kit
Secondary #3: Gewurztraminer Kit
On-Deck:
Kegged & Waiting: Citra Black IPA
ON TAP: n/a
2014 Beers So Far:
Belgian Wit | Burton IPA | Belgian Wit | Black IPA | Rye Saison | Hefeweizen

nickmv is offline
 
Reply With Quote Quick reply to this message
Reply



Quick Reply
Message:
Options
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Overstock caps? 1000@$25, or 1000@$30 free shipping. LinuxAssailant Equipment/Sanitation 6 01-31-2014 10:09 PM
Help with an STC-1000 72Chevelle Kegerators and Keezers 6 03-15-2013 06:28 PM
Stc 1000 . . . . ? Esmitee Fermenters 12 02-02-2012 12:31 AM



Newest Threads

LATEST SPONSOR DEALS