Posts | Comments

Planet Arduino

Archive for the ‘Arduino Robot’ Category

This is a guest post from Surrogate, a team of developers building games that people play in real-life over the internet.

We introduced this concept last year, and have launched three games so far. Our final game of 2019 was SumoBots Battle Royale — where players from anywhere in the world can fight real robots in a battle royale-style arena. The aim of the project was to have the game run semi-autonomously, meaning that the bots could self-reset in between the games, and the arena could run by itself with no human interaction. This was our most complex project to date, and we wanted to share some parts of the build process in more detail, specifically, how we’ve built these robots and hooked them online for people to control remotely.

Robot selection

We’ve started our process by choosing which robots we’d want to use for the game. There were a couple of requirements for the robots when making the evaluation:

  • Are able to withstand 24/7 collision
  • Easily modifiable and fixable
  • Can rotate on the same spot
  • Must have enough space to fit the electronics

After looking at a lot of different consumer robots, maker projects, and competitive fighting bots, we’ve decided to use the JSUMO BB1 robots for this game. We liked the fact that these bots have a metal casing which makes them very durable, all parts are easily replaceable and can be bought separately, and it has 4 independent motors (motor shields included), one for each wheel, which allows it to rotate on the same spot.

We were pretty skeptical of being able to fit all the electronics into the original casing, but we decided to go with this robot anyways, as it had the best overall characteristics. As this robot is easily modifiable, we can always 3D print an extra casing to fit all the parts.

What is the board?

Now that we’ve decided on the robot, it was the time to define what electronics should we use in this build. As usual, it all starts with the requirements. Here’s what we need for the game to run smoothly:

  • The robot should be able to recover from any position
  • Can stay online while charging
  • Supports WiFi network connection and offers reliable connectivity
  • Easily programmable and supports OTA updates
  • Can control four motors simultaneously

Based on these requirements we had the following electronics layout in mind:

We had to find a board that is energy efficient, can send commands to motors, supports parallel charging and has a small footprint on the robot size. With so many requirements, finding the perfect board can be a challenge.

Arduino to the rescue

Fortunately, Arduino was there to help us out. They offer a rich selection of boards to fit every possible robotics project out there and have very detailed documentation for each of the boards. 

More importantly, Arduino is known for its high quality, something that is crucial for semi-autonomous types of applications. Coming from an embedded software background and having to work with all sorts of hardware, we often see that some features or board functionalities are not fully finished which can lead to all sorts of unpleasant situations.

After looking at the Arduino’s collection of boards we quickly found a perfect candidate for our project, the Arduino MKR1000 WiFi. This board fits all of our main requirements for the motor controls, is easily programmable via Arduino IDE, and due to its low power design is extremely power efficient, allowing us to have a lower capacity battery. Additionally, it has a separate WiFi chip onboard, which solely focuses on providing a reliable WiFi connection, something that is very important in our use case.

Now that we’ve decided on the “brain” of our robot, it was time to choose the rest of the components.

Robust hardware means working software

Something to keep in mind is that when working with hardware, you should always try to avoid any possible risks. This means that you should always over-do your minimal hardware requirements where possible. The reason is — if your hardware doesn’t work as intended, your whole software stack becomes unusable too. Always chose reliable hardware components for mission-critical applications.

Some of our electric components might look a bit overkill, but due to the nature of our projects, they are a critical requirement.

Avoiding the battery explosions

As there is a lot of robot collision involved in the game, we decided to go with a high safety standard battery solution. After evaluating multiple options on the market, we decided to go with the RRC2040 from RRC (Germany). It has a capacity of 2950 mAh that allows us to run the robots for up to five hours on a single charge. It has an internal circuitry for power management, protection features and it supports SMBUS communications (almost like I2C), and is certified for all of the consumer electronics battery standards. For charging, we used RRC’s charging solution designed specifically for this battery and that offers the possibility to feed power to the application while the battery is being charged.

Note: the Arduino MKR1000 has a pretty neat charging solution on the board itself. You can connect the battery to the board directly as the main power source, and you charge it directly through the MKR1000’s micro USB port. We really wanted to use it to save space and have a more robust design, but due to the large capacity of our battery, we couldn’t use it at full potential. In our future projects with smaller scale robots, we definitely plan to use the board’s internal charging system, as it works perfectly for 700-1800 mAh power packs.

Bot recovery

For the bot to be able to recover from falling on its head, we’ve implemented a flipping servo. We didn’t want to have any risk of not enough torque, so we went with DS3218, which is capable of lifting up to 20KG of weight. Here’s how it works:

