Hi, I have followed the core electronics guide for the esp32, as closely as possible, and I have failed to flash the board. I thought I might have the com number wrong, so I tried all those and it still doesn’t work… any ideas? here is the error message I received:
Sketch uses 1495249 bytes (47%) of program storage space. Maximum is 3145728 bytes. Global variables use 71360 bytes (21%) of dynamic memory, leaving 256320 bytes for local variables. Maximum is 327680 bytes. esptool.py v4.2.1 Serial port COM6 Connecting...Traceback (most recent call last): File "esptool.py", line 34, in <module> File "esptool\__init__.py", line 1004, in _main File "esptool\__init__.py", line 646, in main File "esptool\__init__.py", line 895, in get_default_connected_device File "esptool\loader.py", line 631, in connect File "esptool\loader.py", line 572, in _connect_attempt File "esptool\loader.py", line 435, in sync File "esptool\loader.py", line 365, in command File "esptool\loader.py", line 317, in write File "serial\serialwin32.py", line 325, in write serial.serialutil.SerialTimeoutException: Write timeout  Failed to execute scrip t 'esptool' due to unhandled exception! Failed uploading: uploading error: exit status 1
I also made my own cable to connect the board, by cutting up an old usb cable and joining it to header wires so that it appears exactly as they do in the video… not sure if this was a mistake… I get a flashing led at the appropriate times…
I have bought the converter and had another crack…… annnnnndddd it didn’t work…… could you have a look below? I thought it might be the complicated wifi password, so I simplified it…… and I thought it might be the com number…. So I tried all of them and that didn’t work either….
Heres what I have. See picture of wired unit attached and error message below….
You should change your phone SSID and password, now that it has been published. You aren’t getting far enough into the process for the code or the WiFi setup to be a part of the problem - it’s in the connection between the PC and the ESP32, as you suspect.
First, confirm that you are following the correct protocol for putting the ESP into program upload mode: GPIO 0 must be connected to ground. I guess that’s the purple wire, but I can’t quite tell from the image.
Second, check that you have selected the correct device and port in the IDE Tools menu. The port should disappear and then re-appear as you unplug and plug the converter. It may or may not have a name.
If all that’s OK then you may have Rx and Tx the wrong way around. Try swapping them. I say ‘may’ because although your setup looks right you can’t trust the labels, and I usually don’t use the labels to determine which is which. The reason is that ‘Tx’ (for instance) sometimes means ‘Data will be transmitted from this pin’ and sometimes means ‘Connect this pin to Tx of your device’. The second meaning is very common with converters, but is not universal. So I usually go by experiment or experience rather than labels, and I don’t have either unit on hand at the moment to examine.
Note that when using the converter, getting the wiring wrong does not stop the PC from seeing the USB port. That’s why the message is quite different than you usually see when the communications link fails, and it’s not very informative. If anything, it suggests the wrong device rather than wrong wiring.
When you select a port to connect the ESP to in the IDE is there a port listed for you to use? If not, then you cannot proceed - you need to resolve that first.
The converter should be automatically recognised and drivers installed, if required, but this may depend on your operating system and version. Can you see the device in Device Manager? It may be listed as a USB device - if so you can try to install a driver for it. If the system can’t find a driver you can search. The the item to search on is “CP2102”. Polulo has a page on finding and installing drivers: Pololu - CP2102 USB-to-Serial Bridge Driver Installation
I have the following error when I try to get the ip address. (everything seems to work well up until this point. except that i didn’t have to press the reset button, it seems to load fine and i get the confirmation message as described in your video)
got it to work after I came back to it… this must have had the same result as pulling the plug, instead of just pressing the reset button… which is good…but a few things happened… I noticed that the camera got quite hot… i’m running 5v and it didn’t go over .270 amps… so it seems to be in the normal limits… then it switched off and had become intermittent… , sometimes working, sometimes not… after it initially worked, it hasn’t got really hot again… not I’m getting this quite often… any ideas? I have installed a fisheye lens…
Depending on your exact configuration, reset might restart the ESP in flash mode. That’s why unplugging and replugging can produce a different result.
Your intermittent problem might be due to the power source. If you are powering the ESP from the converter. it might not be able to supply sufficient current. Power the ESP from a separate supply that has adequate capacity. 5V is recommended - 3.3V should work, but people have reported problems similar to yours. The quoted power figure is ~200mA in normal mode, but it can be nearly twice that with the flash LED on. Ensure that the ground of the supply is connected to the ground of the converter.
I think i’m going to give up on the esp32… I cant get it to work in a stable way… I turn it on, it works… then the camera feed stops… and i could give more details of this but I thought I’d give a high level picture of what i’m trying to do because I might be wasting my time anyway… If you think I should persist with the esp32 after the explanation below, please let me know…
So I’m trying to create an obstacle detection system to stop them from being crushed by a product that i’m developing. Ill be using AI cameras, I was hoping to have wifi cameras to reduce wiring, to see if there is a human close by and also to see if there are any obstacles in the way… there will be 4 off cameras total, 2 off that are 10m away from the main board, probably a jetson nano, and 2 off 3 m away from the nano. Because it is for obstacle detection, the connection has to be reliable.
In addition, I’d like to run the rplidar a1 to monitor the floor. As a safety back up to make sure nothing is in the way of our swinging object.
here is a diagram of the obstacle detection system. Do you think I’m on the right track and/or what do you think would work better…??? (thank you)
Just butting in here. I have never had to worry much about this but doesn’t WiFi have some sort of limit regarding the number of devices it can handle at once. I think I saw a figure of 5 devices somewhere around. I do think that WiFi has a finite bandwidth which has to be shared around. Now a Video camera might have a bit more demand than a lot of other things and Daniel’s sketch indicates 4 with a probability of adding to this.
I am suggesting that could a shortage of bandwidth be causing problems.
If this is causing a problem a solution might be to have the actual obstacle detection smarts right at the camera sites then just send some sort of on/off alarm back to the central point.
Thanks for your help Bob… At this stage i’m just trying to get one camera working at a range of less than 0.5m… so I’m not asking much of it just yet… and re having boards at the camera… I think this might be too difficult to manufacture… the simpler and more robust the better… if there is anyone with expertise out there who could do a video call on the above, i’d be happy to pay… I just cant find anyone who is prepared to help one on one… really appreciate everyone’s help though… im learning stuff…
I think you will find this is more a hobbyist forum and commercial help a bit hard to come by. Also much of the components on offer are aimed at the hobby market. Core staff may be able to point you towards professional commercial help. As for myself once a project gets a commercial feel about it (this has happened a few times in the past) I back right off. Legal implications and liabilities being one of the reasons.
Sorry about that. I don’t have a great deal of experience with what you are trying to do anyway.