SainSmart Balance Robot

The Sain Smart v3 balance robot is an inverted pendulum. Technically, you can use the hardware from this robot, combined with EZ-Builder to balance any robot - with enough patience to configure PID values. The kit includes an Arduino Mega with a shield for the MPU6050 IMU. The custom firmware below allows EZ-Builder to connect to this robot and control it via the Inverted Pendulum movement panel. Link to the EZ-Builder control is below

The firmware can use either USB or Bluetooth, depending on the configuration. The top of the firmware has a configuration section that can specify both the communication port and communication baud rate.

Example of configuration for USB

This configuration example is for USB at 115,200 baud.

// The communication baud rate
#define _BAUD_RATE 115200

// The primary communication interface between EZ-Builder and this controller
// Serial  - USB (recommended 115200 baud)
// Serial1 - 19(RX), 18(TX) <- do not use because pin 18 is used by wheel encoder
// Serial2 - 16(RX), 17(TX) <- recommended for bluetooth dongle
// Serial3 - 15(RX), 14(TX)
#define COMMUNICATION_PORT Serial

Example of configuration for BlueTooth add-on

This configuration example is for a bluetooth module connected to Serial port #2 at 9600 baud. In this case, the respective RX & TX wires would be connected from the MEGA to the Bluetooth module. Of course, the TX on MEGA would be connected to RX on Bluetooth. The same applies for the RX on MEGA connecting to TX on Bluetooth.

// The communication baud rate
#define _BAUD_RATE 9600

// The primary communication interface between EZ-Builder and this controller
// Serial  - USB (recommended 115200 baud)
// Serial1 - 19(RX), 18(TX) <- do not use because pin 18 is used by wheel encoder
// Serial2 - 16(RX), 17(TX) <- recommended for bluetooth dongle
// Serial3 - 15(RX), 14(TX)
#define COMMUNICATION_PORT Serial2

Video Demonstration

Check out this video of the robot balancing (Sort of) next to DJ's laptop. The behavior control for this robot allows real-time configuration of the PID values with sliders.

The Mega from this kit can be programmed with the custom EZ-B firmware for connecting to EZ-Builder.

Download Firmware Sourcecode & Control

February 7 — Updated February 7
I assume the communication is going through a ESP8266 on the bot?
Contacted the company to purchase one of the shields (to build myself) but was told it was discontinued:(
You must have to buy the whole bot from them now.

Thanks in advance.
DJ Sures
Synthiam
February 7
Yeah - we should be able to recreate the same build with DIY parts. The shield is merely an HBridge, but you can use any hbridge (specifically the EZ-Robot one). The IMU it uses is the MPU6050.

As for wireless... I'm actually using a Bluetooth <-> UART module. The same ones that were on the EZ-B v3.