Monday, December 31, 2007

Happy New Year, 2008

This image was created by my brother, Amrit Derhgawen (he's a character animator) :)

I wish all of my readers, be they regulars or new ones, a wonderful New Year with lots of whatever they like. May the year 2008 be in every aspect a better year than 2007.

Have fun! See you in 2008!

Best Wishes,

Tuesday, November 27, 2007

Possibility of misuse?

Here's a comment I received on my Cell Phone Controlled Door Latch post the other day:

Anonymous said:

Nice....wonder how many innocent people died because
you posted these easy
to follow directions for any Islamic Extremist to
build a command IED on your
site. You are obviously a very intelligent
person with either, no common sense
or no
sense of

I appreciate his/her concerns, and they are valid to some extent. To be honest, I was aware that my "easy to follow directions" could be followed for doing much more than just opening a door. Then why did I write about it? Well, like a coin, everything has two sides - one is the good side, and the other is the not so good side. There is already tons of information on the Internet on making bombs and weapons of mass destruction. Does this mean that the Internet should be shut-down..and people should stop sharing ideas with each other? I don't think so. If we stop sharing ideas to stop terrorists from misusing them, no one will be able to make good use of them either. Besides, this is what terrorists want..they want to create an atmosphere of insecurity, mistrust and terror. If we stop sharing our ideas to keep them from getting into the wrong hands, they will succeed in their mission. Moreoever, there are several scientists and engineers who work for these extremist groups. I'm sure that building a simple DTMF decoder wouldn't be difficult for them.

So relax, and be happy. My little door opener cannot worsen the already dire situation of our planet, let alone killing innocent people. :)

- Ashish

Wednesday, November 07, 2007

Object Tracking using Camera and Lasers

Hey folks! Here's a little something I built about a month ago, but couldn't get enough time from college to write about it. Well, it's an object tracking camera panner which tracks any object moving in close range. Unlike my previous method for object tracking, this technique will track almost any moving object, irrespective of its color, using two lasers for edge detection. Depending on which laser is focused on the object, the computer decides which direction to drive. I came up with this idea after watching a video on SoR (Society of Robots) of a sumo robot, called Stampy. Stampy uses a single IR rangefinder for edge detection. Watch the video below:

I used lasers instead of IR rangefinders. My initial plan was to use a single laser..but then it occurred to me that I would have to shake the laser left/right continuously for tracking the trailing edge of an object. So, I decided to go with two lasers instead of one. :)

Well, I guess I've finally put my computer controlled stepper motor to some use. I might be using this object tracking technique in my future projects as it's working very nicely. If you're interested in controlling stepper motors with your computer, read my new article on Coding4Fun. Enjoy! :)

Friday, October 12, 2007

I type a LOT...

...and I type fast. That's why you can't see most of the alphabets on my keyboard. Like most of you reading this, I can touch type. People who believe in two-finger-poke typing, always complain how difficult it is to use my computer.

You can learn a lot about letter frequencies by studying my keyboard. If you look closely, you'll notice that "P", "V", "G", "Z", "X", "V", "W", "Q" and "B" are the least commonly used letters. I compared my observations against the letter frequency chart on Wikipedia to check if my observations were correct..but I realized that "J" and "K" were also very rarely used. However, on my keyboard, these two letters have been wiped off completely! Why?? Well, the answer is index finger and middle finger rest on those keys when I'm not typing.

If you click on the picture below, you'll notice some more startling facts:

I guess I use the Enter, Backspace and Delete keys a lot too. It also seems that I use the right Shift key more than the left one. Humm..I wonder if everyone does that.

Well, it all comes down to this...I should buy a new keyboard.

UPDATE: I did some experiments today to check which Shift key I use more often. Here are the results:

