Hi guys!
I have pushed the initial changes for v1.06 to the
work branch.
I have added support for a second temp probe. I have added 'OFF' display when in soft off mode and it should work even after power is cut
This version adds a couple of items to the 'Set' menu
- tc2 - temp correction for probe 2
- hy2 - hysteresis for probe 2
- Pb - Enable/disable probe 2 (disabled by default)
With probe 2 enabled, the control algorithm will
also cut heating or cooling, when temp2 exceeds setpoint +- hysteresis2.
The idea is that it should measure ambient fridge temp (or a smaller thermal mass) and with a correctly set hystereris2, cut heating and/or cooling before beer reaches setpoint and limit under/overshoot. You will need to experiment with the setting to find what suits your system.
To connect an extra probe, you need (apart from the probe) a 10kOhm resistor (preferably 1% tolerance). All the connections needed are available on the programming header, so it is easiest to hook it up there.
From above the board, the connectors on the header (left to right, starting closest to the transformer) are:
ICSPCLK, ICSPDAT, GND, VCC, nMCLR
Connect the resistor between ICSPCLK and GND. Connect the probe between ICSPCLK and VCC.
You can have the probe attached and still program the STC, but if you (like me) want to power the stc's logic from the programming header and do testing, you must disconnect the ICSPCLK line after programming, as having it connected affects the temp reading otherwise.
If you do not have an extra temp sensor, you need a 10k NTC with beta 3435 (25-75 I think, but retailers seldom specify). I've been using
these, cheap as dirt, but with wires that are very thin. But they work well. You might want to add a capacitor in parallel with the resistor (for noise suppression) 10-100nF should be the range. With the cap in place, programming wont work, so you might as well have a different header/connector for the the extra probe that you can remove when programming. The cap is not necessary, but would be good (I have not tried yet with a cap myself).
I've had to do a bunch of refactoring to be able to free up the codespace needed to pull this off (it is tight as <insert dirty joke here> now!!!!). And as always, I have only written the code, but not done much more, I
need your help testing it! I hope/think the controller algorithm is ok, I think highest probability of bugs lies in handling EEPROM variables and menus. That reminds me, this version has slightly new EEPROM layout, so you'd do best in reinitializing EEPROM, but if you have profiles you want to keep, you can retain it but then you would need to check/set every item in the 'Set' menu.
*Phew*.... Long, post. I hope I got everything down.
In short, please, please. Help testing this version, both with and without the extra probe. Report any bugs. As I said it is tight now, but if there is anything you think should be tweaked or changed. Do tell. I really think this might be the final version, (that is there will be no more features only bug fixes, if they appear).
Thanks and cheers!
//mats
Edit: Dang it! I forgot one thing. With temp probe 2 enabled, you can switch between which temp is displayed by doing a short press on the power button. An additional LED will indicate that you are watching temp 2.