Skip to content

Instantly share code, notes, and snippets.

@svensken
Created August 7, 2011 19:12
Show Gist options
  • Save svensken/1130669 to your computer and use it in GitHub Desktop.
Save svensken/1130669 to your computer and use it in GitHub Desktop.
The heating element will begin to coast upon nearing the target temperature, but what kind of control must there be over this coasting? PID (an algorithm that smoothes out the approach to any target value) would be one way to prevent overshooting, but it employs PWM (rapidly switching on/off) which drastically reduces a relay's life cycle :( The simple solution? Just calculate the time between turning off the heat and achieving a temperature 'apex.' Hard-code this time period into the relay control.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment