Arduino and Raspberry Pi Controlled Robotic System with Audio and Vibration Feedback
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates an Arduino Nano, a Raspberry Pi 4B, and various peripheral components including servos, a vibration motor, a loudspeaker, a DFPlayer MINI, and a PAM8403 amplifier. The circuit is powered by a LiPo battery and includes a boost converter and a LiPo battery charger module. The Arduino Nano and Raspberry Pi 4B communicate with each other and control the peripheral components.
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 GPIO pins for interfacing with other 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
Adafruit DRV2605L
- Description: A haptic motor controller that can drive 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 module.
- 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 toggle between two states.
- Pins: L1, COM, L2
LiPo Battery Charger Module
- Description: A module for charging LiPo batteries.
- Pins: B-, B+, OUT-, OUT+
LiPo Battery
- Description: A rechargeable lithium polymer battery.
- Pins: VCC, GND
Boost Converter MT3608
- Description: A DC-DC step-up converter.
- Pins: OUTPUT +, OUTPUT -, INPUT +, INPUT -
Wiring Details
Arduino Nano
- D1/TX connected to Raspberry Pi 4B GPIO15
- D0/RX connected to Raspberry Pi 4B GPIO14
- D3 connected to Servo pulse
- D5 connected to Servo pulse
- D7 connected to Adafruit DRV2605L IN/TRIG
- D8 connected to Servo pulse
- D9 connected to Servo pulse
- D10 connected to DFPlayer MINI RX
- D11/MOSI connected to DFPlayer MINI TX
- A5 connected to Adafruit DRV2605L SCL
- A4 connected to Adafruit DRV2605L SDA
- 5V connected to Raspberry Pi 4B 5V, Servo vcc, DFPlayer MINI VCC, Adafruit DRV2605L VIN, PAM8403 5vIN+, boost converter MT3608 OUTPUT +
- GND connected to Raspberry Pi 4B GND, Servo gnd, Adafruit DRV2605L GND, PAM8403 GND/IN-, DFPlayer MINI GND, boost converter MT3608 OUTPUT -
Raspberry Pi 4B
- GPIO15 connected to Arduino Nano D1/TX
- GPIO14 connected to Arduino Nano D0/RX
- 5V connected to Arduino Nano 5V, Servo vcc, DFPlayer MINI VCC, Adafruit DRV2605L VIN, PAM8403 5vIN+, boost converter MT3608 OUTPUT +
- GND connected to Arduino Nano GND, Servo gnd, Adafruit DRV2605L GND, PAM8403 GND/IN-, DFPlayer MINI GND, boost converter MT3608 OUTPUT -
Adafruit DRV2605L
- VIN connected to Arduino Nano 5V, Raspberry Pi 4B 5V, Servo vcc, DFPlayer MINI VCC, PAM8403 5vIN+, boost converter MT3608 OUTPUT +
- GND connected to Arduino Nano GND, Raspberry Pi 4B GND, Servo gnd, PAM8403 GND/IN-, DFPlayer MINI GND, boost converter MT3608 OUTPUT -
- SCL connected to Arduino Nano A5
- SDA connected to Arduino Nano A4
- IN/TRIG connected to Arduino Nano D7
- OUT+ connected to Vibration Motor POS
- OUT- connected to Vibration Motor NEG
DFPlayer MINI
- VCC connected to Arduino Nano 5V, Raspberry Pi 4B 5V, Servo vcc, Adafruit DRV2605L VIN, PAM8403 5vIN+, boost converter MT3608 OUTPUT +
- GND connected to Arduino Nano GND, Raspberry Pi 4B GND, Servo gnd, Adafruit DRV2605L GND, PAM8403 GND/IN-, boost converter MT3608 OUTPUT -
- RX connected to Arduino Nano D10
- TX connected to Arduino Nano D11/MOSI
- SPK1 connected to PAM8403 R-INPUT
- SPK2 connected to PAM8403 L-INPUT
Loudspeaker
- pin1 connected to PAM8403 L-
- pin2 connected to PAM8403 L+
Servo
- vcc connected to Arduino Nano 5V, Raspberry Pi 4B 5V, DFPlayer MINI VCC, Adafruit DRV2605L VIN, PAM8403 5vIN+, boost converter MT3608 OUTPUT +
- gnd connected to Arduino Nano GND, Raspberry Pi 4B GND, Adafruit DRV2605L GND, PAM8403 GND/IN-, DFPlayer MINI GND, boost converter MT3608 OUTPUT -
- pulse connected to Arduino Nano D3, Arduino Nano D5, Arduino Nano D8, Arduino Nano D9
PAM8403
- 5vIN+ connected to Arduino Nano 5V, Raspberry Pi 4B 5V, Servo vcc, DFPlayer MINI VCC, Adafruit DRV2605L VIN, boost converter MT3608 OUTPUT +
- GND/IN- connected to Arduino Nano GND, Raspberry Pi 4B GND, Servo gnd, Adafruit DRV2605L GND, DFPlayer MINI GND, boost converter MT3608 OUTPUT -
- R-INPUT connected to DFPlayer MINI SPK1
- L-INPUT connected to DFPlayer MINI SPK2
- L- connected to Loudspeaker pin1
- L+ connected to Loudspeaker pin2
- R- connected to Loudspeaker pin1
- R+ connected to Loudspeaker pin2
Vibration Motor
- POS connected to Adafruit DRV2605L OUT+
- NEG connected to Adafruit DRV2605L OUT-