Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino-Controlled Ultrasonic Distance Measurement with Relay-Activated Gearmotor and Buzzer Notification

View and Edit Project In Cirkit DesignerImage of Arduino-Controlled Ultrasonic Distance Measurement with Relay-Activated Gearmotor and Buzzer Notification

Circuit Documentation

Summary of the Circuit

This circuit is designed to interface an HC-SR04 Ultrasonic Distance Sensor with an Arduino UNO for distance measurement. The Arduino controls a relay module, which in turn can switch a gearmotor and a buzzer on and off. The gearmotor and buzzer are powered by a 9V battery. The relay module is used to control the high-power circuit of the gearmotor and buzzer, isolating it from the low-power control circuitry of the Arduino.

Component List

HC-SR04 Ultrasonic Distance Sensor (Wokwi Compatible)

Arduino UNO

Relay module 5v-30v

Gearmotor DC / Motorreductor

9V Battery

Buzzer

Wiring Details

HC-SR04 Ultrasonic Distance Sensor

Arduino UNO

Relay module 5v-30v

Gearmotor DC / Motorreductor

9V Battery

Buzzer

Documented Code

Arduino UNO Code (sketch.ino)

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

}

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

}

Note: The provided code is a template and does not contain any functional code. It needs to be filled in with the logic for controlling the HC-SR04 sensor, the relay module, and subsequently the gearmotor and buzzer based on the sensor's readings.