Circuit Documentation
Summary
This document provides a detailed overview of a circuit that integrates a Raspberry Pi 4B, an Arduino 101, a Tower Pro SG90 servo, a Mini Diaphragm Water Pump, an OV2640 Camera Module, an L298N DC motor driver, and a LiPo battery. The circuit is designed to control a servo motor, a water pump, and a camera module, with power supplied by a LiPo battery and control logic managed by the Raspberry Pi and Arduino.
Component List
Raspberry Pi 4B
- Description: A powerful single-board computer used for various applications.
- 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
Tower Pro SG90 Servo
- Description: A small servo motor used for precise control of angular position.
- Pins: Signal, +5V, GND
Mini Diaphragm Water Pump
- Description: A small water pump used for liquid transfer.
- Pins: Positive (+), Negative (-)
LiPo Battery 2200mAH 30C
- Description: A rechargeable lithium polymer battery providing power to the circuit.
- Pins: VCC, GND
OV2640 Camera Module
- Description: A camera module used for capturing images and video.
- Pins: 3.3V, GND, SIOC, SIOD, VSync, HRef, PCLK, XCLK, D9, D8, D7, D6, D5, D4, D3, D2, RET, PWDN
Arduino 101
- Description: A microcontroller board based on the Intel Curie module.
- Pins: A5/SCL, A4/SDA, AREF, GND, D13/SCK, D12/MISO, D11 PWM/MOSI, D10 PWM/SS, D9 PWM, D8, D7, D6 PWM, D5 PWM, D4, D3 PWM, D2, D1/TX, D0/RX, AIN, ioref, RESET, 3V3, 5V, VIN, A0, A1, A2, A3, ICSP MISO, ICSP SCK, ICSP MOSI
L298N DC Motor Driver
- Description: A dual H-bridge motor driver used to control the water pump.
- Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB
Wiring Details
Raspberry Pi 4B
- 3V3 connected to OV2640 Camera Module 3.3V
- 5V connected to Arduino 101 5V, Arduino 101 VIN, L298N DC Motor Driver 5V, Tower Pro SG90 Servo +5V
- GPIO2 connected to OV2640 Camera Module HRef
- GPIO3 connected to OV2640 Camera Module SIOD
- GND connected to OV2640 Camera Module GND, Arduino 101 GND, Tower Pro SG90 Servo GND
- GPIO4 connected to Tower Pro SG90 Servo Signal
- GPIO14 connected to Arduino 101 D0/RX, L298N DC Motor Driver ENA
- GPIO15 connected to Arduino 101 D1/TX
Tower Pro SG90 Servo
- Signal connected to Raspberry Pi 4B GPIO4
- +5V connected to Raspberry Pi 4B 5V
- GND connected to Raspberry Pi 4B GND
Mini Diaphragm Water Pump
- Positive (+) connected to L298N DC Motor Driver OUT1
- Negative (-) connected to L298N DC Motor Driver OUT3
LiPo Battery 2200mAH 30C
- VCC connected to L298N DC Motor Driver 12V
- GND connected to L298N DC Motor Driver GND
OV2640 Camera Module
- 3.3V connected to Raspberry Pi 4B 3V3
- GND connected to Raspberry Pi 4B GND
- HRef connected to Raspberry Pi 4B GPIO2
- SIOD connected to Raspberry Pi 4B GPIO3
Arduino 101
- 5V connected to Raspberry Pi 4B 5V
- VIN connected to Raspberry Pi 4B 5V
- D0/RX connected to Raspberry Pi 4B GPIO14, L298N DC Motor Driver ENA
- D1/TX connected to Raspberry Pi 4B GPIO15
- GND connected to Raspberry Pi 4B GND
L298N DC Motor Driver
- 5V connected to Raspberry Pi 4B 5V
- OUT1 connected to Mini Diaphragm Water Pump Positive (+)
- OUT3 connected to Mini Diaphragm Water Pump Negative (-)
- 12V connected to LiPo Battery 2200mAH 30C VCC
- GND connected to LiPo Battery 2200mAH 30C GND
- ENA connected to Arduino 101 D0/RX, Raspberry Pi 4B GPIO14
Documented Code
Arduino 101 Code
void setup() {
}
void loop() {
}
L298N DC Motor Driver Code
void setup() {
}
void loop() {
}
LiPo Battery Code
void setup() {
}
void loop() {
}
Mini Diaphragm Water Pump Code
void setup() {
}
void loop() {
}
This documentation provides a comprehensive overview of the circuit, including a summary, component list, wiring details, and documented code.