1 / 1
Ring light for ESP32-Cam Case — image 1

Ring light for ESP32-Cam Case

Order a print of this model

We calculate the final price from your selected file. You review and accept it before payment.

Saved on this device.

12 LED ring light for the popular ESP32 Cam Case initially published by bkgoodman

Rating
0 / 5
Likes
5
Downloads
31
Makes
0
Views
326
Reviews
0

Updated at source:

Model information

Category
Accessories
License
Creative Commons — Attribution — Noncommercial — Share Alike

I wanted to install fuchsr's remix of the popular ESP32-CAM Case (initially designed by bkgoodman) … but I needed a stronger light. So I bought one of the 12 LED neopixel ring lights from Aliexpress and designed this holder, that glues to the original case. The three wires can be threaded through the original flash LED hole.

Can be printed facing down - if bridges sag, needs a little cleanup before glueing the LED ring to the holder.

 

====================

 

I'll try to explain how I changed the “original Prusa camera firmware" for ESP32-CAM for the AI-Thinker module to light the Neopixel ring. Do this at your own risk - and NO, I can't put this on GitHub as a fork because I do know how to code - but I never used GitHub or anything similar and I'm not going to learn how to do it just for this project ;)

Firmware source - this worked for me on December 28th, 2024
https://github.com/prusa3d/Prusa-Firmware-ESP32-Cam

NeoPixel data pin must be connected to pin 13 of the ESP32 board. Connecting an external temperature/humidity sensor will NOT be possible anymore. Light will be permanently on in a dimmed state and will light up at 100% for the configured flash time. 

 

camera.h

After the existing #include lines, add
#include <Adafruit_NeoPixel.h>

 

camera.cpp

In the definitions, after
Camera SystemCamera(&SystemConfig, &SystemLog, FLASH_GPIO_NUM);
insert
Adafruit_NeoPixel neostrip = Adafruit_NeoPixel(12, FLASH_NEOPIXEL_LED_PIN, NEO_RGB + NEO_KHZ800);


In Camera::Init, after
  InitCameraModule();
  ApplyCameraCfg();
  GetCameraModel();
insert
  neostrip.begin();
  neostrip.setBrightness(100);
  neostrip.show();


In Camera::SetFlashStatus, after 
/* rgbLedWrite control of the FLASH */
change code to 
#if (true == CAMERA_FLASH_NEOPIXEL)
  if (true == i_data) {
    for(int i_px=0; i_px<12; i_px++)
      neostrip.setPixelColor(i_px, FLASH_ON_STATUS, FLASH_ON_STATUS, FLASH_ON_STATUS*0.45);
  } else if (false == i_data) {
    for(int i_px=0; i_px<12; i_px++)
      neostrip.setPixelColor(i_px, FLASH_OFF_STATUS, FLASH_OFF_STATUS, FLASH_OFF_STATUS*0.25);
  }
  neostrip.show();
#endif

 

module_AI_Thinker_ESP32-CAM.h

Change 
/* --------------- FLASH LED CFG  ---------------*/ 
to
#define ENABLE_CAMERA_FLASH         true
#define CAMERA_FLASH_DIGITAL_CTRL   true
#define CAMERA_FLASH_PWM_CTRL       false
#define CAMERA_FLASH_NEOPIXEL       true
#define FLASH_GPIO_NUM              -1
#define FLASH_NEOPIXEL_LED_PIN      13
#define FLASH_OFF_STATUS            64
#define FLASH_ON_STATUS             255
//#define FLASH_PWM_FREQ              2000
//#define FLASH_PWM_CHANNEL           0
//#define FLASH_PWM_RESOLUTION        8

Change
#define DHT_SENSOR_ENABLE           true
to false

Tags