PI4B-4GB WAVEGO KIT

From Waveshare Wiki
Jump to: navigation, search
PI4B-4GB WAVEGO KIT
PI4B-4GB WAVEGO KIT
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Introduction

The WAVEGO is a 12-DOF bionic dog-like robot that features 12 2.3kg.cm large torque servos, a reliable structure, and flexible motion, incorporating devices like a front camera, 9-axes motion tracker, RGB indicator, etc., together with open source multi-platform Web application. It uses the ESP32 as a sub-controller for connecting rod inverse solving and gait generation, sharing calculating tasks for the host controller, an additional Raspberry Pi can be attached as the host controller for high-level decision operating.

Features

  • 12 degrees of freedom, the action is more flexible and rich.
  • Multi-link leg structure + inverse kinematics algorithm, increasing the servo effective torque.
  • ICM20948 9-axis motion tracker, can use self-balancing mode.
  • 2.3kg. cm high-torque steering gear, the locked-rotor torque is up to 5.2kg.cm, and the scalability is stronger.
  • ESP32 is equipped with an OV2640 camera, which can realize low-latency image transmission with a 2.4G external antenna.
  • The structural parts are composed of 5052 aluminum alloy and PA12 nylon parts. There are 40 sets of bearings used in each joint of the whole body, and the structure is firm and reliable.
  • Integrate a variety of interactive devices, including a 0.96-inch OLED screen, two RGB-LED indicators, an active buzzer, etc.
  • The example code is developed using Arduino IDE, no need to manually configure the compilation environment, ESP32 will automatically establish a WIFI hotspot when it is turned on, you can use a mobile phone (Android/iOS) or computer (Linux/Windows/Mac) to connect and log in to the control page, just install A Chromium-based browser is enough, no app download is required.
  • With a charging interface and automatic download circuit, you can use it while charging.
  • Support two series 18650 batteries (not included), 5200mAh large capacity, larger output current, and stronger servo power.
  • Onboard lithium battery protection circuit, with anti-overcharge, anti-over-discharge, anti-over-current, and short-circuit protection functions.
  • The onboard AINA219 acquisition chip is convenient for real-time monitoring of battery voltage and charging current.
  • 2*5P expansion interface is reserved for the remaining IO and serial port of ESP32. The functions include RGB expansion, RX0, TX0, G21, G15, G12, 3V3, 5V, and GND, which can be used to communicate with the host computer or connect to other devices.
  • The Raspberry Pi can be installed as the upper computer to communicate with the lower computer through the serial port. As the lower computer, ESP32 can share a lot of computing power of the rod inverse solving and gait generation, leaving more resources for the Raspberry Pi for high-level function development.
  • The Raspberry Pi kit is equipped with a cooling fan and an ultra-wide-angle lens. The Raspberry Pi routine includes a web application developed based on Flask-Streaming, which can use the functions developed based on OpenCV such as face recognition/color tracking/motion detection.
  • All codes are open source and provide rich development documents and tutorials.

Assembly Guide

Be sure to understand the following content before assembling.
1. Since this product uses a large number of servos, the servos are used as the component of the angle changing mechanism, and the wrong assembly will cause the robot to fail to operate normally.
2. Refer to the product assembly tutorial,use the correct screws to assemble the corresponding module, otherwise it may cause the angle deadband of the Leg link action to be too large or damage the structural parts.
3. When it comes to the assembly part of the anti-loose nut, the tightening degree of the nut should not be too tight or it cannot rotate normally, nor too loose or it will shake outside the rotation plane.
4. All the above problems can be avoided as long as the following assembly instructions are strictly followed.
5. We also provide a pre-assembled version package and the servo is calibrated, so you do not need to assemble it.

WAVEGO Pi4 Kit

WAVEGO Basic

WAVEGO Developing

Note: The provided ESP32 board has been flashing, you can just assemble and use it as the video. This guide is provided for users who would like to modify the codes themselves.

Install Arduino IDE

  • Download the Arduino IDE from Arduino.cc website.
  • Please choose the Arduino IDE version according to your OS
  • Download and install the IDE according to the prompt.

Install Arduino core for the ESP32

  • Run the Arduino IDE, and click File.

QQ截图20211130112221.png

  • Click Preferences.

QQ截图20211130112341.png

