Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE504 ST Project Jeff Rice

Similar presentations

Presentation on theme: "ECE504 ST Project Jeff Rice"— Presentation transcript:

1 ECE504 ST Project Jeff Rice
Arduino Based Temperature Controller, Ethernet Enabled **Please Click on Icon to Hear Sound, then click On slide when sound over to advance**

2 Presentation Structure
Arduino Overview Review of Temperature Controller Project stages and results Microprocessors role in industrial & utility controllers

3 Arduino Overview Pin connectors for I/O Serial port interface (SPI)
Crystal Oscillator (clock source) USB port and onboard USB-serial chip allows easy programming in C language Volt Regulator – to allow wide input voltage range The arduino platform is an open source hardware and software development package, intended for both programmers and non-programmers. The boards come in several flavors. Shown here is the Arduino Uno, the most popular version of the current revision of the Arduino boards available. The intent of the Arduino is to be a simple, easy to use development platform that is both readily available and has a wide array of users extending the basic functionality through libraries. The hardware is simple, adding a voltage regulator (to allow more input voltages), a crystal oscillator (to allow for basic chip timing and timekeeping in programs), i/o pins (for controlling external hardware) and USB and FDTI serial interfaces to the basic chip. The base chip is an Atmel corporation ATMega 328p 8 bit microprocessor with a pre-loaded bootloader. Brains – Atmel ATMega RISC microprocessor with pre-loaded bootloader Result - $30 microproc. Based dev. Development board with wide usage and many open source libraries.

4 Arduino: Open Source Enabled
Actuators: LEDs, Solenoids, Motors Peripherals: LCDs, remote I/O (I2C) Direct Inputs: Heat, Light, Motion Arduino Board Zigbee Libraries LCD X10 (PLC) I2C Servo PID SD Card CapSense Stepper Motor LowPower Text Messaging Modbus Printing Tones PC or Mac running Arduino IDE While the CS majors may be well used online forums, standardization and open source libraries as tools speed development, I was surprised at the ease with which one can walk right into programming one of these development boards. About ten years ago I worked with Motorola 6800 series chips and the learning curve between those and this were an order of magnitude different. The chief reasons for this were not differences in hardware but rather a wide support structure through the internet where code, code problems and code fixes are shared and documented. There are typically multiple libraries readily found for any software or hardware task which are open source and well commented. And the IDE is elegantly simple, allowing a user to code in C using high level functions or direct bit operations on the micro registers.

5 Arduino History Processing Ben Fry & Casey Reyes create Processing, programming language for Artists (MIT, 2001) WIRING Wiring IDE, development board & language created (Ivrea Italy, 2003) ARDUINO Arduino developed for low cost student development (Ivrea Italy, 2005) As a side note, the Arduino project was a furthering of two previous languages and associated hardware. The original framework was developed at MIT as Processing, a language for artists, that was taken and reworked into a language to program the Atmel microprocessor called “wiring”. Wiring was then further refined to lower the cost of the board as well as further simplify it to reach a broader audience of prototypers and inventors, and the result was the “Arduino” platform. One thing I liked about Arduino is that it is largely focused on being a community driven project.

6 Thyristor Review Thyristors are widely used three terminal power semiconductors – if you gate it the unit conducts until reversed biased. Mature technology, mass produced and widely used for motor drives & inverters Gate not isolated from Cathode

7 Thyristor Trouble (continued)
5v gate signal driven by micro and power supply, thyristor cathode and anode hooked to AC mains supply. Not realizing the gate was not isolated, it seemed like the logical solution to drive the gate pulses with the microcontroller while This brings forward an important design criteria (other than doing sufficient research before flipping the on switch). Isolation is both difficult and very important for control circuits interacting with high power.

