March 25, 2026

Automatic Start and Load Transfer for Diesel Generator using Schneider PLC M340

Introduction: -

An Automatic Transfer Switch (ATS) system is an essential part of modern electrical installations that ensure uninterrupted power supply to critical loads. When the main supply (mains) fails, the ATS system automatically detects the failure, starts the diesel generator, waits for it to stabilize, transfers the load to the generator, and returns the load to mains supply once it is restored.

This system integrates electrical control devices such as contactors, relays, timers, and voltage sensors with PLC-based logic control (Schneider M221) to perform a fully automatic transfer operation.

The system comprises three main modules:

Mains monitoring module

Generators start and confirmation module

Load transfer and interlock module

The operation sequence includes mains failure detection, generator start with time delay, load transfer, and auto-return to mains.

Main Components Used: -

The following components are used in the system:

24V DC SMPS (PS1) Provides control power to the PLC, sensors, relays, and indicator lamps.

Schneider M221 PLC – Executes the ATS ladder logic program. Processes inputs and controls outputs automatically.

Voltage Sensor (VS1) – Monitors mains supply voltage and sends a digital signal to PLC input I0.0 when mains is healthy.

Voltage Sensor (VS2) – Monitors generator output voltage and confirms generator is running at rated voltage on PLC input I0.1.

Contactor KM1 (Mains Contactor) – Connects or disconnects the load from mains supply. Controlled by PLC output Q0.1.

Contactor KM2 (Generator Contactor) – Connects or disconnects the load from generator supply. Controlled by PLC output Q0.2.

Electrical Interlock (KM1/KM2) Hardware NC auxiliary contacts ensure KM1 and KM2 can never be energized simultaneously, preventing a short-circuit between mains and generator.

TON Timer (T0 – 3s) – Provides a 3-second delay after mains failure before sending the DG start command, to avoid false starts during brief voltage dips.

TON Timer (T1 – 10s) – Alarm timer. If the generator does not confirm within 10 seconds, alarm output Q0.3 activates.

Alarm Output (HA1 / Q0.3) Buzzer or warning light activated when DG fails to start within the timeout period.

 

MCB QF1, QF2, QF3 – Circuit breakers protecting mains feed, generator feed, and load output respectively.

Selector Switch SA1 (I0.2) – Manual override switch to force the system into manual mode.

Reset Button SB1 (I0.3) Operator push button to reset active alarms.



Diagram: -






























Variable Table: -





































  

Position during switching from mains supply to DG (Diesel Generator): -



  



When the full load is operating on DG (Diesel Generator):-



  










Condition When a fault occurs in the DG (Diesel Generator):-
































Working Sequence of the System: -

The system operates in the following step-by-step sequence:

Step 1: Initial Condition

KM1 (mains contactor) is energized load is running on mains supply.

KM2 (generator contactor) is de-energized.

All PLC internal bits M0 and M1 are FALSE.

DG set is in standby (stopped) condition.

Step 2: Mains Failure Detection

Voltage sensor VS1 detects loss of mains voltage.

PLC input I0.0 (Mains_OK) drops to 0V.

NC contact /I0.0 in Rung 1 closes, energizing internal bit M0 (Mains_Fail = TRUE).

KM1 drops out immediately load is de-energised.

 

Step 3: Start Delay Timer (Rung 2)

M0 being TRUE activates TON timer T0 with a 3-second preset.

This delay prevents false starts due to momentary voltage dips or flickering.

After 3 seconds, T0 output energises Q0.0 (DG_Start command).

 

Step 4: Generator Cranking and Confirmation (Rung 3)

Q0.0 sends a start signal to the DG set engine controller or starter relay KA1.

The diesel engine cranks and starts up.

Once the generator reaches stable voltage, sensor VS2 sends 24V to PLC input I0.1.


Rung 3: Q0.0 AND I0.1 both ON M1 (Gen_Confirmed) = TRUE.

Step 5: Load Transfer to Generator (Rung 4)

Conditions checked: M0=ON, M1=ON, and /Q0.1 NC interlock confirms KM1 is open.

All three conditions met Q0.2 energises KM2 contactor closes.

Load is now supplied by the diesel generator.

Indicator lamp HL2 activates to show generator is feeding the load.


Step 6: Generator Operation (Steady State)

The DG set continues running and supplies the critical load.

KM1 remains open, KM2 remains closed.

PLC continuously monitors I0.0 for mains restoration.

 

Step 7: Mains Restoration and Return Transfer (Rung 6)

When mains voltage is restored, VS1 output goes HIGH I0.0 = ON.

Rung 6 Reset coil fires M0 and M1 are reset to FALSE.

M0=FALSE causes Rung 4 to drop KM2 de-energises generator disconnected from load.

Rung 5 sees I0.0=ON and KM2 interlock clear → Q0.1 energises → KM1 closes.

Load is transferred back to mains. DG start command Q0.0 drops — engine begins cool-down.

 

Step 8: Alarm Generator Failure to Start (Rung 7)

If mains has failed (M0=ON) but generator never confirms (M1=OFF) within 10 seconds:

