-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support ESP32/ESP32-S3/ESP32-C3 #10
base: master
Are you sure you want to change the base?
Conversation
See also the mavesp8666 version. |
@DavideLentini - please send me email when you'd like to review the failure. |
I have a couple different custom boards. It seems the one everyone thinks I should build is the ESP32-S3. Thoughts? |
@jafrado i am using a ESP32 DevKitC w/ WROOM-32E. I'm running a custom version of Arudupilot from Skybrush based on 4.3....I'm not sure how this relates to your PX4 comment. I'm rather new to the AP echo system |
I'm planning on doing a small ESP32 (probably WROOM) to start that has the
smallest form factor possible
and an SMA connector so I can mount an external antenna. I know there are
some existing boards out there, but
all of them are too large or don't have a nice easy option. I know Davide
wants an S3 or C3 board, but the pinout on that
module is different and I could easily spin that later. I do think that
this S3/C3 is a better design but the WROOM is really
cheap right now.
For your development, look at the PX4 connector standards and make an
adapter for the UART port, this is what I did to
test the board. Its clunky but as long as you don't fly fast or crazy it
will work just fine :-)
…On Wed, Jan 11, 2023 at 9:58 AM markingle ***@***.***> wrote:
@jafrado <https://github.com/jafrado> i am using a ESP32 DevKitC w/
WROOM-32E. I'm running a custom version of Arudupilot from Skybrush based
on 4.3....I'm not sure how this relates to your PX4 comment. I'm rather new
to the AP echo system
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXSUDCU5RAT3HSOW3Y2U7TWR3YDZANCNFSM6AAAAAATXSWMXY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Exactly!!! The WROOM is a great SoC to prototype with and PCBWAY always has them in stock. I already have several DipTrace designs with a 5v and 3.3v power rails as well as the LDO with a bat charging circuit to keep the ESP32 running w/o using the drone battery. Once I get to a point being able to compile your code and confirm passing MAVLink 2.0 to the drone I will be working to trap MAVLink LED commands. This will also require an I2C interface with the 3DR LEDs.....I think. The schematics are old and its hard to tell where the I2C travels on the PCB....Thank you so much for making your code available! |
@markingle - thanks, yes, that would be the idea. I already have an ESP32-WROOM design that is solid. Below is a picture of my router board which supports the original ESP8266, the ESP32-WROOM, XBee Pro WAN module, and LORA-E5 module. B-Side shows ESP32 and E5 module tucked away. Also attached shameless shot from vehicle at 125K AGL (almost half-way to space). Tracked vehicle throughout flight and routed over WiFi with this code. Probably next version I will compile my router code on latest Apache NuttX 12 which supports ESP32-S3/C3 already; Your idea on the LED is a good one, the original 3DR code uses a chip that the PX4 / Ardupilot firmware knows about already so you would just need the 4-Pin I2C and it will just work, I will have to lookup the circuitry for that, let me know if you are interested. |
No that's pretty much outer space! Very impressive! Thanks for sharing. If you have the schematics (or any info) that would be a great jump starter. |
@jafrado What pins are used for tx/rx to the Cube in your code? I am using 16/17... |
@markingle - thanks, lots of fun! Probably will have some better shots in the months ahead. Yessiree sir, yessiree - below are the schematics, yes, IO16/IO17 are the pins (package pins 27/28). See below. |
By the way, I'm driving that with an LM1086 (5A) and 1mF cap. For this design, I would use LM317 and a 10uF/20uF SMD with an option for electrolytic (PTH) - think of cheap, cheap new old stock 🥇 |
I doubt I will manufacture what I'm building. I'm really not that experienced (4 years) with PCB design and I'm self-taught. Got the burned up boards to prove it!!! The work is almost therapeutic though and I do enjoy learning new skills that allow me to do creative problem solving. But to your point I did use the LM317 on my last project! Do I need an ESP programmer? I'm having trouble getting the parameters to save consistently and when debug is enabled the esp core dumps repeatedly...I have separate Wi-Fi network called Skybrush and a static ip assigned but the esp becomes inaccessible after reboot...weird!!! |
Not making much progress...It appears that I really should be using a debugger to work with the code. I had to add Serial.println statements to understand what is going on with the AP/STA setup. I finally got the ESP32 connected to my wifi network. After checking the Rx/Tx (16/17) pins with my analyzer I dont see any data coming across. The 3DR Solo is turned on. The baudrate is 115200 for Telem1 - confirmed with Mission Planner. Serial Protocol is MAVLink 2.0. I was expecting the ESP32 to at least send a heartbeat. The screenshot shows the output from the serial.println statements. I am currently tying to track down the "RX Buffer..." error. I dont think I caused it but I am not sure at this point....Let me know if you have any thoughts.... ...kind of frustrating but still encouraged with my progress...it will be worth it in the end. |
Thanks for the update.
how did you program it?
ESPPROG can be emulated with a UART but I use the JTAG mode to flash….
The default telem baud rate is 921600 baud so you need to change that on
your pixhawk.
…On Sat, Jan 14, 2023 at 5:47 PM markingle ***@***.***> wrote:
Not making much progress...It appears that I really should be using a
debugger to work with the code. I had to add Serial.println statements to
understand what is going on with the AP/STA setup. I finally got the ESP32
connected to my wifi network. After checking the Rx/Tx (16/17) pins with my
analyzer I dont see any data coming across. The 3DR Solo is turned on. The
baudrate is 115200 for Telem1 - confirmed with Mission Planner. Serial
Protocol is MAVLink 2.0. I was expecting the ESP32 to at least send a
heartbeat.
The screenshot shows the output from the serial.println statements. I am
currently tying to track down the "RX Buffer..." error. I dont think I
caused it but I am not sure at this point....Let me know if you have any
thoughts....
...kind of frustrating but still encouraged with my progress...it will be
worth it in the end.
[image: Screen Shot 2023-01-14 at 8 35 39 PM]
<https://user-images.githubusercontent.com/11239466/212505181-3054daed-f86c-4be2-80aa-d58f68d34f5d.png>
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXSUDD6T2MMCC3TJDKL6SLWSNJKLANCNFSM6AAAAAATXSWMXY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I'm using platformio. The command is ... platformio run -e espwroom32 -t upload. I'm using an ESP32 Dev board. While troubleshooting I have changed the telem baudrate to 115200 in all the header files...I'll change it back if needed though. I just found where Serial.swap is called before Serial.setRxBufferSize when the code is ran on a 8266. The setRxBufferSize call probably assumes the swap has been ran successfully. And I am not sure if the ESP32 supports serial.swap....time for some reading I guess. |
Finally got connected to the telemetry from the CubeSolo(3DR Solo).....the ESP32 does not support Serial.swap so I had to add HardwareSerial.h to mavesp8266_vehicle.cpp and create ESP32Serial1 to enable pins 16/17. I am not getting a heartbeat so I need to track that down.....Also MAVProxy is not picking up the UDP connection so I got track that down too... |
what programming interface?
See the link to the manual above
you shouldn’t need to change any of the code
…On Sat, Jan 14, 2023 at 7:12 PM markingle ***@***.***> wrote:
I'm using platformio. The command is ... platformio run -e espwroom32 -t
upload. I'm using an ESP32 Dev board. While troubleshooting I have changed
the telem baudrate to 115200 in all the header files...I'll change it back
if needed though.
I just found where Serial.swap is called before Serial.setRxBufferSize
when the code is ran on a 8266. The setRxBufferSize call probably assumes
the swap has been ran successfully. And I am not sure if the ESP32 supports
serial.swap....time for some reading I guess.
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXSUDA5YC6H6CEDT3KQAMDWSNTK3ANCNFSM6AAAAAATXSWMXY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I’m not sure what DEV board you’re talking about, there are over 1/2 a
dozen. Be specific. The serial on all boards is directly connected to the
pixhawk. The USB serial is not used to program the board but the JTAG
programmer esp-prog via the JTAG pins. The second serial port is for
debugging, not connection to the pixhawk.
The serial architecture on the ESP32 is documented in the chip Manual and
that is what is being used on all the dev boards as the programming
interface, maybe that is the confusion… i have these connected to the FMU
and use the JTAG pins to program the module.
You seem to be using these as the programming interface and the FMU
connection . You dont want to change the baudrate to satisfy platformio but
use the megabaud rate as configured or else the mission planner will be
really slow.
You’ll need to send me the schematics for the board that you are using for
me to comment further.
I also recommend you buy the ESPPROG programming board if you want to do
anything serious with this module, including debugging (link above, 20
dollars on Digikey)
…On Sat, Jan 14, 2023 at 9:13 PM markingle ***@***.***> wrote:
The dev board has a usb connection to UART0 Serial....[image: image]
<https://user-images.githubusercontent.com/11239466/212523972-97e8b794-c3e5-4e1c-9f3d-ed211d4ac135.jpeg>
The serial architecture on the ESP32 is different than the 8266...at least
that's what I have concluded
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXSUDBTQHEOLLXGJNCFF6TWSOBQPANCNFSM6AAAAAATXSWMXY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
yeah, they all look alike. Which board is this?
…On Sat, Jan 14, 2023 at 9:17 PM markingle ***@***.***> wrote:
Here's a better picture[image: image]
<https://user-images.githubusercontent.com/11239466/212524092-306dd864-05f2-4140-9b0c-77201dd22f7a.jpeg>
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXSUDFOR2KX36QF52VHFOTWSOB45ANCNFSM6AAAAAATXSWMXY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
so you will need to connect the FMU to the same pins that the serial
adapter is connected to!
to program you will press and hold down S2, then press S1 momentarily (to
reset) while holding down S2 and running esp-prog
If that does not work (with no changes to the code), the this is not an
ESP32-WROOM module!
…On Sat, Jan 14, 2023 at 9:34 PM markingle ***@***.***> wrote:
HiLetgo
https://www.amazon.com/HiLetgo-ESP-WROOM-32-Development-Microcontroller-Integrated/dp/B0718T232Z
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXSUDF5ROH52W5GT465YYLWSOD5FANCNFSM6AAAAAATXSWMXY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I see. I use the debugger with the ESPPROG to see what is going on. You
can see it in the link above or get a clone on amazon
https://a.co/d/hEi38aP
…On Sat, Jan 14, 2023 at 9:52 PM markingle ***@***.***> wrote:
Yes I am able to program the ESP32 I just can't see the logging output
when the program runs....but it all good now that I understand what is
going on with the code
The dev board is a WROOM module. See attached picture...[image: image]
<https://user-images.githubusercontent.com/11239466/212525081-ffbf5f74-3311-48f3-a41e-c040825d6ff8.jpeg>
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXSUDCQGJZOYVVLW2D5JRLWSOGA5ANCNFSM6AAAAAATXSWMXY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The JTAG is the best way to Debug these
…On Sat, Jan 14, 2023 at 10:03 PM James Dougherty ***@***.***> wrote:
I see. I use the debugger with the ESPPROG to see what is going on. You
can see it in the link above or get a clone on amazon
https://a.co/d/hEi38aP
On Sat, Jan 14, 2023 at 9:52 PM markingle ***@***.***>
wrote:
> Yes I am able to program the ESP32 I just can't see the logging output
> when the program runs....but it all good now that I understand what is
> going on with the code
>
> The dev board is a WROOM module. See attached picture...[image: image]
> <https://user-images.githubusercontent.com/11239466/212525081-ffbf5f74-3311-48f3-a41e-c040825d6ff8.jpeg>
>
> —
> Reply to this email directly, view it on GitHub
> <#10 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACXSUDCQGJZOYVVLW2D5JRLWSOGA5ANCNFSM6AAAAAATXSWMXY>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Yes I agree. I just don't have one. I'm definitely going get one ordered as soon as I can. |
@jafrado Thank you for making this PR available! I have the code working to support my needs for doing drone shows with the 3DR Solo! Once I get the drone show tested with several drones I will work to build in LED control through MAVLink commands trapped out by the code....fingers crossed!!! |
Thanks @markingle , have fun and keep me posted on your progress and findings! |
I've successfully used the ESP8266 with no issues, but after building and flashing the firmware to the ESP32, the WiFi does not appear. |
@hi6otb - you should find an AP named Pixracer and make sure you are using a 2.4Ghz channel on your host machine. |
@jafrado - When I build for the ESP01 and flash it onto an ESP8266 board, an AP named 'Ardupilot' appears and functions correctly. However, after building for the ESP-WROOM-32 and flashing it onto an ESP32 board, no AP appears. Could you provide the firmware.bin for ESP32, if possible? |
@hi6otb - sorry, I was wrong - the SSID is Ardupilot, I didn't change this in the tree because I wanted to merge this PR. 921600 Default UART Speed Ardupilot as default SSID Default WiFi channel 11 Make sure you are building for the correct board, for example esp32wroom https://github.com/RealFlightSystems/mavesp8266/blob/master/platformio.ini#L49 Follow the README here https://github.com/RealFlightSystems/mavesp8266/blob/master/README.md For debug, please try changing the SSID and make sure the platform you are using (-e setting) is correct for your board. I can send you a test firmware this weekend, but it sounds like the issue you are facing (if programming your board does not bringup the AP - e.g. you don't see Beacons) then the memory configuration or board configuration is wrong. Please check the above and let me know what you find. |
Also, what ESP32 variant are you using and what is the board name. Take a
look at the schematics
for the boot-strap options. You may not be programming the board correctly.
What does esp-prog report?
…On Thu, Mar 14, 2024 at 6:41 PM Hiro ***@***.***> wrote:
@jafrado <https://github.com/jafrado> - When I build for the ESP01 and
flash it onto an ESP8266 board, an AP named 'Ardupilot' appears and
functions correctly. However, after building for the ESP-WROOM-32 and
flashing it onto an ESP32 board, no AP appears.
Is the code altered to show 'Pixracer' as the default AP name for ESP32?
If so, I might not have the correct version of the code.
Could you provide the firmware.bin for ESP32, if possible?
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXSUDHNUSMOA3DAMSWIY3DYYJGUJAVCNFSM6AAAAAATXSWMX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYG42TENJUGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Let me know what you find.
I'm picking this up again next week and planning a new board.
Maybe you want some?
…On Thu, Mar 14, 2024 at 9:02 PM James Dougherty ***@***.***> wrote:
Also, what ESP32 variant are you using and what is the board name. Take a
look at the schematics
for the boot-strap options. You may not be programming the board
correctly. What does esp-prog report?
On Thu, Mar 14, 2024 at 6:41 PM Hiro ***@***.***> wrote:
> @jafrado <https://github.com/jafrado> - When I build for the ESP01 and
> flash it onto an ESP8266 board, an AP named 'Ardupilot' appears and
> functions correctly. However, after building for the ESP-WROOM-32 and
> flashing it onto an ESP32 board, no AP appears.
> Is the code altered to show 'Pixracer' as the default AP name for ESP32?
> If so, I might not have the correct version of the code.
>
> Could you provide the firmware.bin for ESP32, if possible?
>
> —
> Reply to this email directly, view it on GitHub
> <#10 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACXSUDHNUSMOA3DAMSWIY3DYYJGUJAVCNFSM6AAAAAATXSWMX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYG42TENJUGU>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
@jafrado plaintext plaintext Am I making a mistake somewhere? I've tried various boards (esp32-wroom-32, xiao ESP32S3, etc.), but the WiFi AP does not appear. It works fine with ESP8266 (ESP-WROOM-02). |
@hi6otb - thanks for that. I looked at the board here: https://docs.m5stack.com/en/core/stamp_pico?id=schematic Two things come to mind:
Now lets get a look at your esptool output log. See also here for debugging FLASH woes: https://community.platformio.org/t/esp32-flash-memory-size/26669/5 |
@jafrado me@myPC ~ % esptool.py --port /dev/tty.usbserial-53240003841 flash_id |
that’s really odd. I will take a look at it this week. Maybe I will order
this board and test it also
…On Fri, Mar 15, 2024 at 5:51 PM Hiro ***@***.***> wrote:
@jafrado <https://github.com/jafrado>
I flashed it by esptool with FTDI USB tool that reported 4MB flash.
This is full log.
***@***.*** ~ % esptool.py --port /dev/tty.usbserial-53240003841 flash_id
esptool.py v4.7.0
Serial port /dev/tty.usbserial-53240003841
Connecting..........
Detecting chip type... Unsupported detection protocol, switching and
trying again...
Connecting.....
Detecting chip type... ESP32
Chip is ESP32-PICO-D4 (revision v1.0)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in
efuse, Coding Scheme None
Crystal is 40MHz
MAC: 4c:75:25:c4:65:c4
Uploading stub...
Running stub...
Stub running...
Manufacturer: c8
Device: 4016
Detected flash size: 4MB
Hard resetting via RTS pin...
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXSUDETUVXLCXZGWMCNBXDYYOJQVAVCNFSM6AAAAAATXSWMX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBQHA2DGNRZG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Support ESP32 modules. See README.md for more details. Probably the next step is to factor out the ifdef'd code and provide a hardware layer per chip/module.