BiBoard V0 Quick Start Guide
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.
Note:
Arduino IDE 2.0 cannot add the large_spiffs_16MB (4.5MB APP with OTA/6.93MB SPIFFS) configuration option currently.
The SPIFFS file upload plugin in Arduino IDE 1.8.* is written in Java. And Arduino IDE 2.0 is written in a different language (TypeScript + Golang), so the previous upload plugin cannot be used in Arduino IDE 2.0. There is no support for the Arduino IDE 2.0 SPIFFS file upload plugin currently.
So it is recommended that you temporarily install and use the Arduino IDE 1.8.* IDE.
Open “Preferences” in Arduino, add ESP32 development board URL:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
Save it and then exit.
Open “Boards Manager...” and wait for updates from external board support links. Search “esp32” and install the support package.
Please install the latest available version 2.0.12. Installing version 2.0.13 and above may cause the motherboard to fail to startup.
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 serial 1 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.
Part No. | Module | Function | Introduction |
---|---|---|---|
Power 1
Battery Socket
Connects to Bittle's battery or provides external 8.4V power
Bittle battery or external 8.4V battery
2
Power LED
Indicates power status: Blue for 5V/3.3V, Orange for 8.4V servo power
3
Power
Provides 5V and 3.3V power
ICS
4
USB
Enables program download and soft reset of the controller
5
IMU
6-axis Inertial Measurement Unit (IMU) for motion sensing
6
EEPROM
External memory for storing data
7
DAC Amp
Amplifies audio signal for speaker output
8
IRDA receiver
Receives infrared signals
Extension
9
PWM Servo
Provides 12 pulse-width modulation (PWM) outputs for controlling servos
10
3 extensions
Offers additional connectivity options: 4 analog inputs, 2 serial ports, 1 I2C interface, and 5V DC-DC power (max 3A)
Buttons
11
Boot and Reset buttons
Press the reset button to restart the program