Programmable logic controllers (PLCs) have been used extensively and are offered in terms of functions, program memories, and the number of inputs/outputs (I/Os), ranging from a few to thousands. With a focus on how to design and implement a PLC, this volume explains hardware and associated basic concepts of PLC. Authors have used PIC16F1847 microcontroller with: 8192 words of Flash program memory, 1024 bytes of SRAM data memory, 256 bytes of EEPROM data memory, the maximum operating speed of 32 MHz, 16-level deep hardware stack, an enhanced instruction set consisting of 49 single-word instructions. Flowcharts are provided to help the understanding of macros (instructions). Aimed at researchers and graduate students in electrical engineering, power electronics, robotics and automation, sensors, this book:
Explains how to design and use a PIC16F1847 microcontroller-based PLC.
Provides easy to use software structures written by using the PIC Assembly programming language.
Describes a PLC from a designer's perspective.
Explains the basic hardware and basic software structures of the PIC16F1847 based PLC.
Focuses on concepts like Contact and Relay Based Macros, Flip-Flop Macros, Timer Macros, Counter Macros and Comparison Macros.
Trusted by 375,005 students
Access to over 1 million titles for a fair monthly price.
The hardware of the PIC16F1847-Based PLC consists of mainly two parts: the CPU board and the I/O extension board. The schematic diagram and the photograph of the PIC16F1847-Based PLC CPU board are shown in Figures 1.1 and 1.2, respectively. The CPU board contains mainly three sections: power, programming, and CPU (central processing unit).
FIGURE 1.1 Schematic diagram of the PIC16F1847-Based PLC CPU board.
FIGURE 1.2 Photograph of the CPU board.
The power section accepts 12V DC input used as the operating voltage of relays. 5V DC is also used for ICs, inputs, etc. An adjustable LM2596 step-down voltage regulator module is used to obtain 5V DC voltage from the 12V DC input voltage. It has the following specificationsâconversion efficiency: up to 92%; switching frequency: 150 KHz; rectifier: nonsynchronous rectification; module properties: non-isolated step-down module (buck); operating temperature: industrial grade (â40 to +85 ); load regulation: ± 0.5%; voltage regulation: ± 2.5%; dynamic response speed: 5% 200 ”s; input voltage: 3â40V; output voltage: 1.5â35V (adjustable); output current: maximum 3A; size: 43mm*21mm*14mm (length*width*height).
It is important to note that the output voltage (OUT+) of the adjustable LM2596 step-down voltage regulator module must be set to 5.00V by adjusting the potentiometer on the module before inserting the CPU. 12V DC input voltage can be subjected to electric surge or electrostatic discharge on the external terminal connections. The TVS (transient voltage suppressor) 1.5KE13A shown in the circuit provides highly effective protection against such discharges. It is also used to protect the circuit from accidental reverse polarity of the DC input voltage. For a proper operation of the PIC16F1847-Based PLC make sure that the DC input voltage < 13V DC.
The programming section deals with the programming of the PIC16F1847 microcontroller. For programming the PIC16F1847 in circuit, it is necessary to use a PIC programmer hardware and a software with ICSP (in-circuit serial programming) capability. In this project, Microchipâs PICkit 3 In-Circuit Debugger/Programmer (www.microchip.com/PICkit3) is used as the PIC programmer hardware. MPLAB X IDE software (www.microchip.com/mplab/mplab-x-ide), freely available by Microchip (www.microchip.com), is used for the program development and for programming the PIC16F1847 microcontroller. The ICSP connector takes the lines VPP (MCLR), VDD, VSS (GND), DATA (RB7), and CLOCK (RB6) from the PIC programmer hardware through a properly prepared cable and it connects them to a 4PDT (four pole double throw) switch. There are two positions of the 4PDT switch. As seen from Figure 1.1, in the PROG position of the 4PDT switch, PIC16F1847 is ready to be programmed and in the RUN position, the loaded program is run. For programming the PIC16F1847 properly by means of a PIC programmer and the 4PDT switch, it is also a necessity to switch off the power switch. The CPU section consists of the PIC16F1847 microcontroller. In the project reported in this book, the PLC is fixed to run at 32 MHz with an internal oscillator (oscillator frequency = 8 MHz and PLL = 4). This frequency is fixed because time delays are calculated based on this speed. RB1, RB3, and RB4 pins are all reserved to be used for 8-bit parallel-to-serial converter registers 74HC/LS165. Through these three pins and with added 74HC/LS165 registers we can describe as many inputs as necessary. RB1, RB3, and RB4 are the âdata inâ, the âshift/loadâ, and the âclock inâ pins, respectively. Similarly, the RB2, RB4, and RB0 pins are all reserved to be used for 8-bit serial-to-parallel converter register/drivers TPIC6B595. Through these three pins and with added TPIC6B595 registers we can describe as many outputs as necessary. RB2, RB4, and RB0 are the âdata outâ, the âclock outâ, and the âlatch outâ pins, respectively.
The RA0, RA1, RB5, and RB7 pins are described and used as analog inputs. They are called AI0, AI1, AI2, and AI3, respectively. The RA2 pin is used as an analog output and it is called DACOUT. The RA3 pin is used as VREF+ (ADC voltage reference input). The RB6 pin is used as the clock input of the high speed counter and it is called HSCI. The RA4 and RA7 pins are used as PWM (pulse width modulation) outputs. Therefore, they are called PWM_RA4 and PWM_RA7, respectively. The RA6 pin is not used. The PIC16F1847 provides the followingâflash program memory (words): 8K; SRAM data memory (bytes): 1,024; and EEPROM data memory (bytes): 256. The PIC16F1847-Based PLC macros make use of registers defined in SRAM data memory.
Figures 1.3 and 1.4 show the schematic diagram and the photograph of the I/O extension board, respectively. The I/O extension board contains mainly two sections: 8 digital inputs and 8 digital outputs. The I/O extension connector DB9M, seen on the left, connects the I/O extension board to the CPU board or to a previous I/O extension board. Similarly, the I/O extension connector DB9F, seen on the right, connects the I/O extension board to a next I/O extension board. In this way we can connect as many I/O extension boards as necessary. 5V DC and 12V DC are taken from the CPU board or from a previous I/O extension board and they are passed to the next I/O extension boards. All I/O data are sent to and taken from all the connected extension I/O boards by means of I/O extension connectors DB9M and DB9F.
FIGURE 1.3 Schematic diagram of the I/O extension board.
FIGURE 1.4 Photograph of the I/O extension board.
The inputs section of each I/O extension board introduces 8 digital inputs for the PIC16F1847-Based PLC (called I0.0, I0.1, âŠ, I0.7 for the first I/O extension board, called I1.0, I1.1, âŠ, I1.7 for the second I/O extension board, called I2.0, I2.1, âŠ, I2.7 for the third I/O extension board, and called I3.0, I3.1, âŠ, I3.7 for the fourth and last I/O extension board). 5V DC or 24V DC input signals can be accepted by each input. These external input signals are isolated from the other parts of the hardware by using NPN-type optocouplers (e.g., 4N25). For simulating input signals, one can use on-board push buttons as temporary inputs and slide switches as permanent inputs. In the beginning of each PLC scan cycle (get_inputs), the 74HC/LS165 of each I/O extension board is loaded (RB3 [shift/load] = 0) with the level of 8 inputs, and then these data are serially clocked in (when RB3 = 1, through the RB1 âdata inâ and RB4 âclock inâ pins). If there is only one I/O extension board used, then 8 clock_in signals are enough to get the 8 input signals. For each additional I/O extension board, 8 more clock_in signals are necessary. The serial data coming from the I/O extension board(s) are taken from the âSIâ input of the 74HC/LS165.
The outputs section of each I/O extension board introduces 8 discrete relay outputs for the PIC16F1847-Based PLC (called Q0.0, Q0.1, âŠ, Q0.7 for the first I/O extension board, called Q1.0, Q1.1, âŠ, Q1.7 for the second I/O extension board, called Q2.0, Q2.1, âŠ, Q0.7 for the third I/O extension board, and called Q3.0, Q3.1, âŠ, Q3.7 for the fourth and last I/O extension board). Each relay operates with 12V DC and driven by an 8-bit serial-to-parallel converter register/driver TPIC6B595. Relays have SPDT (...
Table of contents
Cover
Half-Title
Title
Copyright
Dedication
Contents
Prologue
Preface
About the Author
Background and Use of the Book
Chapter 1 Hardware of the PIC16F1847-Based PLC
Chapter 2 Basic Software
Chapter 3 Contact and Relay-Based Macros
Chapter 4 Flip-Flop Macros
Chapter 5 Timer Macros
Chapter 6 Counter Macros
About the Downloadable Files for Hardware and Basic Concepts
Index
Frequently asked questions
Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, weâve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere â even offline. Perfect for commutes or when youâre on the go. Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access PIC16F1847 Microcontroller-Based Programmable Logic Controller by Murat Uzam in PDF and/or ePUB format, as well as other popular books in Technology & Engineering & Electrical Engineering & Telecommunications. We have over one million books available in our catalogue for you to explore.