vb.net barcode scanner programming Interfacing Analog Input in Software

Encoding QR-Code in Software Interfacing Analog Input

14.6 Interfacing Analog Input
QR Code 2d Barcode Recognizer In None
Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
Paint QR-Code In None
Using Barcode printer for Software Control to generate, create QR Code ISO/IEC18004 image in Software applications.
In most cases, the varying nature of analog inputs means they can t be directly connected to the control circuitry of your robot. If you want to quantify the values from the input, you need to use some form of analog-to-digital conversion (see the section Using Analog-toDigital Conversion later in this chapter for more information). Additionally, you may need to condition the analog input so its value can be reliably measured. This may include amplifying and buffering the input as described in this section.
Read QR Code 2d Barcode In None
Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications.
Create QR Code JIS X 0510 In Visual C#
Using Barcode generation for .NET framework Control to generate, create QR image in .NET framework applications.
14.6.1 VOLTAGE COMPARATOR
QR-Code Creator In Visual Studio .NET
Using Barcode generator for ASP.NET Control to generate, create QR Code 2d barcode image in ASP.NET applications.
Create Quick Response Code In Visual Studio .NET
Using Barcode maker for .NET framework Control to generate, create Quick Response Code image in VS .NET applications.
Before the robot s controller responds to an input sensor s analog voltage, it must reach a specific threshold. Rather than converting the analog voltage to a binary value using an analog-to-digital converter, the voltage from the input sensor can be compared against a reference voltage and a simple binary value, indicating if the analog input is above or below the reference passed to the robot s controller. The voltage comparator takes a linear, analog voltage and outputs a simple on/off (low/high) signal to the control electronics of your robot. Fig. 14-17 shows a sample voltage comparator circuit. The potentiometer is used to determine the trip point (reference
Making QR-Code In VB.NET
Using Barcode creation for Visual Studio .NET Control to generate, create QR-Code image in Visual Studio .NET applications.
Barcode Printer In None
Using Barcode generator for Software Control to generate, create barcode image in Software applications.
COMPUTER PERIPHERALS
Painting ANSI/AIM Code 39 In None
Using Barcode maker for Software Control to generate, create USS Code 39 image in Software applications.
UPC Code Generation In None
Using Barcode maker for Software Control to generate, create UPCA image in Software applications.
+12vdc
DataMatrix Printer In None
Using Barcode generator for Software Control to generate, create Data Matrix image in Software applications.
EAN / UCC - 14 Maker In None
Using Barcode printer for Software Control to generate, create UCC - 12 image in Software applications.
Input
Postnet Maker In None
Using Barcode generator for Software Control to generate, create Postnet image in Software applications.
EAN / UCC - 13 Generator In VB.NET
Using Barcode drawer for .NET Control to generate, create GTIN - 13 image in .NET applications.
5 IC2 339
Printing GTIN - 128 In None
Using Barcode creation for Online Control to generate, create EAN / UCC - 13 image in Online applications.
Data Matrix ECC200 Recognizer In .NET Framework
Using Barcode reader for .NET Control to read, scan read, scan image in VS .NET applications.
3 2 12
Bar Code Printer In C#
Using Barcode drawer for Visual Studio .NET Control to generate, create bar code image in .NET applications.
Recognize European Article Number 13 In None
Using Barcode reader for Software Control to read, scan read, scan image in Software applications.
R2 10K Output
Code 39 Creation In Java
Using Barcode maker for Android Control to generate, create Code-39 image in Android applications.
ECC200 Generation In None
Using Barcode generator for Font Control to generate, create Data Matrix image in Font applications.
Reference Voltage
FIGURE 14-17 Using a voltage comparator to determine whether an input voltage is above or below a reference voltage.
voltage) of the comparator. To set the potentiometer, apply the voltage level you want to use as the trip point to the input of the comparator. Adjust the potentiometer so the output of the comparator just changes state. Note that the pull-up resistor is used on the output of the comparator chip (LM339) used in the circuit. The LM339 uses an open collector output, which means that it can pull the output low, but it cannot pull it high. The pull-up resistor allows the output of the LM339 to pull high.
14.6.2 SIGNAL AMPLIFICATION
Many analog inputs provide on and off signals but not at a voltage high enough to be useful to the control electronics of your robot. In these instances you must amplify the signal, which can be done by using a transistor or an operational amplifier. The op-amp method (Fig. 14-18) is the easiest in most cases, and while the LM741 is probably the most referenced op-amp, you should look around for different devices that have simpler power input requirements (i.e., a single 5 V, which matches the power requirements of your robot s controller).
14.6.3 SIGNAL BUFFERING
The control electronics of your robot may load down the input sources that you use. This is usually caused by a low impedance on the input of the control electronics. When this happens, the electrical characteristics of the sources change, and erratic results can occur. By buffering the input you can control the amount of loading and reduce or eliminate any unwanted side effects. The op-amp circuit, as shown in Fig. 14-19, is a common way of providing highimpedance buffering for inputs to control electronics. R1 sets the input impedance. Note
14.6 INTERFACING ANALOG INPUT
Op-Amp Wired as a Non-Inverting High-Gain Amplifier
Input
+ Rb
Output
Ra Op Amp Gain = (1 + Rb / Ra)
FIGURE 14-18 LED used to indicate the logic level (high or low) or a switch input.
that there are no resistors wired to the op-amp s feedback circuitry, as in Fig. 14-18. In this case, the op-amp is being used in unity gain mode, which does not amplify the signal.
14.6.4 OTHER SIGNAL TECHNIQUES FOR OP-AMPS
There are many other ways to use op-amps for input signal conditioning, and they are too numerous to mention here. A good source for simple, understandable circuits is the Engineer s Mini-Notebook: Op-Amp IC Circuits, by Forrest M. Mims III, available through Radio Shack. No robotics lab (or electronics lab, for that matter) should be without Forrest s books.
FIGURE 14-19 Op-amp buffer.
COMPUTER PERIPHERALS
+V +V Light-Dependent Resistor (CdS Cell) Output Potentiometer Output
FIGURE 14-20 CdS cell voltage divider.
FIGURE 14-21 Potentiometer voltage divider.
14.6.5 COMMON INPUT INTERFACES
Figs. 14-20 and 14-21 are two basic, common interfaces for analog inputs. These can be connected to analog-to-digital converters (ADC), comparators, buffers, and the like. The most common interfaces are as follows:
CdS (cadmium-sulfide) cells are, in essence, variable resistors controlled by light and not a mechanical wiper. By putting a CdS cell in series with another resistor between the +V and ground of the circuit (Fig. 14-20), a voltage divider varying voltage is provided that can be read directly into an ADC or comparator. No amplification is typically necessary. A potentiometer forms a voltage divider when connected as shown in Fig. 14-21. The voltage varies from ground and +V. No amplification is necessary. The output of a phototransistor is a varying current that can be converted to a voltage by using a resistor. (The higher the resistance is, the higher the sensitivity of the device.) The output of a phototransistor is typically ground to close to +V, and therefore no further amplification is necessary. Like a phototransistor, the output of a photodiode is a varying current. This output can also be converted into a voltage by using a resistor (see Fig. 14-20). (The higher the resistance, the higher the sensitivity of the device.) This output tends to be fairly weak on the order of millivolts instead of volts. Therefore, amplification of the output analog voltage is usually required.
Copyright © OnBarcode.com . All rights reserved.