ActivityLeft Shift Key
Right Shift Key
Writing E-mails
Programming (C#)

When I'm writing e-mails, I use both of the Shift keys. However, I use the left one more while writing code. The right shift key on my keyboard is slightly smaller than the left one..and I'm pretty sure this is the reason why its entire surface has been wiped clean by my pinky.

Thursday, September 13, 2007

Computer Controlled Stepper Motor

A few months ago, I bought a stepper motor for only Rs.75 (about USD $1.50). I had almost forgotten about that motor until I found it lying in a secluded corner of my bedroom, collecting dust the other day. I searched the internet for information on controlling stepper motors with a computer and I was surprised at how easy it was! My stepper motor has five wires, and it is a unipolar stepper motor with a step angle of 7.5 degrees.

Here's the simple circuit I had used for controlling it:

(Note: If you can't find ULN2003, you can simply use use a single transistor for each winding as shown here.)

As you can see in the diagram, each successive coil in the motor is connected to successive data pins on the parallel port. If the coils are not connected in the correct sequence, the motor will not rotate, but will only wiggle from side to side. Identifying the wires on the stepper motor was probably the only time consuming step. Click here for information on how to do this.

Now, since each coil can be programatically controlled, you can experiment with different types of stepping modes. The simplest stepping mode is called Single-Stepping. In this mode, each successive coil is energized and the motor moves one full step at a time. For example, my motor will make a full step of 7.5 degrees whenever the coils are energized in the following sequence (D0 - D3 represent parallel port data pins):

Step No.D0D1D2D3

Another interesting stepping mode is Half-Stepping. The difference between single-stepping and half-stepping is that for the same step rate, half-stepping gives you half the speed but twice the resolution of a single step. Since my motor has a step angle of 7.5 degrees, half-stepping it would result in approximately 3.75 degrees of rotation. Here's the sequence in which coils are energized for half-stepping:

Step No.D0D1D2D3

You can achieve other types of steps by energizing the coils in different ways. For example, here's how high torque stepping works:

Step No.D0D1D2D3

For more information on these stepping modes, read this article.

My program allows me to control the motor with the scroll wheel on my mouse and I can press the right mouse button to switch between different stepping modes. Watch the video above to see it working. I'm still thinking of ways to use this stepper motor with my projects. I guess I could use it as a camera panner. It would be better, efficient and more compact than my floppy drive camera panner. My floppy drive camera panner could only rotate through an angle of 45 degrees because of mechanical limitations. This stepper motor can rotate a camera through 360+ degrees!

Here's something interesting I found while googling - Neil Fraser's "Computerized Etch A Sketch". Neil has used two computer controlled stepper motors for turning the horizontal and vertical knobs on an Etch A Sketch. His work is just amazing! I just wish he posted some videos of the device in action.

Sunday, August 26, 2007

Whistle (or scream) to control your computer!

Hello Readers!

It has been a long time since I wrote my last blog post. Well, I had been busy with a lot of things – like college, harmonica playing, meeting people, (and not to mention a whole host of fun, yet unproductive things I had been doing). Oh, and I was also busy reading, discussing and thinking over the last Harry Potter book by J.K. Rowling. Harry Potter and the Deathly Hallows is stunningly beautiful. I loved it. :)

Well, anyway … I’m always in search for alternate ways to communicate with computers, and ever since I built a sound sensor for my Viper robot, I was thinking of ways to communicate with my computers using sound as a medium. I figured out how to use DirectSound to read the levels of my computer’s available sound capture devices thanks to a wonderful example by Jacob Klint over at CodeProject. I’ve written code to count the number of times the sound level of my microphone exceeds a certain threshold for controlling a few things on my computer. Say, for example, if I whistle two times (loudly), the software would check my email. If I whistle three times, it would turn off my computer, and so on.

The drawback is that it won’t be long before everyone in your house will be irritated by your whistling! That’s why I still prefer laser gesture recognition for controlling things. :) However, if you’re interested in seeing the code, just let me know.

Now, I’m thinking about capturing sound from two sources and perhaps even perform sound localization! That would be very cool. :) Keep visiting...

Tuesday, July 17, 2007

Cell Phone Controlled Door Latch

Download Video (1.78 MB)

