Spike Brewing 12.5 Conical Fermenter Giveaway!

Home Brew Forums > Home Brewing Beer > DIY Projects > TeensyPi Networked Temperature Controller

Reply
 
LinkBack Thread Tools
Old 03-13-2013, 01:00 AM   #221
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 577
Liked 46 Times on 41 Posts
Likes Given: 2

Default

Quote:
Originally Posted by jsbird View Post
I'm also having trouble with the new PID build. I've downloaded and loaded it twice, including the RPI image and have the same issue. After loading the teensy I can update the chip names, read the temp sensors and manually turn the switches on/off. I can set an action and it seems to work fine. When I try to setup the PID, it will allow me to enter the variables but when I hit try to enable the LED on the Teensy goes from steady to off and my web interface freezes (tries to refresh but never gets a response). Rebooting the Teensypi doesn't unfreeze the interface. If I reload the Teensy with the PID Debug .ino, the LED immediately goes back on steady and remains on until I try to enable the PID.

Since updating the Teensy with the PIDdebug.ino, the LED no longer flashes rapidly/dims. It is either on steady and bright (even if the temps are updating just fine in the web interface) or it's fully off which coincides with the web interface hanging. I can still SSH/login to the TeensyPi so the RPi still seems to be operating at that point, wlan1 is operating, etc.

I again reloaded the MySQL files as suggested above but no change.

Any suggestions?
Try downloading the very latest TeensyPiPidDebug.ino file from my github, compile and upload it to the Teensy 3.0. You'll know you have the latest code if you go to the /var/www/htdocs directory and issue the command

Code:
php getCommand.php z
The TeensyPi should return a version string:

Code:
teensypi@teensypi /var/www/htdocs $ php getCommand.php z

Number of Arguments:2
getCommand.php
z
TeensyPiPidDebug Version 0.0.1
That should correct the problem.
jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Old 03-13-2013, 05:23 AM   #222
jsbird
HBT_SUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Oct 2012
Posts: 39
Likes Given: 2

Default

Jim:

So I did the following (using Putty):

Quote:
teensypi@teensypi ~ $ cd /var/www/htdocs
teensypi@teensypi /var/www/htdocs $ php getCommand.php z
...and got the response:

Quote:
Number of Arguments:2
getCommand.php
z
TeensyPiPidDebug Version 0.0.1
No change in the behavior/performance. I also tried turning on the Debug messages (not that I would understand them) following the directions on the Teensypi website. Got the minicom running fine and got all the expected responses from the commands but no minicom traffic/messages on the PID, EEPROM or all debug messages options.

Setup an action setting and again that seemed to work fine but "Enabling" the PID froze/crashed it as described earlier.

Can you provide some entries for the PID settings that you have used successfully? I've used the one's in the website screenshots as well as, for example, Setpoint 148, P = 1100, I = 1, D = 1, Direction = Forward, Window = 5000. Wouldn't think that my entries would be crashing the Teensy but just to eliminate that possibility I'd like to try a "known good" setting.

Thanks...Jon
__________________
jsbird is offline
 
Reply With Quote Quick reply to this message
Old 03-13-2013, 11:22 AM   #223
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 577
Liked 46 Times on 41 Posts
Likes Given: 2

Default

Quote:
Originally Posted by jsbird View Post
Jim:

So I did the following (using Putty):



...and got the response:



No change in the behavior/performance. I also tried turning on the Debug messages (not that I would understand them) following the directions on the Teensypi website. Got the minicom running fine and got all the expected responses from the commands but no minicom traffic/messages on the PID, EEPROM or all debug messages options.

Setup an action setting and again that seemed to work fine but "Enabling" the PID froze/crashed it as described earlier.

Can you provide some entries for the PID settings that you have used successfully? I've used the one's in the website screenshots as well as, for example, Setpoint 148, P = 1100, I = 1, D = 1, Direction = Forward, Window = 5000. Wouldn't think that my entries would be crashing the Teensy but just to eliminate that possibility I'd like to try a "known good" setting.

Thanks...Jon
OK, I was able to duplicate the problem, but I won't be able to investigate until the weekend.
jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Old 03-14-2013, 12:38 AM   #224
jsbird
HBT_SUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Oct 2012
Posts: 39
Likes Given: 2

Default Addl Info

Not sure if this is helpful but another piece of info on the lockup; on one occasion I had an action going where it was controlling my rice cooker set at 120 degs. Separately, I tried to enable a PID and it hung the interface as described earlier. The switch/relay continued to be on while the temp climbed well past 120 and when I rebooted the TeensyPi it continued to be on but was no longer associated with an action. I could see that the switch was "ON" but it wasn't tied to a temp probe so it would have stayed on until I turned it off. My learning from that, for what it's worth, is that it isn't solely a user interface issue as the control function failed/froze as well. Second learning was that I will need some type of safety mechanism in place that insures that when the Teensypi reboots itself (power failure?) it won't come on with the switches on but not tied to some control function.

