(1)(1.4) ESP32 wifi telemetry

Article directory

Preface

1 DroneBridge for ESP32

2 Recommended hardware

3 Download and burn firmware

4 Configure DroneBridge for ESP32


Preface

ESP32 is an off-the-shelfWi-Fi module with completeTCP/IP Protocol stack and microcontroller functions. They provide dedicated UART, SPI and I2C interface. They work with any ArduPilot autonomous driving controller.


1 DroneBridge for ESP32

DroneBridge forESP32 provides transparent, bidirectional Serial toWiFi bridge.

UsingWiFi protocols are not available with otherDroneBridge implementations Same range. TypicalWiFi range is approximately50m  to200m, depending on the antenna. High gain directional antennas provide greater range.

2 Recommended hardware

Almost allESP32 development boards can runESP32 TheDroneBridge. It is recommended to use boards and modules with external antenna connectors as these can provide longer distances.

Warning

Most modules only support3.3V input, and some autopilot serial ports only provide5V. You need to check compatibility and reduce the voltage if necessary. It is generally not recommended to use theautopilot3.3V power supply unless you Make sure it provides enough current for theESP32 board you are using.

Reception 3.3V Electrical model DevKits Target A small example:

Note

NodeMCU withIPEX external antenna port TypeDevKit boards also usually provide onboard antennas that are activated by default. You may need to resolder a resistor to activate the external antenna port.

3 Download and burn firmware

Download the firmware from the GitHub repository ). They are always up to date. follow the flashing instructions there), and follow the flashing instructions there

Note

Follow the flashing instructions inside the repositoryGitHub GitHub Repository). Different versions of ESP32 DroneBridge may have different exact parameters.

For your convenience, here are some brief explanations:

  • Download the pre-compiled firmware binaries (Download the pre-compiled firmware binaries);
  • ConnectDEVKit with Computer connection (mostDEVKit have providedUSB port for flash memory and debugging);
  • Erase flash and burnDroneBridge for ESP32 firmware toESP32< a i=4> on;
  • Use Espressif Flash Download Tool(Espressif Flash Download Tool) (limited to Windows);
  • Use esp-idf/esptool (all platforms).
  • Power cycle ESP32;
  • Connect to"DroneBridge for ESP32WiFi Network and configure the firmware for your application.

4 Configure DroneBridge for ESP32

You can pass through Web Surface change layout. WiFi ESP32 dronebridge.local, http://dronebridge.local or a>192.168.2.1.

default allocation

  • SSID: DroneBridge for ESP32
  • Password: dronebridge
  • Transparent/MAVLink
  • UART baud rate 115200
  • UART TX pin 17
  • UART RX pin 16
  • Gateway IP: 192.168.2.1

Custom settings and web interface

You can change the default configuration through the web interface.

Contact WiFi Connect ESP32, see here dronebridge.local, http://dronebridge.local Or 192.168.2.1.

Note

Some settings require a restart ESP32 to take effect.

wiring

The wiring is very simple, for connecting tothe autopilotany serial port such asTELEM1< /span>), the wiring method is basically the same. This guide does not go into detail here, but provides the following wiring outline. TELEM2 or

1. general ESP32 target UART! 3.3V Simple use ESP32 DevKitsend). Guaranteed electric power level comparison! Majority TELEM 2 or TELEM 1( For example, UART for automatic drive reach

  • TX to RX;
  • RX to TX;
  • GND to GND;
  • Provide stable3.3V or< /span>'s available inputs and DevKit power supply (depends on 5V function).

2. GeneralAutomatic driveEnd location MAVLINK 1 or 2 协议.

Some ESP32 DevKits manufacturers label the wrong pins on their products. If you have problems, make sure the pin labels on the board are correct.

Make sure to always follow the ESP32 board manufacturer's instructions when wiring. Especially the power supply.

ArduPilot配置

Configuration ESP32 ConnectiveAutomatic driving UART. DroneBridge View placement:

  • Protocol: MAVLink (v1 or v2);
  • Baudrate: 115200 baud。

If connected to the serial interface2 it should be onAutopilot Set these parameters on (if using another serial interface, replace "2" in the parameter name with serial interface number):

If you have connection issues, change BRD_SER2_RTSCTS = 0 Set to disable flow control, but this is usually not necessary.

Connect to ground station

The following connection options are available:

  • To all connected devices via 14550 portUDP Unicast;
  • 5760 ClearlyTCP.

DroneBridge for ESP32 will automatically forward all data viaUDP to all connected will automatically detect the connection and no further action is required. Mission Planner or QGroundControl port. 14550 device'sWiFi

troubleshooting

Be sure to erase the flash memory of ESP32 before flashing a new version/firmware.

Check ESP that the pins on the board are correctly labeled.

EnterIP address in the browser address barhttp://192.168.2.1 is not supported! When using your phone, you may need to disconnect from the cellular network to access the web interface. https.

If your network is compatible withESP32 DB'sIP If the scope is the same, you need to change the gatewayIP address in Webinterface to 192.168.5.1.

API

ESP32'sDroneBridge providesREST:API to set a custom baud rate or integrate the system into your own setup. API interface. You can use the Web, allows you to read and write configuration options. You are not limited to the options (such as baud rate) provided by the

Application settings

http://dronebridge.local/api/settings/request

Request statistics

http://dronebridge.local/api/system/stats

trigger restart

http://dronebridge.local/api/system/reboot

Trigger settings change: send valid JSON

{

  "wifi_ssid": "DroneBridge ESP32",

  "wifi_pass": "dronebridge",

  "ap_channel": 6,

  "tx_pin": 17,

  "rx_pin": 16,

  "telem_proto": 4,

  "baud": 115200,

  "msp_ltm_port": 0,

  "ltm_pp": 2,

  "trans_pack_size": 64,

  "ap_ip": "192.168.2.1"

}

to

http://dronebridge.local/api/settings/change

Guess you like

Origin blog.csdn.net/qq_20016593/article/details/134775818