Arduino and Raspberry Pi Controlled Multi-Servo System with Audio and Vibration Feedback
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that integrates an Arduino Nano, a Raspberry Pi 4B, an Adafruit DRV2605L, a DFPlayer MINI, loudspeakers, servos, a PAM8403 amplifier, a vibration motor, and a toggle switch. The circuit is designed to leverage the capabilities of these components to achieve a specific functionality, which is controlled by the Arduino Nano and Raspberry Pi 4B.
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
Raspberry Pi 4B
- Description: A powerful single-board computer with a 64-bit quad-core processor.
- 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
Adafruit DRV2605L
- Description: A haptic driver for controlling vibration motors.
- Pins: VIN, GND, SCL, SDA, IN/TRIG, OUT+, OUT-
DFPlayer MINI
- Description: A small MP3 player module with a simplified output directly to the speaker.
- Pins: VCC, BUSY, RX, USB -, TX, USB +, DAC_R, K2/ADC_KEY, DAC_L, K1/ADC_KEY, SPK1, IO 2, GND, SPK2, IO 1
Loudspeaker
- Description: A device that converts electrical signals into sound.
- Pins: pin1, pin2
Servo
- Description: A motor with a feedback mechanism for precise control of angular position.
- Pins: gnd, vcc, pulse
PAM8403
- Description: A small digital amplifier board capable of driving 3W per channel.
- Pins: 5vIN+, GND/IN-, R-INPUT, GND, L-INPUT, L-, L+, R+, R-
Vibration Motor
- Description: A small motor that provides vibration feedback.
- Pins: POS, NEG
Toggle Switch
- Description: A switch that can be toggled between two states.
- Pins: L1, COM, L2
Wiring Details
Arduino Nano
- D0/RX connected to Raspberry Pi 4B GPIO17
- GND connected to Raspberry Pi 4B GND
- 5V connected to Raspberry Pi 4B 5V
Raspberry Pi 4B
- GPIO17 connected to Arduino Nano D0/RX
- GND connected to Arduino Nano GND
- 5V connected to Arduino Nano 5V
Adafruit DRV2605L
- VIN: Not connected
- GND: Not connected
- SCL: Not connected
- SDA: Not connected
- IN/TRIG: Not connected
- OUT+: Not connected
- OUT-: Not connected
DFPlayer MINI
- VCC: Not connected
- BUSY: Not connected
- RX: Not connected
- USB -: Not connected
- TX: Not connected
- USB +: Not connected
- DAC_R: Not connected
- K2/ADC_KEY: Not connected
- DAC_L: Not connected
- K1/ADC_KEY: Not connected
- SPK1: Not connected
- IO 2: Not connected
- GND: Not connected
- SPK2: Not connected
- IO 1: Not connected
Loudspeaker
- pin1: Not connected
- pin2: Not connected
Servo
- gnd: Not connected
- vcc: Not connected
- pulse: Not connected
PAM8403
- 5vIN+: Not connected
- GND/IN-: Not connected
- R-INPUT: Not connected
- GND: Not connected
- L-INPUT: Not connected
- L-: Not connected
- L+: Not connected
- R+: Not connected
- R-: Not connected
Vibration Motor
- POS: Not connected
- NEG: Not connected
Toggle Switch
- L1: Not connected
- COM: Not connected
- L2: Not connected
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:
}
Additional Documentation
This document provides a comprehensive overview of the circuit, including the components used, their connections, and the code running on the microcontroller.