The microcontroller on the Arduino board has 512 bytes of EEPROM, which is as we know stands for Electrically Erasable Programmable Read-Only Memory and can be used to store small amounts of data that must be saved when power is removed. In this case, we want to permanently store the data about the temperature profile that we have into the EEPROM. By dividing our temperature profile curve into 512 set points corresponding to 512 bytes, we can then use those set points for our PID controller in order to control the oven’s temperature the way we want.
Arduino provides an EEPROM library that is very helpful for us to accomplish that task:
- EEPROM Clear: Clear the bytes in EEPROM
- EEPROM Read: Read the EEPROM and send its values to the computer.
- EEPROM Write: Stores values from an analog input to the EEPROM.
There is also a PID library that is very helpful for us to develop our own PID controller. There are many different ways to write the PID algorithm and this library gives us the basic tools, which are the some functions, that are both easy to understand and utilize.
- PID()
- Compute()
- SetMode()
- SetOutputLimits()
- SetTunings()
- SetSampleTime()
- SetControllerDirection()
- Display Functions
Some simple PID controllers are also provided: