Hey, I'm just starting my journey with IoT and want to use an espcam to take photos of an analog meter to digitise with opencv.
I've seen tutorials saying I need an ftdi programmer to upload code to the cam, but what I don't know is if I need to keep the ftdi attached to the cam during use, ie, do I need an ftdi for each cam?
I ordered 8 espcams and 8 ftdi programmers, can I stream the image over USB instead of wifi if I keep the cam and ftdi attached?
ESP-CAM requirements
-
- Posts: 8
- Joined: Tue Feb 26, 2019 1:55 am
Re: ESP-CAM requirements
Hi.
Some ESP-CAM devices comes without a USB-to-Serial Adapter, some other models may already include such interface.
To upload firmware (program the ESP device), the normal way to do is to use the ESP32 serial interface (rx, tx), as such, the vast majority of people does use an USB-to-Serial (like the FTDI) to accomplish such tasks.
If you use a SBC (single board computer) like the Raspberry PI, you can just wire tx to rx and rx to tx pins between PI and ESP, directly, without the need of any USB-to-Serial Adapter, and do the programming (upload firmware to ESP32).
If you own a board like an Arduino Uno (which have an USB-to-Serial Adapter onboard), you can use the Arduino "as an USB-to-Serial Adapter", just by placing a wire between GND and Reset pins, so that the main Arduino MCU is placed into RESET mode and became "inactive", and the remaining hardware circuitry (the USB-to-Serial Adapter) is somehow "free" to be used as such (as USB-to-Serial Adapter).
PS here: I forgot to mention something important on my post here: the Arduino Uno as well as some USB-to-Serial boards on the market operates on environmnent of 5volts!
The ESP32 operates at 3.3Volts!
In this case, you will need to reduce the voltage between the adapter TX pin (transmmitt) to the ESP32 RX pin.
This is the case with the use of Arduino Uno as "adapter".
Consult the documentation of the FDTI Adapter that you order to check if they do 5v or 3.3v...
To reduce the voltage from 5v to 3.3v, you can use something like a RESISTOR VOLTAGE DIVIDER, it is simple and works.
[OTA]
There is a mechanism, called OTA (Over The Air), that can do upload (programming) using WIFI connection, in this scenario, there will be no need of any wires to do the uploading of new firmware (programs) to the ESP32. PROBLEM IS, the OTA itself need to be uploaded before it is used, SO, YOU STILL NEED some physical wires and maybe a USB-to-Serial Adapter...
Depending on what else you want to do, maybe the OTA can help you...
[Transmitt Images Using USB-to-Serial]
YES, it work, and YES, you will need the USB-to-Serial Adapter connected all the time.
Again, if you use an SBC, you can just wire rx/tx pins directly, no need of USB-to-Serial Adapters...
[USB, Serial Cables]
There is a concern about the DISTANCE that you will be able to run the wires to transmitt images...
You will have to test first at very short distance, then, slowly growing the distance to see if the connection/speed still good...
Chances are the, because of line-noise, you will have to slow down the data transfer at low speed, but, it does not seems a problem for you case...
Have a look at the FTDI that you order, to see the specifications and what the cable length they support...
[Preparing a Tutorial]
I am working on a Tutorial about ESP32-CAM, it is basicaly done, but not yet released...
I am now running some tests with WIFI connections and transmission speed between the CAM and a "host PC"... after that I will release the Tutorial.
The tuto is made of 3 STEPS:
1. CAM with Serial Interface
2. CAM with WIFI
3. Tools, to put all things to work together, and to move up beyond the tutorial...
The "step 1" shows exactly what you are intending to do: take photos and transmitt images to a "host device (desktop)" using USB/Serial Interface.
I just want to know more data about WIFI data "speed" before concluding the tuto...
I have a post on this forum about the WIFI "speed" subject, here:
https://www.esp32.com/viewtopic.php?f=12&t=26240
Hope it help,
Valter
Some ESP-CAM devices comes without a USB-to-Serial Adapter, some other models may already include such interface.
To upload firmware (program the ESP device), the normal way to do is to use the ESP32 serial interface (rx, tx), as such, the vast majority of people does use an USB-to-Serial (like the FTDI) to accomplish such tasks.
If you use a SBC (single board computer) like the Raspberry PI, you can just wire tx to rx and rx to tx pins between PI and ESP, directly, without the need of any USB-to-Serial Adapter, and do the programming (upload firmware to ESP32).
If you own a board like an Arduino Uno (which have an USB-to-Serial Adapter onboard), you can use the Arduino "as an USB-to-Serial Adapter", just by placing a wire between GND and Reset pins, so that the main Arduino MCU is placed into RESET mode and became "inactive", and the remaining hardware circuitry (the USB-to-Serial Adapter) is somehow "free" to be used as such (as USB-to-Serial Adapter).
PS here: I forgot to mention something important on my post here: the Arduino Uno as well as some USB-to-Serial boards on the market operates on environmnent of 5volts!
The ESP32 operates at 3.3Volts!
In this case, you will need to reduce the voltage between the adapter TX pin (transmmitt) to the ESP32 RX pin.
This is the case with the use of Arduino Uno as "adapter".
Consult the documentation of the FDTI Adapter that you order to check if they do 5v or 3.3v...
To reduce the voltage from 5v to 3.3v, you can use something like a RESISTOR VOLTAGE DIVIDER, it is simple and works.
[OTA]
There is a mechanism, called OTA (Over The Air), that can do upload (programming) using WIFI connection, in this scenario, there will be no need of any wires to do the uploading of new firmware (programs) to the ESP32. PROBLEM IS, the OTA itself need to be uploaded before it is used, SO, YOU STILL NEED some physical wires and maybe a USB-to-Serial Adapter...
Depending on what else you want to do, maybe the OTA can help you...
[Transmitt Images Using USB-to-Serial]
YES, it work, and YES, you will need the USB-to-Serial Adapter connected all the time.
Again, if you use an SBC, you can just wire rx/tx pins directly, no need of USB-to-Serial Adapters...
[USB, Serial Cables]
There is a concern about the DISTANCE that you will be able to run the wires to transmitt images...
You will have to test first at very short distance, then, slowly growing the distance to see if the connection/speed still good...
Chances are the, because of line-noise, you will have to slow down the data transfer at low speed, but, it does not seems a problem for you case...
Have a look at the FTDI that you order, to see the specifications and what the cable length they support...
[Preparing a Tutorial]
I am working on a Tutorial about ESP32-CAM, it is basicaly done, but not yet released...
I am now running some tests with WIFI connections and transmission speed between the CAM and a "host PC"... after that I will release the Tutorial.
The tuto is made of 3 STEPS:
1. CAM with Serial Interface
2. CAM with WIFI
3. Tools, to put all things to work together, and to move up beyond the tutorial...
The "step 1" shows exactly what you are intending to do: take photos and transmitt images to a "host device (desktop)" using USB/Serial Interface.
I just want to know more data about WIFI data "speed" before concluding the tuto...
I have a post on this forum about the WIFI "speed" subject, here:
https://www.esp32.com/viewtopic.php?f=12&t=26240
Hope it help,
Valter
Who is online
Users browsing this forum: Baoshi and 31 guests