• 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.
The hot and neutral go to 1 and 2 respectively.

Only jump the hot from 1 to 5 to 7.

Take a neutral from 2 to each outlet. Take a hot from 6 to one outlet and a hot from 8 to the other outlet.

The relay switches hot.

So...electricity 101? Must've forgot the basics after a long brew day. Works perfectly - thanks!
 
I feel like I'm going to want to delete this post after I figure this out from embarrassment, but here it goes:...

I did the same thing with the same heater even though I've wired several of these units before and should have remembered that power to the unit doesn't power the heating and cooling circuits. D'oh! :smack:
 
I did the same thing with the same heater even though I've wired several of these units before and should have remembered that power to the unit doesn't power the heating and cooling circuits. D'oh! :smack:

It feels slightly better I'm not the only one. I guess I deserve it since I was overconfident enough to do a brew & wire up the heater in a single day thinking it'll only take a few extra minutes...
 
I have my 2 probe controller cooling wort now.

Today's temperature is 39.1 deg C.

I'm chilling the wort from 25 deg C to 18 deg C. I set the "hy2" to 12 deg C.

The wort a moment ago was 20.3 deg C and the fridge temp was 15.3 deg C.

The difference between the two has never been more than 6 deg C. I might have to trim the "hy2" down a bit. I will have to see how it performs as the wort approaches 18 deg.
 
I missed the temperature hitting the set point. When I checked a moment ago the wort was 18.5 deg (0.5 hysterisis) and fridge was 19.3. Cooling will kick in soon.

Working like a charm!
 
Mats, thank you for reply. Apologies I have not read the whole thread.

I am not familiar enough with github to know if you have visibility all forked repositories.
In my setup I belive would be useful to have separate Heat/Cool set points so I had a go at implementing it in the most simplistic way (see attached graph and branch 2489/PP_004)
- New configuration parameter SPd (Set Point Difference) introduced.
- SPd has a default value of 0°C/F and defines how far below the Set Point corresponding to the heating cycle is in relation to the cooling cycle
- The parameters in the graph below are SP (Set Point), hy (Hysteresis) and SPd (new, Set Point Difference)
- The change was done for single probe setup only as I do not have means to check other configurations have enough EEPROM to host the new parameter.

On a slightly different subject, I've also implemented a "menu lock" feature. The changes are in branch 2489/PP_005
I have a toddler running around and a bright display with numbers and buttons is way too tempting for him!
The way it works is:
- BTN UP+DOWN (displays version), followed by PWR enables menu lock
- BTN UP+DOWN (displays version), followed by PWR for 10s disables menu lock
- When in menu locked state, the only menu action allowed is to disable menu lock
- Access to menu items is allowed if in alarm.

Unfortunately I don't have the unit available for testing, so these changes are yet to be validated.
I thought you may want to have a quick look to review if I have gone completely wrong?

Thanks

Sorry for the late reply.
First off, I still don't agree with different hysteresis for heating and cooling, but if that is something you want AND you fixed it yourself, then kudos!
The child lock feature is a pretty good idea though. I've had a quick look at the PP_005 branch, and I think you're on the right track.
I don't like that there is duplicated code (special case for show_version, when up and down is pressed). I'd like to see that refactored to eliminate the duplication.
There might be an issue with "power off" and this, but it might not show (that is show version runs even if 'powered off', but if screen is blanked, you might not see that).
I can't spot anything obviously wrong though :)
Keep it up! Hack away!
 
Hello guys, hoping you can help me. I have a stc1000 running the ovbsc software. Switched it on for the first time this afternoon after integrating into my controller box and when I tried to run manual mode to trigger the heating relay, the alarm sounds when the relay is on. I have modified the relays for SSR operation, i.e. I've bridged the relays to get dc to the screw terminals. Am I doing something wrong or could I have caused this through modification? I also added a header in order to flash the software.
 
Hello guys, hoping you can help me. I have a stc1000 running the ovbsc software. Switched it on for the first time this afternoon after integrating into my controller box and when I tried to run manual mode to trigger the heating relay, the alarm sounds when the relay is on. I have modified the relays for SSR operation, i.e. I've bridged the relays to get dc to the screw terminals. Am I doing something wrong or could I have caused this through modification? I also added a header in order to flash the software.

