IO4
(pin 8 en tu ESP32-CAM), que suele estar libre.IO2
es una opción (pin 7 en tu ESP32-CAM), pero ten en cuenta que IO2 debe estar en alto para arrancar desde la memoria flash. Esto no debería ser un problema después del arranque, pero es algo a considerar.Vcc del HC-SR04
a +5V:(P1)
GND del HC-SR04
a GND
(puedes utilizar cualquier punto de tierra común, como J3:(Pin_2)
.Trigger del HC-SR04
a ESP32-CAM1:(IO4)
Echo del HC-SR04
a ESP32-CAM1:(IO2)
Cpp
#include "esp_camera.h" #include // Replace with your network credentials const char* ssid = "your_SSID"; const char* password = "your_PASSWORD"; void startCameraServer(); // Camera configuration #define PWDN_GPIO_NUM 32 #define RESET_GPIO_NUM -1 #define XCLK_GPIO_NUM 0 #define SIOD_GPIO_NUM 26 #define SIOC_GPIO_NUM 27 #define Y9_GPIO_NUM 35 #define Y8_GPIO_NUM 34 #define Y7_GPIO_NUM 39 #define Y6_GPIO_NUM 36 #define Y5_GPIO_NUM 21 #define Y4_GPIO_NUM 19 #define Y3_GPIO_NUM 18 #define Y2_GPIO_NUM 5 #define VSYNC_GPIO_NUM 25 #define HREF_GPIO_NUM 23 #define PCLK_GPIO_NUM 22 void setup() { Serial.begin(115200); Serial.setDebugOutput(true); Serial.println(); camera_config_t config; config.ledc_channel = LEDC_CHANNEL_0; config.ledc_timer = LEDC_TIMER_0; config.pin_d0 = Y2_GPIO_NUM; config.pin_d1 = Y3_GPIO_NUM; config.pin_d2 = Y4_GPIO_NUM; config.pin_d3 = Y5_GPIO_NUM; config.pin_d4 = Y6_GPIO_NUM; config.pin_d5 = Y7_GPIO_NUM; config.pin_d6 = Y8_GPIO_NUM; config.pin_d7 = Y9_GPIO_NUM; config.pin_xclk = XCLK_GPIO_NUM; config.pin_pclk = PCLK_GPIO_NUM; config.pin_vsync = VSYNC_GPIO_NUM; config.pin_href = HREF_GPIO_NUM; config.pin_sccb_sda = SIOD_GPIO_NUM; config.pin_sccb_scl = SIOC_GPIO_NUM; config.pin_pwdn = PWDN_GPIO_NUM; config.pin_reset = RESET_GPIO_NUM; config.xclk_freq_hz = 20000000; config.pixel_format = PIXFORMAT_JPEG; // Init with high specs to pre-allocate larger buffers if(psramFound()){ config.frame_size = FRAMESIZE_UXGA; config.jpeg_quality = 10; config.fb_count = 2; } else { config.frame_size = FRAMESIZE_SVGA; config.jpeg_quality = 12; config.fb_count = 1; } // Camera init esp_err_t err = esp_camera_init(&config); if (err != ESP_OK) { Serial.printf("Camera init failed with error 0x%x", err); return; } // WiFi connection WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("WiFi connected"); startCameraServer(); Serial.print("Camera Ready! Use 'http://"); Serial.print(WiFi.localIP()); Serial.println("' to connect"); } void loop() { delay(10000); }
Table
Step | Description | Objective | Expected Outcome | Tools/Equipment Needed |
---|---|---|---|---|
1 | Component Inspection | Verify all components visually for damage and correctness. | Components should be physically intact and match the specifications. | Visual inspection tools (magnifying glass, etc.) |
2 | Schematic Review | Cross-check schematic against datasheets and connections. | Ensure all connections are logical and match design intentions. | Schematic diagram, datasheets |
3 | PCB Assembly Check | Inspect assembled PCB for soldering faults and bridges. | No visible soldering defects or shorts. | Microscope, multimeter |
4 | Power Supply Test (Unloaded) | Verify power rails +5V,+3V3 with no load. | Correct voltage levels +5V,+3.3V on respective power rails. | Multimeter |
5 | Power Supply Test (Loaded) | Verify power rails with ESP32-CAM and other components. | Stable voltage levels under load conditions. | Multimeter, ESP32-CAM module |
6 | Programming Interface Check | Test USB to UART bridge (CH340C) functionality. | Able to flash firmware onto the ESP32-CAM module. | USB cable, terminal software |
7 | GPIO Expansion Verification | Check GPIO pins' connectivity and functionality. | Correct voltage levels and switching behavior on GPIO pins. | Multimeter, oscilloscope |
8 | Sensor Interface Testing | Verify communication with connected sensors. | Successful data transfer between ESP32-CAM and the sensors. | Relevant sensors, test scripts |
9 | Camera Functionality Test | Verify the camera's ability to capture and transmit images. | Clear image capture and transmission over WiFi. | ESP32-CAM module, WiFi network |
10 | Reset and BOOT Functionality | Test the reset and boot buttons. | Proper reset and boot behavior of the ESP32-CAM. | Multimeter, oscilloscope |
11 | USB Interface Test | Verify USB data lines (USBDP, USBDN) for correct operation. | Successful data communication over USB. | USB cable, logic analyzer |
12 | LED Indicators Check | Test LEDs for correct operation (general and status LEDs). | LEDs light up correctly as per design. | Multimeter, power supply |
13 | Full System Integration | Test full system functionality with all components working. | ESP32-CAM fully operational, with all peripherals working as intended. | All tools and components integrated |
14 | Thermal Testing | Check for overheating during operation. | All components within safe temperature limits. | IR thermometer or thermal camera |
15 | Final Verification | Perform a full verification of the system against specs. | Full functionality with no issues. | Comprehensive testing setup |
ESP-CAM Motherboard Module
Controls
Properties
Availability & Pricing
Distributor | Qty 1 | |
---|---|---|
Digi-Key | $1.08–$2.28 | |
LCSC | $1.66–$1.85 | |
Mouser | $1.75 |
Assets
id=ESP-CAM Motherboard Module-removebg-preview
Simulation
Cpp
#define BUZZER_PIN 4 // Asume GPIO4 para IO4 void setup() { pinMode(BUZZER_PIN, OUTPUT); // Configura el GPIO como salida } void loop() { digitalWrite(BUZZER_PIN, HIGH); // Activa el zumbador delay(1000); // Espera 1 segundo digitalWrite(BUZZER_PIN, LOW); // Desactiva el zumbador delay(1000); // Espera 1 segundo }
Designator | Ruleset | |
---|---|---|
Welcome 👋
Flux helps you build PCBs faster with an AI teammate!
To use this component and get started with Flux sign up now.
pvbt2002
copilot