Esp32 DevKit v1

Esp32 DevKit v1 by Espressif

Connection Type
Wi-Fi
Number of servos
25
Audio Support
No
Camera Support
No

The DOIT Esp32 DevKit v1 is a very affordable WiFi module with plenty of IO, including three hardware UARTs. Adding the firmware below, the WiFi module will become an EZB that ARC can connect. This firmware works with ARC versions greater or equal to 2019.06.25.00.

*Note: For servo use with EZ-Cam, only pins 2,4,12-19,21-23,25-27,32-33 are recommended.


Firmware & Instructions

  1. In the Arduino IDE, add this link to File->Preferences->Libraries: https://dl.espressif.com/dl/package_esp32_index.json
  2. In the Arduino IDE, load the Board Manager, search for "ESP32 by Espressif Systems" and select INSTALL.
  3. Download the firmware from this page to your computer and extract it into a folder.
  4. Edit the source code firmware in the Arduino IDE and view the WiFi mode settings. You can choose between AP or Client mode. The appropriate settings for each method may be configured as well. Follow the instructions in the firmware code for configuring the WiFi modes.
  5. Program the device using Arduino's IDE and the firmware code. If you receive errors in the debug window of the Arduino IDE when programming, hold the BOOT button down on the ESP32 until you see WRITING in the Arduino debug window.
  6. View the status of the connection in the Arduino Serial Monitor set to 115,200 baud. Depending on your WiFi settings, you will see the WiFi connection status.
  7. Load ARC and connect to the ESP32 directly via WiFi if it is in AP Mode; otherwise, connect to the same network as Client Mode. The default IP Address for AP Mode will be 192.168.1.1. In Client mode, you must view the Serial Debug Monitor in Arduino IDE or check your router DHCP client list.


Video Tutorial


WiFi Modes

Two WiFi modes can be configured in the code. They are AP Mode, which turns the ESP32 into a WiFi server your computer connects directly to. The other mode is Client Mode, in which the ESP32 connects to your network router. Get the IP Address and connection status information by viewing the Serial Monitor set to 115,200 in Arduino IDE.


Port Configuration

The pins in ARC are labeled D0 - D23. The ESP32 has GPIO labeled pins, which are not in any ordered sequence. This translation chart below shows the mapping of the ESP GPIO to ARC Dx pins. The ports labeled TX/RX are the hardware UART ports, which correspond to hardware UART #0 in ARC.

Related Tutorials

Related Hack Events

Related Questions


ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

PRO
Synthiam
#23  
Wanna try a new firmware for me? I updated the servo library to the latest - see if this helps. Let me know if it works before I update it on the website firmware list: EZ-ESP32.zip
PRO
Canada
#24  
went to bed with a broken servo, woke up to a working servo.  Nice thank for the quick turn around.
you still have to recalibrate (although i guess I could use an offset with my bots that use them) and release doesn't work but I get 180 degrees and it is a lot snappier, the old driver was a bit grindy.

I think the ESP has a lot of promise as a controller. There are a lot of things that work with arduino like LIDAR etc and having a single $5 controller that does a lot of things with ARC would be great. 

I am sure the new ESP32-S3 will solve all the performance issues as well

https://www.espressif.com/en/news/ESP32_S3
PRO
Canada
#25  
New drivers work well with Robot Hand.  Question in Auto position, can you get two frames to execute at exact same time under the one action.  I played with delay and speed etc but I can’t get a smooth in sync motion where frame 1 and frame 2 load in parallel (same time) and not serial (one starts and then the other starts) Example count in decimal works fine but if you count in binary you want to move two or more fingers at same time versus individual fingers and I really don’t want to create a frame for every permutation, just -1 out the servos that I don’t want to move.  
#26   — Edited
Is it possible to use one of these to add wifi to an older ezb board? I have the version 3 which has a faulty bluetooth module.
#28  
Thanks for the reference. I'll see what it does. I figured it was worth a tinker before scrapping out the board.
PRO
Canada
PRO
Synthiam
#30  
If it's Arduino compatible, throw a firmware there, and she'll go.:D