Are you trying to power your SSRs directly from the STC mobo, effectively bypassing the relays? I doubt it can supply the amperage needed by the SSRs. Those STC relays are held by a few mA, driven by a small transistor.
 
Hello guys, hoping you can help me. I have a stc1000 running the ovbsc software. Switched it on for the first time this afternoon after integrating into my controller box and when I tried to run manual mode to trigger the heating relay, the alarm sounds when the relay is on. I have modified the relays for SSR operation, i.e. I've bridged the relays to get dc to the screw terminals. Am I doing something wrong or could I have caused this through modification? I also added a header in order to flash the software.

Does this help?
https://github.com/matsstaff/stc1000p/wiki/1.5.2-Solid-state-relay
 
Yes, that's the instruction I followed to make the modification. As far as I know I completed it correctly and can't see that I could have caused the alarm to sound when on heating. Am I doing something wrong in my setup in manual mode that's causing the alarm to come on when heating? I've made sure the set point is above the ambient temperature.

try and run a profile and see if the alarm comes on then?
 
I've worked out what the issue is, when I made the modification I believe you are surposed to remove the relays, but I struggled to get them out so thought I'd leave them in. The noise I can hear is the relays buzzing and not the alarm.
 
@lewisash: Glad you worked it out. I was late to the discussion, but my suggestion would have been to check your soldering, as is seemed like a short between ICSPDAT and the relay control line. But, if the relay is still in there, then I agree with you, that is most likely the issue. You can't bridge if the relay is still there, you'll short it on contact, and that is why you get the buzzing. It will close, then then short and can't drive the coil, so it'll open, then voltage rises again and it'll close. This happening fast and repeatingly as long as the relay is driven or the tranny burns out from the shorts.

@IslandLizard: FYI, driving an SSR requires way less current than the mechanical relays. So, replacing the relay with an SSR is no problem.
 
I've worked out what the issue is, when I made the modification I believe you are surposed to remove the relays, but I struggled to get them out so thought I'd leave them in. The noise I can hear is the relays buzzing and not the alarm.

Good to see you got it sorted.
 
All sorted, I removed the relays and resoldered the connections and it works fine! Thanks for your help and suggestions.
 
Those STC 1000 units are tough little guys, they seem to take a lot of punishment. I thought that it might have been a jumper to the wrong place or something. (I have punished one unit badly and it still works)

Or that you found a bug in the code, but that seems extremely unlikely given that this version has been regularly used successfully. That and Mats is a gun at what he does... [emoji13]
 
... @IslandLizard: FYI, driving an SSR requires way less current than the mechanical relays. So, replacing the relay with an SSR is no problem.

Thank you, @alphaomega, Good to know, wasn't aware of that!
I was thinking along the line of an overload or a (near) short.
 
Hi folks.. I just signed up to participate in this thread.

I'm a homebrewer from Ottawa by night, and an embedded software guy by day. Looking forward to toying around with this code and looking for ways to optimize and improve for starters (sdcc is apparently a very sloppy compiler). For seconds, I'm looking to build a more robust ferm chamber algorithm. I typically tend to fab my own boards and stuff, but the STC is just so cheap off-the-shelf, that this is a great starting point.

Cheers!
Sean
 
while waiting for mods to approve my first posts, I did a bit of hand-optimizing of one if() statement and managed to save 110 bytes!
this if going to be fun!
 
Hi folks.. I just signed up to participate in this thread.

I'm a homebrewer from Ottawa by night, and an embedded software guy by day. Looking forward to toying around with this code and looking for ways to optimize and improve for starters (sdcc is apparently a very sloppy compiler). For seconds, I'm looking to build a more robust ferm chamber algorithm. I typically tend to fab my own boards and stuff, but the STC is just so cheap off-the-shelf, that this is a great starting point.

Cheers!
Sean

while waiting for mods to approve my first posts, I did a bit of hand-optimizing of one if() statement and managed to save 110 bytes!
this if going to be fun!

Hi Sean!

I'm glad you registered to HBT! I like to keep discussion of STC-1000+ here and not on github and I really welcome your input!
I agree that SDCC might not be the best compiler for the target (and I think the PIC targets are not their prime concern), but it is open and was a deciding factor. The STC-1000+ project is open and I like to use open tools as well as far as possible.

I agree that the price point is compelling :) Also, they are quite reasonably well designed (well, at least the A400_P ones).

