11. Input devices

Visit Group website for more imformations. [Click here.]http://archive.fabacademy.org/2019/labs/cept/inputdevices.html)

What is an Input Device?

An input device is an equipment/Component used to provide data and control signals to an information processing system such as a Micro Controller. Examples of input devices include Sensors, Cameras etc.

Analog Sensors

There are different types of sensors that produce continuous analog output signal and these sensors are considered as analog sensors. This continuous output signal produced by the analog sensors is proportional to the measurand. There are various types of analog sensors; practical examples of various types of analog sensors are as follows: accelerometers, pressure sensors, light sensors, sound sensors, temperature sensors and so on.

Accelerometers

  • Analog sensors that detect changes in position, velocity, orientation, shock, vibration, and tilt by sensing motion are called as accelerometers. These analog accelerometers are again classified into different types based on the variety of configurations and sensitivities.

Light Sensors

  • Light Dependent Resistor

Analog sensors that are used for detecting the amount of light striking the sensors are called as light sensors. These analog light sensors are again classified into various types such as photo-resistor, Cadmium Sulfide (CdS), and, photocell. Light dependent resistor (LDR) can be used as analog light sensor which can be used to switch on and off loads automatically based on the day light incident on the LDR. The resistance of the LDR increases with decrease in light and decreases with increase in light.

Sound Sensors

  • Analog Sound Sensor

Analog sensors that are used to sense sound level are called as sound sensors. These analog sound sensors translate the amplitude of the acoustic volume of the sound into an electrical voltage for sensing sound level. This process requires some circuitry, and utilizes microcontroller along with a microphone for creating an analog output signal.

Pressure Sensor

  • Piezoelectric Sensor

The analog sensors that are used to measure the amount of pressure applied to a sensor are called as analog pressure sensors. Pressure sensor will produce an analog output signal that is proportional to the amount of applied pressure. These pressure sensors are used for different types of applications such as piezoelectric plates or piezoelectric sensors that are used for the generation of electric charge. These piezoelectric sensors are one type of pressure sensors that can produce an analog output voltage signal proportional to the pressure applied to the piezoelectric sensor.

Analog Temperature Sensor

  • Temperature sensors are widely available as both digital and analog sensors. Typically used analog temperature sensors are thermistors. There are different types of thermistors that are used for different applications. Thermistor is a thermally sensitive resistor that is used for detecting changes in temperature. If the temperature increases, then the electrical resistance of thermistor increases. Similarly, if temperature decreases, then the resistance decreases. It is used in various temperature sensor applications.

  • Practical example of analog temperature sensor is thermistor based temperature control system. This project is used to maintain constant temperature in an enclosed area. A block diagram of temperature control system consists of lamp (that represents a cooler), temperature sensor or thermistor, relay.

Digital Sensors

  • Electronic sensors or electrochemical sensors in which data conversion and data transmission takes place digitally are called as digital sensors. These digital sensors are replacing analog sensors as they are capable of overcoming the drawbacks of analog sensors. The digital sensor consists of majorly three components: senor, cable, and transmitter. In digital sensors, the signal measured is directly converted into digital signal output inside the digital sensor itself. And this digital signal is transmitted through cable digitally. There are different types of digital sensors that overcome disadvantages of analog sensors.

Digital Accelerometers

  • The method of generation of variable frequency square wave output by the digital accelerometer is called as pulse-width modulation. The readings are taken by the pulse width modulated accelerometer at fixed rate, generally at 1000 Hz (but this can be configured by a user based on the IC used). The output PWM signal, pulse width or duty cycle is proportional to the acceleration value.

Digital Temperature Sensor

Digital Temperature Sensor DS1620

  • DS1620 is a digital temperature sensor that provides temperature of device with 9-bit temperature readings. It acts a thermostat with its three thermal alarm outputs. If the temperature of device is greater than or equal to user defined temperature TH, then THIGH is driven high. If the temperature of the device is less than or equal to user defined temperature TL, then the TLOW is driven high. If the temperature of the device exceeds TH and remains high until it falls below that of TL, then the TCOM is driven high.

HC-SR04 Sensor Features

  • Operating voltage: +5V
  • Theoretical Measuring Distance: 2cm to 450cm
  • Practical Measuring Distance: 2cm to 80cm
  • Accuracy: 3mm
  • Measuring angle covered: <15°
  • Operating Current: <15mA
  • Operating Frequency: 40Hz

Applications

  • Used to avoid and detect obstacles with robots like biped robot, obstacle avoider robot, path finding robot etc.
  • Used to measure the distance within a wide range of 2cm to 400cm
  • Can be used to map the objects surrounding the sensor by rotating it
  • Depth of certain places like wells, pits etc can be measured since the waves can penetrate through water

Distance calculation

  • The distance can be calculated with the following formula:

    • Distance L = 1/2 × T × C

where L is the distance, T is the time between the emission and reception, and C is the sonic speed. (The value is multiplied by 1/2 because T is the time for go-and-return distance.)

What is Design & Fabrication for Input week?

  • Printed Circuit Board (PCB) fabrication is the assembly method for circuit boards used in electronic and computer devices. The layers of the board are put together along with the specific surface pattern so it can be used in electronics manufacturing.

  • Design and fabrication is a part of input also.Here design an PCB and fabricate it in MXD20 milling maching which is available at our lab.

  • Here I am using Hello echo boardfrom last week assignment.

How to add library:

Click Here to get library

  • How to use:

    The idea is to provide a simpler environment possible. To do this, simply follow the steps:

  • Installing

First you need to import the library so that the IDE recognizes it. The simplest way is importing through the IDE itself:

Click in Sketch > Include Library > Manage Libraries…;

In the search field type: ultrasonic;

In the list, look for Ultrasonic by Erick Simões;

Click on Install.

Alternatively, you can download the library here and import the .zip file into the IDE (see how to import a library here).

Assessment Section

  • Which board did you use for this week?

Basically this is a input week i started with my previous board ehich is hello echo board, it help to take input from sensor.

Here,

Ultrasonic Sensor Pin Configuration

Pin Number

Pin Name

Description

1

Vcc

The Vcc pin powers the sensor, typically with +5V

2

Trigger

Trigger pin is an Input pin. This pin has to be kept high for 10us to initialize measurement by sending US wave.

3

Echo

Echo pin is an Output pin. This pin goes high for a period of time which will be equal to the time taken for the US wave to return back to the sensor.

4

Ground

This pin is connected to the Ground of the system.

 

Feature

  • Operating voltage: +5V
  • Theoretical  Measuring Distance: 2cm to 450cm
  • Practical Measuring Distance: 2cm to 80cm
  • Accuracy: 3mm
  • Measuring angle covered: <15°
  • Operating Current: <15mA
  • Operating Frequency: 40Hz

// defines pins numbers
const int trigPin = 9;
const int echoPin = 10;
// defines variables
long duration;
int distance;
void setup() {
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
Serial.begin(9600); // Starts the serial communication
}
void loop() {
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance= duration*0.034/2;
// Prints the distance on the Serial Monitor
Serial.print("Distance: ");
Serial.println(distance);
}

InputWeek baord- All files including .prj file