Arduino Nano-Based Ultrasonic Distance Sensor with Vibration Feedback and Dot Matrix Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino Nano, a PWM Vibration Motor Sensor Module Switch, an HC-SR04 Ultrasonic Sensor, and a Dot Matrix 8x32 display. The circuit is designed to interface these components with the Arduino Nano, enabling various functionalities such as vibration sensing, distance measurement, and visual display.
Component List
Arduino Nano
- Description: A small, complete, and breadboard-friendly 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
PWM Vibration Motor Sensor Module Switch
- Description: A module that senses vibration and outputs a PWM signal.
- Pins: Signal, Vcc, Ground
HC-SR04 Ultrasonic Sensor
- Description: A sensor that measures distance by using ultrasonic waves.
- Pins: VCC, TRIG, ECHO, GND
Dot Matrix 8x32
- Description: An 8x32 LED dot matrix display for visual output.
- Pins: +VCC, GND, CS (SS), Data (MOSI), CLK (SCK)
Comment
- Description: Placeholder for comments in the circuit.
- Pins: None
Wiring Details
Arduino Nano
GND is connected to:
- GND of HC-SR04 Ultrasonic Sensor
- GND of Dot Matrix 8x32
- Ground of PWM Vibration Motor Sensor Module Switch
D7 is connected to:
- Signal of PWM Vibration Motor Sensor Module Switch
D8 is connected to:
- TRIG of HC-SR04 Ultrasonic Sensor
D9 is connected to:
- ECHO of HC-SR04 Ultrasonic Sensor
D10 is connected to:
- Data (MOSI) of Dot Matrix 8x32
D11/MOSI is connected to:
- CS (SS) of Dot Matrix 8x32
D12/MISO is connected to:
- CLK (SCK) of Dot Matrix 8x32
VIN is connected to:
- +VCC of Dot Matrix 8x32
- Vcc of PWM Vibration Motor Sensor Module Switch
3V3 is connected to:
- VCC of HC-SR04 Ultrasonic Sensor
PWM Vibration Motor Sensor Module Switch
Signal is connected to:
- D7 of Arduino Nano
Vcc is connected to:
- VIN of Arduino Nano
Ground is connected to:
- GND of Arduino Nano
HC-SR04 Ultrasonic Sensor
GND is connected to:
- GND of Arduino Nano
TRIG is connected to:
- D8 of Arduino Nano
ECHO is connected to:
- D9 of Arduino Nano
VCC is connected to:
- 3V3 of Arduino Nano
Dot Matrix 8x32
+VCC is connected to:
- VIN of Arduino Nano
GND is connected to:
- GND of Arduino Nano
CS (SS) is connected to:
- D11/MOSI of Arduino Nano
Data (MOSI) is connected to:
- D10 of Arduino Nano
CLK (SCK) is connected to:
- D12/MISO of Arduino Nano
Documented Code
Arduino Nano Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code is a basic template for the Arduino Nano. The setup() function is where you initialize your components and settings, and the loop() function is where the main logic of your program runs repeatedly.