Very cool! Did you modify the generated asm? STCC does support inline assembly and I would be open to use that if there are places where it does a lot of good. I have actually tried a couple of times to refactor the C code to make it generate smaller code. But I guess there are still places that could be improved or where asm would save space.

I've already told you, but I'll say it again, I really don't like PIC ASM. It seems like a mess to me (particularly the bank switching stuff). But still, if there is significant benefit to use it, then I'm for it. But I'd like to keep SDCC (and C), I don't want to switch to a closed source compiler or ASM altogether.

If you make progress (that is in line with STC-1000+) feel free to send pull requests (I'd prefer smaller chunks/changes if you do so). I'd also be open to suggestions.

If you want to discuss privately, send me a PM with your e-mail, and we can talk over mail if you feel you have stuff to talk about that does not belong here, otherwise I like to keep it public so others can benefit from the discussion as well.

Cheers!

Edit: Oh, and if you do write some C code, beware that there is a bug in SDCC, that local static variables are not initialized. You need to make them global. Bit me in the a$$ when I started this project.
 
Very cool! Did you modify the generated asm? STCC does support inline assembly and I would be open to use that if there are places where it does a lot of good.

I didn't bother modifying any of the generated code.. just some refactoring of the C was enough to start seeing savings. I'm going to just probably profile the compiler output and see what sort of constructs it is absolutely horrid at and see if there are any common patterns that produce smaller code. Agree, the bank-switching is a bit klunky.. keeping variable accesses grouped would be one way to reduce that, but the compiler seems very naive sometimes (for example: if (condition) { bank switch; set variable } else { bank switch; set same variable }. bank switched on both branches :( Some of those areas are pretty low value for optimization though... but some others like int = int >> 8; also produce wasteful code with unnecessary extra instructions. something like that is a good candidate for hand-coding in assembler as a SHIFT8 macro or similar.

I've started putting together a list of best practices for this development environment, and we can sync up on that as I learn more.. it's only been a few hours working with this architecture :p

Edit: Oh, and if you do write some C code, beware that there is a bug in SDCC, that local static variables are not initialized. You need to make them global. Bit me in the a$$ when I started this project.

I saw that in your docs.. thanks for the heads up!
Expect some simple diffs shortly :)
 
I didn't bother modifying any of the generated code.. just some refactoring of the C was enough to start seeing savings. I'm going to just probably profile the compiler output and see what sort of constructs it is absolutely horrid at and see if there are any common patterns that produce smaller code. Agree, the bank-switching is a bit klunky.. keeping variable accesses grouped would be one way to reduce that, but the compiler seems very naive sometimes (for example: if (condition) { bank switch; set variable } else { bank switch; set same variable }. bank switched on both branches :( Some of those areas are pretty low value for optimization though...

I hear ya! I have done some C optimization, but I haven't analyzed the generated code, but I think you are totally right. I've just tweaked until what I needed to fit, would fit :)

but some others like int = int >> 8; also produce wasteful code with unnecessary extra instructions. something like that is a good candidate for hand-coding in assembler as a SHIFT8 macro or similar.

That should actually generate no code at all :) That should just be the top 8 bits (i.e. the high register) of a 16 bit variable. (Depending a bit on the usage, but in all probability, what is ment by your example is rather char = int >> 8).

[/QUOTE]
I've started putting together a list of best practices for this development environment, and we can sync up on that as I learn more.. it's only been a few hours working with this architecture :p
[/QUOTE]

Very nice!!! I'll gladly add this to the wiki on github, if you're willing to share :)

I saw that in your docs.. thanks for the heads up!
Expect some simple diffs shortly :)

Looking forward to it!!!
 
That should actually generate no code at all :) That should just be the top 8 bits (i.e. the high register) of a 16 bit variable.

it's a shift & store. but they go and unnecessarily zero things in some spots. Perhaps better described as int >>= 8; it crops up in the eeprom programming code :)

here's a tip along the same lines: if you've got an int, but it's not going to be >255, then it's best to just assign it to a new variable (space permitting) if it's going to be used much subsequently. e.g., in value_to_led(), assigning unsigned char v=divu10(value) saves a fair bit.

anyhow.. I'll aggregate some of these tonight and see about pushing something over.. I hate git ;)
 
Nice!
Can't wait :)
I love git, I just can't wrap my head around it :) I grew up with CVS and SVN, and as much as they sucked, at least I understood them :)
 