TON timer T1 (10s) output activates Q0.3 alarm buzzer HA1 sounds.

Operator must manually inspect the DG set and press SB1 to reset the alarm.


Unique Features of This Design: -

Fully automatic mains failure detection and generator start using PLC logic (no manual intervention required).

Hardware electrical interlock between KM1 and KM2 prevents both contactors from closing simultaneously.

Software interlock in PLC ladder logic as a second layer of protection.

Configurable start delay (3 seconds) to avoid false starts on brief voltage fluctuations.

Generator confirmation feedback through VS2 — load is only transferred after stable generator voltage is confirmed.

Automatic return to mains when power is restored — no operator action required.

Alarm with 10-second timeout if generator fails to start ensures operator is alerted.

HMI screen (Vijeo Designer) for live monitoring of contactor status, source voltages, and system state.

 

Applications: -

Hospitals and clinics critical life-support equipment power backup.

Data centers and server rooms preventing downtime on power failure.

Industrial production lines avoiding costly production stoppages.

Telecom towers and communication sites maintaining signal continuity.

Commercial buildings, offices, and shopping centers.

Water treatment and pumping stations — ensuring uninterrupted pumping.

 

Conclusion: -

This Diesel Generator Auto-Start and ATS System demonstrates how voltage sensors, PLC logic (Schneider M221), contactors, and timers can work together to create a fully automatic power backup solution. The system continuously monitors the mains supply and, upon failure, automatically starts the diesel generator, confirms its readiness, and transfers the critical load — all within seconds and without any human intervention.

 

The double interlock design (hardware aux contacts and software logic) ensures electrical safety at all times. The automatic return-to-mains feature and alarm on DG failure make this system reliable, safe, and suitable for real-world industrial and commercial installations.

March 23, 2026

Automatic Bottle Filling System by using Schneider M 340 Controller

Introduction

In modern industries, automation plays a crucial role in increasing productivity, accuracy, and efficiency. A PLC (Programmable Logic Controller)-based automatic water bottle filling system is designed to automate the process of filling water into bottles using a conveyor mechanism. This system reduces human intervention, ensures consistent filling, and improves overall production speed.

Aim

The main aim of this project is to design and implement an automated water bottle filling system using a PLC and conveyor belt to achieve efficient, accurate, and continuous bottle filling.

Objectives

To automate the bottle filling process using PLC.

To reduce manual labor and human error.

To ensure accurate and consistent filling of water.

To increase production efficiency.

To develop a reliable and cost-effective industrial solution.

System Components

The system consists of the following main components:

PLC (Programmable Logic Controller) – Controls the entire operation.

Conveyor Belt – Moves bottles from one stage to another.

Sensors (Proximity/Photoelectric) – Detect the presence of bottles.

Solenoid Valve – Controls water flow.

Water Pump – Supplies water to the system.

Motor – Drives the conveyor belt.

Power Supply – Provides required electrical energy.

Control Panel – Interface for system operation.

Working Principle

The system works on the principle of automation using PLC logic. When a bottle is detected by a sensor on the conveyor belt, the PLC stops the conveyor and activates the solenoid valve to fill water into the bottle. After a predefined time or level, the valve closes, and the conveyor resumes movement to bring the next bottle.

 

PLC Ladder Logic









 






























Start/Stop Control (Rung 1–2)

The system begins with a START push button and a STOP push button.

When START is pressed:

Relay R0 is energized.

R0 acts as a holding (latching) contact to keep the system ON.

When STOP is pressed:

The circuit breaks and the system turn OFF.

 Purpose: To control the overall ON/OFF operation of the system.

 

Conveyor Motor Control (Rung 3–6)

When R0 is ON, the system becomes active.

A timer (TON_1.0) is used to delay motor operation.

If no alarm condition exists:

The MOTOR turns ON.

The motor drives the conveyor belt, moving bottles forward.

 Purpose: To control conveyor movement with timing and safety conditions.


Bottle Detection & Filling Valve Control (Rung 7–12)

When a bottle reaches the filling station:

Sensor signal activates logic via R0 and TON_1.0.

Timer (TON_2.0) is triggered:

The VALVE opens to fill water.

After preset time:

Valve closes automatically.

 Purpose: To ensure bottles are filled for a fixed duration.

 

Level Detection Logic (Rung 14–18)

A LEVEL sensor checks if the bottle is properly filled.

If the required level is reached:

Relay R1 is activated.

Timer (TON_3.0) may add delay for stability.

 Purpose: To avoid overfilling or underfilling.

 

Bottle Counting System (Rung 20–24)

A CTU (Counter Up) block counts filled bottles.

Each completed filling cycle increments the counter.

Counter value (CV) increases until it reaches preset value (PV).

 Purpose: To track production quantity.

 

Counter Comparison Logic (Second Image)

GT (Greater Than) blocks compare counter values:

If count > 1 → activates COUNT2

If count > 2 → activates COUNT3

If count > 3 → activates COUNT4

 Purpose: To trigger actions based on number of bottles filled.

