sensors + LCD

Cards (42)

  • HC-SR04 ultrasonic distance sensor
    Consists of two ultrasonic transducers
  • Ultrasonic distance sensor operation
    1. One transducer acts as a transmitter that converts electrical signal into 40 KHz ultrasonic sound pulses
    2. The other transducer acts as a receiver and listens for the transmitted pulses
    3. When the receiver receives these pulses, it produces an output pulse whose width is proportional to the distance of the object in front
  • HC-SR04 ultrasonic distance sensor
    • Provides excellent non-contact range detection between 2 cm to 400 cm (~13 feet) with an accuracy of 3 mm
    • Operates on 5 volts, can be connected directly to an Arduino or any other 5V logic microcontroller
  • VCC
    Supplies power to the HC-SR04 ultrasonic sensor
  • Trig (Trigger) pin
    Used to trigger ultrasonic sound pulses. By setting this pin to HIGH for 10µs, the sensor initiates an ultrasonic burst
  • Echo pin

    Goes high when the ultrasonic burst is transmitted and remains high until the sensor receives an echo, after which it goes low. By measuring the time the Echo pin stays high, the distance can be calculated
  • GND
    Ground pin
  • HC-SR04 ultrasonic sensor connections
    • VCC connects to 5V
    • Trig connects to 9
    • Echo connects to 10
    • Ground connects to GND
  • Download NewPing (library) by Tim Eckel
  • Sound sensor
    Capable of detecting voice, claps, or door knocks
  • Sound sensor
    • Incorporates a microphone (50Hz-10kHz) and some processing circuitry to convert the sound wave into an electrical signal
    • The electrical signal is fed to the on-board LM393 High Precision Comparator, which digitizes it and makes it available at the OUT pin
    • Includes a potentiometer for adjusting the sensitivity of the OUT signal
    • Can be used to set a threshold, so that when the amplitude of the sound exceeds the threshold, the module outputs LOW, otherwise HIGH
  • Use of sound sensor
    • When the amplitude of the sound exceeds a threshold (a knock is detected), you can activate a relay to control the light
  • Sensitivity adjustment

    Rotate the knob counterclockwise to increase sensitivity and clockwise to decrease it
  • Power LED
    Illuminates when the module is turned on
  • Status LED
    Illuminates when the sound level exceeds the threshold value
  • VCC
    Supplies power to the sensor. It is recommended that the sensor be powered from 3.3V to 5V
  • OUT pin
    Outputs HIGH under quiet conditions and LOW when sound is detected. You can connect it to any digital pin on an Arduino or to a 5V relay directly
  • Sound sensor connections
    • VCC connects to 5V
    • GND connects to GND
    • OUT connects to 8 (or any number pins?)
  • Infrared proximity sensor (IR Sensor)

    An electronic device that emits infrared lights to sense some aspect of the surroundings and can be employed to detect the motion of an object
  • IR Sensor

    • Has two main components: In the transmitter section, IR led is used and in the receiver section, a photodiode is used to receive infrared signal and after some signal processing and conditioning, you will get the output
  • VCC
    Power supply pin for the IR sensor which we connect to the 5V pin on the Arduino
  • OUT pin

    A 5V TTL logic output. LOW indicates no motion is detected; HIGH means motion is detected
  • GND
    Should be connected to the ground of the Arduino
  • IR sensor connections

    • VCC connects to 5V
    • OUT connects to 9 (or any number pin?)
    • GND connects to GND
  • DHT11 sensor

    Can measure temperature from 0°C to 50°C with a ±2.0°C accuracy, and humidity from 20 to 80% with a 5% accuracy
  • + (VCC) pin
    Provides power to the sensor. A 5V supply is recommended
  • Out pin
    Used for communication between the sensor and the microcontroller
    • (GND)
    Ground pin
  • DHT11 sensor connections
    • VCC connects to 5V
    • OUT connects to 8 pin
    • GND connects to GND
  • Install DHTlib library by Rob Tilaart
  • Soil moisture sensor

    This resistance varies inversely with soil moisture: The more water in the soil, the better the conductivity and the lower the resistance. The less water in the soil, the lower the conductivity and thus the higher the resistance
  • Soil moisture sensor

    • Includes a fork-shaped probe with two exposed conductors that is inserted into the soil
    • Includes an electronic module that connects the probe to the Arduino and generates an output voltage based on the resistance of the probe, which is available at an Analog Output (AO) pin
    • The same signal is fed to an LM393 High Precision Comparator, which digitizes it and makes it available at a Digital Output (DO) pin
  • AO (Analog Output)

    Generates analog output voltage proportional to the soil moisture level, so a higher level results in a higher voltage and a lower level results in a lower voltage
  • DO (Digital Output)

    Indicates whether the soil moisture level is within the limit. D0 becomes LOW when the moisture level exceeds the threshold value (as set by the potentiometer), and HIGH otherwise
  • Soil moisture sensor connections
    • A0 connects to A0
    • VCC connects to 7
    • GND connects to GND
  • I2C LCD
    Only uses two I/O pins that are not even part of the digital I/O pin set and can be shared with other I2C devices
  • I2C LCD display

    • Consists of an HD44780-based character LCD display and an I2C LCD adapter
    • Ideal for displaying only characters. A 16x2 character LCD, for example, can display 32 ASCII characters across two rows
  • If your LCD has a PCF8574 chip from Texas Instruments, its I2C address is 0x27; if it has a PCF8574 chip from NXP Semiconductors, its I2C address is 0x3F
  • Install LiquidCrystal_I2C library by Marco Schwartz
  • VCC
    Power supply pin. Connect it to the 5V output of the Arduino or an external 5V power supply