First I need to thank smithabusa since it was his website that helped me find this great thread. I purchased a STC1000 from a local brew supply store when I was getting ready to control my first batch of beer to be fermented from my new Pico Brew Zymatic. Later I learned I was lucky enough for it to be one I could flash to this great software. Since then I purchased 6 more from smithabusa and they all flashed no problems.

One of them however doesn't want to power the screen when connected to 110VAC. It still power up just fine off the Arduino Nano and I'm using this one at my tester for now. Anyone else have this kind of issue with an STC1000?

I flashed all 5 of my units with the picprog_com software version in F and 2 others C for a buddy. I have left the 5v line off since I didn't have diode handy and there is not a single place where I live to get any electronics. I have a batch fermenting right now with the arduino connect to a Gen 1 RPi and I can VPN to my home network and VNC to the RPi and check the status. I'm noticing some weird things with the register mapping. Then I use the Arduino serial monitor I can read the Temp, heating and cooling status, then all report back normal. But the SP and hy parameters are not working like they should. My SP is 73.0 and it reports back as 0 and my hy is set to 0.5 and reports back as 73.0 I flashed v1.09 I went looking through he code as best I could and could not find details on the mapping or how I can fix what I suspect is a mistake in the register mapping. I was not sure where to ask this question here or Git.

My plan is to as some code to stream Temp, SP, Heating and Cooling status every 5 seconds. The have the RPi read and log that. I will then use a script to upload to my Dropbox every hour so even from work I can look at my progress and the heating or cooling duty cycles. I'm eventually (next few weeks) going to have 4 fermentors going each with their own STC all reporting to a RPi 2 and the fith STC1000+ will running my glycol chiller for my SSBrewtech Mini Buckets that have chilling coils installed.

Thanks,

Lee

Screen Shot 2016-01-22 at 7.12.18 PM.png
 
First I need to thank smithabusa since it was his website that helped me find this great thread. I purchased a STC1000 from a local brew supply store when I was getting ready to control my first batch of beer to be fermented from my new Pico Brew Zymatic. Later I learned I was lucky enough for it to be one I could flash to this great software. Since then I purchased 6 more from smithabusa and they all flashed no problems.

One of them however doesn't want to power the screen when connected to 110VAC. It still power up just fine off the Arduino Nano and I'm using this one at my tester for now. Anyone else have this kind of issue with an STC1000?

Measure the 5v line when powered from mains. Sounds like the voltage regulator, it's a TO-92 package component between two capacitors and just to the side of the buzzer.

I flashed all 5 of my units with the picprog_com software version in F and 2 others C for a buddy. I have left the 5v line off since I didn't have diode handy and there is not a single place where I live to get any electronics. I have a batch fermenting right now with the arduino connect to a Gen 1 RPi and I can VPN to my home network and VNC to the RPi and check the status. I'm noticing some weird things with the register mapping. Then I use the Arduino serial monitor I can read the Temp, heating and cooling status, then all report back normal. But the SP and hy parameters are not working like they should. My SP is 73.0 and it reports back as 0 and my hy is set to 0.5 and reports back as 73.0 I flashed v1.09 I went looking through he code as best I could and could not find details on the mapping or how I can fix what I suspect is a mistake in the register mapping. I was not sure where to ask this question here or Git.

Doesn't matter, now I know :) Thanks for that I'll look into it when I get a chance. It does sound like a register mapping that is off.

My plan is to as some code to stream Temp, SP, Heating and Cooling status every 5 seconds. The have the RPi read and log that. I will then use a script to upload to my Dropbox every hour so even from work I can look at my progress and the heating or cooling duty cycles. I'm eventually (next few weeks) going to have 4 fermentors going each with their own STC all reporting to a RPi 2 and the fith STC1000+ will running my glycol chiller for my SSBrewtech Mini Buckets that have chilling coils installed.

Thanks,

Lee

Sounds cool! Post a pic if you can!
Thank you!
 
@ldzielak: Hopefully I have fixed the com.ino sketch now. At one point I refactored the menu system in the STC-1000+ code and forgot to change com.ino. Unfortunately, with my current setup, I cannot test com stuff, so I couldn't verify that the change I made is correct, but it'll hardly make it worse at least ;)

Cheers!
 

Latest posts

Back
Top