Hooking everything together

Now that we’ve decided on all of the crucial elements of this setup, it was time to connect all the elements together. As the first step, we figured what would be the best step way to locate all the pieces within the bot. We then 3D-printed a casing to protect the electronics. With all of the preliminary steps completed, we’ve wired all of the components together and mounted them inside of the casing. Here’s how it looks:

It was really convenient for us that all the pins on the board could be connected just by plugging them in, this avoids a lot of time spent on soldering the cables for 12 robots and more importantly, allowed us to cut out the risk of bad soldering that usually can’t be easily identified.

Arduino = Quick code

Arduino MKR1000 offered us the connectivity we needed for the project. Each sumo robot hosts their own UDP server using MKR1000 WiFi libraries to receive their control commands for a central control PC and broadcasting their battery charge status. The user commands are translated to three different PWM signals using Arduino Servo library for the flipping, left and right side motor controllers. The board used has support for hardware PWM output which was useful for us.  Overall we managed to keep the whole Arduino code in a few hundred lines of code due to the availability of Servo and Wifi libraries.

The out of the box ArduinoOTA support for updating the code over the WiFi came in handy during the development phase, but also anytime we update the firmware for multiple robots at the same time. No need to open the covers and attach a USB cable! We created a simple Bash script using the OTA update tool bundled in Arduino IDE to send firmware updates to every robot at the same time.  

To summarize

It’s pretty amazing that we live in the age where you can use a mass market, small form factor board like the Arduino MKR1000 and have so much functionality. We’ve had a great experience developing our SumoBots Battle Royale game using the board. It made the whole process very smooth and streamlined, the documentation was right on point, and we never had to hit a bottleneck where the hardware wouldn’t work as expected.

More importantly, the boards have proven to be very robust throughout the time. These SumoBots have been used for more than 3,000 games already, and we haven’t seen a single failure from the MKR1000. For a game where you literally slam the robots in to each other at a high speed, that’s pretty impressive to say the least.

We look forward to working with Arduino on our future games, and we can’t wait to see what they will be announcing in 2020!

Okay, we’ve just left May and stepped into June, why are we talking about Arduino Day — traditionally a March 16th event where makers congregate and share projects? I live in Ho Chi Minh City, and the event tends to take place in mid-May, but the enthusiasm and collaborative spirit are just as strong. Organized by the awesome local maker group Fablab Saigon with the venue provided by Intek Institute, there were some neat projects on display along with some talks from local companies.

The first thing that struck me about the event was how young the maker movement is here – most attendees were still in high school or early university. By contrast, I was 23 when I first learned to use AVR microcontrollers with assembly language (by the time Arduino started to get traction the boat effectively missed me). I couldn’t help but feel like a bit of a relic, at least until we all started talking excitedly about robots (I had brought a couple). It seems that geeking out about electronics is the great equalizer which knows no age limits.

Tesla Coils, Blinking Circuits, and Robot Races

Among the projects on display was this low-power Tesla coil, happily making small sparks, turning on CCFL bulbs in its immediate vicinity, and generating a bit of plasma too.

There was a learn to solder workshop for attendees to join in anytime and produce artful dead-bug style transistor multivibrator circuits.

Many of you will be familiar with the astable multivibrator circuit seen here as a popular introduction to electronics and soldering. But if you’re not, it’s a good place to start as you’ll learn about several different components, and the result has blinking lights… while leaving your Arduino free to be used in other projects! Someone had also brought in a bit of a show-and-tell on using GSM modules here.

Next there was a workshop where rover-style robots were built from a locally developed STEM education kit called GaraStem. Fundamentally, it’s a tacklebox filled with instructions, laser-cut chassis parts, an Arduino compatible board and sensors, and an Android control application for your smartphone. It looked easy and fun to work with, and I wish that STEM robot kits like this were available when I was a kid. I can’t help but feel a little jealous – all we had in my area when I was in high school was the occasional science fair!

Of course, any time more than one remote controlled robot is in the same place, a race is necessary and we got right to that. Entirely by coincidence, the floors were painted in a way that sort of looked like a racetrack.

Talks from Hardware Startups

Besides the projects and workshops, there was a track of talks from local companies on what they’ve been up to. One of them, called Indruino, designs their own Arduino boards for use in industrial environments, along with all the bells and whistles that requires. They had a good demo of a speed controller for a 3-phase motor, and talked about what they’ve done to make the platform suitable for industrial use.

