I want to connect five OV2640 cameras via FPC to an ESP32 on a custom PCB. Is this generally possible and does the ESP32 have enough power for this or do I need an ESP32 for each camera? The frames per second are not so important as the cameras will be used as QR code scanners. Which components allow to run so many cameras with one ESP32?
Cameras can use a lot of bandwidth, I’d recommend just one camera per ESP32 if that’s an option…
If you’re restricted to a single ESP32 though, I think this would turn into a headache without some external circuitry on your custom PCB to handle switching between the cameras. If there’s no libraries available with support for multiple cameras on a single ESP32, you’d likely need to re-initialise the library after each camera switch - the delay from this powering down/initialising sequence for each consecutive camera could extend the time taken for a QR code to be scanned IMO
Worth noting I’ve not interfaced an ESP32 with a camera specifically (only really tinkered with much lower bandwidth devices, such as SPI relays and OLED displays) - so I’ve not got a clue how well this would work in practice.
Hopefully someone else can chime in here too
Hijacking your post since I was wondering if the ESP32 is capable to use more than just one cam.
If not are there small wifi devices that are a better solution?
Usual situation - if I needed to interface to 5 cameras I wouldn’t start with ones that needed: “The DVP physical interface consists of a single, 100-conductor, 110-ohm cable organized. as 45 differential signal pairs. These signal pairs consist of the following: • 36 RGB data pairs. • 2 clock pairs.” So, you would be interfacing to 5 x 45 differential pairs. I’d be looking for camera modules with serial output…
Or, as you suggest, give each camera something that can convert that lot into a single serial data stream. Or even process it down to a QR code and just send that. Or even do what-ever it is that you want to do with that code, once received.
Thanks to everyone for the all helpful responses.
Connecting each camera to its own ESP32, which process the data and sends only necessary information to the main ESP32, I think is a cool idea.
I plan to use this Schamatic as a guide for building the ESP32 cam parts on my pcb, although I’m sure I’ll be using a slightly newer ESP32: https://github.com/SeeedDocument/forum_doc/blob/master/reg/ESP32_CAM_V1.6.pdf
It seems that the PINS U0TXD and U0RXD are free. Can I use these to connect them to the main ESP32 via UART or is there a better way to connect all ESP32 cams to the main ESP32?
And there is one more question. How can I program the ESP32 of the cams? The main ESP32 will be connected to a Micro-B SMD USB connector. Do I need another one for each ESP32 (for the cams) or is it possible to program all ESP32 via the same USB connector?
Depends on your programming abilities. You can set up a “1-Wire” bus and put the lot on that. You could have one microcontroller as master and the rest as slaves - your external USB connection would go to the master and it could, in theory at least, then pass on program upgrades to the others. Clearly they would all have to be programmed individually, originally. But, quite frankly, the investment in time and effort on setting all that up? If you had dozens, hundreds - then yes. But you only have a small hand full. I’d just bring out their USB connections and program them individually, via those. I think each one has a unique identifier, stored in ROM - so they could all run the same software and include that identifier in messages on the bus.
I suppose you could use a bus or something to cycle through the cameras one at a time?
Why not use a lower-resolution I2C camera module? I2C allows multiple devices to be connected to the same I2C port, as long as they have different addresses. You can also use one with lower resolution for QR I suspect.
An alternate method would be to buy QR-code recognition modules, with some form of serial output. Then connect all of those to the ESP32, if you can do 5 software serial ports. More expensive this way though.
I don’t know if the ESP32 is ideal for that. A raspberry pi with a powered USB hub is probably better for this.