I’ve been reading a lot on how DTMF (Dual Tone Multi Frequency) tones work over the last couple of weeks. I’m sure you’ve noticed that when you press the keys on a standard telephone keypad, an audible ‘beep’ is generated. These beeps are actually the combination of two distinct frequencies. For example, the tone you hear when you press the number ‘9’ on a telephone, is actually a combination of a 1447 Hz and 852 Hz signal. In a telephone exchange, these signals are decoded by a computer which finally connects the dialer to the designated phone line. For example, the tone of 1447 Hz and 852 Hz will be decoded as binary ‘1001’. In this project, I have designed a simple DTMF decoder circuit which allows me to control appliances in my house from any place on Earth using a telephone.

I always wanted to be able to control things such as air-conditioners, lights, etc, remotely…but I never thought about putting the front door of my house under remote control until I saw this “knock to open” door hack on Hackaday. It’s a door that will unlock when the correct knock pattern is performed. After being inspired by the mechanical door opening system in that hack, I decided to do something similar to allow me to open my door with a cell phone! I mean c’mon, door locks with keys are obsolete..everyone uses them..they’re so old fashioned! They’ve been around for over 4,000 years. Yikes! It’s time for a little change.

This project would have been much simpler if I had an electronic door lock…but I didn’t! They’re expensive, so I didn’t want to buy a new electronic door lock. I wanted to open the front door of my house without “seriously” modifying/replacing any door components. I thought about using a servo/stepper motor to twist the door knob on the door, but their control circuitry is slightly complicated if you’re not using a microcontroller. So, I decided to use a simple, 24VDC, “pull solenoid”. They don’t have any complicated control circuitry and you just have to supply the required voltage to make them work. I simply fastened the solenoid to the door knob with a metal wire. When the solenoid is switched on, its linear motion twists the door knob and opens the door. Positioning the solenoid properly was probably the only mechanical challenge in building this door opener because the force applied by a solenoid, is theoretically inversely proportional the square of the length of the air gap. Thus, strongest force is generated when the air gap is smallest.

The second part of this project was to build a DTMF decoder circuit. I used a CM8870PI tone decoder IC for doing this. The circuit I have built is fairly simple, and can be used for controlling up to four devices. If you want to control more than four devices, check out this circuit. I had a Nokia 1100 cell phone lying around with a hands-free accessory which was rarely used. So, I hacked its hands-free accessory and connected it to the circuit (I just cut the wires which went into the earpiece). That’s about it! To control things in the house, you just dial into the base station and the Nokia 1100 auto-answers the phone call. Each function is just a matter of pressing the appropriate number on the phone and the DTMF chip decodes it and sends output to a transistor which controls a relay. To open my door, I just dial the phone, enter the magic code and voila - Alohomora! Watch the video above. :)

Now I’m thinking about building a password protected door by placing a keypad outside my house which will generate DTMF tones. A circuit on the other side of the door will check the numbers entered, and if the password is correct, it will open the door. However, there’s one little snag. Any nasty programmer would just love to use a computer to generate DTMF tones and crack the password using brute force…I would. :)

Monday, June 11, 2007

Pong Playing Computer playing against another computer using a webcam as an eye!

Download video (5.54 MB)

Several years ago, when I was a stupid little schoolboy, I created a really fun and addictive game called Ping Pong. It was based on the classic arcade game, PONG, and had some cool features like gradual speed increase, two game modes, and some neat sound effects.

I had almost forgotten about that game until I saw this auto wood-chopper project in which a computer plays a simple game on a PSP using only a webcam to view its screen. I thought the idea was pretty good. So, I decided to make my own computer play that old pong game of mine on another computer using a webcam for vision! I fired up my code editor, and after several hours of coding and experimentation, my image recognition code started looking good. It uses edge detection to determine the boundaries of the ball and the bat in the webcam’s field of view. The area of the ball is more than the bat, so that’s how it differentiates between the two. The other steps are more or less similar to the things I did for my object tracking app. Like the auto wood-chopper dude, I thought about using motors to press the keyboard keys on my laptop. However, I thought it would be overkill when I could write a simple TCP client/server program to establish communication between the two computers.

Be sure to watch the video above! I’d love to hear what you think. Oh and here’s a similar project in which a computer plays Minesweeper on another computer using a webcam – wow!