- Alarm & Buzzer System (Last Rung)

 

When certain conditions are met (e.g., count limit or level issue):

ALARM is activated.

BUZZER turns ON.

Controlled using relays like R3 and counter outputs.

 Purpose: To notify operator of system status or faults.

 

Overall Working Summary

Press START → System turns ON

Conveyor (MOTOR) starts moving bottles

Sensor detects bottle → Conveyor stops

Valve opens → Bottle fills

After time → Valve closes

Level checked → System confirms filling

Counter increments bottle count

Conveyor restarts for next bottle

Alarm triggers if limits reached

Advantages

High accuracy in filling

Reduces labor cost

Increases production speed

Minimizes water wastage

Reliable and consistent operation

Easy to operate and maintain

Applications

Bottled water industries

Beverage manufacturing plants

Pharmaceutical liquid filling

Food processing industries

Chemical industries

Conclusion

The PLC-based automatic water bottle filling conveyor system is an efficient and reliable solution for modern industries. It enhances productivity, ensures precision, and reduces manual effort. With increasing demand for automation, such systems play a vital role in improving industrial processes and achieving high-quality output.

March 21, 2026

Automated Car Parking Indication System using Schneider PLC M340

AIM: To study and design an Automated Car Parking Indication System. And understand the use of different elements such as NO/NC Contacts, Counters and Memory Bits in the designing of an automated system.

OBJECTIVE: We will try to,

Understand the work and complexity of the system.

Create and Understand Ladder Logic of this Entire System.

Create HMI Interface of this Entire System.

Working:


The Automated Car Parking Indication System works using two sensors, namely the In Sensor and the Out Sensor, along with a counter in the PLC. When a vehicle enters the parking area, the In Sensor detects it and increases the vehicle count. Similarly, when a vehicle exits, the Out Sensor detects it and decreases the count. The PLC continuously keeps track of the total number of vehicles inside the parking area using this counting logic. When the count reaches 5 vehicles, the “Parking Full” indicator turns ON, indicating that no parking space is available. When the count is less than 5, the Space indicator turns ON, showing that parking slots are available. This system provides real-time and automatic monitoring of parking without the need for manual checking.

[AI Generated Illustration of Automated Car Parking Indication System]


Ladder Logic of the System:

 

Elements Used:

 

NO Contact:

 






A Normally Open Contact is widely use in PLC Programming. When we give it signal 1, we will get output 1 and when we give it signal 0, we will get signal 0.

 

 

NC Contact:

 




 

 

A Normally Open Contact is widely use in PLC Programming. It works opposite of the NO Contact. When we give it input signal 1, we will get output signal 0 and when we give it input signal 0, we will get output signal 1.

 

 

CTUD:




 

CTUD (Count Up/Down) is a type of counter used in PLC programming that can both increase and decrease its count value. It increments the count when an input signal is received at the count-up input and decrements when a signal is received at the count-down input. It is commonly used in applications like parking systems to track the number of objects entering and exiting.




Complete Ladder Diagram:

 



























Explanation:


The ladder logic for the Automated Car Parking System starts with a start-stop circuit where t

he System_Start push button energizes Memory_Bit_1, and it is latched using a self-holding contact, while the Stop button breaks the circuit.


    Once the system is active, the CTUD (Count Up/Down) counter is enabled through Memory_Bit_1.The In_Sensor is connected to the count-up (CU) input, which increases the car count when a vehicle enters, and the Out_Sensor is connected to the count-down (CD) input, which decreases the count when a vehicle exits.


  The preset value (PV) is set to 5, representing the maximum parking capacity.

When the count reaches this value, the counter output activates Memory_Bit_2, which turns ON the Full_Indicator.


If the count is less than 5, Memory_Bit_2 remains OFF, and the Space_Indicator is turned ON instead.


  This logic ensures proper tracking of vehicles and real-time indication of parking availability.

 

Complete HMI Interface:



                                                       



 


Explanation:

-  The HMI interface of the Automated Car Parking Indication System is designed to provide clear and easy monitoring of the parking status.

-  It includes a System ON/OFF button to start or stop the system operation.

-  The Cars In and Cars Out buttons are used to simulate or indicate vehicle entry and exit.

-  A digital display shows the total number of parked cars in real time, based on the counter value from the PLC.

-  The interface also displays the total parking capacity, which is set to 5 vehicles.

-  Additionally, visual indicators (circular lamps) are provided to represent the parking status, such as whether the parking is full or space is available.

-  This user-friendly design helps the operator quickly understand and control the system efficiently.



[














Complete HMI Interface and PLC Ladder Logic Simulation


[Co






























CONCLUSION:

-  Through this project, we learned how industrial automation concepts can be applied to solve real-world problems like parking management.

-  We gained practical knowledge of PLC programming, especially ladder logic using sensors and CTUD counters for real-time counting operations.

-  We also learned how to design an effective HMI interface for monitoring and controlling the system.

-  This project helped us understand the integration of hardware and software, improved our problem-solving skills, and gave us hands-on experience in automation systems used in industries.