At the very least, I could tell that their boards made ample use of optoisolators, secure connectors, and high quality shielded DC-DC converters. According to their pamphlet, they’ve already deployed in a number of factories, with industrial touchscreens and a freeze-drying system controller — not surprising as freeze dried foods is an industry that has really been taking off in Vietnam the last few years and designing what you can locally is a good move.

Vulcan Augmentics, a local startup that designs modular prosthetic limbs was there to present their work on practical human-machine interfaces. For a variety of reasons, there are quite a few amputees of all ages in Vietnam, and so any effort to better serve them is certainly appreciated. Unfortunately, their prosthetic limbs were either overseas or in use at the time, so I couldn’t examine the hardware. Nonetheless, it’s a nice example of how the skills we learn as a hobby can one day develop to the point where we can make a positive impact on another person’s life.

I presented some IoT use cases and demos, many of which I’ve written about here, along with some notes on the importance and implementation of security such as MQTT with either AES or TLS. I also talked about ways to define reliable failure states for IoT devices in case of loss of connectivity. While it’s an extreme example, you can’t have a large robot plow into a wall because the last command received before a connection loss was ‘go forward’! Of course, there exists the argument that we shouldn’t be connecting dangerous robots to the Internet frivolously in the first place, but it’s not very interesting and the lessons in control systems still apply. It was good fun and no robot, human, or architecture was harmed.

Chúc mừng sinh nhật Arduino!

Even the Cake was High Tech

At the end of the day, there was the requisite cake (strawberry jam). The local bakeries have something like a type of marzipan sheet that they can print on at a surprisingly good resolution, and the cake featured some pretty good imagery as a result.

The event wrapped up with a trivia competition, with some kits that had been donated as prizes for the highest scores.

Overall the sense of community at the event was strong, and despite the fairly high attendance it was well organized. My hat is off to Fablab Saigon for putting it together.

Powering small robots could be considered the specialty of Arduino boards, but what if you want to control something much bigger? There are, of course, ways to do this, but larger motors are naturally more difficult to source. This hasn’t deterred YouTuber The Post Apocalyptic Inventor, however, who has been exploring the use of European-style washing machine motors to drive a large steel tubing robot chassis.

While the project is not yet finished, he’s turned to an Arduino Uno for experimental control along with a variety of other components to provide the proper power. 

Be sure to check out video below of this robot-in-progress if you’re interested in “beefing up” your next project!


If you need a robot to traverse piping systems, what are you to do? You could purchase a (very expensive) inspection robot, or you could instead build your own like the prototype pipe-crawler presented here. 

The device features six spring-loaded wheel assemblies that help it get a grip on different diameters of pipe, with two of the wheels powered for locomotion.

An Arduino Uno controls the uniquely-shaped bot, with an LN298N H-bridge used to regulate the three 9V batteries wired in series that run the motors. 

Pipeline systems deteriorate progressively over time through various means. Pipeline inspection robot are designed to remove the human factor from labour intensive or dangerous work environments and also to act in inaccessible environment. However, if you take a look at the prices of those robots you will find that they are way too expensive.

This project aims to create another kind of pipeline inspection robot. Because we think that It is beneficial to have a robot with an adaptable structure to the pipe diameter, and cheaper at the same time.

Our challenge is to make this robot adaptable to diameters varying from 260mm to 390mm based on two sliding mechanisms.

Be sure to see it in action in the short video below! 

If you’d like an easy way to accomplish repetitive biological experiments, the OpenLH presents a great option for automating these tasks. 

The heart of the system is the Arduino Mega-controlled uArm Swift Pro robot, which is equipped with a custom end effector and syringe pump. This enables it to dispense liquids with an average error of just .15 microliters.

A Python/Blockly interface allows the OpenLH to be set up for creative exploration, and because of the arm’s versatility, it could later be modified for 3D printing, laser cutting, or any number of other robotic duties. 

Liquid handling robots are robots that can move liquids with high accuracy allowing to conduct high throughput experiments such as large scale screenings, bioprinting and execution of different protocols in molecular microbiology without a human hand, most liquid handling platforms are limited to standard protocols.

The OpenLH is based on an open source robotic arm (uArm Swift Pro) and allows creative exploration. With the decrease in cost of accurate robotic arms we wanted to create a liquid handling robot that will be easy to assemble, made by available components, will be as accurate as gold standard and will cost less than $1,000. In addition the OpenLH is extendable, meaning more features can be added such as a camera for image analysis and real time decision making or setting the arm on a linear actuator for a wider range. In order to control the arm we made a simple Blockly interface and a picture to print interface block for bioprinting images.