You can download my fun Pong game from here. (1.20 MB)

This was a very exciting project. In my opinion, one of the coolest webcam based projects I’ve done so far. I entered the world of webcams after working on CamCapture – a project based on a Coding4Fun article by Scott Hanselman. :) Webcams are fun but I sometimes wonder why they’re called Webcams. I never use them for online video conversations! In my opinion, they should be simply called USB cameras. :)

Opto-isolated Parallel Port Driven Relays

A few months back, I made a parallel port driven relay box for Engineer 2007 with four outputs which were opto-isolated from my PC. Since I didn't have opto-isolators, I built my own by taping LED/photoresistor pairs together. It worked perfectly.

I also combined it with laser gesture recognition to turn four appliances on or off using a laser pointer for Engineer 2007. I guess everyone loved it. :)

If you can make pcbs, and are interested in a simple little circuit
to provide opto-isolator protection to 4 parallel port inputs, and relays on the other 4 bits, as outputs, then check the offer on....

... which is a little way down the page, next to the Google panel, in
the paragraph starting "I have a third generatino, inexpensive...".

Wednesday, May 30, 2007

Viper Ear: Sound Sensor for Microbric Viper Robot

Hello readers!

It’s been a long time since my last blog post. I was a bit busy and wasn’t getting time for blogging. Anyway, I did something cool and thought you people would like it. I’ve been working mostly with webcams over the last couple of months. I wanted to do something different for a little change and found sound a very interesting way of communicating with robots/computers. I created a sound sensor for my Microbric Viper Robot to give it the ability to respond to claps and whistles. I had to work extra hard on this project as things weren’t getting done as quickly as they usually do. The basic idea was that the sensor would send the PIC a logic 1 if the loudness of the sound coming in to the microphone exceeds a certain threshold and 0 otherwise. So, the sensor compares the microphone voltage to a reference voltage, and sends a logic 1 if the microphone output is higher (however, my signal is inverted because of the way I set up the op-amp as a comparator in my circuit). I had to experiment a lot on a breadboard before I had the circuit working perfectly. Here’s the final circuit I ended up with:

Since I didn’t have an oscilloscope at home, I turned my computer into an oscilloscope by using PC-Oscilloscope by Christian Zeitnitz. This software works with a sound card. It doesn’t have a fast sampling rate, but it’s good enough for testing this circuit. Parallel port based oscilloscopes are probably a little faster, but I didn’t have time to make one. In the oscilloscope, the signal from the sensor is a nice series of sharp spikes.

In the video, you’ll notice that I clap several times to control the robot. The first clap I make is only for initializing the clap counting algorithm in the program. After the first clap, the robot counts the number of times I clap my hands during an interval of 2-3 seconds. For example, if I clap once (after the initializing clap), the robot either moves forward or stops, depending on its state. If I clap twice, the robot turns left. Three claps make it turn right. Sometimes, the sensor also gets triggered from motor noise. So, I have to adjust the preset in the circuit to get things working perfectly. For extra reliability, the robot moves forward slowly to keep motor noise as low as possible. I think that programmatically distinguishing between a clap and motor noise or electronically filtering it out could also be worth a try.

This was a fairly simple project, but it took much longer than usual. Well, I have some more cool ideas for sound sensors. ;) Keep visiting!

Thursday, May 03, 2007


Colin has built a fully functional prototype for the Defcon competition, ASIMOV1, using two high torque, serial port controlled servos! He’s also got a cool circle detection code working which identifies white circles against a black background and shoots them down. Trust me, you wouldn't want to go in front of that robot in a white underwear! Check out the video above. You’ll also see a video clip in which ASIMOV1 is working as a simple laser guided gun! We’ve procured sponsorship from Pololu and ServoCity. Now, its time to get a more powerful shotgun airsoft gun for this autonomous robot! :)

Tuesday, April 24, 2007

Self Navigating Microbric Viper Robot

Hey folks,