QQ截图20211130113232.png

  • Restart the IDE, choose Tools > Board > Boards Manager, to open the Boards Manager.
  • Enter ESP32 to search the library and click Install.

QQ截图20211130113827.png

  • Wait for installing.

QQ截图20211130114001.png

  • After installing, you can use the Arduino IDE to develop the ESP32 board.

Download demo code and dependency libraies

  • You need to install the libraries below by the Libraries Manager:
    • ArduinoJson
    • Adafruit SSD1306
    • Adafruit PWM Servo Driver Library
    • ICM20948 WE
    • INA219 WE
    • Adafruit NeoPixel
  • Click Tools -> Manage Libraries to open the manager.

QQ截图20211130115318.png

  • Type the library in the search box, find the correct libraries, and install them.
    • ArduinoJson
    • Adafruit SSD1306
    • Adafruit PWM Servo Driver Library
    • ICM20948 WE
    • INA219 WE
    • Adafruit NeoPixel
  • Instal or update the library.

QQ截图20211130135130.png QQ截图20211130135223.png

QQ截图20220107181927.png

  • The Arduino Demo codes include the programs for ESP32, use C/C++/html languages, and are developed by the Arduino IDE.
  • The Demo codes in the RPi folder are examples for Raspberry Pi, using Python3(The Web application is based on flask-streaming).

Upload example to WAVEGO

  • Run the WAVEGO/Arduino/WAVEGO/WAVEGO.ino.

QQ截图20211130140519.png

  • Choose Tools > Port to check the COM port.
  • The COM number should be different on different PCs, choose the correct COM number.

QQ截图20211130140744.png

  • Connect the driver board to the computer.
  • Choose Tools > Port to check the COM port.
  • The COM number should be different on different PCs, choose the correct COM number.

QQ截图20211130141904.png

  • Click Tools > Boards: > ESP32 Arduino > ESP32 Dev Module, and choose ESP32 Dev Module.

QQ截图20211130142717.png

  • Configure as the below options:
Upload Speed: "921600"
CPU Frequency: "240MHz(WiFi/BT)"
Flash Frequency: "80MHz"
Flash Mode: "QIO"
Flash Size: "4MB(32Mb)"
''' Partition Scheme: "Huge APP(3MB No OTA/1MB SPIFFS)"
PSRAM: "Enabled"'''
  • PSRAM should be set as Enabled, otherwise, the camera image may be blank.

QQ截图20211130143434.png

  • Click the ```Upload``` button to upload an example.
  • Note that if you connect the WAVEGO to Raspberry Pi, the auto-download circuit is disabled, you need to disconnect the Raspberry Pi and then upload the example.

QQ截图20211130144718.png

  • Wait for the uploading
  • The codes are successful in uploading with the information that Leaving... Hard resetting via RTS pin...

QQ截图20211130145013.png

WAVEGO Multi-function Expansion Interface

  • Since ESP32 has higher computing power, integrates WIFI and Bluetooth, and supports the use of Arduino IDE for development, we choose ESP32 as the main control chip of WAVEGO. Multi-function expansion interface as shown in the figure below.

QQ截图20211231144138.png

  • As shown in the example above, connecting G12 and 3V3 can make the device enter assembly mode.
  • LED: There are two RGB LEDs on the driver board, and the numbers on the program are 0 and 1 respectively. If you need to connect more RGB-LEDs (WS2812), you can extend this interface. Correspondingly, the numbers start from 2.
  • The control functions:
  • LED_NUM: The number of the lamp beads, such as two on the control board, then LED_NUM is 0 or 1. If the first lamp bead expanded on the LED-OUT port is controlled, LED_NUM=2.
setSingleLED(LED_NUM, matrix.Color(R, G, B));
  • G21:This IO is also used to control the buzzer on the driver board. When G21 is low, the buzzer starts to sound, and when G21 is high, the buzzer does not sound.
  • G15:This IO port is not used, you can use these two IO ports to expand other modules.
  • G12:By default, this IO port is used to set the assembly mode. When the G12 is connected to the 3V3, the device enters the assembly mode. In this mode, the RGB will turn orange, and control all the servos connected to the device to rotate to the middle of the encoder, and then install the steering gear swing arm according to the specified angle.
  • RX TX: Corresponding to the UART_0 of ESP32, it can be used to communicate with other devices. It can be connected to the TX RX of the Raspberry Pi, and it can communicate with each other after the ground is supplied.
  • Note: When the RX TX is connected with the TX RX of the Raspberry Pi, the automatic download function cannot be activated, so if you need to upload a new program to the ESP32, you need to disconnect the connection between UART_0 and the Raspberry Pi.
  • The row below <TX RX GND 5V 5V> can be used to connect the Raspberry Pi, 5V and GND can be used to power the Raspberry Pi and TX RX can be used to communicate with the Raspberry Pi.

