Let's Make Robots!

Mounting testing and tunning Insect Bot Mini (I&II)

Walk around and goes backwards in curves if it detects an obstacle.
AttachmentSize
InsectBot.cpp: to make the Insectbot walk very fast (5ms for walkspeed)2.7 KB
insectbot-mod-solo-adelante.zip: simplified version of the Insectbot program to make it walk forward743 bytes

Update: I uploaded a new video with the robot walking with a speed of 5 milliseconds of "SpeedWalk". It flies!

Update II 26-Jan-2014: finally I recieved the new IR sensor! After some days finally I could test the insect robot with the infrared sensor. I had to change the old sensor for the new one, upload the new software to the robot and it worked like a charm! You can see the new video in Youtube: it moves fast, it also avoids obstacles even faster!

I observed that depending on the light comming from, the IR sensor has erratic measures, i.e.: the robot "sees" thigns where actually there is nothing. I'm checking some filtering noise by software, like this one.

Next thing to do is some update on sensors or even a total change in movements configurations. We'll see...

After my exciting first part Unboxing the Insectbot Mini Kit from DFRobot, I was expecting to build the Insect bot. So finally I could gain a hour to build it.

I was surprised on how easy it was to mount it. As we remember from my last chapter, on the rear of the kit's box there is a list of tips about how to mount the Insect bot mini Wiki and the software to program the creature:


Rear of the Insect bot kit's box

It was also a great help to have the article from Lumi about this Insect bot.

The first thing you realize is how the designer and manufacturer has though for the customer's convenience: the box has everything to mount it, excepting and iron solder and some soldering paste. Everything else is in the box.

Starting from the main little (but powerful) CPU board:

Beetle CPU board with an Atmel ATMega32U4

This board contains everything to command this robot: CPU, servos and sensor pins, also the power supply pins, however the kit brings a convenient Beetle Shield to connect all the hardware in a faster and easy way:

Beetle Shield board for the Insect bot mini

CPU and Beetle Shield boards must be soldered in order to have the whole kit working, only eight (8) points of soldering later all both boards are together:

CPU and Beetle Shield boards soldered for the Insect bot mini

After this step it's time to fix the two servos together in order to have the bot's body. It's a clever design solution to build this small body up from the two servos. Even you can use only a zip tie that the kit brings.

Here the two servos and the tape I used

Some minutes later both servos are together:

Some minutes later both servos are together

The I fixed both servos with a zip tie from the kit:

Both servos fixed with a zip tie

 

Detail on the two servos fixed with the zip tie

Another detail on the two servos fixed with the zip tie

I found easy to shape the steel wires to work as leg. However, as their shape have impact on the overal performance, I think it's interesting to tell here some details.

This is the first steel wire ready to work as front legs:

First steel wire ready to work as front legs

First steel wire mounted on the servo arm ready to work as front legs:

First steel wire mounted on the servo arm ready to work as front legs

First steel wire mounted and shaped on the servo arm ready to work as front legs:

First steel wire mounted and shaped on the servo arm ready to work as front legs

Detail of the first steel wire mounted on the front servo to work as front legs:

Detail of the first steel wire mounted on the front servo to work as front legs

Detail of the secod steel wire mounted on the rear servo to work as rear legs:

Detail of the secod steel wire mounted on the rear servo to work as rear legs

Now it's time to prepare the head of the beast. Here is the Sharp distance sensor preparing to be mounted in the plastic "T", to serve as a head:

Sharp distance sensor mounted in the plastic "T"

Here is the head of the bot with the Sharp sensor mounted:

The head of the bot with the Sharp sensor mounted

Now it's time to mount the brain with the battery:

Mounting the brain of the bot with the battery

Cheking the system with the battery:

Cheking the system with the battery

Beware the version of you Beetle as maybe you have to change the Power and GND cables (red and black ones) at the distance sensor connector. I didn't so I fried the sensor. We'll see later what where the effects. To change these cables, a fast way is to use a small flat screwdriver and pull the red or black cable and push the metalic connector's end. After several tries you have both off and you can swap them.

Here the board and battery mounted on the bot, with the servos and sensor connected:

Board and battery mounted on the bot, with the servos and sensor connected

As the end of the legs are sharp, I though it's convenient to put some rubber band on them. On this way the robot's legs don't damage any surface when walking on them, and the bot has more traction. First the base:

The end of the legs are sharp, I though it's convenient to put some rubber band on them

Then the rubber itself. Here is a detail of the end of the leg finished with the rubber band (at the rear a leg without rubber band):

Here is a detail of the end of the leg finished with the rubber band (at the back a leg without rubber band)

After three iterations more, the four legs are finished:

The four legs are finished

So now the Insectbot Mini is finished from the hardware part:

Insect bot finished

You can see the legs look a bit different on shape also. It's because lowering the bot's gravity center, it has more stability when walking and climbing small obstacles. Now it's time to program the bot. There are several possibilities, but I wanted to try an easy one: the Ardublock enviroment. To work with it I had to install the Arduino IDE from its website, and install it. It's very easy on Windows enviroment. There are also versions for Linux 32 and 64bit, Mac OSx, also the source files:

Arduino IDE start screen splash

This Arduino IDE is an open software, and it's the base to write the bot's program, connect and program it. But this programming software allows to use some interfaces that make very easy to program, like the Ardublock one.

So then I had to donwload and install the Ardublock tool from here. I found very useful the programming explanations in this blog, as it use the same Insect bot I'm mounting right now ;-) so I downloaded it too.

