Difference between revisions of "OpenPLC version1 with LDmicro"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 84: Line 84:
 
#*I/O assignment
 
#*I/O assignment
 
#*Compile
 
#*Compile
 +
#OpenPLC version 1 Mainboard
 +
#*OpenPLC version 1 Mainboard
 +
#*Input power unit
 +
#*24V, 2A power supply
 +
#*Ouput power section
 +
#*4 different types of connectors
 +
#*ATMega16 microcontroller
 +
#*4 I/O ports
 +
#*ISP header
 +
#*USBasp programmer
 +
#*UART pins
 +
#Programming OpenPLC
 +
#*Programming OpenPLC V1 Mainboard
 +
#*Using USBasp to program the Mainboard
 +
#*Connect SMPS and USBasp to the Mainboard
 +
#*Check the programmer connection
 +
#*AVRDUDE command to upload HEX file
 +
#*Various parameters of the AVRDUDE command
 +
#*Output to show the communication with the mainboard
 +
#*Precautions before programming
 +
#*Ways to troubleshoot
 +
#*Various part numbers for different controllers & programmers
 +
#OpenPLC Traffic Light and Switchboard Modules
 +
#*About OpenPLC Traffic Light module
 +
#*Where can this module be used?
 +
#*Different ways to connect using single LED connections
 +
#*How to use LEDs with the connectors at the bottom of the module?
 +
#*Power connections of the module
 +
#*Working demo of Traffic Light module using connectors present at the bottom
 +
#*Working demo of Traffic Light module using single LED connectors
 +
#*About OpenPLC Switchboard module
 +
#*Different types of switches and LEDs
 +
#*Female berg connectors for connections
 +
#*Working of each type of switch
 +
#*How can a Switchboard module be powered?
 +
#Normal Coil
 +
#*Connection of SMPS and USBasp to the Mainbaord
 +
#*About types of Coils
 +
#*About source types for Coils
 +
#*Working of Normal Coil in LDmicro
 +
#*Real-time simulation of Normal coil
 +
#*Microcontroller and its parameter setting
 +
#*Compile the logic and save the hex file
 +
#*Upload normalcoil.hex to Mainboard
 +
#*Make hardware connections for the Normal coil logic
 +
#*Working of Normal coil on hardware
 +
#Normal Contact
 +
#*Connection of SMPS and USBasp to the Mainbaord
 +
#*Insert contact
 +
#*Different types of Contact
 +
#*Working of Normal Contact in LDmicro
 +
#*Real-time simulation of Normal Contact
 +
#*Microcontroller and its parameter setting
 +
#*Compile the logic and save the hex file
 +
#*Upload normalcontact.hex to Mainboard
 +
#*Make hardware connections for the Normal Contact using traffic light module and switchboard module
 +
#*Working of Normal contact on hardware

Revision as of 14:09, 8 March 2021



Industrial training has become an essential part in training personnel and getting them ready for the challenging work in the industry. An Open Source Hardware initiative by FOSSEE Project at IIT Bombay presents OpenPLC an open source Programmable Logic Controller. This cost effective, robust, dynamic and modular hardware with open source software enables students from various streams of Engineering and Polytechnics to learn Industrial automation using Ladder Logic programming language, one of the widely used languages in automation industries.

The Spoken Tutorials on OpenPLC will be based on OpenPLC Version 1 hardware and LDmicro software, both are available Free and Open Source to use. LDmicro generates native code for microcontrollers like Atmel AVR and Microchip PIC16.

LDmicro was available only for Windows initially. The FOSSEE team has ported it and made it available for Linux OS also.

OpenPLC version1 is based on ATMega16 AVR microcontroller. The board is equipped with sets of digital and analog input/output pins, a standard ISP header to which you can connect an external programmer for loading programs from computers, output power pins, external UART module, reset button etc and input power terminal.

The Spoken Tutorial effort for OpenPLC version1 with LDmicro has been contributed by Harsha Priyanka from FOSSEE team and Nirmala Venkat from Spoken Tutorials team.

The domain review is done by Akshay Chipkar and Rajesh Kushalkar from the FOSSEE team.

Learners: UG/PG Electronics students, hardware professional or anyone who is interested in PLC programming.


  OpenPLC version 1 hardware schematic and gerber files for making PCB’s are available at links given below:
  https://openplc.fossee.in/
  https://openplc.fossee.in/downloads
  https://static.fossee.in/openplc/Schematic.pdf
  https://static.fossee.in/openplc/installation-files/Gerber_Files.zip

