# Introduction ## What is OpenPLC? OpenPLC is an open source **P**rogrammable **L**ogic **C**ontroller(**PLC**). Our hardware/s are functionally PLCs that can be programmed using [Ladder Logic diagram (LD)](https://en.wikipedia.org/wiki/Ladder_logic), as well as [Function Block diagram (FBD)](https://en.wikipedia.org/wiki/Function_block_diagram). We have designed the systems for academic purpose and to enable effective learning of programming PLCs. For this reason, we are also providing a set of *modules* that supplement the PLCs, which can be used to perform experiments like *simple traffic light, elevator, conveyor belt etc.* ## Our story Few years ago we came across the need for a affordable and functional PLC for educational purposes. Every year, a large number of students in our colleges are undergoing training in PLCs without proper hands-on experience. The sky-high cost of the setup is a reason, also is the high maintenance because of being used by students. Vendor specific tools and work-flow, which are often complex, is another hindrance. ## Our solution ### **Hardware** OpenPLC consists of **two** versions - OpenPLC Version 1 : Hardware based on AVR's [**ATmega16A**](https://www.microchip.com/wwwproducts/en/ATmega16) and programmed using **LD** - OpenPLC Version 2 : Hardware based on [**Raspberry Pi**](https://www.raspberrypi.org/products/raspberry-pi-zero-w/) and programmed using **FBD** As mentioned earlier, we are also providing a set of plug-and-play modules for practising a range of experiments. The current ones are - Elevator/Conveyor belt : Consists of a timing bet, a motor and a motor driver that can be controlled. - Temperature Sensing and control. - Switches : an array of *normally-open, normally-closed and latch* switches. - Simple traffic light. ### **Software** The two versions of PLCs uses two different software for programming. - LDMicro : A simple and intuitive LD programming IDE, used for programming *OpenPLC Version 1*. It is a forked and locally maintained version of [jwesthues's](https://github.com/LDmicro/LDmicro) version. - 4diac : A system, used for *OpenPLC version 2*, that consists of an IDE and a runtime environment for FBD programming and deployment. At present we directly use the [Eclipse 4diac](https://www.eclipse.org/4diac/) project with the Raspberry Pi work-flow. *Note : Detailed documentation regarding each of the above are present in the respective directories.* # Community and contributing OpenPLC is developed by [FOSSEE](https://fossee.in/) and by users like you. We welcome both pull requests and issues on GitHub. How to and guides pertaining to both *software* and *hardware* can be found in the respective directories. # Directory Structure . ├── Documentation # documentation for ladder diagrams ├── Experiments # some examples in LD ├── Images # images used in this README ├── ladder-files # some beginners ladder examples ├── Resources # hardware design directory │   ├── modules # designs of all modules │   ├── OpenPLCv1 # design of Version 1 PLC │   └── OpenPLCv2 # design of Version 2 PLC └── Software # Details on LDMicro and 4diac ├── OpenPLC V1 # LDMicro └── OpenPLC V2 # Eclipse 4diac The OpenPLC setup is shown below: ![OpenPLC Version 2](/Images/v2.jpg "OpenPLC Version 1") # Licence OpenPLC is released under the MIT license. Some part of the software are released under other licences specified.