Let's Make Robots!

Hacking your K'nex or Loz building system to build robots

Attempts to dominate the lounge room
AttachmentSize
Roomba_Fighter.zip2.34 KB

I want to teach my seven year old son about robots. Lego Mindstorms is a cool system but way too expensive. K'nex is much cheaper and makes a great robot building system for kids that can be used with any micro controller.

I am using a Micro Magician as a controller since it has servo connectors, dual FET "H" bridge, 3-axis accelerometer and IR receiver buit in. This means my son does not need to wire anything up and the reverse polarity protection makes it pretty hard for him to damage anything.  Since the controller is low voltage, same as the K'nex motors, everything runs happily from a single 4.8V battery pack.

The geared motors that come in these kits include a space for 2x AA batteries that is perfect for installing additional circuitry. Because I want to control them with a controller I have removed the switch and installed a control PCB from a servo that stripped it's gears. I've converted the board to continuous rotation by replacing the 5K pot with 2x 2K7 resistors in series and added an optional 470uF capacitor across the power connections to reduce any power surges when the motor starts up or changes direction.

As I am using a Micro Magician for my controller and it has a dual FET "H" bridge built in I have wired two motors up without the servo control PCB. All my motors and sensors are wired with a standard servo connector so that I can use servo extension cables when required. This means the size of my robot is not limited by the length of my cables.

I could not find an easy way to connect a servo pot to the geartrain of these motors and I wanted some normal servos so after checking the dimensions I found I could make standard sized servos fit into the Knex framework fairly easlily.

I used some self tapping, flange head screws and washers to mount some Knex parts onto my servos and then the servos can be easily integrated into the Knex robot body.

Although the Micro Magician has a built in 3-axis accelerometer built in that can detect impacts I decided to add some standard micro switches as bumper switches. The main problem with using the accelerometer for collision detection is that collisions with soft objects may not register.

I have soldered my positive wire (red) to the N.O. connection and my ground (black) to the N.C. connection. My signal wire (white) goes to the switches common connection and is high or low depending on the position of the switch.

NOTE: I was in a hurry when I made these so I did not solder in any current limiting resistors. It is a good idea to solder a 4K7 resistor between the positive wire (red) and the N.O. connection. Another 4K7 resistor should also be soldered between the ground wire (black) and the N.C. connection. This will prevent any damage if the switch is accidentally connected to an output pin.

The micro switch is just held in place with cable ties but could be more permanently mounted with self tapping screws the same as the servos if required.

Mounting your controller is the easiest part. K'nex blocks offer plenty of holes for screws or cable ties to go through. I have left a hole in the front of my robot to easily access the Micro Magician. This also leaves the IR receiver facing outward to detect signals.

I found it didn't really matter where the IR receiver was placed if you are using the robot indoors. If your TV remote has good batteries then the receiver can detect the signal reflecting from the walls and ceiling.

Add some batteries and simple code from the Arduino IDE and the result is:

DEATH TO ALL HUMANS - BITE MY SHINY METAL ASS!

I have attached my code. Originally this started out as a simple "Roomba" style robot after my son saw a demonstration model in a store and wanted us to buy one. It just played music through the drive motors and then used the bumper switches for a simple bump and turn routine.

That part of the code is still in the fighting robot which means, although remote controlled, if you hit anything the robot will back up and spin around while waving it's arms in the air.

The rest of the code allows you to use the TV remotes cursor keys to drive the robot around. The numeric key pad is used to control the arms with 1,4 & 7 raising, centering or lowering the left arm while 3,6 & 9 do the same for the right arm.

Pressing 5 on the keypad will toggle berserker mode on or off. Berserker mode causes the arms to go up and down automatically which assuming you give the robot some swords turns him into a dangerous opponent.

 

Comment viewing options

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

Until the video embedding can be fixed I have posted a link at the top of the post.

You really need to see it-not just because it's a really great robot that works impressively well, but because it's adorable and funny. OddBot's son Shi Sen is as cute as they get and he's actually fencing with the robot! Monty Python fans especially will appreciate the Black Knight aspect. As OddBot put it in he shoutbox, the robot would still be hopping around on one foot claiming "It's only a flesh wound!"

What an awesome, inspiring robot post!

Hopefully a few Dad's will give this a go for their kids.

It only takes about an hour to upgrade a few motors and wire up a few switches.
Most of us have some broken, standard sized servos with stripped gears laying about.

Servo extension cables are a must have item. Not only for making bigger robots but also as a source of cables with headers. Just cut off the end you don't want and solder the wires onto the switches, LEDs etc.

 

I can see a more detailed instructable coming in the next week.

Wow what a great robot, I love it.  I have never seen the K'nex building set before.  I see the Robot Apocalypse is getting into full swing ...LOL.

Do you want to be Dread Robotic Overlord of the Western Pacific zone?

I recently got IR working my first robot, Ajax.  I notice the sensor has a view angle of 45 degrees.  I am thinking about building a "crown" for the second robot using 4 of the sensors placed in a circle.

Great minds think alike, I use the ...exact ...same... buttons... to move the left and right arms that you did ...LOL.

Its a great robot, but I would keep an eye on that cactus, he looks like he might be considering an alliance against you.

 

                            Masterpiece as always,

                                              Hal

 

Actually I would like my son to become "Dreaded Robotic Overlord of the World" but I will settle for him getting a good education. As you can see in the video, my son was forced to make repairs after ripping the robots arm off so you could say his engineering career has begun.

 

I didn't see the video until you mention it then I find it in your youtube channel. Nice one Oddbot. I can see your love from your son.

Unfortunately LMR is not displaying the video at the moment. Hopefully Frits and Hugo will solve the problem soon.