After installing everything it's time to launch the software Arduino IDE. As you can see It's in Spanish language as it's a bit easier to me, but it's in several languages too, also English language of course:

Arduino IDE main screen

The I oppened the Ardublock tool going to Tools -> Ardublock, and loaded the example I downloaded from the above blog (save this archive with other name so you can have a backup just in case):

Ardublock screen with an example

On this way, even I don't know anything about the Arduino platform or programming I can start to manage it. So I connected the USB cable to my computer and my blot, and I downloaded the program to the bot. Maybe you have to change the serial port to communicate with the bot. You can do it from the Arduino IDE -> Tools -> Serial port and choose the one that the bot is connected. Usually there are two: COM3 (that comes as default) and another one where the bot is connected.

After a few seconds the robot came alive! It was a very nice feeling to see the robot moving. As I can't use the distance sensor, I changed the program so the robot just go straight.

Final tips:

When the battery is over, you can charge it with the simple battery charger the kit brings inside the battery bag:

 

So you just have to connect the battery to the charger's connector and the charger to your computer's USB port:

Charging insectbot battery from the USB port with the battery charger

This is the battery charger that includes the kit:

The battery charger that includes the kit

Charging the LiPo battery is not as straight forward and it is for other batteries. You need the right charger, like the one that brings this kit. So be careful If you want to change the battery charger.

You can tune a bit the software like giving speed to the bot. To do that just go to the Insectbot library called "InsectBot.cpp" (and located at C:\Program Files (x86)\Arduino\libraries\Workshop or similar one) and open it with a text editor (save this archive with other name so you can have a backup just in case):

Insectbot library edited with notepad to increase speed

And change the "walkSpeed" variable that tells the speed in milliseconds (10^-3 seconds), to a value that can be smaller (faster) or higher (slower). With 5 milliseconds of walkSpeed the Insectbot covers 1 meter in 25 seconds, so it runs as fast as 144 meters/hour... if the battery could last one hour, but it last usually several minutes at that high speed :-)

Update: I uploaded a new video with the robot walking with a speed of 5 milliseconds of "SpeedWalk". It flights!

I attached the file in this article for your convenience. I uploaded here also a simplified version of the Insectbot program to make it walk forward, called "insectbot-mod-solo-adelante.abp".

However, I find very useful this kit, as it allows to anyone to get hands on the robotics world from every point: mechanics, electronics, programming and strategy routines for movements and robot decisions.

Now I'm waiting for the Sharp sensor to test again the robot with full programming. I'm planning also some variations on this robot, some are small, and some include extra hardware and software. We'll see... (Please read the updates at the top of this post, as I tested the robot with a new IR sensor sucessfully).

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

As I was checking small board for my summer project with a very small Wall-e toy, I remembered the Beetle board.

And of course, I was wondering if I would order a pair of insect bot too just to have fun with my son :)

Your nice description push me to check where I will buy those :)

(and I was pleased to see 'by Lumi' on the shield :) )

Hi!

Thanks TitiMoby. It's great that you liked my description. I hope it's clear enough also some modifications that make it faster ;-) Those Lumi's robots are great to start in robotics even for children.

Please drop some lines and pictures (or even better videos) about your experiments.

Kind regards!

Hi all!

Just to tell you that I uploaded a new video with the insect bot moving fast and its new IR sensor! ;-) Have a look and tell me what you think about. Thanks!

Well done. Congrats on completing the kit build.

I would mention you could have loaded the .cpp file into the arudino IDE and it would have been formated in a more sane way. :)

.cpp is the filetype for C++ programs. The arduino language as I understand is a bit of a bastard child of C, C++, and, for lack of a better name, arduino. Either way cpp files and ino/pde files will look similar in thier layout. C++ and its ilk are not so concerned with whitespace (spaces, tabs, and newlines [ENTER/RETURN] ).

Notepad++ and GEdit are 2 alternatives aswell, plus they will preserve the original newlines which notepad has just thrown out the window :P

Hi 6677!

Thanks for the suggestions! I have downloaded the Notepad++ to eddit these files.

Kind regards,

Francisco

Hi birdmun!

Thank you for your feedback! I'm not very used to the arduino IDE not to the C, C++ ones. I'm starting with these tools and I went directly to the Ardublock tool which I found very useful and strightforward ;-) I know that's no the best solution to control all programming aspects for robotics, but I think I can start with it to jump to the standard IDE as soon as I have some projects working.

Ah! Did you see the last video I uploaded yesterday? The little bot is running like crazy ;-)

 

Kind regards!

Francisco

Hello Francisco,

Congratulations on building a unique Insect Bot mini. As Lumi stated, we do know that the robot can have many different ways of assembly.

I really liked the legs and the antenna. That was a clever use of wire ( if I see correctly) to give a real-life effect to the robot.

Best Regards, and good luck on implementing further ideas of your own! ( As you mentioned using more servos, that's a great idea to take the robot's movement up a notch)

Ashim

That's a very extensive review Francisco :) I've read it with great interest as I also have an Insect bot kit waiting for me. One remark about the battery. Are you sure it's Lipo battery? I thought it uses a lithium-ion battery.

Hi Bajdi,

So you will receive another baby Insect bot kit! Congratulations!

I think you will have greate moments with it, and I hope you can do something special ;-)

Yes the battery is a LiPo one. A very powerful one by the way. It's small and light weight, but enough for the two micro-servos, the board and sensor.

I'm waiting for your review. Good luck!

 

Kind regards,

Francisco