On/Off Controller – Interfacing Touch LCD LC7981 using ATMega Microcontroller

Concept of Touch LCD LC7981 using ATMega

Interfacing Touch LCD

An on/off controller is the simplest form of a temperature control device. The output from the device is either on or off, with no middle state.
An on-off controller will switch the output only when the temperature crosses the set-point. For heating control, the output is on when the temperature is below the set-point, and off above set-point.
Since the temperature crosses the set-point to change the output state, the process temperature will be cycling continually, going from below set-point to above, and back below. In cases where this cycling occurs rapidly an on-off differential, or “hysteresis,” is added to the controller operations. This differential requires that the temperature exceed set-point by a certain amount before the output will turn off or on again. On-off differential prevents the output from “chattering” or making fast, continual switches if the cycling above and below the set-point occurs very rapidly.
On-off control is usually used where a precise control is not necessary, in systems which cannot handle having the energy turned on and off frequently, where the mass of the system is so great that temperatures change extremely slowly, or for a temperature alarm.


Program requirements:

– Program an on/off controller with your AVR Evaboard
– On the start of the program let the user enter the on/off values and the time of checking using the serial port or an external connected keypad
– The on/off values must be entered in degrees Celsius (0 = 0V-99 = 5V) and the time of checking in ms(1-1000)
– Make it possible to correct typing mistakes
– Display the on/off state and the recent measured value on your LCD display
– Use the 10-bit AD result to calculate with, do not cut it to an 8-bit value
– Use inline documentation and the good style programming rules
– Do not use float/double or other fractured number variables


– Connect an 1st order RC network of your choice to your controller output pin and check, if your controller is working
– Draw/record a diagram with a program of your choice for a measurement where your system temperature goes up and is cycling between on and off state, then is disturbed and after this goes back to the normal cycling states


– Make a small users manual for using your on/off controller
– Document your basic program operation by using one or more Nassi – Shneiderman or flow chart diagram(s)
– Document also, what ports/pins you are using in your program
– Include your measurements, the diagram and the used RC network description. Explain the parts of the measured diagram
– Include the source code in your documentation in a readable monospace font

Principle of this on/off controller

Interfacing Touch LCD2

5V are connected to the capacitor (on status).
This capacitor loads up until it reached the maximum value, which you can decide (for example 4V).
If the capacitor reached this value, the 5V will turn off (0V = off status).
The capacitor will discharge until it reached the minimum value, which you can also decide (for example 2V).

About The Author

Scroll to Top