__________________
jsbird is offline
 
Reply With Quote Quick reply to this message
Old 03-14-2013, 04:38 PM   #225
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 577
Liked 46 Times on 41 Posts
Likes Given: 2

Default

Quote:
Originally Posted by jsbird View Post
Not sure if this is helpful but another piece of info on the lockup; on one occasion I had an action going where it was controlling my rice cooker set at 120 degs. Separately, I tried to enable a PID and it hung the interface as described earlier. The switch/relay continued to be on while the temp climbed well past 120 and when I rebooted the TeensyPi it continued to be on but was no longer associated with an action. I could see that the switch was "ON" but it wasn't tied to a temp probe so it would have stayed on until I turned it off. My learning from that, for what it's worth, is that it isn't solely a user interface issue as the control function failed/froze as well. Second learning was that I will need some type of safety mechanism in place that insures that when the Teensypi reboots itself (power failure?) it won't come on with the switches on but not tied to some control function.
Yeah, the Teensy 3.0 is set up to renew it's last known state before a power failure or reboot. This is a throwback to when its primary function was to monitor / control my coolers.

This PID bug is pretty insidious, but I think I've tracked it down. It looks like it's going to require changes to the .ino and some .php codes.

More later.
jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Old 03-14-2013, 06:00 PM   #226
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 577
Liked 46 Times on 41 Posts
Likes Given: 2

Default Updated code

I think I've nailed down the PID bug, and in the process did some general cleanup.

The new TeensyPiPidDebug.ino and *.php files are uploaded to my github account.

Thanks for your patience...

__________________
TeensyNet Networked Controller
ButtCrack Brewery
And This Is Why We Drink...
jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Old 03-14-2013, 10:47 PM   #227
jsbird
HBT_SUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Oct 2012
Posts: 39
Likes Given: 2

Default

Great! Downloaded the fixes but if I want to stay married I probably won't get to implement/test until the weekend...

Thanks for the persistence!

__________________
jsbird is offline
 
Reply With Quote Quick reply to this message
Old 03-15-2013, 03:34 PM   #228
jsbird
HBT_SUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Oct 2012
Posts: 39
Likes Given: 2

Default

Wife went on an errand so I did get to load the updates and SUCCESS! PID function is working. Now I just need to play with the tuning. Excellent work on the fix Jim!

pid-test.jpg  
__________________
jsbird is offline
 
Reply With Quote Quick reply to this message
Old 03-15-2013, 03:48 PM   #229
doughaas
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Mar 2009
Location: , Ohio
Posts: 40
Liked 1 Times on 1 Posts

Default

I've also loaded up the new files and everything seems to be working well.

I've noticed a change in the behavior of the teensy LED with this update - it's now constantly solid. Is that by design or should I reflash?

I've rebooted it a couple of times without any change but everything works well despite the solid LED.

__________________
doughaas is offline
 
Reply With Quote Quick reply to this message
Old 03-15-2013, 04:51 PM   #230
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 577
Liked 46 Times on 41 Posts
Likes Given: 2

Default

Quote:
Originally Posted by doughaas View Post
I've also loaded up the new files and everything seems to be working well.

I've noticed a change in the behavior of the teensy LED with this update - it's now constantly solid. Is that by design or should I reflash?

I've rebooted it a couple of times without any change but everything works well despite the solid LED.
The LED is just an indication of the level of serial communication between the Teensy 3.0 and RPi. When the Teensy 3.0 is doing something that it doesn't want disturbed by a message from the RPi, the LED is off. This will vary with the number of devices, active actions and active PIDs. When I have all 32 devices on my test bed in active actions or PIDs, the LED is very dim. When I hit the Emergency STOP button, the LED is very bright.
__________________
TeensyNet Networked Controller
ButtCrack Brewery
And This Is Why We Drink...
jimmayhugh 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
Arduino - Networked Temperature Monitor jimmayhugh DIY Projects 81 01-27-2013 12:22 AM
Temperature Controller sy2088 Equipment/Sanitation 3 10-25-2012 06:28 PM
Lux Temperature Controller scoots DIY Projects 9 07-06-2012 01:38 PM
temperature controller from deas fridge - use as external controller on live fridge? BrewingChemist DIY Projects 1 05-22-2012 10:21 PM
Johnson Analog Temperature Controller Temperature Profile Coastarine Equipment/Sanitation 4 10-11-2010 03:58 PM