BASIC TOPIC
PID Control Module (PID CM)
The goal is to design a device that can control a styrox ball to float in a tube at a certain level.
The tube has a fan for air flow to make the ball float, and an IR sensor(model GP2D12) for distance measurement sensor.
These are located at the bottom of the tube. An image of this setup is show below. If you have your own
suggestion for controlling with PID control, you may implement that as well.

The level control is done with a PID controller. The device can be controlled via PC with serial interface, or from the device itself via
some buttons and LCD display. The PC is running some basic terminal program such as
hyperterminal, which is used as the user application. The block diagram of the system is show
below.
The basic requirements for the device are the following:
The serial interface works from MCU to PC. The unit sends at least the current level setting to PC.
The serial interface works from PC to MCU. At least the PID parameters of the unit and the ball level can be altered from PC.
Menu buttons can be used to operate the device.
LCD display shows menu and some information.
The device measures the distance of the styrox ball.
The device can hold the styrox ball at a specified level. The level can be altered online.
These are also the basic grading points. Additional points can be
received from additional features that demonstrate utilizing different features of the MCU.
You may include also following optional features:
PC data visualization for measurements
Automatically adjusting PID parameters (search research articles for more information)
The PIDCM will be based on an Atmel ATmega series microcontroller
(MCU). The students are recommended to use ATmega32 controller. The
control module is required to contain the following on-board components:
ATMega MCU
some buttons for operating the PIDCM
LCD display
RS-232 interface for PC connection
JTAG connector for programming and testing the MCU
electronics needed to support required functions
Each group will receive
- The serial cable connector
- LCD-display (2,54mm raster socket for pin header)
Serial cable connector, 5 pin 2,54mm raster socket for pin header. Notice 2 empty orientation slots.
LCD
LCD connector, 2x8 pin 2,54mm raster socket for pin header.
NC = Not Connected
In TS139, the lab, there will be the tube with fan and IR-distance measurement device.
Pinouts for the fan and IR-device are below.
FAN connector, 2 pin 2,54mm raster socket for pin header
IR connector, 4 pin 2,54mm raster socket for pin header. Notice the empty orientation slot.