0015 / esp32-ov5640-af Goto Github PK
View Code? Open in Web Editor NEWLibrary for ESP32 to use OV5640's autofocus function
Home Page: https://youtube.com/thatproject
License: MIT License
Library for ESP32 to use OV5640's autofocus function
Home Page: https://youtube.com/thatproject
License: MIT License
I am using the Arducam module, which appears to be very similar to the one from Waveshare, however the camera is not focusing.
I have tried implementing the basic example.
I can confirm the camera emits a click when it is connected to a power supply, which seems to confirm that the autofocus coil is actually connected.
It is more correct to connect the autofocus module power to 2.8V.
There is an appropriate regulator on the ESP32CAM board.
// OV5640_Console_Test.ino:72
uint8_t rc = ov5640.getFWStatus();
Serial.printf("FW_STATUS = 0x%x\n", rc);
if (rc == -1) { // -1 is out of range for uint8_t
...
// ESP32_OV5640_AF.cpp:87
uint8_t OV5640::getFWStatus() {
if (!isOV5640) return -1; // -1 is out of range for uint8_t
uint8_t rc = sensor->get_reg(sensor, OV5640_CMD_FW_STATUS, 0xff);
return rc;
}
I tried with ESP32-CAM board but something seems to be wrong. I connected 3V3 to pin 24 of camera connector but produced a shortcut. I looked at pin 24 and found out it's connected to GND. Datasheet of OV5640 says that AF-VCC is pin 4 and not 24 and pin 4 has 3V3. What is going wrong?
Thank you for this wonderful project. I'm wondering if there are particular challenges with enabling manual focus. It should consist of sending a command via i2c to the proper register right? Are there registers for setting the position of the lens that are known?
I haven't tried this yet - but it looks excellent!
ESP32-OV5640-AF/src/ESP32_OV5640_cfg.h
Line 34 in e3c1817
Do you know what this microcode actually does? Is there source code that could be modified? Or an 5640 microcode programming manual?
Is it your understanding that the esp32-camera driver does not have that auto-focus microcode?
I thought it did, but as I look at it right now, it is not there, so the standard esp32 drivers must leave it in infinity focus mode.
I've seen a few similar things like this, but never put the time to understand it.
https://www.its304.com/article/hwytree/118992955
https://gitlab.com/k2wl/g2_kernel/-/blob/4472ce5be96571f65dcfad53a6aa32c58d5553bd/drivers/media/video/msm/ov5640.h#L1046
Hi
Will your lib works with esp32 wroom without psram ?
Thanks a lot!
Fantastic work on getting autofocus to work on the ESP32 !
I'm using the Espressif esp32-camera esp_camera_init
function to initialize my camera. Question is when do I call your ov5640.focusInit()
function? I see that your focusInit()
resets the camera and loads the autofocus firmware to the camera and this is going to cause havoc if focusInit()
is called after esp_camera_init
?
My camera init code looks something like this:
esp_err_t err = esp_camera_init(&config);
if (err != ESP_OK) {
return;
}
Hi,
I want to use ESP-WROVER-KIT with the Waveshare OV5640 board. I installed the ESP32-OV5640-AF library, but:
How can I use ESP-WROVER-KIT with the Waveshare OV5640 cam board?
Thanks.
Hi! I want to use this library to micropython on ov5640,is that library can complie to micropython fireware?
Hello,
I tried replicating the result on my esp32 cam, but the auto focus function doesn't work. I bought a slightly different version of the ov5640 model, which has Auto-VDD at pin #23 instead of #24, and I did connect that pin to the 3V power pin from the board accordingly. I ran the unmodified example code you provided, and the monitor console did indeed show the camera was focusing and focused. However, I didn't hear any sounds from the motor while the camera was focusing, nor did I get a clear picture when I took a shot with it. Any thoughts on what could cause it? I tried it on several camera modules from different vendors, same result.
This is the one I bought.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.