Better than a bunch of photos we have created an Assembly guide video. Some steps, like how to program the Arduino, controlling your robot or Troubleshooting are listed below. The interactive 3D model will help you to get a good idea about how the B-robot EVO looks.
Part list:
- jjRobots Brain Shield (or equivalent: schematic info here)
- Arduino Leonardo (CLONE) + USB cable (already programmed)
- 2x High Quality NEMA17 stepper motors +14 cms cables (pair)
- 2x Stepper motor driver
- IMU (gyro+accelerometers) + custom cable
- Optional: 3D printed parts (vibrant colours)
- Powerful servo: Metal gears (you will need an arm to fight and raise your B-robot…)
- 6x AA Battery case with ON/OFF Switch (batteries not included)
- Bolts+nuts needed to set everything up
- Pair of nylon bumpers (14×5 cms)
- Double side tape, googly eyes…
Have questions/ comments? Refer to the B-robot EVO community!
HOW TO:
UPLOAD the ARDUINO CODE to the ARDUINO LEONARDO
(skip this step if you got the Plug & Play B-robot EVO kit version. The Arduino is already programmed)
- Open your Arduino IDE
- Open the main code in /BROBOT_EVO2/BROBOT_EVO2-XX.ino
- Connect your Leonardo board with the USB to the PC
- Note: If this is the first time you connect a Leonardo board to your PC maybe you might need to install the driver.
- Select the board Leonardo (tools->board)
- Select the serial port that appears on the tools->Serial port
CONTROL YOUR B-ROBOT EVO 2:
Android users:
We have developed a FREE APP to control the Brobot (and future JJrobots) for your Android based Smartphone/Tablet:
It works sending UDP packets to the B-robot. It uses a simple layout with Throttle and Steering slicers and several buttons.
Steps to follow:
- Install the JJRobots control APP
- After turning the Brobot EVO ON, connect your smartphone/tablet to the B-robot EVO´s wifi network (remember, the WIFI´s password is 87654321)
- Launch the JJrobots control APP and play with your B-robot EVO!
Above: Screen capture of the JJrobots B-robot control APP (available for free in GOOGLE PLAY)
iOS users. App Store App or TouchOSC :
iOS B-robot control APP (thanks to Xuyen for this great contribution!)
It is quite straightforward to use. Just connect your iPhone/iPad to the B-robot EVO´s wifi (use the password “87654321“) and launch the App.
(thanks to Xuyen for this great contribution!)
iOS TouchOSC APP: Alternative way to control the B-robot EVO. Setup guide and files here
USEFUL LINKS:
Arduino CODE (latest version V.2.0) and the GITHUB REPOSITORY
B-robot Challenges (robotics, Academy)
B-robot alternative frames: Stealth version, Compact version (credits to s199)
B-robot EVO 2: 3D MODEL
TROUBLESHOOTING:
My B-robot is not responding to the command sent from my smartphone/tablet
Check you are connected to the JJROBOTS_XX netwrok using the correct password (by default: 87654321) and your device has not blocked the data traffic to the B-robot (stay always connected to the robot)
The IMU gets loose/ the i2C cable is too short
The gyroscope (IMU) is one of the most important element in this robot. It provides the current angle of the robot updating its value hundred times per second. The protocol used to send the data is quite sensitive to any electromagnetic interference so a very short cable is needed to connect the IMU and the Brain Shield. At the same time, vibrations create false angle measurements so we have to isolate the Brobot´s main frame vibrations from the IMU: that is the reason to use a double sided sticky pad to fix the IMU to the Brain Shield.
Place the IMU as indicated above: Close to the Brain Shield´s i2C connector. Bend the cable if needed. If you place the IMU as above, there should not be any lateral force pushing the IMU out of place
My B-robot lacks of power or fall without reason
Adjust the current delivered by the stepper motors drivers. Use a screwdriver and gently rotate the screws indicated on the photo below. Rotating 10º-30º is more than enough.
Clockwise rotation: increase the power delivered to the motors
A4988 STEPPER MOTOR DRIVERS output current potentiometer
My B-robot can not stand up by itself.
If everything is ok, the B-robot only needs a little bit of help from the servo to stand up by itself. Take a look to the video below. If your robot does not behave like in the video, adjust the stepper motor drivers output power (instructions above). Keep in mind that the bumpers have two functions here: protect the electronics+robot and help it to stand up easily.
DEBUG MODE
There is a DEBUG MODE inside the B-robot CODE. This MODE will allow you the debug the behaviour of the robot if you are having issues. Please, refer to the B-robot community if you have problems or questions.
Look at the sketch line “#define DEBUG 0″ and change the 0 to 1…8 depending on what info you want to get. Take a look to the CODE below:
#if DEBUG==8
Serial.print(throttle);
Serial.print(” “);
Serial.print(steering);
Serial.print(” “);
Serial.println(mode);
#endif
//angle_adjusted_radians = angle_adjusted*GRAD2RAD;
#if DEBUG==1
Serial.println(angle_adjusted);
#endif
//Serial.print(“\t”);
mpu.resetFIFO(); // We always reset FIFO
// We calculate the estimated robot speed:
// Estimated_Speed = angular_velocity_of_stepper_motors(combined) – angular_velocity_of_robot(angle measured by IMU)
actual_robot_speed_Old = actual_robot_speed;
actual_robot_speed = (speed_M1 + speed_M2)/2; // Positive: forward
int16_t angular_velocity = (angle_adjusted-angle_adjusted_Old)*90.0; // 90 is an empirical extracted factor to adjust for real units
int16_t estimated_speed = -actual_robot_speed_Old – angular_velocity; // We use robot_speed(t-1) or (t-2) to compensate the delay
estimated_speed_filtered = estimated_speed_filtered*0.95 + (float)estimated_speed*0.05;
#if DEBUG==2
Serial.print(” “);
Serial.println(estimated_speed_filtered);
#endif
// SPEED CONTROL: This is a PI controller.
// input:user throttle, variable: estimated robot speed, output: target robot angle to get the desired speed
//target_angle = (target_angle + speedPControl(estimated_speed_filtered,throttle,Kp_thr))/2.0; // Some filtering : Average with previous output
//target_angle = target_angle*0.3 + speedPIControl(dt,estimated_speed_filtered,throttle,Kp_thr,Ki_thr)*0.7; // Some filtering
target_angle = speedPIControl(dt,estimated_speed_filtered,throttle,Kp_thr,Ki_thr);
target_angle = constrain(target_angle,-max_target_angle,max_target_angle); // limited output
#if DEBUG==3
Serial.print(” “);
Serial.println(estimated_speed_filtered);
Serial.print(” “);
Serial.println(target_angle);
#endif
#if DEBUG==10
Serial.print(angle_adjusted);
Serial.print(” “);
Serial.println(debugVariable);
#endif
#if DEBUG==6 //BATTERY STATUS
Serial.print(“B”);
Serial.println(battery);
Serial.print(” “);
#endif
#if DEBUG==7
Serial.print(distance_sensor);
Serial.print(” A”);
Serial.println(autonomous_mode_status);
USEFUL INFO: ARDUINO LEONARDO, IMU 6050 & STEPPER MOTOR DRIVER(A4988):
Arduino Leonardo:
MPU-6050 (gyro+accelerometers)
- MPU-6050 series info can be found here
- How to integrate it with any Arduino, here
- Schematic and connection info, here
Stepper motor driver A4988:
FAQ (frequently asked questions):
Why are you using Stepper motors?
There are several options for motors: DC, Brushless, Steppers… We choose stepper motors because they have enough torque, you could connect the wheels directly without gears that generate some backslash (this is a common problem in balancing robots), they have good bearings and you will be able to control the speed of the motors with accuracy. In standard sizes these motors are cheap (we use the same motors used on a regular 3D printers) and the drivers are cheap and easy to interface with Arduino too.
Why you use a Wifi connection?
Using a Wifi connection allow us to work with a lot of devices (Smartphones, Tablets, PCs…) Bluetooth devices are cheaper but their range is usually shorter. Old devices are not supported and you could not connect it to Internet easily. The Wifi module that we recommend, allow us to create an Access Point, so you don’t need to use an existing Wifi infrastructure (cheap Wifi modules don´t let you do this). You can connect your device directly to the Robot anywhere but if you prefer you can hack it and use your own infrastructure therefore controlling your robot (or whatever you have created) over the Internet from any remote place in the world! (Cool, isn´t it?)
Why BROBOT?
Self balancing robots are fun to see and play. A self balancing robot requires sensors and control algorithms. You will find all the HOWTO and technical documents which explains the “behind the scenes” in JJROBOTS. Learn electronics and robotics creating your own BROBOT from scratch!.
There are some commercial solutions to the balancing robot, but here we want to share knowledge and thoughts. You can use the BROBOT parts to create more robots or gadgets, keep in mind all the devices used in a BROBOT are standard devices/electronics with a lot of potential. In the JJROBOTS community we want to show you how! You are now buying a self balancing robot, your are buying your own electronic and ancillary devices!
Thinking about creating a GPS self guidance robot? a modified version of BROBOT is your robot!
How much payload could carry BROBOT?
BROBOT could easily carry your soft-drink cans. We have tested with 500g of payload with success. More weight makes the robot more unstable but this could be fun also, isn’t it?
Why use stepper motors for a balancing robot?
There are several options for motors, DC, Brushless, Steppers… We choose stepper motors because they have enough torque, you could connect the wheels directly without gears that generate some backslash, they have good bearings and you could control the speed of the motors very precisely. Also they are cheap and the drivers too…
Could I use rechargeable batteries of Lipo batteries?
Yes, you could use standard AA batteries (alkaline recommended), AA rechargeable batteries (e.g. NiMh) or you could optionally use a 3S Lipo battery. Run Lipo batteries at your own responsibility.
What is the runtime of BROBOT?
With rechargeable AA batteries (e.g. Ni-Mh 2100mAh) you could expect around half to an hour of runtime
Could BROBOT work without the wifi module?
Yes, BROBOT could work and keep its stability. But, of course you could not control it without the module.
Could I change the name of the Wifi network that BROBOT generate?
Yes, on the configuration sketch you could change the name and also some other internet configurations. You could also connect BROBOT with your existing Wifi network
Is this a project for an Arduino beginner?
Well, BROBOT is not an easy “beginner project”, but it has a lot of documentation so you have a platform to grow your skills. You could first mount your BROBOT following the instructions and it should work OK, then you could start understanding some parts of the code and finally writing your own pieces of code…
For example it could be easily (there are tutorials for this) to write your code so the robot automatically move the arm and spin itself if you don’t send a command in 10 seconds…
More advanced hacks: Convert to a totally autonomous robot with obstacle avoiding adding a SONAR, convert to a follow line robot, and so on…
Why BROBOT electronics are not so cheap?
We are a really small startup (2 persons in our free time) and now we could only run small batch of electronics. As yo know the price of electronics drops quickly in high volume productions but we are starting… If we sell many boards and we could run more volume productions we will drop the prices!!. JJROBOTS didn´t born to get money, our spirit is to sell “good products” to found our next projects and spread the robotics knowledge
Have fun!