Research and Teaching Blog
3 Posts in March Archive
Sensors and actuators
PID Control using the arduino
The Arduino comes with a beautiful contributed PID library. The following code demonstrates how to use the PID library to control the voltage level in a 'leaky' capacitor.
#include <PID_v1.h> // This file loads the PID_v1 library. // make sure the PID library is stored in // Path/to/Arduino/libraries/ folder // http://arduino.cc/playground/Code/PIDLibrary // PID library // http://arduino.cc/en/Reference/Libraries // How to install the library /* Tank filling PID controller. Kaustubh Bhalerao ABE 425 Demo In this ...
Analog In and Debounce
/* A control system based on the Arduino microcontroller platform Copyright: Kaustubh D. Bhalerao. All rights reserved System specifications: 1) Toggle switch for toggling the controller 2) LED output showing the state of the controller 3) A digital output for controlling a heater 4) An analog input for reading temperature Resource Allocation: 1) Momentary ON switch - Pin 2 (Interrupt capable) 2) LED status output - Pin 13 (Using the built-in LED) 3) Digital output for heater - Pin 5 (PWM capable for future ...