8 Using a Solid State Relay
Duty cycle control over 1 second interval 120 segment resolution (# of half sine waves) Solid state relay required due to cycles needed. Unit will switch twice per second, meaning over 7000 operations per day. While the unit I used was a “zero crossing” type, there are also “random fire” types.

9 As you can see design for solid state relays have the trigger built in
As you can see design for solid state relays have the trigger built in. On this diagram the main power components (Triac is a bidirectional Thyristor) can be found by looking just down and to the left from the skull and crossbones. You can there is some design involved in isolating and signal conditioning in the trigger circuit preceding the Triac. Image by Tony van Roon (

10 Digital Temperature Sensor
Hardware Setup AC Breaker Digital Temperature Sensor Arduino Here are the local parts of the setup PID temperature controller unit. Sensor = digital temp sensor on serial “one wire” interface. This interface was created by Dallas Semiconductor and is used in a number of sensor applications. It is a low data rate multidrop communications system. Interestingly, the reason it is called one wire is that the devices are made to be powered via the communications line Typically units are in a listening mode which is low power and store charge on an internal 800pf . If a unit must switch into a high power mode to perform some processing or a function the main processor will signal the sensor to start the task and hold the data bus high for a pre-determined amount of time while the sensor accomplishes its task. Then the main processor polls the sensor and data is exchanged. Output = microprocessor triggers the solid state relay maintained for part of a second corresponding to output percentage There is an LCD which displays the duty cycle of the heater, the temperature read from the sensor and the temperature setpoint. Local LCD HMI Heating Element Solid State Relay

11 PID Control Loops Overview
PID Loops: very common control loop PID = Proportional, Integral, Derivative Controlled Variable, Setpoint, Output As there was some question about the term “PID” in the progress reports I thought I’d briefly review what a PID controller is. PID is a type of continuously acting control loop. PLCs and other control devices not tied to a specific process but used in many different situations will typically have them as a basic programming block. Wikipedia list them in the PID article as “the most commonly used feedback controller”. By changing parameters in the PID control loop this general controller can be made to correctly respond to most process control problems. The PID controller takes the error, which is the difference between the setpoint and current value of the process. For my project this is the difference between the actual vessel temperature and setpoint. P = Proportional -> error * constant Kp = response. P is the most basic response, but you will stabilize with the setpoint and actual value off by some amount. I = Integral – error integrated over time * constant Ki = response. I will integrate the error and so over time will influence the output to make the setpoint and actual value come together D = Derivative of error signal * constant Kd. D increases the response speed and helps avoids overshoot. All three responses taken together change the output. Image source = Wikipedia

12 Simple Web Setup Any Computer with a Web Browser Web Browser Ethernet
To achieve the web server Ethernet Expansion Board with Wiznet 5100 TCP/IP Chip Arduino Unit PID Library Ethernet Library SSR Firing Routine One Wire Comm.

13 Simple Web Result Virtual Emulation of Local LCD Display with ability to change setpoint

14 Full HMI Setup Inductive Automation Ignition Runtime and IDE
Status Module HMI IDE and Runtime Historian Database & Drivers OPC Kepware I/O Server USB After doing the simple web interface I wanted to add to the remote interface to make it more like a typical industrial or utility control system. The web interface lacked data storage, system metrics, security and a number of other features. To “upgrade” the system I utilized the Kepware I/O server and Inductive Automation’s HMI platform running on my PC. I used a modbus library for Arduino that responded to a Kepware Modbus master driver to create the data exchange. You might wonder why use an I/O server. The I/O server handles any complexities associated with communication such as polling, communications hardware and protocol requirements. It then translates and concentrates all of the data into a single interface to pass on to the HMI system. Arduino Unit PID Library Modbus Library Register Data SSR Firing Routine I2C Comm

15 Kepware I/O Server Handles communication to hardware, data concentration and status flagging

16 Ignition HMI (Platform Monitor)

17 Here is a screen from the HMI that was created for control of the unit
Here is a screen from the HMI that was created for control of the unit. This HMI has a number of built in features For operators of large systems it can have many screens and data points, and alarm and data logging so out of range events are brought to the operator’s attention. As you can see on the screen items can be flagged by animation including color and movement to attract attention to important areas. This must carefully be managed to avoid overloading the operator with too flashy of a system. Trending is a critical item here and requires a database to store historical data. Then operators can easily look at past and current data trends to determine when and how things have changed. Setup as a client/server system The system support redundancy of the server In this case the PID loop is not tuned and immediately overshoots, causing alarms.

18 Need for Local Control Note that processor controls the process, not the HMI. No critical process data routed through HMI. LCD Serves as Backup indication Typically a real critical process would have a “hard” backup to the controller One thing I thought about as I ran between watching kids and leaving this thing run amok in the garage was the safety of the system. At this point I had not tuned it and did have it melt my plastic temperature controlled “vessel” a few times. While the computer control was nice, I did not want to have the processor require the computer to safely control the process. Especially when my computer decides to randomly reboot and install lengthy updates. So no critical data was routed through the HMI / SCADA. The LCD served as a backup indication which could be quickly checked to get a local indication of the system, whether or not the PC interface was on. Basically if the micro was powered, the display came on whether or not I had my PC connected.. While I did not have time or equipment to install a fail-safe backup to the temperature controller, I did recognize the need to do so if it was to run unattended. To be safe most systems have some sort of physical barrier to the system failing in a dangerous state such as: Fire systems – have meltable links so even if dampers are not closed by the fire control system they fail closed when exposed to heat Process tanks – often have an overflow prevention mechanism that shuts off the filling port/pump if level approaches spill For this temperature controller, I would have installed a temperature based bimetallic switch that would cut power to the motor if the vessel drastically overheated and require a physical reset.

19 Arduino Ethernet board Security Issues
Based on Wiznet 5100 chip Found published errata on chip When I delved into trying to discover security holes with the Arduino ethernet board, I found Wiznet the ethernet board’s main chip manufacturer had published the errata shown on the right of the slide. This errata sheet basically describes how the chip will not finish send commands on UDP packets if it receives a packet during its send process. I had trouble making this happen as I found that the libraries for UDP were not well developed and it would be difficult to understand whether I was making the library or the hardware malfunction during tests. It surprised me to find encryption with the Arduino is possible and being done by a number of people interested in cryptography. I found libraries doing RSA-512, AES-256, SHA, and HMAC-SHA. In fact there are a number of papers on the internet on doing encryption on small microprocessors, even down to low power 4 bit micros. Working directly with a process through hardware made security take on a new meaning for me; If I was running unsecured Wi-fi to my PC exchanging modbus ethernet messages with the Arduino, it might not take much time watching me send my three pieces of data back and forth in Wireshark to figure out how to change my temperature setpoint from 70 degrees to 10,000 degrees and set my garage on fire.

20 Bridge to PLCs In Process Control we don’t hear people talk about
Microprocessors Libraries and common code Instead Industrial vendors either Develop everything themselves package chipsets and libraries in their own “wrappers”

21 GE Fanuc VersaMax MicroController
One of the more common GE micro PLCs

22 GE Versamax Micro PLC Innards
IO Board RELAYS CPU/Comm Board Terminals

23 GE Labeled, But Made By…. Someone Else?
Renesas microprocessor Hitachi manufactured PCB General Electric’s Versamax PLC (GE’s most common Micro PLC line) dis-assembled reveals that Main computer is a Renesas 32-bit RISC Microcomputer, Super H SH7000 series Information for chip hardware and software packages on web.

24 PLC Demolition Results
If we can extrapolate from this one example: Although PLCs looks like custom built pieces of proprietary hardware and software… The industry reuses technology and components. Use of such third party hardware and software can open the doors of information to mal – actors

25 Presentation Conclusion
Learning / Research project Gained experience with Arduino, Processing, Libraries and C language, Modbus protocol, GE PLCs, One Wire protocol, Thyristors and Solid State Relays and Ignition HMI platform. Hopefully some of this was passed on in the presentation!

26 Questions? Thanks for listening!

Download ppt "ECE504 ST Project Jeff Rice"

Similar presentations

Ads by Google