A log of slapdash experiments…

August 7, 2009

Gesture Controlled robot

Filed under: GesBot,Uncategorized — adwaitsdeshpande @ 2:01 pm

I had made this long time ago but I had to redo it for some demo to be given to students. So clicked a few pictures, and here it goes…

The idea is to change the perception of remote controls. As of now, remote controls are cool, small, crisp handheld gadgets which can control tons of machines. They have different coloured, shaped, textured buttons which can command machines. Well, I just removed the buttons..

Say, how would it feel to control a racing robot with gestures instead of buttons? Just wear this glove thingy which has a sensor thingy, which can understand your hand gestures. This sensor thingy will transmit an appropriate command to the bot and, well, the bot behaves accordingly..

The Sensor thingy, of course, is the accelerometer. It measures the change in acceleration. Details later..

So what I present is the most crude form of the Gesture controlled Robot. It understands only 4 commands: Go Forward, Reverse, Left and Right. Attached below are some videos.

Before I start the tutorial, let me introduce you the accelerometer.

Accelerometer is an example of MEMS. MicroelectroMechanical Systems. Which simply means, micro dimensional mechanical moving parts in small packages like ICs. So an accelerometer has moving parts inside it!

This is how big an accelerometer is.Accelerometer Size
Basically, the most common types of accelerometers are of capacitive type.

If you want more details of the inside working of the accelerometer, refer to this: http://www.ett.bme.hu/memsedu/

So accelerometers sense accelerations right? Which means it senses acceleration due to gravity too..

When I tilt the sensor, I don’t change the magnitude of the acceleration acting on the accelerometer. But I change the direction. I have used the MMA7260Q accelerometer from Freescale. This is a capacitive sensors and gives an analog voltage proportional to the acceleration.

Most of the sensors can sense acceleration along all 3 axis. Mine does. So I have 3 analog voltage outputs.

Here are some considerations to make while choosing an accelerometer:

Sensitivity: The sensitivity of accelerometers can be programmable. The unit is generally G. 1G means the acceleration due to gravity. The highest sensitivity I have seen is 1.5 G. So a slight movement can be detected with this G setting. To sense sudden shocks, we will have to use the 10G setting.

Output: Many sensors can communicate in a protocol like I2C/SPI. Use them if u plan to use more than one sensors. Otherwise, simple analog voltage outputs are ideal for small projects.

My MMA7260 has the following values:

Sensitivity: Selectable 1.5g/2g/4g/6g

Output: 3 Analog output channels (for 3 axis)

They way an accelerometer is used is like this. When no acceleration is applied on the accelerometer (or equal acceleration from both sides), it gives a voltage output which is at the mid point. Since MMA7260 works on 3.3V, this value will be 1.65V.

When u tilt the Accelerometer on one side, the reading will increase from 1.65V to 3.3V.

When u tilt it on the other side, the reading will decrease from 1.65 to 0V.

Same for the other axes..

Now, all that said, here we go….

Things u’ll need:

Parts List

A robot chassis with 2 DC motors.

An accelerometer circuit.

A motor driver circuit (I used TRI’s Motor Driver Board)

A microcontroller circuit. (Try to use a microcontroller with inbuilt ADC, this will simplify the circuit. I have used TRI’s miniAVR iBoard which has an ATmega8)

mini iBoard with accelerometer

mini iBoard with accelerometer

Power Source. Batteries sound better.

Interface between Microcontroller and Motor Driver. The microcontroller-Accelerometer circuit will be in your hand and the motor driver will be on the robot. The interface can be wired/wireless. I made wired coz at that time I did not have a reliable RF-Module, plus wired remote control really simplifies the project.

I could give you the circuit for each component but it really won’t help a lot coz mini iBoard is really a general purpose development board and Accelerometer and motor driver circuits are well explained in respective datasheets.

The motor driver circuit was assembled on the bot as shown. The accelerometer circuit fits directly on the mini iBoard. An FRC Cable sends signals to the motor driver board on the bot.

The reason why every thing looks so compatible is because I had designed this for a workshop on advanced sensors. But, hobbyists can do this on a breadboard itself.

Here’s the algorithm for the code I burned in the microcontroller.

Flowchart

Flowchart

The reading I get from ADC is a value between 0 and 255 which is proportionally scaled between 0V and 5V.

I have compared the X axis value with X-reference +10 and X-reference-10 on purpose. This gap of 20 will not be in the active region. Meaning, the bot will do nothing in when the X-axis value is near Xref. This adds a little control to the robot. Otherwise the robot will constantly be moving, making it difficult to control.

I think I have given a feel of the gesture bot and fairly proved that it is as easy as making an obstacle avoider or line follower.. I may improvise my bot with speed control and wireless interface..

BOT

Am I missing anything? Lemme know..

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.