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
Arduino Mega Based PLC
Project Area of Specialization Electrical/Electronic EngineeringProject SummaryA 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 ObjectivesThe 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- Literature Survey:
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.
- Project Proposal:
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.
- Planning the Project:
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.
- Virtual Implementation:
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.
- Physical Implementation:
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.
- Testing:
Now this step is crucial for a project were we will be expecting that our system will work as we wanted.
- Re-Iterating:
The testing step will be done repeatedly to ensure that the project is working fine under different conditions and situation.
- Future Enhancement Suggestions:
In this step future enhancement will be suggested so in future anyone can work on it to make that project more efficient.
- Final Product:
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 ProjectAutomation/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- This PLC, will be programmed using High-Level Language (C/C++).
- The PLC’s I/O is expandable using RS485 Modbus as same as of other typical PLC available in the market.
- 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.
- This PLC will also have 16 Analog inputs from which 4 pins will be for current sensors and 12 pins for voltage sensors.
- The digital input will be passed through opto-coupler to protect and isolate the micro-controller from over loading.
- 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.
- PWM output will be isolated to the output load using Opto-Isolator.
- 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.
- HMI interfacing will be possible using Mod bus RS485.
| Item Name | Type | No. of Units | Per Unit Cost (in Rs) | Total (in Rs) |
|---|---|---|---|---|
| Total in (Rs) | 46006 | |||
| Arduino Mega 2560(Original) | Equipment | 3 | 6500 | 19500 |
| Transistor(2N2222) | Equipment | 25 | 5 | 125 |
| LM741 OP-AMP IC | Equipment | 40 | 30 | 1200 |
| XY-IT0V Current to Voltage Module | Equipment | 6 | 250 | 1500 |
| 4N35 Optoisolator IC | Equipment | 60 | 20 | 1200 |
| Solid State Relay | Equipment | 20 | 150 | 3000 |
| Relay Driver(ULN-2803) | Equipment | 2 | 30 | 60 |
| RS-485 | Equipment | 3 | 120 | 360 |
| Veroboard | Equipment | 8 | 40 | 320 |
| Diode(1N4007) | Equipment | 25 | 1 | 25 |
| Voltage Regulator IC's | Equipment | 10 | 10 | 100 |
| RTD PT-100 Sensor | Equipment | 1 | 250 | 250 |
| Proximity Sensor | Equipment | 1 | 400 | 400 |
| Thermocouple K Type | Equipment | 1 | 400 | 400 |
| Transmitter(temperature to current) | Equipment | 1 | 1700 | 1700 |
| 3D printed Plastic Casing | Miscellaneous | 2 | 2500 | 5000 |
| PCB Screw terminal block | Equipment | 50 | 5 | 250 |
| PCB Fabrication | Equipment | 2 | 5000 | 10000 |
| EMI Filter | Equipment | 2 | 200 | 400 |
| Resistors | Equipment | 18 | 12 | 216 |