Students can perform OpenPLC experiments without OpenPLC hardware using the simulation mode in LDmicro. But we encourage having a hardware kit for better knowledge of the subject.

  OpenPLC hardware kit consist of:
  1. OpenPLC version1 Mainboard (1 no.) 
  2. 24V, 2A SMPS (1 no.) 
  3. USBasp programmer (1 no.) 
  4. Traffic Light module (1 no.) 
  5. Switchboard module (1 no.) 
  6. Heater module (1 no.) 
  7. Jumper wires
  8. Relimate Connectors


Contents

Basic Level

  1. Overview of OpenPLC version1 with LDmicro
  2. Installation of LDmicro on Linux
    • What is LDmicro?
    • Installation of LDmicro.
    • What is AVRDUDE?
    • How to install AVRDUDE?
    • How to check the version of AVRDUDE ?
    • What is USBasp Programmer?
    • Why do we need USBasp drivers installed on our computer?
    • How to check if USBasp drivers are installed or not?
  3. Installation of LDmicro on Windows
    • What is LDmicro?
    • What is AVRDUDE?
    • How to install AVRDUDE on Windows?
    • How to check the version of AVRDUDE ?
    • What is USBasp Programmer?
    • Why do we need USBasp drivers installed on our computer?
    • How to install USBasp drivers on Windows
    • How to disable driver signature enforcement
  4. Introduction to LDmicro
    • LDmicro interface
    • Rungs
    • Rails
    • Instructions
    • Instructions toolbar
    • I/O list
    • Multiple inputs and Multiple outputs in a rung
    • Adding/Deleting a rung
    • Renaming instructions
    • Saving it as .ld file
  5. Simulation and Compilation
    • LDmicro simulator
    • Simulation mode
    • Real-time simulation
    • Single cycle option
    • Halt simulation
    • Effect of cycle time on simulation
    • Pre-compilation checklist
    • Microcontroller selection
    • MCU parameters
    • I/O assignment
    • Compile
  6. OpenPLC version 1 Mainboard
    • OpenPLC version 1 Mainboard
    • Input power unit
    • 24V, 2A power supply
    • Ouput power section
    • 4 different types of connectors
    • ATMega16 microcontroller
    • 4 I/O ports
    • ISP header
    • USBasp programmer
    • UART pins
  7. Programming OpenPLC
    • Programming OpenPLC V1 Mainboard
    • Using USBasp to program the Mainboard
    • Connect SMPS and USBasp to the Mainboard
    • Check the programmer connection
    • AVRDUDE command to upload HEX file
    • Various parameters of the AVRDUDE command
    • Output to show the communication with the mainboard
    • Precautions before programming
    • Ways to troubleshoot
    • Various part numbers for different controllers & programmers
  8. OpenPLC Traffic Light and Switchboard Modules
    • About OpenPLC Traffic Light module
    • Where can this module be used?
    • Different ways to connect using single LED connections
    • How to use LEDs with the connectors at the bottom of the module?
    • Power connections of the module
    • Working demo of Traffic Light module using connectors present at the bottom
    • Working demo of Traffic Light module using single LED connectors
    • About OpenPLC Switchboard module
    • Different types of switches and LEDs
    • Female berg connectors for connections
    • Working of each type of switch
    • How can a Switchboard module be powered?
  9. Normal Coil
    • Connection of SMPS and USBasp to the Mainbaord
    • About types of Coils
    • About source types for Coils
    • Working of Normal Coil in LDmicro
    • Real-time simulation of Normal coil
    • Microcontroller and its parameter setting
    • Compile the logic and save the hex file
    • Upload normalcoil.hex to Mainboard
    • Make hardware connections for the Normal coil logic
    • Working of Normal coil on hardware
  10. Normal Contact
    • Connection of SMPS and USBasp to the Mainbaord
    • Insert contact
    • Different types of Contact
    • Working of Normal Contact in LDmicro
    • Real-time simulation of Normal Contact
    • Microcontroller and its parameter setting
    • Compile the logic and save the hex file
    • Upload normalcontact.hex to Mainboard
    • Make hardware connections for the Normal Contact using traffic light module and switchboard module
    • Working of Normal contact on hardware

Contributors and Content Editors

Nirmala Venkat