After several days of hard work, I've managed to turn my Microbric Viper robot into an intelligent mobile robot, which moves around my house and avoids obstacles along its way! This time, I've mounted a laser based obstacle detector on top of a servo. So, now the robot is able to scan its surroundings before making a move. This project is still based on the principles working behind my autonomous RC car project. However, unlike the autonomous RC car, now more than half of the robot's brain resides within the robot itself. The part of the brain which lies in my computer makes only one crucial decision of whether it is safe to move forward or not. Based on this Yes/No decision, the robot decides how it should maneuver itself in order to avoid the obstacle in front of it. For example, if the computer detects an obstacle, it tells the robot to stop. Then, the robot starts scanning the area by rotating the obstacle detector. During the scan, if the computer finds a place with no obstacles in close range, it tells the robot to move forward again. Check out the video above to see it in action!

I've made some hardware modifications on the Viper robot for attaching the laser pointer. Watch the video below. In this video, I'm controlling the Viper robot (and its laser pointer), with a TV remote!:

The Iguanaworks IR transmitter I used in my previous project charges up a capacitor in order to provide a range of up to 10-meters. This time, however, I wasn't getting very good mileage with the computer I was using. So, I built my own parallel port controlled IR transmitter using a DVD remote which came with my PS2. :) I'm using a simple, parallel port controlled transistor switch for turning the remote on and off. On receiving any IR pulse from the computer, the robot takes action. Yeah, I admit that its a bit of an overkill, but I had to do it!

Wow..this project was kinda difficult! I really had to work hard on it and my ass is really burning.....AARRRRGGHHHH.....I feel tired..I think I'll be taking a short break. :)

Keep sending me your thoughts and ideas. I really appreciate them. In the meantime, I'll be enjoying life... :)

- Ashish

Thursday, April 05, 2007

Laser Following Microbric Viper Robot

I've been playing around with the Microbric Viper robot construction kit over the last couple of days. The Viper uses a Basic Atom microcontroller which can be programmed in BASIC. These robots can also be controlled with a computer using an IR transmitter. I'm using an Iguanaworks IR tranceiver which works with a serial port for my projects.

Well, since I love webcams, I decided to turn my Viper into a simple laser following robot! I've mounted a small wireless webcam on top of the robot. The webcam, transmits video to my computer. My computer determines the position of the laser in the camera's field of view and tries to move the robot towards it. As far as the software is concerned, I'm using a modified version of my Autonomous RC Car code. Watch the video above. I think the next step could be to mount the camera on a servo motor. That way, the robot would be able to scan its surroundings by rotating the camera! I also plan to try object tracking with this robot. That would be fun!

Sunday, March 25, 2007

Microbric Robots!

I've got my hands on some cool Microbric Robots, thanks to Scott Hanselman and Josh Richards (Microbric Pty Ltd, Australia). Scott Hanselman sent Josh over to my blog, and he got interested in the work I'm doing. He sent me two i-bot kits, two Ai2 kits, a Viper kit (with some add on packs) along with an Iguanaworks IR Transmitter/Receiver. This IR tranceiver works with a serial port and can be used with WinLIRC to send and receive IR codes used by most televisions, DVD players, and other devices. It could also be used for controlling the Microbric Robots using a computer.

The Microbric robot kits consist of soldereless, interconnecting parts, and all you have to do is screw everything (switches, motors, sensors etc), directly into the mainboard, and thats it. I built the i-bot first, because I found it the easiest to build. After everything was ready, I made the robot do some simple things like line tracking and bump detection. I-bot can be programmed by scanning barcodes, or by using its own, icon/picture based programming language. Well, after doing some quick programming, I was able to make the i-bot do some cool things like light tracking. Watch the video above!

These robots are really fun to play with and I can't wait to get started on building the Microbric Viper and the Ai2! I plan to do several fun projects with these robots once I'm comfortable using them.

Scott Hanselman has some nice Coding4Fun articles on controlling the Microbric Viper using .NET here and here. Check them out!

Wednesday, March 21, 2007

Autonomous RC Car II (with wireless camera!)

I've finally got a nice and cheap wireless camera! It cost me around Rs. 1200 (USD $24). I quickly fixed this camera to my autonomous RC car and now the connection between the RC car and my computer, is completely wireless. As before, the 'brain' of this robot still resides in my computer. If the computer sees the the car approaching an obstacle, it stops it and turns it around. Check out the video above to see it in action!

