0
0
FreertosHow-ToBeginner · 4 min read

PLC Project for Automatic Door Control: Simple Guide & Example

A PLC project for automatic door control uses sensors and outputs to open and close a door automatically. The basic logic involves detecting a sensor input (like a motion sensor) and controlling an output (like a motor or solenoid) to operate the door. This is done using simple ladder logic or structured text programming in the PLC.
📐

Syntax

The basic syntax for an automatic door control in PLC ladder logic includes:

  • Input: Sensor signals (e.g., motion detector) as I0.0
  • Output: Door actuator control (e.g., motor) as Q0.0
  • Logic: Use contacts and coils to control output based on input

Example ladder logic elements:

  • --[ ]--( )-- : Normally open contact controlling a coil
  • I0.0 : Input address for sensor
  • Q0.0 : Output address for door motor
ladder_logic
(* Ladder logic syntax example for automatic door control *)
(* I0.0 = Motion sensor input *)
(* Q0.0 = Door motor output *)

(* If motion sensor is ON, turn ON door motor *)
|--[ I0.0 ]--( Q0.0 )--|
💻

Example

This example shows a simple PLC ladder logic program that opens a door when a motion sensor detects presence and closes it after a delay.

The program uses:

  • I0.0 as motion sensor input
  • Q0.0 as door motor output
  • A timer T1 to close the door after 5 seconds
ladder_logic
(* PLC Ladder Logic for Automatic Door Control *)
(* I0.0: Motion sensor input *)
(* Q0.0: Door motor output *)
(* T1: Timer for door close delay *)

(* When motion sensor is ON, start door motor and timer *)
|--[ I0.0 ]--------------------( Q0.0 )--|
|--[ I0.0 ]--------------------( T1 )----|

(* Timer T1 runs for 5 seconds *)
(* When timer done, turn OFF door motor *)
|--[ T1.Q ]--------------------( /Q0.0 )--|
Output
When motion sensor (I0.0) is ON, door motor (Q0.0) turns ON immediately. After 5 seconds of no motion, timer T1 finishes and door motor (Q0.0) turns OFF, closing the door.
⚠️

Common Pitfalls

Common mistakes when creating a PLC automatic door control project include:

  • Not using a timer to delay door closing, causing the door to close immediately when sensor turns off.
  • Forgetting to debounce sensor inputs, which can cause the door to open and close rapidly.
  • Incorrect addressing of inputs and outputs, leading to no response or wrong device activation.
  • Not handling safety inputs like door obstruction sensors, which can cause accidents.

Always test the logic with simulation or on a safe test setup before deploying.

ladder_logic
(* Wrong: Door closes immediately without timer *)
|--[ I0.0 ]--( Q0.0 )--|

(* Right: Use timer to delay closing *)
|--[ I0.0 ]--------------------( Q0.0 )--|
|--[ I0.0 ]--------------------( T1 )----|
|--[ T1.Q ]--------------------( /Q0.0 )--|
📊

Quick Reference

Summary tips for PLC automatic door control:

  • Inputs: Use motion or presence sensors (e.g., I0.0)
  • Outputs: Control door motor or solenoid (e.g., Q0.0)
  • Timers: Use timers to delay door closing for safety
  • Safety: Add sensors to detect door obstruction
  • Testing: Simulate logic before real deployment

Key Takeaways

Use sensor inputs and output coils to control door motor in PLC ladder logic.
Include timers to delay door closing for smooth and safe operation.
Always verify input/output addresses and test logic before deployment.
Handle safety conditions like door obstruction to prevent accidents.