Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino Nano-Controlled Ultrasonic Distance Sensor with Vibration Feedback

Image of Arduino Nano-Controlled Ultrasonic Distance Sensor with Vibration Feedback

Circuit Documentation

Summary

This circuit integrates an Arduino Nano microcontroller with an HC-SR04 Ultrasonic Sensor and a Vibration Motor, powered by two 18650 Li-ion batteries. The Arduino Nano serves as the central processing unit, controlling the ultrasonic sensor to measure distances and activating the vibration motor based on the sensor's readings. The batteries provide the necessary power to the system.

Component List

Arduino Nano

  • Description: A compact microcontroller board based on the ATmega328P.
  • Pins: D1/TX, D0/RX, RESET, GND, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11/MOSI, D12/MISO, VIN, 5V, A7, A6, A5, A4, A3, A2, A1, A0, AREF, 3V3, D13/SCK.

HC-SR04 Ultrasonic Sensor

  • Description: An ultrasonic distance sensor capable of measuring distances from 2cm to 400cm.
  • Pins: VCC, TRIG, ECHO, GND.

Vibration Motor

  • Description: A small motor that vibrates when electricity is applied.
  • Pins: +, -.

18650 Li-ion Battery x 2

  • Description: A pair of rechargeable lithium-ion batteries.
  • Pins: +, -.

Wiring Details

Arduino Nano

  • GND: Connected to the GND pin of the HC-SR04 Ultrasonic Sensor and the "-" pin of the Vibration Motor.
  • D8: Connected to the "+" pin of the Vibration Motor.
  • D9: Connected to the "ECHO" pin of the HC-SR04 Ultrasonic Sensor.
  • D10: Connected to the "TRIG" pin of the HC-SR04 Ultrasonic Sensor.
  • VIN: Connected to the "+" pin of the 18650 Li-ion Battery x 2.
  • 5V: Connected to the "VCC" pin of the HC-SR04 Ultrasonic Sensor.
  • GND: Also connected to the "-" pin of the 18650 Li-ion Battery x 2.

HC-SR04 Ultrasonic Sensor

  • VCC: Connected to the "5V" pin of the Arduino Nano.
  • TRIG: Connected to the "D10" pin of the Arduino Nano.
  • ECHO: Connected to the "D9" pin of the Arduino Nano.
  • GND: Connected to the "GND" pin of the Arduino Nano.

Vibration Motor

  • +: Connected to the "D8" pin of the Arduino Nano.
  • -: Connected to the "GND" pin of the Arduino Nano.

18650 Li-ion Battery x 2

  • +: Connected to the "VIN" pin of the Arduino Nano.
  • -: Connected to the "GND" pin of the Arduino Nano.

Documented Code

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

Filename: sketch.ino

Note: The provided code is a template and does not contain any functional code to operate the circuit. The user must implement the setup and loop functions to control the HC-SR04 Ultrasonic Sensor and the Vibration Motor.