Monday, March 12, 2007


A few weeks ago, I was invited to Engineer 2007, one of India’s largest technical symposia organized by the National Institute of Technology Karnataka, Surathkal (NITK). Fascinated by some of the projects on this blog, they wanted me to explain and demonstrate how I did, whatever I did, to the students of various engineering colleges from across India.

Well, I left for Surathkal on the 5th of March. The flight took about three hours to reach from Delhi to Bangalore. Then, from Bangalore, I took a fifty minute flight to Surathkal. Surathkal is on the shore of the exotic Arabian Sea and has a very beautiful sea beach. I used to spend several hours walking along the sea shore whenever I had time. This was my first trip to South India and the thing that really struck me was that the people rarely understood Hindi (the most popular language of India)! I realized for the first time that India is a multilingual country. I had to speak in English to communicate with them. If someone didn’t know English, I had to use sign language!

The projects I decided to show were - laser gesture recognition and parallel port driven relays (I built a new opto-isolated relay box for Engineer 2007 - more information later), computer controlled RC car, computer controlled autonomous airsoft turret and some webcam projects I did over the last 5-6 months. This was the first presentation of my life and I was obviously a bit nervous at first. However, everything turned out very good and I somehow also managed to successfully solve every little problem which got in my way while demonstrating. Phew! Everyone loved the presentation and clapped whenever I did something cool - this was a big relief for me. I’ve learned a lot from this experience. I’m quite sure my next presentation will be even better than this one.

Engineer 2007 had some lectures addressed by notable people like Bjarne Stroustrup (creator of C++), Professor Kevin Warwick (aka Captain Cyborg), John C. Mather - 2006 Nobelist (Physics), Dr. Timothy Poston - mathematician and interdisciplinary scientist (picture above), just to name a few. I really loved Kevin Warwick’s stuff. I think he is most widely known for his famous work in “Project Cyborg”. In Project Cyborg, he had a chip implanted into his left arm which allowed him to control lights, doors and other computer controlled devices around him! His work on building direct interfaces between computer systems and the human nervous system are really fascinating. He also showed us a necklace he gave to his wife, which changes color to reflect Kevin Warwick’s mood! If Kevin Warwick is happy and relaxed, the mood necklace would turn blue. If he gets angry or excited about something, the necklace would flash red!

I really liked the students of NITK. They were very helpful and helped me out whenever I needed some help for my presentation or otherwise. Nothing could’ve been possible without their help. I also enjoyed watching some of the robotics events at Engineer 2007 like “Automata”. The students had to build a robot which could move through a pattern made of white lines on a black background and locate the smallest loop in the given pattern. Some of the students had built their robots completely from scratch and watching them test was really fun.

I came back home yesterday night. I’ve made some really cool friends at NITK and I’ll always remember this trip. I’ve even got some new ideas after watching the events which took place at Engineer 2007. Let’s see if I’m successful in implementing some of them.

Friday, March 02, 2007

I won the CodeProject monthly article competition! Yippeee!

Chris Maunder of CodeProject just informed me that my article on Laser Gesture Recognition has won the monthly competition for January, 2007! I'll be getting tons of neat developer tools:
In total, I get $3,119 in prizes! Wow!

I haven't been getting much time for my blog over the last couple of days. However, I've got some really cool things to write about. I'll save them for later. :)

Keep visiting!

Friday, February 16, 2007

Autonomous RC Car with Laser Based Obstacle Detector

Autonomous RC car with laser based obstacle detector on Vimeo

Hello Readers!

This is my first project with the computer controlled RC car, I made. Instead of purchasing ultrasonic obstacle detectors, I used my laser based obstacle detector with the RC car to turn it into an autonomous vehicle. The computer determines the position of the laser dot in the webcam's field of view. Based on its position on the y-axis, it determines how close the obstacle is, in front of the car. When an obstacle gets really close, the computer stops the car and turns it until it finds a place with no obstacles in close range. Check out the video above to see it in action! I apologize for the camera shakes in the video. I was finding it really difficult to do several things at the same time. Anyway, I admit that it would be much more fun and exciting if I had a wireless webcam. I can't stop thinking of the possibilities!

