.

In signal conditioning unit, the output of the sensor may be amplified, filtered or modified to the desired output voltage. For example, if we consider a microphone it detects the audio signal and converts to the output voltage (is in terms of millivolts) which becomes hard to drive an output circuit. So, a signal conditioning unit (an amplifier) is used to increase the signal strength. But the signal conditioning may not be necessary for all the sensors like photodiode, LDR etc.

Most of the sensors can’t work independently. So, sufficient input voltage should be applied to it. Various sensors have different operating ranges which should be considered while working with it else the sensor may get damaged permanently.

Types of Sensors:

Let us see the various types of sensors that are available in the market and discuss their functionality, working, applications etc. We will discuss various sensors like:

  • Light Sensor
    • IR Sensor (IR Transmitter / IR LED)
    • Photodiode (IR Receiver)
    • Light Dependent Resistor
  • Temperature Sensor
    • Thermistor
    • Thermocouple
  • Pressure/Force/Weight Sensor
    • Strain Gauge (Pressure Sensor)
    • Load Cells (Weight Sensor)
  • Position Sensor
    • Potentiometer
    • Encoder
  • Hall Sensor (Detect Magnetic Field)
  • Flex Sensor
  • Sound Sensor
    • Microphone
  • Ultrasonic Sensor
  • Touch Sensor
  • PIR Sensor
  • Tilt Sensor
    • Accelerometer
  • Gas Sensor

We need to select the desired sensor based on our project or application. As said earlier in order to make them work proper voltage should be applied based on their specifications.

.

SPI, A Serial Communication PROTOCOL

The most commonly used communication technique is Serial Communication, that’s the process of sending data one bit at a time, sequentially, over a communication channel or bus.

There are many types of serial communication like UART, CAN, USB, I2C and SPI communication: here we learn about SPI protocol and how to use it in Arduino.

SPI (Serial Peripheral Interface) is a serial communication protocol. SPI interface was found by Motorola in 1970. SPI has a full duplex connection, which means that the data is sent and received simultaneously. That is a master can send data to slave and a slave can send data to master simultaneously. SPI is synchronous serial communication means the clock is required for communication purpose.

A SPI has a master/Slave communication by using four lines. A SPI can have only one master and can have multiple slaves. A master is usually a microcontroller and the slaves can be a microcontroller, sensors, ADC, DAC, LCD etc.

SPI communication circuit between a master and slave
Below is the block diagram representation of SPI Master with Single Slave.

SPI has following four lines MISO, MOSI, SS, and CLK

  • MISO (Master in Slave Out) – The Slave line for sending data to the master.
  • MOSI (Master Out Slave In) – The Master line for sending data to the peripherals.
  • SCK (Serial Clock) – The clock pulses which synchronize data transmission generated by the master.
  • SS (Slave Select) –Master can use this pin to enable and disable specific devices.
SPI Communication
SPI Master with Multiple Slaves

To start communication between master and slave we need to set the required device’s Slave Select (SS) pin to LOW, so that it can communicate with the master. When it’s high, it ignores the master. This allows you to have multiple SPI devices sharing the same MISO, MOSI, and CLK lines of master. As you can see in the above image there are four slaves in which the SCLK, MISO, MOSI are common connected to master and the SS of each slave is connected separately to individual SS pins (SS1, SS2, SS3) of master. By setting the required SS pin LOW a master can communicate with that slave.

SPI Pins in Arduino UNO

Protected Area

This content is password-protected. Please verify with a password to unlock the content.

End Of Post