Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: Smart Sensors and Applications
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Smart Sensors andApplications

[attachment=22505]

INTRODUCTION AND AUTHOR'S NOTE

The first time I saw the term "smart sensor" was in Tracy Allen's Applied Sensors text(then known as Earth Measurements). Tracy aptly applied this term to the DS1620 digitalthermometer, which has built-in electronics that simplify microcontroller temperaturemeasurements. In addition, it can remember settings it receives from a microcontroller
and even function on its own as a thermostat controller.
In contrast to smart sensors, primitive sensors are devices or materials that have someelectrical property that changes with some physical phenomenon. An example of aprimitive sensor from What's a Microcontroller? is the cadmium sulfide photoresistor.Its resistance changes with light intensity. With the right circuit and program,
microcontroller light measurements are possible. Other examples of common primitivesensors are current/voltage output temperature sensors, microphone transducers, and eventhe potentiometer, which is a rotational position sensor.Inside every smart sensor is one or more primitive sensors and support circuitry. Thething that makes a smart sensor "smart" is the additional, built-in electronics. The
electronics make these sensors able to do one or more of the following:

BEFORE YOU START

To perform the experiments in this text, you will need to have your Board of Educationor HomeWork Board connected to your computer, the BASIC Stamp Editor softwareinstalled, and to have verified the communication between your computer and your
BASIC Stamp. For detailed instructions, see What’s a Microcontroller? which isavailable as a free download from www.parallax.com. You will also need the partscontained in the Smart Sensors Parts Kit. For a full listing of system, software, andhardware requirements, see Appendix D.

Ultrasonic Distance Sensor

The Ping))) sensor interfaced with a BASIC Stamp can measure how far away objectsare. With a range of 3 centimeters to 3.3 meters, it's a shoo-in for any number of roboticsand automation projects. It's also remarkably accurate, easily detecting an object'sdistance down to the centimeter.

HOW DOES THE PING))) SENSOR WORK?

Figure 2-2 shows how the Ping))) sensor sends a brief chirp with its ultrasonic speakerand measures the echo's return time to its ultrasonic microphone. The BASIC Stampstarts by sending the Ping))) sensor a pulse to start the measurement. Then, the Ping)))sensor waits long enough for the BASIC Stamp program to start a PULSIN command.
Then, at the same time the Ping))) sensor chirps its 40 kHz tone, it sends a high signal tothe BASIC Stamp. When the Ping))) sensor detects the echo with its ultrasonicmicrophone, it changes that high signal back to low.

Displaying Text

Now that the LCD is set up, it’s time to start sending text to the display. To display acharacter of text on the Serial LCD, simply send the ASCII code of that character to theSerial LCD over the serial port at the correct baud rate.When a character is received, the Serial LCD displays that character at the current cursorposition and then moves the cursor one position to the right. When you first turn on theLCD, the cursor is in the leftmost position on the top line, as you might expect. The short
bar on the bottom of the character shows where the cursor is positioned currently.Once you’ve sent a full line characters to the LCD, you will notice that the cursorautomatically wraps around to the leftmost position of the second line, just like the text ina book. The text will wrap like this at the end of every line, with the end of the bottomline wrapping back around to the top line of the LCD. The text will never“runoff” thedisplay; you’ll always see all of the characters you send.Try the following code on your BASIC Stamp 2 to send a text string to the LCD display.First, set the baud rate on your Serial LCD to 19,200. Then, load the code below intoyour BASIC Stamp 2 and run it. You will see the text string show up and wrap to thesecond line of the display.

Moving the Cursor

When you send a character to the Serial LCD, it always displays at the current cursorposition. There are a few different ways to move the cursor on the Serial LCD display.After each character you send, the cursor automatically moves over one position. Alongwith this, there is a standard set of cursor move commands including Backspace, Carriage
Return, and Line Feed.The Backspace/Left command (Dec 8) moves the cursor one place to the left and theRight command (Dec 9) moves the cursor one place to the right. These can be useful formoving the cursor around to overwrite existing text. These commands wrap to the next
line of the display, if necessary. The Line Feed command (Dec 10)moves the cursor tothe next line of the display without changing the horizontal position of the cursor. TheCarriage Return command (Dec 13) also moves the cursor to the next line, but it movesthe cursor to the leftmost position on that line as well. The Form Feed command (Dec
12) clears the entire display and moves the cursor to the leftmost position on Line 0, justlike when you first turn on the display. You will need to pause for 5mS in your codeafter sending the Form Feed command, to give the Serial LCD time to clear the display.
Except for Form Feed, none of these move commands affects the characters on thedisplay.