We wanted to build a tool that would be used by students, bioartists, biohackers and community biology labs around the world.

The OpenLH can be seen in the video below, bioprinting with pigment-expressing E. coli bacteria.

Six-legged robots are nothing new, but if you’d like inspiration for your own, it would be hard to beat this 22 servo-driven, 3D-printed hexapod from Dejan at How To Mechatronics. 

The ant-inspired device features three metal geared servos per leg, as well as a pair to move the heat, another for the tail, and a micro servo to activate the mandibles.

To control this large number of servos, Dejan turned to the Arduino Mega, along with a custom Android app and Bluetooth link for the user interface. While most movements are activated by the user, it does have a single ultrasonic sensor buried in its head as “eyes.” This allows it to lean backwards when approached by an unknown object or hand, then strike with its mandibles if the aggressor continues its advance. 

As the name suggests, the hexapod has six legs but in addition to that, it also has a tail or abdomen, a head, antennas, mandibles and even functional eyes. All of this, makes the hexapod look like an ant, so therefore we can also call it an Arduino Ant Robot.

For controlling the robot I made a custom-built Android application. The app has four buttons through which we can command the robot to move forward or backwards, as well as turn left or right. Along with these main functions, the robot can also move its head and tail, as well as it can bite, grab and drop things and even attack.

You can see it in action and being assembled in the video below, and build files are available here.

In the middle of a project, you may find that what you’re making is similar to something that’s been done before. Such was the case with Adrian Lindermann when he started constructing his “Twinky” robot and found the Jibo social bot had a similar design. 

Like any good hacker, he pressed ahead with his build, creating a small yellow companion that can respond to voice commands via a SpeakUp click module, along with pressure on its face/touchscreen.

Control is provided by an Arduino Mega, and Twinky can interact with other devices using a Bluetooth module. The robot’s head can even turn in order to point the display in the needed direction, and it’s able to play sound through an audio amplifier and speaker. 

IT CAN SPEAK! PLAY MUSIC, SET TIMERS, ALARMS, TURN ON/OFF THE LIGHTS OR OTHER APPLIANCES. IT HAS A CALCULATOR AND A WEATHER STATION! DATE & TIME, BLUETOOTH 4.0, EVERYTHING WITH VOICE COMMANDS!!! And also with a touchscreen, it has one little motor so it can turn around when one of the two microphones hear you talk or make a noise.

For more on this wonderful little robot, check out the project’s write-up and and build files here.

While the STAR, or Sprawl Turned Autonomous Robot, is more than capable of traveling over obstacles with its three-pointed wheels, it can also make itself thin enough to simply slide under others as needed. This clever design uses an Arduino Pro Mini for control, and normally moves around like a tank, rolling on six wheels that are turned by two motors.

When the task calls for it to go under something, a third motor cranks these wheels to nearly parallel with the floor, shrinking the robot down to a very slim profile—so thin, in fact, that it can actually slide under a door as seen in the video below! 

Print files and more information on the build can be found here, while the original paper upon which this robot is based is also available.

Would you like to create a robot that slithers from place to place like a snake? Well now you can, thanks to this bio-inspired design from Will Donaldson. 

Donaldson’s project uses 10 metal gear servos to allow his robotic snake to curl its body back and forth, sliding along on small wheels that replace a real serpent’s bottom scales. An Arduino Nano controls its 10 segments, and power is provided by an external tether from a recycled desktop power supply. 

As shown in Donaldson’s video, he’s been experimenting with several different snake builds and forms of locomotion. These include an inchworm-style gait where sections are picked up off of the ground, and a sort of hybrid configuration where a snake can move in both the horizontal and vertical planes. 

Instructions and code can be found in Donaldson’s write-up here, and you can check out the video below to see more about his design process.

While building a walking robot especially with less than six legs can be quite a challenge, maker “Skill Mill NYC” decided to construct a quadruped robot named DoggoBot using cardboard for its body.

Four micro high torque servos power the legs, which are able to move the robot around with the help of unpowered knee joints.

DoggoBot is controlled by an Arduino, and it takes movement commands via a computer USB-serial connection or from a Bluetooth module. 

Ever since I started programming Arduinos, I wanted to build a robot using one. I also want a dog. However, living in NYC makes it tough to take care of a dog. So after hours of watching videos of robots and dogs, I decided to put my phone down and build myself a pet!

Although what’s seen in the demonstration below is an impressive feat of “cardboard engineering,” its creator has a few more ideas for it, such as adding sensors and getting Doggo’ to turn.



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook