Unit 2 Sensors parameters • Digital or Analog devices such as mechanical switches, proximity switches, photoelectric switches, encoders, temperature, pressure switches. • Some of the more common terms used to define the performance of sensors: 1. Accuracy: Is the extent to which the value indicated by a measurement system or element might be wrong. Ex: A temperature sensor might have an accuracy of + 0.1°C Error : it is the measurement of difference between the result of the measurement of true value of quality being measured. • Non linearity error is used to describe the error that occurs as a result of assuming a linear relationship between the input and output over the working range. • When the input value to a sensor changes, it will take some time to reach and settle down to the steady state value. • The response time is the time that elapses after the input to a system or element is abruptly increased from zero to a constant value, up to the point at which the system or element gives an output. • Sensitivity: ratio of output/input • Ex: a thermocouple having a sensitivity of 20µV/°C, It gives an output of 20µV for each 1° change in temperature. • Stability: constant • Repeatability: same value for repeated measurement of the same variable. • Reliability: probability that will operate to an agreed level of a specified period. Input devices • • • • • • • Mechanical switches Proximity switches Photoelectric sensors and switches Temperature sensors Position sensors Pressure sensors Smart sensors Mechanical switches • • ON/OFF signal Switches are normally open, normally closed • Disadvantage: switch debounce • Overcome by including a software program by introducing 20ms delay. Single Pole Double Throw(SPDT) Single Pole Single Throw(SPST) Limit switch • Limit switch is used to detect the presence or passage of a moving part. It can be actuated by a cam, lever and roller Proximity switches • Proximity switch are used to detect the presence of an item without making contact with it. • Types of proximity switch: 1. Eddy current 2. Reed switch 3. Capacitive switch Eddy current • A coil that is constantly energised by a AC and produces a constant alternating magnetic field, when a metal object brought near to it eddy currents are induced in it. • The magnetic field due to these induces an EMF back in the coil. • The voltage amplitude is thus an measure of the proximity of metallic objects. • The voltage can be used to activate an electronic switch circuit, basically a transistor. • Range is typically about 0.5 to 20mm Reed switch • It consists of two overlapping, but not touching strips of a springy ferromagnetic material sealed in a glass or plastic envelope. When a magnet or current carrying coil is bought close to the switch the strip becomes magnetized and attract each other. • Application: burglar alarms to detect whether the door is closed Capacitive proximity switch • A proximity switch that can be used with metallic and non metallic objects is the capacitive proximity switch. • One plate of the capacitor is sensor, the other being the metal object for which the proximity is to be detect. Range (4mm to 60mm) from the sensor head • Inductive proximity switch Photo electric sensor and switches • The radiation emitter is generally a LED, detector might be a phototransistor. • Range typically less than 5mm. • Photoconductive cell, the resistance often cadmium sulphide, depends on the intensity of light falling on it. • These sensors light is converted in to a current, voltage or resistance. Temperature sensor Types of temperature sensors 1. Bimetallic strip 2. Resistive temperature detector(RTD) 3. NTC thermistors 4. LM35, LM3911N 5. Thermocouple • It is used to turn ON/OFF a signal when a certain temperature is reached using a bi-stable element. • It consists of two metals Brass and Iron with different coefficient of expansions. • Resistive temperature detector(RTD): The electrical resistance of metals or semiconductors changes with temperature. • Metals include platinum, nickel or nickel alloys. • Bridge balance condition P/Q=R/S • • • • Thermistors show a very large change in temperature with temperature, the change is non-linear. They have Negative temperature co-efficient, the resistance decreases with increase in temperature. Advantages: cheap and small, giving large change in resistance and having fast reaction to temperature changes. Disadvantage: non-linear, with limited temperature ranges. • Thermo diodes and thermo transistors are used as temperature sensors, in which electrons and holes diffuse across semiconductor region • LM35 which gives an output of 10mV/C when the supply voltage is 5V. • • • • • Thermocouple consists of two wires A and B forming a junction, when the junction is heated so that it is at a higher temperature than the other junctions in the circuit, which remains at a constant cold temperature. An EMF is produced that is related to the hot junction temperature. The thermocouple voltage is small and needs amplification before it can be fed to the analog channel input of the PLC. Advantage: able to sense the temperature at almost any point , ruggedness and being to operate over a large temperature range. Disadvantage: non linear response. Position displacement sensor • Position sensor: It is used to measure the distance between a reference point and the current location of the target. • Displacement sensor: It gives a measure of distance between the present position of the target and the previously recorded position. • Resistive linear and angular position sensors are widely used and relatively inexpensive Position sensor • A DC voltage is provided across the full length of a track and the voltage signal between the slides over the resistance track and one end of the track is related to the position of the sliding contact between the ends of the potentiometer. Thus it behaves as an angular position sensor. Displacement sensor • • • • • LVDT: Linear Variable Differential Transformer, it gives an voltage output related to the position of a ferrous road. The LVDT consists of three symmetrically placed coils through which the ferrous rod moves When an alternating current is applied to the primary coil , alternating voltages V1 and V2 are induced in the two secondary coils. When the ferrous rod core is cantered between the two secondary coils, the voltage induced in them are equal so no output voltage. When the rod is displaced from its central position there is more of the rod in one secondary coil than the other. The difference between the two gives the output voltage. Pressure sensor • They are designed to give outputs that are proportional to the difference in pressure between two input ports. • If one of the ports is left open to the atmosphere, the gauge measures the pressure changes with respect to the atmosphere and the pressure measured is known as gauge pressure. • Absolute pressure: when it is measured with respect to vacuum. • Piezoelectric pressure sensor • The output is a voltage with a sensitivity of 0.6mV/kpa. Pressure sensor • Pressure switch are designed to switch on or off at a particular pressure. • Diaphragm moves under the action of the pressure and operates a mechanical switch. • Diaphragm are less sensitive than bellows but can withstand greater pressure. Smart sensor • Sensors generally need signal amplifying circuits to convert from Analog to Digital and vice versa. • To get the sensors signal in Wright form take an account of nonlinearities and calibrate it. A gradual change in the properties of sensors overtime. • Some sensors have all these elements take care of in a single package called smart sensors. • Smart sensors usually consists of data convertors, a processors, firmware's and some form of non volatile electrically erasable programmable read only memory(EEPROM). • Smart sensors can have their elements produced on a single silicon chip. • the IEEE1451.4 standard interface for smart sensor and actuators is based on electronic data sheet(TEDS) • The standard requires the non-volatile EEPROM embedded memory to hold and communicate data, which will allow a plug and play capability. Sensors, Actuators, and Smart Objects • Active or passive: • Sensors can be categorized based on whether they produce an energy output and typically require an external power supply (active) or whether they simply receive energy and typically require no external power supply (passive) Classification of sensors • Invasive or non-invasive: • Sensors can be categorized based on whether a sensor is part of the environment it is measuring (invasive) or external to it (noninvasive). Classification of sensors • Contact or no-contact: • Sensors can be categorized based on whether they require physical contact with what they are measuring (contact) or not (no-contact). Classification of sensors • Absolute or relative: • Sensors can be categorized based on whether they measure on an absolute scale (absolute) or based on a difference with a fixed or variable reference value (relative). Classification of sensors • Area of application: Sensors can be categorized based on the specific industry or vertical where they are being used. • How sensors measure: Sensors can be categorized based on the physical mechanism used to measure sensory input (for example, thermoelectric, electrochemical, piezoresistive, optic, electric, fluid mechanic, photoelastic). • What sensors measure: Sensors can be categorized based on their applications or what physical variables they measure. Actuators • Type of motion: Actuators can be classified based on the type of motion they produce (for example, linear, rotary, one/two/three-axes). • Power: Actuators can be classified based on their power output (for example, high power, low power, micro power) • Binary or continuous: Actuators can be classified based on the number of stable-state outputs. • Area of application: Actuators can be classified based on the specific industry or vertical where they are used. • Type of energy: Actuators can be classified based on their energy type. Smart object Stepper Motor • • • Stepper motor or stepping motor that produces rotation through equal angles, the so called steps. If one input pulse produces a rotation of 1.8° then for a rotation of 360°, 200 such digital pulses are required. The motor thus can be used for angular position. Application: If stepping motor is used to drive a continuous belt, it can be used to give accurate linear positioning. Such a motor is used with computers, printers, robots, machine tools Conveyor Belt • Conveyor belt is used to transport goods from a loading machine to a packing area. • When an item is loaded onto the conveyor belt, a contact switch might be used to indicate that an item is on the belt and to start the conveyor motor. • Motor remains off until the next item is loaded Input / Output Signal Conditioning • When connecting sensors that generate digital or discrete signals to an input, care has to be taken to ensure that voltage levels match. • A standard form of analog is used to convert analog signal to a current in the range 4 to 20mA by passing it through a 250Ώ resistance to give a 1 to 5V input signal. • Where 0 level is indicated by 4mA • 1 is indicated by 20mA Changing Voltage Levels • A potential divider can be used to reduce the voltage from a sensor to the required level Vout • Vout= R2*Vin/(R1+R2) • Amplifiers are used to increase the Voltage level 1. Inverting amplifier 2. Non-inverting amplifier Inverting Amplifier • Input is applied to inverting terminal of the op-amp. Non-Inverting Amplifier • Input is applied to non inverting terminal of the op-amp. Differential Amplifier • It is used to amplify the difference between two input voltages. Signal conditioning with a strain gauge sensor • The arrangement that might be used for a strain gauge sensor . • Sensor is connected in a wheat stone bridge and the out of potential is amplified by a differential amplifier before being fed via an anlog-to-digital converter unit Op-amp Comparator • The output of an op-amp saturates at about + 12V. • Operational amplifiers are widely used to give on/off signals based on the relative values of the two input signals. • One is connected to the inverting and the other is connected to the non inverting terminal of the Op-amp. Directional Control Valves • Solenoid as an actuator is a solenoid operated valve. They are used to control the directions of pressurized air or oil and used to operate devices, such as piston moving in a cylinder. • Pressurized air hydraulic fluid is input from port P which is connected to the power supply from a pump or compressor and port T is connected to hydraulic fluid return to the supply tank or in the case of a pneumatic system . The hydraulic fluid or pressurized air is fed to the right of the piston and exhausted from the left, the result being the movement of the piston to the left. When a current is passed through a solenoid, the spool valve switches the hydraulic fluid or pressurized air to left of the piston and exhaust from the right. • • Directional Control Valves • The valve has four ports – A,B,P and T and two control positions. 4/2 valve. • Basic symbol for a valve is a square, with one square used to describe each of the control positions. • With each square the switching positions are then described by arrows to indicate a flow direction, or a terminated line to indicate no flow path . Directional Control Valves • Direction control valves are used to control the direction of motion of position in cylinders. 1. 2 ports and 2 control outputs 2. 3 ports and 2 control outputs B is absent. 3. 4 ports and 2 control outputs Directional Control Valves • Actuation symbols a) Solenoid b) push button c) Spring operated d) Spring and solenoid operated 4/2 valve Directional Control Valves • Single acting cylinder • Double acting cylinder Control of single acting cylinder Control of double acting cylinder Communications Criteria • The various technologies used for connecting sensors can differ greatly depending on the criteria used to analyze them • Range: This section examines the importance of signal propagation and distance. • Frequency Bands: This section describes licensed and unlicensed spectrum, including sub-GHz frequencies. • Power Consumption: This section discusses the considerations required for devices connected to a stable power source compared to those that are battery powered. • Topology: This section highlights the various layouts that may be supported for connecting multiple smart objects. • Constrained Devices: This section details the limitations of certain smart objects from a connectivity perspective. • Constrained-Node Networks: This section highlights the challenges that are often encountered with networks connecting smart objects Communication technologies for connecting smart objects • IEEE 802.15.4: This section highlights IEEE 802.15.4, an older but foundational wireless protocol for connecting smart objects. • IEEE 802.15.4g and IEEE 802.15.4e: This section discusses improvements to 802.15.4 that are targeted to utilities and smart cities deployments. • IEEE 1901.2a: This section discusses IEEE 1901.2a, which is a technology for connecting smart objects over power lines. • IEEE 802.11ah: This section discusses IEEE 802.11ah, a technology built on the well-known 802.11 Wi-Fi standards that is specifically for smart objects. • LoRaWAN: This section discusses LoRaWAN, a scalable technology designed for longer distances with low power requirements in the unlicensed spectrum. • NB-IoT and Other LTE Variations: This section discusses NB-IoT and other LTE variations, which are often the choice of mobile service providers looking to connect smart objects over longer distances in the licensed spectrum IoT access technologies • Standardization and alliances: The standards bodies that maintain the protocols for a technology. • Physical layer: The wired or wireless methods and relevant frequencies. • MAC layer: Considerations at the Media Access Control (MAC) layer, which bridges the physical layer with data link control. • Topology: The topologies supported by the technology • Security: Security aspects of the technology • Competitive technologies: Other technologies that are similar and may be suitable alternatives to the given technology Message Queue Telemetry Transport MQTT • MQTT is machine-to-machine (M2M)/"Internet of Things" connectivity protocol. • originally developed and released by IBM • It was designed as an extremely lightweight publish/subscribe messaging transport. • It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium. • MQTT-enabled smart phone applications have taken off on a strong note. Design principles and aims of MQTT • It provides publish-and-subscribe messaging • specifically designed for resource-constrained devices. • low bandwidth and high latency networks such as dial-up lines and satellite links. • Facebook are using it as part of their mobile applications because it has such a low power footprint and is extremely light on network bandwidth. MQTT-enabled device connectivity. MQTT • MQTT enables resource-constrained IoT devices to send, or publish, information about a given topic to a server that functions as an MQTT message broker. • The broker then pushes the information out to those clients that have previously subscribed to the client's topic. MQTT • Many open source implementations of clients and brokers are available • Really small message broker (RSMB) • Mosquitto • Micro broker: Java based for PDAs, notebooks • Quality of Service Levels: Three levels: • 0 = At most once (Best effort, No Ack) • 1 = At least once (Acked, retransmitted if ack not received) • 2 = Exactly once [Request to send (Publish), Clear-tosend (Pubrec), message (Pubrel), ack (Pubcomp)] QOS Zero • This service level guarantees a best-effort delivery. There is no guarantee of delivery. • The recipient does not acknowledge receipt of the message and the message is not stored and re-transmitted by the sender. • QoS level 0 is often called “fire and forget” and provides the same guarantee as the underlying TCP protocol. QoS 1 – at least once • QoS level 1 guarantees that a message is delivered at least one time to the receiver. • The sender stores the message until it gets a PUBACK packet from the receiver that acknowledges receipt of the message. • It is possible for a message to be sent or delivered multiple times. QoS 2 – exactly once • QoS 2 is the highest level of service in MQTT. • This level guarantees that each message is received only once by the intended recipients. • QoS 2 is the safest and slowest quality of service level. • The guarantee is provided by at least two request/response flows (a four-part handshake) between the sender and the receiver. • The sender and receiver use the packet identifier of the original PUBLISH message to coordinate delivery of the message. MQTT MQTT Application • Home pacemaker monitoring solution • Sensors on patient • Collected by a monitoring equipment in home (broker) using MQTT • Subscribed by a computer in the hospital • Alerts the doctor if anything is out-of-order • VerneMQ is a high-performance distributed MQTT message broker. • low latency and fault tolerance, connects virtually everything • It is being positioned as the one for enabling connected cars, smarter lighting, public transportation, and smarter homes. • ThingMQ: is a carrier-grade multiprotocol message broker for IoT that runs on the cloud. Any device can be easily connected to their cloud using MQTT, CoAP, REST, or WebSockets and ThingMQ handles the rest. Constrained Application Protocol (COAP) • It is an application layer protocol for Machine to Machine (M2M) applications. • Meant for constrained applications. • COAP uses a client server architecture. Clients communicate with servers using connectionless diagrams. • COAP supports methods such as GET, PUT, POST and DELETE User Datagram Protocol UDP is an alternative communications protocol to Transmission Control Protocol (TCP) used primarily for establishing low-latency and loss-tolerating connections between applications on the internet. XMPP Extensible Messaging and Presence Protocol • Protocol for real time applications and streaming XML data between network entities. • XMPP powers wide range of applications including messaging, presence, data syndication, gaming, voice/video calls. • XMPP also sending small chunks of XML data from one network entity to another in near real time. • XMPP supports both client to server and server to servers communication paths. • XMPP allows real time communications between IOT devices. IEEE 802.15.4 • IEEE 802.15.4 is a wireless access technology for low-cost and low-data-rate devices that are powered or run on batteries. Applications: • Home and building automation • Automotive networks • Industrial wireless sensor networks • Interactive toys and remote controls IEEE 802.15.4 • The negatives around reliability and latency often have to do with the Collision Sense Multiple Access/Collision Avoidance (CSMA/CA) algorithm. • CSMA/CA is an access method in which a device “listens” to make sure no other devices are transmitting before starting its own transmission. • If another device is transmitting, a wait time (which is usually random) occurs before “listening” occurs again. • Interference and multipath fading occur with IEEE 802.15.4 because it lacks a frequency-hopping technique. • Later variants of 802.15.4 from the IEEE start to address these issues Protocol Stacks Utilizing IEEE 802.15.4 • • • • • • ZigBee 6LoWPAN ZigBee IP ISA100.11a WirelessHART Thread Zigbee- 802.15.4 • ZigBee protocol was framed by the ZigBee alliance. Following features of ZigBee make it very suitable for IoT applications: • Low power consumption • Low cost • Support for large number of network nodes (<=65K nodes) • • • • • ZigBee specification uses lower layers of IEEE 802.15.4 protocol stack and defines its own upper layers from network to application including application profiles. The ZigBee network and security layer provides mechanisms for network startup, configuration, routing, and securing communications. This includes calculating routing paths in what is often a changing topology, discovering neighbors, and managing the routing tables as devices join for the first time. The network layer is also responsible for forming the appropriate topology, which is often a mesh but could be a star or tree as well. From a security perspective, ZigBee utilizes 802.15.4 for security at the MAC layer, using the Advanced Encryption Standard (AES) with a 128bit key and also provides security at the network and application layers. Applications of Zigbee