Raspberry Pi 4B-Based Smart Surveillance System with Audio Capture and Ultrasonic Sensing
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates a Raspberry Pi 4B with various peripherals including a digital audio amplifier (PAM8406), an electret microphone amplifier (Adafruit MAX9814), an ultrasonic sensor (HC-SR04), a TTL Serial JPEG Camera, and a speaker. The Raspberry Pi 4B serves as the central processing unit, controlling the peripherals and processing the data from the sensors. The PAM8406 amplifier is used to drive the speaker, and the Adafruit MAX9814 amplifier is used to boost the microphone signal. The HC-SR04 ultrasonic sensor provides distance measurements, and the TTL Serial JPEG Camera captures images. The circuit is powered by a 5V supply, which is distributed to the components that require it.
Component List
Speaker
- Description: A transducer that converts electrical signals into audible sound.
- Pins:
+,-
Raspberry Pi 4B
- Description: A small, powerful computer that includes a variety of GPIO pins for interfacing with external hardware.
- Pins:
3V3,5V,GPIO2,GPIO3,GND,GPIO4,GPIO14,GPIO15,GPIO17,GPIO18,GPIO27,GPIO22,GPIO23,GPIO24,GPIO10,GPIO9,GPIO25,GPIO11,GPIO8,GPIO7,ID_SD,GPIO5,GPIO6,GPIO12,GPIO13,GPIO19,GPIO16,GPIO26,GPIO20,GPIO21,ID_SC,TR01_TAP,TR00_TAP,TR03_TAP,TR02_TAP,RUN,GLOBAL_EN
PAM8406 5V Digital Audio Amplifier
- Description: A digital audio amplifier capable of driving a small speaker.
- Pins:
VCC,GND,ROUT+,ROUT-,LOUT+,LOUT-,R'IN,L'IN
Adafruit MAX9814 Electret Microphone Amplifier
- Description: An amplifier module for boosting the signal from an electret microphone.
- Pins:
GND,VDD,GAIN,OUTPUT,A/R
HC-SR04 Ultrasonic Sensor
- Description: A sensor that measures distance by emitting ultrasonic waves and measuring the time taken for the echoes to return.
- Pins:
VCC,TRIG,ECHO,GND
TTL Serial JPEG Camera
- Description: A camera module that captures images and sends them over a serial connection.
- Pins:
GND,RX,TX,CVBS,5V
Wiring Details
Speaker
- +: Connected to
ROUT+of the PAM8406 Digital Audio Amplifier. - -: Connected to
ROUT-of the PAM8406 Digital Audio Amplifier.
Raspberry Pi 4B
- 5V: Powers the PAM8406 Digital Audio Amplifier, Adafruit MAX9814 Electret Microphone Amplifier, TTL Serial JPEG Camera, and HC-SR04 Ultrasonic Sensor.
- GND: Common ground for the PAM8406 Digital Audio Amplifier, Adafruit MAX9814 Electret Microphone Amplifier, TTL Serial JPEG Camera, and HC-SR04 Ultrasonic Sensor.
- GPIO2: Not connected in this circuit.
- GPIO3: Not connected in this circuit.
- GPIO14: Connected to
RXof the TTL Serial JPEG Camera. - GPIO15: Connected to
TXof the TTL Serial JPEG Camera. - GPIO18: Connected to
R'INof the PAM8406 Digital Audio Amplifier. - GPIO23: Connected to
TRIGof the HC-SR04 Ultrasonic Sensor. - GPIO24: Connected to
ECHOof the HC-SR04 Ultrasonic Sensor. - GPIO9: Connected to
OUTPUTof the Adafruit MAX9814 Electret Microphone Amplifier. - GPIO19: Connected to
L'INof the PAM8406 Digital Audio Amplifier.
PAM8406 5V Digital Audio Amplifier
- VCC: Powered by the 5V pin of the Raspberry Pi 4B.
- GND: Connected to the common ground.
- ROUT+: Connected to the
+pin of the Speaker. - ROUT-: Connected to the
-pin of the Speaker. - R'IN: Connected to
GPIO18of the Raspberry Pi 4B. - L'IN: Connected to
GPIO19of the Raspberry Pi 4B.
Adafruit MAX9814 Electret Microphone Amplifier
- GND: Connected to the common ground.
- VDD: Powered by the 5V pin of the Raspberry Pi 4B.
- OUTPUT: Connected to
GPIO9of the Raspberry Pi 4B.
HC-SR04 Ultrasonic Sensor
- VCC: Powered by the 5V pin of the Raspberry Pi 4B.
- TRIG: Connected to
GPIO23of the Raspberry Pi 4B. - ECHO: Connected to
GPIO24of the Raspberry Pi 4B. - GND: Connected to the common ground.
TTL Serial JPEG Camera
- GND: Connected to the common ground.
- RX: Connected to
GPIO14of the Raspberry Pi 4B. - TX: Connected to
GPIO15of the Raspberry Pi 4B. - 5V: Powered by the 5V pin of the Raspberry Pi 4B.
Documented Code
No code has been provided for the microcontrollers in the circuit. If code is available, it should be documented here with explanations for each function and routine, including setup and loop (or main) functions, interrupt service routines, and any libraries or external modules used.