Introduction: How to Create a Remotely Controlled 3D Printed Self-Balancing Robot

About: We love robots, DIY and funny science. JJROBOTS aims to bringing Open robotic projects closer to the people by providing hardware, good documentation, building instructions+code, "how it works" info …

This is an evolution of the previous version of B-robot. 100% OPEN SOURCE / Arduino robot. The CODE, 3D parts and electronics are open so feel free to modify it or create a huge version of the robot. If you have doubts, ideas or need assistance make the most of the B-robot community

The new version comes with tons of new features:

  • Control and tune it up using your smartphone/tablet via the free jjRobots APP or iOS or Android
  • Google Blockly controllable!
  • Perfect to have fun as you learn robotics (Take a look to the Robotics Challenges!)
  • Now can use regular AA batteries (or a 3 cells LIPO battery) Anything capable of delivering 9V
  • Two SERVO outputs (one used for the ARM). Control the two servo output just tapping on your smartphone screen.
  • Easier to print and using less plastic
  • PRO MODE can be activated from your smartphone/Tablet (increased agility and velocity)
  • Increased WIFI range (up to 40 meters)
  • Battery status and “Tilt angle” displayed in real time on your smartphone screen
  • Modify its PID robotic control in real time and see how that affects to its behavior and performance.

But first, lets start from the beginning. As this is Instructables you might have some of the elements needed to create the B-robot EVO.

The list:

  • DEVIA Control Board (this board makes the set-up easier as it has already Gyro/accelerometers + WIFI module and can control servos and up to three stepper motors). If you want to manufacture your own, take a look at this schematic)
  • 2x NEMA17 stepper motors +14 cms cables (pair)
  • 2x Stepper motor driver (A4988)
  • Metal gears servo (you will need an arm to fight and raise your B-robot…)
  • 6x AA Battery case with ON/OFF Switch
  • Bolts+nuts needed to set everything up
  • Pair of nylon bumpers -or 3D printed- (14×5 cms)
  • Double side tape, googly eyes…
  • 2 rubber bands for the wheels: grip

Step 1: BOM List and What the Elements Are

The list:

  • DEVIA CONTROL BOARD :this board makes the set-up process easier. It is a "enhanced" version of the powerful Arduino ZERO but with motors+servos control outputs, WIFI, COMMs port, 12V controllable voltage port and sensors. If you want to "manufacture/assembly" your own, take a look at this diagram, it will help you to connect all the different elements all together.
  • 2x NEMA17 stepper motors +14 cms cables (pair). Well, a NEMA17 stepper motors with the same specs should work.
  • 2x Stepper motor driver (A4988). The most widely used stepper motor driver.
  • Metal gears SERVO : You will need an arm to fight and raise your B-robot…The nylon gears servo will not work as good as intended
  • 6x AA Battery case with ON/OFF Switch: This case has been fitted into the frame but you can use a LiPO battery too (3S)
  • Bolts+nuts needed to set everything up: M3 bolts and nuts (12x6mm, 12x15mm)
  • Pair of nylon bumpers (14×5 cms): alternatively you can create your own custom bumper here and print it
  • Double side tape, googly eyes… to fix the IMU to the Brain shield. This double sided tape will work as a shock absover on the IMU
  • Frame: 3D printed parts
  • 2 rubber bands for the wheels: grip
  • Your smartphone/tablet to control it

If you want to skip all of this and jump to the Assembly guide video. Click here

Step 2: B-robot Features and Robotic Challenges

We have created challenges to beat with the B-robot, they are an easy way to introduce the electronics and robotics control while you have fun. We have tried to make everything as affordable as possible using very common "MAKER World" elements and providing free APPs to control the robots.

The B-robot can be controlled via Google Blockly. More info here

Its behavior parameters adjusted in real time: info

You can even be a robot technician: Adjust your B.robot to win the race!

Many makers have been modifying and adding parts to the B-robot. Take a look at them here

Some theory behind a self balancing robot: here

Step 3: If You Create This Robot, You Have Almost Everything You Need to Create These Ones:

If you already have the parts needed to create this robot you already have 90% of the items needed to create:

  • the Sphere-o-bot: friendly art robot that can draw on spherical or egg-shaped objects from the size of a ping pong ball to a large duck egg (4-9 cm).
  • The Iboardbot: The iBoardbot is a robot connected to the internet capable of writing texts and drawing with great precision
  • TheMotorized Camera Slider: A smartphone controlled Camera Slider
  • the Air hockey robot!: A challenging air hockey robot, perfect to have fun!
  • The B-robot EVO

All of them use the same electronics and ancillary elements

Step 4: Assembly Guide Video

This is the first time we have recorded a video instead of doing a "photo" assembly guide. For this robot, it is easier if you see how to connect everything and get some explanations/tip about how to do everything.

There is an "always updated" assembly guide here with some tips just in case you want to take a loot at it.

Step 5: UPLOAD the ARDUINO CODE to the DEVIA CONTROL BOARD

a) Install the Arduino IDE on your PC from here (skip this step if you have the Arduino IDE already installed) This B-robot code has been tested and developed on IDE version 1.6.5 and later versions. If you have a problem compiling the code, let us know

b) Download all the arduino files from here . Copy the files inside the BROBOT_EVO2_23_M0 folder in your hard drive

c) Compile and send the code to the DEVIA control board:

  1. Open your Arduino IDE
  2. Open the main code in /BROBOT_EVO2_23_M0/BROBOT_EVO2_23_M0.ino
  3. Connect your DEVIA board with the USB cable to the PC
  4. Note: If this is the first time you connect an Arduino board to your PC maybe you might need to install the driver.
  5. Select the board Arduino/Genuino ZERO (native USB port). In the TOOLS menu->board
  6. Select the serial port that appears on the tools->Serial port
  7. Send the code to the board (UPLOAD button: Arrow pointing to the RIGHT)

upload Selecting the right board before uploading the code

d) Done!

Step 6: CONTROL YOUR B-ROBOT EVO 2:

Android Users:

We have developed a FREE APP to control the Brobot (and future JJrobots) for your Android or iOS based Smartphone/Tablet:

Android APP / iOS APP

Steps to follow:

  1. Install the JJRobots control APP (for Android or iOS)
  2. After turning the Brobot EVO ON, connect your smartphone/tablet to the B-robot EVO´s wifi network (the default WIFI´s password is 87654321)
  3. Launch the JJrobots control APP and play with your B-robot EVO!


Step 7: 3D Interactive B-robot Model

The interactive 3D model will help you to get a good idea about how the B-robot EVO looks once assembled

Step 8: Troubleshooting

My B-robot is not responding to the command sent from my smartphone/tablet

Check you are connected to the JJROBOTS_XX network 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)

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

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 this video. 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.

More info at the very end of this page

Step 9: 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!

Wireless Contest

Participated in the
Wireless Contest