Notifications
Clear all

Problems connecting esp32-wroom-32 with ArduinoIDE

36 Posts
5 Users
6 Reactions
828 Views
TFMcCarthy
(@tfmccarthy)
Member
Joined: 2 months ago
Posts: 129
 

@davee, @robotbuilder

My intention here is not to hijack the thread, but to extend the conversation on a circuit we're both working on.

Some of this will be repetitious but I'm trying to build the logical progression.

The circuit is essentially the one DaveE shows from DroneBot example the https://dronebotworkshop.com/servo-motors-with-arduino/

9553 image

The circuit powers the servo directly from 5-6v battery. Dave notes that

Not shown is the Arduino's power source, which during development (at least) would be via USB Gnd and +5V wires. The USB Gnd would connect directly through the PCB tracks/planes to the Gnd pins of the Arduino board.

(emphasis mine)

I can translate this to use an ESP32 and breadboard

fig001

I've also replaced the 5-6v battery with a breadboard power supply. Note that I've tied the ground rails together. So, this allows the PS to provide 5v to the servos.

As before, we haven't provided power to the ESP32 nor have we connected the ESP ground to the breadboard ground.

The actual circuit has 2 servos, so we add those

fig002

(The GPIO pins used are unimportant for this discussion, but I'm using GPIO 19 and 21.)

The blue box represents the enclosure to house the ESP and battery. The servos are housed in the device model. There are other components (2 switches) not shown that are housed with the servos and use digitial GPIO pins, in addition to LEDs used in development. All of those devices are 3.3v devices and would be powered from the same source as the ESP32.

I thought, to power the ESP32 with 3.3v I'd just connect to the 3,3v power rail. I thought the 5v and 3.3v rails were separate and, initially, that worked. But it was unstable and eventually the servos stopped working.

I didn't want to use the 5v raii that was powering the servos. So, I add a second breadboard PS. And that worked.

Except, if I replace PS with the battery, as it would be in the actual circuit, I no longer have a 3.3v power line. I think if I add a voltage regulator I can get one. But then I'd need two additional wires from the battery for ground and power. I don't think I've ever seen that before.

What am I missing?


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2171
Topic starter  

@tfmccarthy

My intention here is not to hijack the thread, but to extend the conversation on a circuit we're both working on.

These forums aren't really designed for project development which would require that the author could edit and thus update the first post. It is really only people asking questions and giving answers.

You can change the title as I have done with this post to show a change in topic. I am not sure if the Search looks at titles or just text withing a post.

I will get back again after hooking up the components and writing some code to control them.

esp32 controllers

 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2171
Topic starter  

From:

https://forum.dronebotworkshop.com/project-help/help-required-for-model-railway-project/paged/8/

Posted by: @tfmccarthy

@robotbuilder 

You wish!

What I have has only been run in Baltimore, MD. It has to get past Inspector 5 in East Down Under. (You know how tough those chaps are!) Then it goes for approval from the East Down Under Architect. Then there's final equipment selection, parameter adjustment, assembly and installation.

(BTW, I didn't know Down Under had an East. I thought they only had Up and Down.)

@tfmccarthy

It seems Ian Millard has it in hand privately messaging codecage and says he should be able to start hooking it all up very soon. Also your coding will be better than mine so really I need to stand aside and watch while getting back to work on my own projects which now will include some esp32 projects.


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 2 months ago
Posts: 129
 

Posted by: @robotbuilder

so really I need to stand aside and watch while getting back to work on my own projects which now will include some esp32 projects.

Fair enough! I completely understand this.

'Til next time then.


   
ReplyQuote
(@aliarifat)
Member
Joined: 2 months ago
Posts: 39
 

Posted by: @robotbuilder

Ahh! I was compiling and downloading the wrong sketch!!

Had swapped in another esp32 board in case I had damaged the other and then realised I was compiling and downloading the wrong sketch!!

With the correct sketch and replaced esp32 board I then got this on trying to download ...

Sketch uses 281309 bytes (21%) of program storage space. Maximum is 1310720 bytes.
Global variables use 20208 bytes (6%) of dynamic memory, leaving 307472 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.6
Serial port COM4
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Failed uploading: uploading error: exit status 2

 

If you still face any problems with board and driver installation, you can follow this: https://www.theengineeringprojects.com/2021/11/introduction-to-esp32-programming-series.html

to remove the error message that you have mentioned, press the BOOT button of ESP32. While holding the BOOT button, press the EN (Reset) button once to reset the board. Continue holding the BOOT button until the upload starts. Once you see the "Connecting..." message, you can release the BOOT button. Sometimes switching between ESP32 boards can cause confusion in port selection. Select the correct COM PORT from Tools > Port in ARduino IDE. 

 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2171
Topic starter  

@aliarifat

All good now. I have the esp32 working with the IDE and also have the two boards communicating with ESP-NOW.

I was going to use two computers, one for each board, but now realise that creating a new sketch also creates another instance (or something like that) of the IDE. Each sketch can have its own port. I plug one board into the pc and the port selection appears to be automatic. I then plug in the second board to another port and then another port number shows up and I select that one for the second board.

Rather hard on the poor old finger holding the BOOT button down! And once both have their version of the sketch downloaded I press the reset buttons and use the Serial Monitor to observe if there is a successful bidirectional communication.

Some time ago now I had two Arduino UNO's talking to each other using the NRF24L01.

https://forum.dronebotworkshop.com/introductions/hello-everybody-rclawn-arduino-robot-car-with-nrf24l01/paged/4/

 


   
ReplyQuote
Page 3 / 3