Arduino Mega Based PLC

A PLC (Programmable Logic Controller) is nowadays one of the most popular and widely used equipment in industry which automates the process in an industry and increases the production, flexibility, reliability, stability, performance and decreases the chances of human error. But theses PLC are very

2025-06-28 16:30:17 - Adil Khan

Project Title

Arduino Mega Based PLC

Project Area of Specialization Electrical/Electronic EngineeringProject Summary

A PLC (Programmable Logic Controller) is nowadays one of the most popular and widely used equipment in industry which automates the process in an industry and increases the production, flexibility, reliability, stability, performance and decreases the chances of human error. But theses PLC are very costly and entrepreneurs and small scale industry cannot afford these PLC’s so for them we are designing this PLC which is an Arduino mega based PLC in which the CPU will be ATmega2560. This PLC will be compatible with almost every industrial sensor by using interfacing circuit which will make compatible with 12v/24v/4~20mA sensors. Using a controller in industrial PLC is not quite easy as to make it possible we have to combine several small interfacing units which will make Arduino Mega compatible with industrial grade sensors and equipment.

As we know that in industrial environment there are many disturbances around and if Arduino Mega or any other version of Arduino is placed in industrial environment so it does not work proper and Arduino get halt and get reset when electrical surges or high frequency harmonics which can be defined as electrical noise. To remove this problem EMC filters are used in PLC which can be divided in three parts ESD protection, Low pass filter and EMC grade soldering.

Project Objectives

The aim is to design and develop a low-cost industrial Arduino Based PLC that is similar to the other typical PLC’s with the same function and features. While we achieve our aim the objective behind is that our PLC should be affordable but will provide the same features as compare to any typical PLC available in the market. As we know that Arduino is programmed via C/C++ High level language so our aim is to make such PLC which will use High Level language and in case the user needs more I/O’s so we will provide the expandable feature by which the user will be capable to automate their system more efficiently.

In industry there are many ways to use PLC in which HMI (Human Machine Interface) is involved and many tasks are performed without changing the program of PLC so we have also this feature in our Arduino Mega based PLC in which RS485 Modbus will be used to interface HMI (Human Machine Interface).

EMC/EMI (Electromagnetic Compatibility/Electromagnetic Interface) Filter are available in this PLC which will immune to electrical noises and surges and the Arduino Mega will not get Halt and reset.

In typical PLC there is no default PWM digital output present but in this Arduino Mega based PLC we will provide this option so several operations can be performed.

Project Implementation Method

In the beginning of the project implementation first a literature review or narrative review is required so in depth knowledge, theoretical findings and methodological contributions could be collected in order to understand the real world complications and scenarios of a particular topic or idea.

After analyzing the situation now it’s time to propose the project or idea to the relevant authority so whether the idea or project can be implemented, and according to recent market and demand can this idea or project is feasible.

Once the project is approved now it’s time to think how to convert your idea to a working project and how to achieve the objective goals.

After planning to avoid failure losses it is necessary to implement the plan on the relevant software so defects or any malfunctioning can be detected easily here we will use MATLAB, PROTEUS and other software to test and achieve our required goals virtually.

Once the simulations are done it’s time to implement on hardware so we can run our project in real world situation were unexpected disturbance can interfere.

Now this step is crucial for a project were we will be expecting that our system will work as we wanted.

The testing step will be done repeatedly to ensure that the project is working fine under different conditions and situation.

In this step future enhancement will be suggested so in future anyone can work on it to make that project more efficient.

Now our project is completed so it’s time to present it to everyone and whoever wanted to get benefit from it they can.

Benefits of the Project

Automation/controlling in the industries has become most important to run the industry around the clock without any kind of human intervention. But due to the Covid-19, the PLC in market is short because the import process is halted and if a PLC is available in the market then the price is too much high which may be not a problem for few very big industries but for the mid-range industry it would be impossible to buy that PLC. So, our project is to make a cost-effective PLC that will work as a typical PLC.

As we have seen Arduino is commonly used in academic or research application but not in industrial application because industrial environment is a lot different from normal environment where Electrical Surges, Electromechanical Interference, Electrical noises, Harmonics and many more, which are the main reason from which Arduino get fail in industrial environment, moreover if we talk about the response time and frequency of different sensors so our Arduino Mega based PLC will be designed accordingly which will be compatible with these situations.

The aim is to build a High-Level Language Based PLC that will be similar to any other typical PLC’s with almost same function and features but the way of use will be different where an engineer would not have to learn LAD, STD or etc specially because in academic they have learn C/C++ language already by which the engineer will get command on it and can work efficiently.

Technical Details of Final Deliverable
  1. This PLC, will be programmed using High-Level Language (C/C++).
  2. The PLC’s I/O is expandable using RS485 Modbus as same as of other typical PLC available in the market.
  3. This PLC will have 54 digital I/O pins out of which there will be 18 digital Inputs, 15 digital outputs, 6 pins for I/O expansion and 15 pins for PWM output.
  4. This PLC will also have 16 Analog inputs from which 4 pins will be for current sensors and 12 pins for voltage sensors.
  5. The digital input will be passed through opto-coupler to protect and isolate the micro-controller from over loading.
  6. All the digital output will pass to relay through the relay driver which will smoothly perform the switching of the relay and will also protect the micro-controller from the back EMF of the relay coil and provide enough current to the relay to operate.
  7. PWM output will be isolated to the output load using Opto-Isolator.
  8. As we know that in industrial environment electrical noises are the main problem so to eliminate this problem we will use EMC filters and ESD protection which will filter the harmonics and passes only base frequency of 50 HZ and eliminates the surges using ESD.
  9. HMI interfacing will be possible using Mod bus RS485.
Final Deliverable of the Project Hardware SystemCore Industry EducationOther Industries Manufacturing Core Technology RoboticsOther TechnologiesSustainable Development Goals Decent Work and Economic Growth, Industry, Innovation and Infrastructure, Responsible Consumption and ProductionRequired Resources
Item Name Type No. of Units Per Unit Cost (in Rs) Total (in Rs)
Total in (Rs) 46006
Arduino Mega 2560(Original) Equipment3650019500
Transistor(2N2222) Equipment255125
LM741 OP-AMP IC Equipment40301200
XY-IT0V Current to Voltage Module Equipment62501500
4N35 Optoisolator IC Equipment60201200
Solid State Relay Equipment201503000
Relay Driver(ULN-2803) Equipment23060
RS-485 Equipment3120360
Veroboard Equipment840320
Diode(1N4007) Equipment25125
Voltage Regulator IC's Equipment1010100
RTD PT-100 Sensor Equipment1250250
Proximity Sensor Equipment1400400
Thermocouple K Type Equipment1400400
Transmitter(temperature to current) Equipment117001700
3D printed Plastic Casing Miscellaneous 225005000
PCB Screw terminal block Equipment505250
PCB Fabrication Equipment2500010000
EMI Filter Equipment2200400
Resistors Equipment1812216

More Posts