Гид по быстрому старту BiBoard
Last updated
Last updated
BiBoard is a robot dog controller based on ESP32 developed by Petoi LLC. Unlike NyBoard for normal users and robot lovers, BiBoard is mainly facing developers and geeks. High-performance processors, larger memory and storage, wireless connections. Audio function is also included.
The function partition for BiBoard is shown below:
Block diagram for BiBoard is shown below:
There're 2 ways to power the BiBoard: USB 5V and battery socket 7.4V.
When using USB power, there’s no power output for DC-DC 5V extension and servo. So USB power mainly supplies ICs.
When using battery power at 7.4V (maximum: 8.4V). Both servos and 5V power will be supplied. You can use 5V powering the Raspberry Pi.
Open “Preferences” in Arduino, add ESP32 development board URL:
https://dl.espressif.com/dl/package_esp32_index.json
Save it and then exit.
Open “Boards Manager” and wait for updates from external board support links. Search “ESP32” and download its board support package.
After shown “INSTALLED”, the BiBoard board support package is finished.
There’s no USB circuit in the ESP32, so we use the CP2102 USB bridge as officially recommended. The maximum download baud is 921600. The bridge is connected to serial1 of the ESP32.
We use the USB Type-C port, 2 resistors CC1 and CC2 are added as the identifier.
We tried the automatic download circuit designed by ESP and the NodeMCU, but none of them works perfectly. So we modified the circuit by adding the third transistor and enlarger the capacitor.
The transistors receive standard serial modem signals DTR and RTS and trigger a unique timing-sequence forcing ESP32 into download mode and then reboot. The detail of the automatic download circuit is shown below.
We use Invensense MPU6050, the most widely used IMU. Its I2C address is 0x68, and DMP’s interrupt is connected to IO26 of the ESP32.
With the help of Jrowberg’s MPU6050 DMP library, you can easily get the motion status of the Bittle. The Jrowberg’s MPU6050 library must be modified to adapt ESP32. The data types of “int8” and “PGMSpace” should be pre-defined instead of 8-bit AVR macros. We offer the modified library of MPU6050. You can replace the original library so that both AVR boards and ESP boards would be worked normally.
There is a 64Kbit EEPROM on the BiBoard. You can directly use the EEPROM read and write a program that is used on the Arduino UNO. You can use it to store calibration data.
There is also an example program named “EEPROM” in the ESP32 support package. This is not the demo code of the I2C EEPROM. That’s the demo of the simulated EEPROM by ESP32’s QSPI flash memory.
We use DAC output and a class-D amplifier instead of a PWM buzzer to make Bittle more vivid. You can use 3 ways to drive the audio module:
Use Arduino “Tone()” function.
Use ESP32 “dacWrite()” function like “analogWrite()” in Arduino. The data quality produced by the DAC is better than the PWM.
Use ESP MP3 decode library developed by XTronical, you can play MP3 files. You should configure a file system like SPIFFS or FAT in the flash before you use this MP3 decoder.
URL:https://www.xtronical.com/basics/audio/dacs-on-esp32/
The IR sensor on Nyboard and BiBoard are the same, so you can directly use the sketch from the Nyboard. The BiBoard’s flash is large enough so that you don’t have to disable macros in IRremote.h.
There’re 12 PWM servo sockets on the BiBoard, and the pin number is marked near the socket.
We transform the direction of the PWM servo socket by 90 degrees since the size of the ESP32 module. You should connect the wires first before you screw the BiBoard on the cage.
There’re 3 extension sockets on the BiBoard that marked with P15, P16 and P17.
This socket is used for analog input extension, you can try to connect foot press sensors to this socket.
This socket is used for bus extension of the ESP32.
You can use this interface to connect to the Raspberry Pi, but you cannot directly mount the Raspberry Pi above the BiBoard. Use wires or adapters instead.