But because it is esp32, you're still going to be limited by the i/o restrictions. The camera will use a number of the i/o ports, which will reduce the amount of available i/o to you. It'll also use the same internal timers and DMA, which will conflict with servo PWM generating timers.

ESP32 is an ESP32, even if you change the form factor. You will still experience the same limitations because, at heart, it's the same thing with a different breakout board.

When you look at any micro board that says ESP32, you'll see a shiny silver metal box. That is the same module that all ESP32 controllers use. They all have the same parts but with a different breakout board.
PRO
Synthiam
#31  
I was just thinking, if you need additional servo ports on an ESP32Cam, it has a UART. That means you can add an arduino or SCC-32 to the ESP32cam's uart. It'll require a minor firmware change but that's an easy fix. Pretty much you'd be sending all data from the TCP to the UART, and vice versa.
PRO
Canada
#32  
OK thanks I figured $20 was worth a try.  I have been meaning to order one of those Adafruit servo controllers and try it with the ESP.  For now I will just run a separate camera off another ESP32-CAM.   Good thing ARC supports multiple controllers.:)
PRO
Synthiam
#33  
I wouldn't bother with the adafruit servo controller because the communication is slow and a little wonky with i2c.

You'd get more out of an Arduino with a servo shield. Simply connect the Arduino's RX and TX to the TX and RX of the ESP32 cam.

Once you do that, the firmware change is minor on the esp32. All you need to do is a while () loop that passes TCP to the UART and vice versa. All of the EZB code is removed.
PRO
USA
#35  
To compile on Arduino IDE 2.0.3 I had to change line 591 to:
analogWrite(translateaDigitalPort(port), (uint16_t) map(pos, 0, 100, 0, 255));

I'm assuming here it is supposed to use the included analogWrite and not the Arduino included one?
PRO
Synthiam
#36  
I don't think an Arduino analog write exists for the ESP Arduino library. At least at the time of the firmware creation, there wasn't. It shouldn't matter which one you use if there happens to be an Arduino AnalogWrite installed with the ESP package.

But i think you need to be casting the value to a uint8_t not a uint16_t. Because it's only a byte from 0-255. I mean, the 16bit int will work but it's unneeded extra bits:)
PRO
USA
#37  
Gotcha. I commented out analogWrite and moved the files out of the project and it compiled.
Looks like it was included November 2021 since version 2.0.1 so after the firmware was written.

esp32/hardware/esp32/2.0.6/cores/esp32/esp32-hal.h:void analogWrite(uint8_t pin, int value);

Aside from that error the rest of the firmware compiled fine.
PRO
Synthiam
#38   — Edited
that's good to know - i might have to revisit that firmware and remove the analogwrite.h to use the built-in one.

so you got it working then?
PRO
USA
#39  
Yeah I'm just sitting at my bench with multimeter testing the PWM's on the pins. Works great.

p.s. nabu'er here as well :-) actually that's how I found ARC. It's just a hobby of mine and learning ros2 was not fitting into my schedule anytime soon.
PRO
Canada
#40  
I was really impressed how well the ESP32 worked with ARC.  I think if someone sat down and built a free 3D printed opensource series of robots like a robot humanoid, robot hexapod, robot car etc based on the ESP and called it something like ES-Robot, it would be a huge success for schools and hobbyists  :)
PRO
Synthiam
#41  
Haha, @nink - suggesting I start another hardware company to compete with my old company? I never want to get into hardware again - I still have nightmares about supply chain issues!

@Atomist, that's great! What a small world. The NABU has been such a great distraction for me. I never imagined I would experience anything like it - probably never will again. 

I have to agree that the ESP32 works so well with ARC. I do wish it had more I/O, but that available I2C or UART could expand on that. Or, using a dynamixel or other "smart" servo would be great. There is a line of servos called Feetech that I've found to be somewhat comparable in quality but much lower cost.