Tuesday 29 April 2014

NES Zapper Hack

So after a Clear out of the shed (freeing up ALOT of space), I found Some old Nintendo Controllers and a Zapper. The Console had long since gone after I tried to repair it and got nowhere.

After a quick browse on ebay to see what I could get them, I found that it's flooded with the buggers and any that do sell don't go for a great deal anymore; not worth the insertion fee or postage.

So I had a brainwave, turn it into a toy!

I had the idea of changing it so it 'fires' a beam of light out the end with a pull of the trigger!

A Laser source is out of the question here! I don't want me lad going blind! Also I didn't have one in my spares box...

But I did have a clear, 10mm, RGB LED wired up already from another project, so that'd do! I also had a PP3 (9V) battery plus a clip for it, so I'd base the design around that power source.
NEZ Zapper with Lead cut off, Hugo wanted to play with it, and it was a trip hazard!

Tear Down

The Zapper is quite simple in construction, all you need is a suitable Phillips or Cross-head screw driver:
3 screws hold the grey fascia to the orange body..

Then 2 screws on the handle and 2 smaller screws on the foresight & barrel end allow you to get inside

A Look at the Innards!

  1. Focusing Lens - plastic, focuses the image on the screen to the photo diode in 3.
  2. Ferrite Core - 2x half cores taped together to form a cylinder, used for balancing the gun's weight
  3. Photo-detector Circuit - has a Photo diode and associated circuitry
  4. Trigger mechanism - houses a switch connected to the Photo-detector Circuit
  5. Brass coloured weight - as with 2. its used to balance the gun

Basic Overview of Operation

So when you press the trigger, the closing of the switch is a signal to the Photo-detector circuit to capture the image on the screen, which is focused on a photo-diode. 

This information is then passed to the console via the lead and the NES processes this information to decide weather you hit the duck (I'm assuming you're playing Duck Hunt), hit thin air, or if you're shooting the giggling dog cos you suck! Don't lie, you have done that!(http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2003/lbb23/duckhunter/hardware.htm)

Get Cracking!



So before I got too far in, I double checked the switch on the trigger assembly to make sure to worked and its configuration. Turns out it is a Normally Open (N.O.) switch and closes when the trigger is pressed. However it is only closed for a small period of time, its essentially a mechanical one shot timer.

Now armed with information on what I was dealing with, I drafted up a circuit diagram:
A decided to go with a blue LED for the colour of light beam. Typically a Blue LED has a forward voltage of 3V, and I wanted it really bright, so chose a current of 30mA, a bit overkill, but within limits.

So from these requirements I needed a current limiting resistor of about 200OHMs - no 200OHM resistors in spares box so went with 2x 120OHM resistors, thus giving a current in the LED of 25mA - ok that'll do!

C1 is to provide some sort of extension of the duration on which the light beam stays on for, I didn't bother with in depth calculations here with regards to current draw from cap, I just did a simple t=RC calculation.

I chose t= 240ms, so C1 must be somewhere in the region of 1000uF. <rummage in parts box>.........BINGO! 1000uF @ 10V (oohh close to max voltage of circuit but should be within limits), this gives a delay of 250ms

I unscrewed the 3 larger screws holding the trigger assembly in place, disconnected the lead out to the NES from the circuit board and cut the wires on the switch to leave the trigger assembly by itself:


I then refitted the trigger assembly back and offered up the main parts of the design so I could see what needed hacking off:

The holder for the Brass weight and one of the screw mountings/fittings on the handle had to be removed with a Dremel and the same on the opposite shell: the mating mountings and fittings. I judged that only one screw would hold the handle part of the zapper together OK.



After a bit of assembly, dis-assembly and routing out I managed to get the battery to fit perfectly. The battery has to be fitted before fitting the trigger assembly. Hopefully the battery will live long enough so that swapping it out is not a common occurrence.
I closed up the 2 halves of the zapper to make sure battery fitted OK with the trigger assembly in place. Like a glove. I was also right about the screw mount I routed out, its happy with just one screw in the handle.

Now I could begin wiring up.
Soldered the Positive terminal of battery to one side of switch. Then soldered up LED, resistor and capacitor and tested with battery:
Resistors are covered in heat-shrink as are bear wires on capacitor leads

It Works! Knew it would...

I then soldered the black lead of LED assembly to Negative lead of the battery clip, hooked it up to the battery for a final test before fitting:
The LED does fade off rather than shut off after a delay, which is what I expected. still the effect is still good.

I'd also like to point out that you should heat-shrink over solder joints or at least us insulation tape.

Then it was just a case of fitting everything back in:
 I decided to fit the LED into the barrel weight, it holds it in place better and taped down the wires to the shell for additional support whilst I tried to screw it back together. I also tapped over the now redundant screw hole in the other half of the zapper. I also fitted the lens back in, which is not shown in the above picture.

Taped over screw hole

Viola!

Test of Finished Hack


Well its bright! The overall original aesthetics have been retained and the blue light looks cool! Also the barrel glows when fired, making it look like its overheating!

Not bad for a Sunday afternoons work! Built just in time for sonny-jim to wake up from his afternoon nap and test it!
What does this button do?

Improvements/Design flaws

Well I did originally plan to find a knackered Buzz Lightyear Doll - with the the arm laser button, and gut it for the laser sound module. That could be an add on if and when I find one, so will trawl the local car-boot sale.

I did also think of using a 74595, shift register IC so that with each pull of the trigger, the beam changes colour, that would also be cool, but will the circuit it fit inside the zapper?

Also; having a capacitor that gets switched directly to the battery is not really good design. If you think about it: a large capacitor looks like a short circuit to a power source. At the point of the switch closing, the capacitor is going to yank the battery for all the current it can get for a fraction of a milli-second, this could stress the battery.

The switch in the trigger assembly may have a Normally Closed pin as well.If so then I can use it as a toggle between charging the capacitor from the battery and discharging through the LED. This means cracking the trigger assembly open to check for the extra pin on the switch. I was avoiding this as I didn't want to open it up and any tensioned springs to pop out!