Linkedin

Powered by Blogger.

Labels

Wednesday, May 23, 2007

Online Gun


The world of the extremely bored technician

How a tech nut thinks
By : a tech nut of note

Without a challenge, a keen inquiring mind gets bored in an instant. An ever, advancing level in the challenges faced is what keeps this certain breed of technician from becoming insane. Like a junky awaiting his next fix, the tech nut awaits his next biggest challenge. The one hardly finished before the next has to be found.

The result of this weird addiction
One of the main features in the tech nut’s repertoire of rare and mostly fascinating ideas and projects is the ability, to stun people into silence, make the audience applaud with enthusiasm or most often laugh out load and to his face.

The latter reaction is what has greeted this tech nut in his latest venture. In his quest to find the most interesting and exciting elusive challenge he wondered into the world of the insane when he decided to conquer the real outside world, spoken about in many circles, but only with vague insinuations and rarely with any conviction, with the ever popular phenomenon, known to the uninitiated only as the internet, web and ultimate source of entertainment.

In order to capture an audience that, to say the least, is as fickle as fate, must be the ultimate challenge. Well with a good dose of imagination and some really way out mental glitch, he came upon the idea of shooting via the internet. Not just any shooting mind you, a real live gun that makes a noise and is likely to hurt if aimed at you.

Gripping stuff

Once it had taken post in his mind it began taking root as the idea twisted him this way and that. Not letting go of him until he had totally given in to the idea. What was he thinking? What would his wife say every time the shots rang out in his living room, never mind the mess that would be his living room while he struggled with the very fabric of existence as he slowly painstakingly put the pieces of this very extraordinary puzzle together?
This is it, the tech nut’s delight
The number of challenges facing him began to mount. What gun? What will they shoot? Where will the funding come from? How will it all work? (obviously secretly delighted that he had managed to figure out a problem that would keep him solidly busy for more than a day) Why – oh don’t bother, “Why” does not figure in this equation.
One of the most difficult things to figure out, would be to make this so called online gun do what the demanding audience would require of it to do.

Given the fact that the very idea of guns scares off so many people that it might have been insane to even contemplate such an idea, he nonetheless decided to give his full and undivided attention to this man made problem.

This is his story
Seen from the eye of the average Joe, this may be the time to put down this article and leave it be. It can’t be worth anything as it is not marketable. Maybe not, but it sure is interesting. Ain’t it.

How Pellet Cam is set up
The real nuts and bolts stuff

This is a highly technical story due to it’s complexity and therefore is not for the faint hearted. It may however be the light that you have been looking for. I doubt it but you never know. Also please take note that the project is not entirely finished yet as it is still lacking a bit of funding for various items. It should however be finished on schedule within the next two to three weeks.

The technical idea behind it all
The idea is to have a gun that can be maneuvered via the internet. It can be made to point at a target and actually shoot a projectile in order to hit the target. There is no prize, there is no glory, it is just to give you that feeling of touching something out there without physically being there to do it.

The original idea was to use a pellet gun, but due to the fact that I keep on getting the question of “When is it going to be ready so that we can shoot the darn thing?” I decided to use an easier implementation that would not require a fully automated loading tray. The actual work that goes into manufacturing this sort of tray would not really be compensated financially at the end of the day, and due to it being wholly self financed the shorter route has been taken. Of course a a tech nut I would still like to do this and now have the time to actually really go into it while the people still have the ability to shoot.

The idea behind it all is of course that in order to sell anything or advocate any sort of ideas via the internet, one has to have an audience. Well this may just bring that audience to my web site.

The gun is a semi automatic paintball gun with a remote Co2 tank that allows it to shoot 1000 rounds without being refilled or manipulated in any way. This is a cheat obviously due to the fact that every 1000 shots I will still have to replace the cylinder but I was not prepared to go through the cost of actually automating that as well.



A laser site (that incidentally comes from a real gun and was purchased in South Africa in December) is placed on the gun so that the users can view the position of the gun. The laser points to the targets and the idea is, where the laser points is where the projectile will hit.

The targets consist out of a number of metal plates, which are also customary in a normal shooting range for close range shooting. The plates have micro switches that are activated when they are hit. This allows me to keep an electronic score over and above the visual realization that the targets have been hit.
There is a camera that provides a constant visual image to the user that is currently shooting. They can therefore see the targets as well as the laser which points to the targets.

The main electronics behind it all
In order to make all the parts move, a web server is needed that will be able to translate the users requirements into actual movement of the gun.

For this purpose I went scouting on the internet and found the perfect partner that would be capable of achieving my goals.

It is to be found at http://www.bcl-online.de

The web server shown above is a totally self sufficient unit. Other than the power supply that is connected to it, there is nothing else needed to host your sites. It does not have too much space obviously so it should be carefully designed in order to maximize the experience for the user. In order to achieve this I am currently using Flash. The Flash files are relatively small and achieve a lot besides being easy to create.

A web server alone, is nothing!
In order to move the servos that are connected to the gun’s mechanism the web server has to talk the language spoken by servos and other interesting objects.



The humble servo, used by the average hobbyist is one of the most versatile items to use when it comes to automating machines (it is relatively cheap as well), of course when it came to finally purchasing servos I soon realized that the average servo was not going to be able to hold the weight of this large paintball gun which weighs a considerable amount when loaded with 200 paintballs.



The servos I chose eventually turned out to be digital servos which meant that I need to buy a digital servo programmer as well (I see a new project to begin on straight away – a computerized digital servo setter upper). They cost a fortune but are capable of lifting 20 kilograms without breaking a sweat. Also the gear trains are supposed to be unbreakable. I sure hope this is the case as the success of this project is riding on that factor.

A language unlike anything we know
The servo needs to have a signal that is given at specified intervals in order to move. This signal needs to be between 900 and 2100 microseconds and needs to be repeated every 20 milliseconds. Now, actually this should be no problem as any computer is capable of producing these types of PWM (pulse width modulation) pulses through careful programming of a few timers.

Well in actual fact it turned out to be a nightmare. I created something in Delphi and it worked fantastically, on one servo. I needed at least 5 to work simultaneously. So what to do.

I finally ended up wading through several hundred web sites each professing to have their own servo drivers. Most of them would handle one or two but no more. Finally I got a subscription to the Elektuur which is an electronic magazine here in the Netherlands, and checked out hundreds of articles till I found the correct circuit. It had to be done electronically as it would leave the microprocessor free to do the rest of the work as well as move the servos when it was required.

I first tried making the Printed Circuit Board (PCB) and after a few tries I let some company make them for me at a ridiculously low cost, even less than the cost of the items I had purchased just to make 1 PCB.

The basic idea was that the web server would talk I2C to the servo controller and tell it to move to the correct positions and the electronic controller would translate this into the correct signals required by the servos.

0 comments: