Project

General

Profile

Connecting a non-Waijung camera to ESP32

Added by Panagis Vovos 4 months ago

Hello everybody. I have finally managed to make my non-buffered VGA OV7670 (CMOS SCCB W/ I2C) camera work using the ESP-32 Arduino Sketch. However, I wonder if I can do the same thing using the camera block of Waijung 2. I cannot find any information about the supported Waijung camera or the "custom" setup. Can I use it for non-buffered OV7670 camera modules and how can this be done?
Thanks,
Panagis


Replies (7)

RE: Connecting a non-Waijung camera to ESP32 - Added by Dhanika Mahipala (ดานิก้า) 4 months ago

Hi,

Thank you for reaching out to us. In the camera block mask under Camera Module drop down menu the option Aimagin Camera refers to our own aMG ESP32 Camera module (As of now it has not yet been released). The next option Custom Camera grants the user to configure the block to any other commercial camera module available in the market compatible with ESP-WHO driver by ESPRESSIF. However the camera block has not been specifically tested with the camera module you mentioned (non-buffered VGA OV7670 (CMOS SCCB W/ I2C) camera). The commercially available LILYGO TTGO T-Camera Plus has already been tried and tested with the Waijung2 camera block.

Please see that there is a minor bug related to camera block in the current release (Release waijung2_20.11b). Before testing out the camera block please replace the following patch file, esp32_camerablock_callback.p at the location:
" ...[ your path to waijung2 installation directory ]\waijung2_20.11b\waijung2\targets\esp32\src\blocks "

Regards,
Dhanika

RE: Connecting a non-Waijung camera to ESP32 - Added by Panagis Vovos 4 months ago

Hello Dhanika,

Thank you for the quick reply. So, this is a project under development, I see. However, before I dive into Matlab and P files, do you have any documentation available about the block's operation, e.g. communication protocol used (I2C perhaps) or other data tha will allow me to proceed with the connection of my hardware or other possible hardware in the future?

Another thing is that I do not see in the WiKi any reference to the possible activation of the available ESP32 energy state modes (sleep, idle) etc. Is there such functionality in Waijung 2 or its components? Let me know if you want me to start another thread about this question (I just thought that this goes hand in hand with the camera operation).

Regards,
Panagis

RE: Connecting a non-Waijung camera to ESP32 - Added by Dhanika Mahipala (ดานิก้า) 4 months ago

Hello Panagis,
Currently the Waijung2 block set is distributed free of charge for evaluation purpose only. We strive to improve our product based on customer feedback. Please check the following documentations.
  1. The Camera Block page will help you get a basic idea about the features and basic functionality of the block.
  2. The Camera Demo documentation will help explain the functionality of each demo file included with the Waijung2 block set.
  3. The Espressif GitHub page, esp32-camera driver, which this block is based on will help you find the technical specs.

Unfortunately the current Waijung2 block set (waijung2_20.11b) does not include activation/deactivation of ESP32 energy state modes. Upon customer feedback we might include this feature in a future release.

Regards,
Dhanika

RE: Connecting a non-Waijung camera to ESP32 - Added by Panagis Vovos 4 months ago

Hello again Dhanika,
Thank you very much for your guidance. I have started building my camera blocks, however, I got stuck to the sample time setting. It seams as if I cannot use a sample time less than 0.001s, even if all I do is a sequence of 2 counters in series (Simulink file attached). That seams too slow for a 240MHz CPU. Is it a real speed limit set by the CPU capability or some other technicallity I am missing?

Thank you,
Panagis

RE: Connecting a non-Waijung camera to ESP32 - Added by Dhanika Mahipala (ดานิก้า) 4 months ago

Hello Panagis,

The waijung2 block set code generation mechanism uses the FreeRTOS. Therefore the sample time of the ESP32 depends on the FreeRTOS tick rate. For the higher tick rate we can get a better configurable sample time range. But there are some limitations of FreeRTOS configuration on ESP-IDF. According to the configuration, the range of the tick rate is between 1 to 1000 Hz as in the following configuration figure. It means that the sample time can be varied from 1s to 1ms.

Therefore the minimum sampletime is 1ms.

Check Scheduling mechanism in Waijung 2 to see how FreeRTOS tasks are created when using waijung2 block set.

Regards,
Dhanika

RE: Connecting a non-Waijung camera to ESP32 - Added by Panagis Vovos 4 months ago

Dear Dhanika,

I went through Waijung 2 scheduling mechanism and I did find it extremely useful and easy to use. However, the 1khz sample rate is an unsurpassed obstacle for DSP. What a shame, having a dual core 240MHz processor and be limited to 1 kHz!
Is there a way this range can be changed in the configuration on ESP-IDF or can the range be bypassed somehow else? Can the user of Waijung do something to increase that sample time, despite the limitation set by the freeRTOS configuration on ESP-IDF?

Thanks once again,
Panagis

RE: Connecting a non-Waijung camera to ESP32 - Added by Dhanika Mahipala (ดานิก้า) 4 months ago

Dear Panagis,

Yes. Convenience of FreeRTOS in task scheduling comes at a cost of 1kHz sampletime limitation. The ESP-IDF does not allow an esp32 to be configured to work at higher frequencies (more than 1kHz). The only work around is bare-metal programming. Unfortunately the current release (waijung2_20.11b) of the Waijung2 block set does not support this feature. We are planning to implement this in a future release. Stay tuned for updates!

Please feel free to contact us if you need any further assistance related to our product.

Best regards,
Dhanika

    (1-7/7)