WAVEGO Onboard Devices and Interfaces

  • The WAVEGO driver board integrates a variety of devices, most of which use IIC control (GPIO 33 as SCL, GPIO 32 as SDA) to communicate with other devices, including ICM20948 attitude sensor, PCA9685 servo control chip, INA219 voltage detection and OLED screen (SSD1306).
  • This guide is only used to introduce the interface. For API calls of specific programs, please refer to the API documentation of the product.
  • IIC interface

GPIO 33 as SCL GPIO 32 as SDA

  • IIC address

ICM20948 0x68 INA219 0x42 SSD1306 0x3C PCA9685 0x40

  • Others

RGB_LED GPIO 26 BUZZER GPIO 21

Raspberry Pi guides

  • The main control board of WAVEGO uses ESP32 for connecting rod inverse solution and gait generation, which is used to transmit to the servo for lower computer control. The positioning holes on WAVEGO can be used to install copper posts and fix Raspberry Pi 4B. WAVEGO uses multi-function The expansion interface supplies power to the Raspberry Pi and uses UART0 to communicate with the Raspberry Pi. In the default program, the Raspberry Pi uses ttyS0 to communicate with the WAVEGO, with a baud rate of 115200.
  • We offer WAVEGO-RPi versions with Raspberry Pi expansion kits, RPI WAVEGO ACCE, or PI4B-4GB WAVEGO KIT. For more information, please refer to the WAVEGO with Raspberry Pi WIKI homepage.

Resource

Documents

Demo Codes

FAQ

 Answer:
It uses 2x 18650 batteries (not included), with a diameter of 18mm and a length of 65mm. The nominal voltage of a single cell is generally 3.7V, and the full charge voltage is generally 4.2V.


 Answer:
The default account for the Raspberry Pi system is "pi" and the password is "raspberry".


 Answer:
When entering a password in Linux, the input content is not printed, which means you need to type it blindly. Simply type "raspberry" on the keyboard and press Enter.


 Answer:
Open the Arduino IDE -> tools, and set PSRAM to "enable".


 Answer:
If the servo motor cannot rotate as specified in the instructions, please check if it is installed correctly. In assembly mode, the servo motor needs to be installed at a 45-degree angle with the white swing arm.


 Answer:
If an error occurs when running setup.py, please check if the source or network problem caused the download to fail. After installation, enter the Python environment in the terminal by typing "python3" and entering "import cv2" to check for error reports. If there is no error report, the installation is successful. If there is an error report, you can run setup.py multiple times or use the already installed image directly.


 Answer:
Note that the browser must be Google Chrome or Microsoft Edge. When adjusting PWM, clicking once is for fine-tuning, which is subtle. You need to click multiple times to see the change. If you still cannot adjust it, it may be due to an error in installing the servo motor. Please refer to Q5.


 Answer:
The ESP32 camera and the Raspberry Pi camera are different. The ESP32 camera is a small one, and the displayed page after the connection is 192.168.4.1, while the Raspberry Pi camera is bigger, and the displayed page after the connection is <IP>:5000.


 Answer:

First, check if the Raspberry Pi is using the serial port of the subcontroller. If it is connected to the Raspberry Pi, please disconnect it and upload the program again. If the automatic download of the program fails, please enter the download mode manually. After compiling the program, press and hold the boot button while uploading the program and release the boot button during the rst button press. If the problem cannot be solved, please return it for repair.


 Answer:

Please check the configuration you set when burning the image. For more information, please refer to the product installation tutorial on the WAVEGO Raspberry Pi Wiki page. If you still cannot burn the image successfully, please help the customer burn the image through remote login.


 Answer:
The battery life of WAVEGO depends on various factors such as usage and environment. In general, a single charge can support continuous use for 1 to 2 hours, and continuous high-intensity operation can be used for 20-30 minutes. However, the specific usage time will vary depending on usage (such as different power settings, different wavelengths) and working environment (such as temperature, and humidity).


Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)