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
responsibility.

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 simple..my 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
54.3%
45.6%
Programming (C#)
66.6%
33.3%

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
11000
20100
30010
40001

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
11000
21100
30100
40110
50010
60011
70001
81001

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
11100
20110
30011
41001

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.