Wednesday, February 07, 2007

Computer Controlled RC Car

Computer Controlled RC Car on Vimeo

After working on this project all night, I've finally managed to control the RC car with my computer! I bought this cheap car from a local toy store a few days ago. I didn't go for high-end cars because, apart from being expensive, they use analogue signals to give precise speed and direction control. Cheap cars have a digital controller that uses switches for controlling left/right/forward/backward movements, and not potentiometers.

The first step was to modify the car's controller so that it could be interfaced with my computer. The buttons on my car's controller simply push down upon some micro-switches on the board, closing the circuit for controlling forward/backward/left/right movements. After identifying the 0 V ground and the active (control) points on the controller, I soldered wires to each of those points.

The next step was to build a circuit for connecting the car's controller to my computer's parallel port. My circuit is really simple as I didn't use relays. I only used four BC547 transistors as switches. These transistors, in effect, ground the controller's active points when they get a signal from the computer's parallel port.

I connected my computer's parallel port to the car's controller using this circuit and it worked right from my first attempt! The software for controlling this car is fairly simple and it allows me to control the car with the arrow keys on my keyboard. I want to share a little tricky problem which I had encountered while testing the program. When my computer tried sending two commands at the same time, like turn right and move forward, the car behaved unpredictably. Sometimes it obeyed the computer's command, and sometimes it just moved forward without turning at all. My first guess was, that something was wrong with my circuit. I tested the circuit a couple of times but it seemed to be working perfectly. I almost gave up on it until it occurred to me that my computer's parallel port was sending two signals (one for forward/backward and the other for left/right) at the same, exact time. The car's controller was unable to handle two commands together. When humans control the car with its controller, they normally don't press two buttons exactly at the same time. So, I modified my program and put some delay between all possible combination signals (like left + forward or right + backward etc) and it worked! So, now the sequence of commands for making the car move forward and left is something like: [left] -> [delay] -> [forward].

I really enjoyed working on this project. I'm really looking forward to using this car in my future projects! I plan to attach a wireless camera on the car for some extra fun. However, I don't have a wireless camera at this moment. I really hope I get a nice and cheap wireless camera soon or make a wireless link for my good old webcam. Anyway, I hope you found this project interesting. I'd love to hear your comments and ideas. Feel free to contact me if you're planning to build your own computer controlled RC car and have questions about it.


Sunday, February 04, 2007

RC Car hack

Hello folks,

Right now, I'm trying to control an RC Car from my computer. Yesterday, I bought a cheap RC car from a local toy store. As you can see in the picture above, I've already done some work on its controller. This will be a fun project as I could put a camera on the car and do all sorts of cool stuff!

Well..I hope I'm successful in controlling it. Keep visiting.

Saturday, January 27, 2007

Fun with LEDs and pattern recognition...

Having nothing much to do today, I connected a bunch of LEDs to my computer's parallel port. I've written a little program which uses a webcam to recognize color patterns, I create, by making colored dots on a sheet of paper. If I make a sequence like, red - yellow - red, the computer will recognize it as a binary 101 (red = 1, yellow = 0). So, it will turn on the LEDs in the sequence: ON OFF ON. Well, I guess this thing doesn't have much practical use. However, its fun because it feels as if I'm visually communicating with the computer in some way! I find this really interesting. Check out the videos above. :)

Sunday, January 21, 2007

Parallel port relay for playing with real world gadgets!

I've finally connected a relay to my parallel port! I got the circuit design from here. I can use the relay to control almost anything in my house. I have combined it with my gesture recognizer to allow me to control things with a laser pointer! Its fun. Using this with motion detection could also be a good idea. The computer would turn on lights whenever it senses motion. Anyway, check out the video above. I'm controling a table lamp with my computer.

I guess I could've connected upto eight relays, but I wanted to keep it simple. Besides, I might end up using a bluetooth relay board later on (or maybe even X10). :)