Monday, 4 May 2015

Current Source Update

So I managed to breadboard up a simple constant current source from a schematic and CAD up my enclosure (whilst at the same time learn how to use Autodesk inventor) and make some end covers for it (also at the same time train up on works laser cutter).

The initial test proved my design did need some tweaking, and thanks to ease of CAD, these where amended on the schematic easily. Also to weeded out some crap components!

The Circuit


 So the circuit is pretty basic but enough to constitute a constant current source with a little overload alarm/indicator.

Brief Run-down of the specs

  1. Must be mostly constructed of recycled, scavenged or spare parts found lying around in spares boxes/collections.
  2. Must be mostly THP components and populated on a single sided PCB 
  3. Must manage up to 7A load current at 30V maximum input voltage. Current must be fully adjustable from 0 to 7A.
  4. There must be a display showing the set and driven current to a resolution of 0.1A (100mA)
  5. must have over-temp warning for the driver circuit either audible or visible
  6. must have an set/enable switch for turning the load on and off prior to adjustment or for quick disengage of load (in those situations where you realised you overloaded your DUT!)
  7. driver electronics must run off a minimum of 12V supply, with input protection against reverse polarity supply and fused
  8. DUT input must be protected against over-voltage (greater than 30V DC)
  9. Spend no more than £20 on any parts that must be bought.

First iteration

I got the inspiration for this design from PauloRenato - its a pretty good design though, and also employs the same ethos as the design I want to construct.
Below is the first schematic revision and highlighted circuits are fitted to the breadboard:
So I used an adjustable reference source (TL431 adjustable voltage reference) to set a voltage of about 7.0V to the Current Set pot(goes off board on J2). The reason for a voltage ref? well why not, if you have it use it! I could have used a 9V1 Zener, but that would require potting it down and then there's the voltage/Temp issues with a Zener (as with any semiconductor junction), so with a voltage ref, there's more stability.

J3 & J4 are for the SET/ENABLE switch, but for testing on the bread board I just connected the wiper of the set pot to the non-inverting input of U1:A (first op-amp on U1). U1 is a LM324: cheap, readily available and are pretty much here to stay.

U1:B is a buffer for the LCD DMM. The LCD I chose was the DVM-210, main cos it had no units on the display meaning the reading could be translated into amps without confusion, it was small and had a backlight, which I intended to use as a over-temp indicator. It required a 0-200mV input for the DMM and required 9V to operate. So the output of the buffer had to be potted down to give a 0-200mV output from a 0-7V output, with the ability to trim/zero the meter reading.

I omitted VR2 and connected a 1R 5W resistor where J1 pins 2 and 3 are. This acts as the load resistor. Q1 & Q2 are the driver MOSFET's. They are FDP6670AL N-channel MOSFETS with some pretty good specs, albeit are they are becoming harder to find. The reason for the MOSFET pair is that the current load is split between the 2, thus halving the amount of power each FET is trying to dissipate.

U4 is a 555 timer which flashes the back light on the LCD when the over-temp detector circuit activates it. Its a slow flash at about 3Hz.

Also the input power protection was not needed and I also hit my first design snag. I had no 7809 voltage regulators (D'oh!) so I had to tweak the design and utilise an LM317 and  a few resistors to get 9V. Below is the second revision of the schematic:
Rev02 of schematic - 9V reg from LM317 highlighted in green

Testing

Testing the voltage reference output was the easy bit. Turn on power and stick a volt meter across its output and GND: 6.99V - Spot on! Job's a good 'un!

Next I tested the 9V out of the LM317: 9.05V - Good enough!

I tested the balance of load through each MOSFET to ensure each one was getting their equal share of the load. I placed an ammeter in series with the drain of Q2 and hooked it up to load a bench PSU. I set the PSU voltage to about 3V and tweaked the set-point pot till the ammeter on the PSU read about 1A, which means you would expect 0.5A through the ammeter. And you would be right, except after a while the current started to go down slowly! After some head scratching I put this down the the combination of the voltage lost over the meter impedance and the Vds of Q2, along with the affects of temperature due to power dissipated in Q2. So it did work, but it's worth noting the affect of this measurement.

Then things started to go a little awry from this point! I hooked 9V power the display and tried out the alarm circuit by connecting the reset pin on the 555 to Vcc & GND and sure enough the backlight flashed. 

However I could not get the blasted thing to give a sensible reading from the DMM, I kept getting negative values. At full scale on the set-point I got -7.00 on the display. As I approached 0A on the setpoint I got 0.56?! I tried zero it using RV1 and trying again but still negative, I thought I must have hooked it up the wrong way, but swapping the leads made things worse, and the voltage between the + and - DMM terminals remained at a steady 1.0V! WTF?! In the end I ditched it, not before dismantling it to see if there was anything stupid going on and then chucking it. I still have no idea what was going on there, the manual for these DMM's are pants and offered no detailed explanation of the internal circuitry, so I went on amazon and found me a china special 0-99V display for the low low price of £2.17! - and guess what? With VR1 & R6 removed, along with removing the LM317 circuit and hooking the display directly to Vcc, the bloody thing worked! up yours VoltCraft!
All I had to do to get it to flash was connect the power for the display to the output of the 555 timer to turn it on and off. simple and effective, the 555 can easily source the current required for this display. It did flash a bit fast now so I had increase C7 to slow it down to a little under 1Hz. There is a very small delay when the display is powered on and showing the set current, something I can live with.

I then proceeded to test the accuracy of the display against a Fluke 77 (old fluke!). I set a bench supply to a low-ish voltage to minimise heat from power dissipation (about 2V). I set the setpoint to 200mA on the display and took a reading of the voltage across the 1R shunt resistor and the current off the bench PSU:



OK so it's about 37mA out, but with the 0.1 degree of resolution and a single turn set pot I can't conclusively say that it's bang-on. Another at 0.5A (500mA):



This looks promising! The needle is pretty much half its full deflection of 1A and the Fluke says 526mV across the shunt! One more at an 1A:


That's pretty good! For now I'm satisfied that the display is not so far out for 100mA resolution. It's not uber precise or accurate, but best I could have hoped for from mostly scavenged and collected bits!

 CADding!

With the basic circuit done, it needs something to live in. I found an old extruded aluminium enclosure in my spares box. It used to house some control electronics for a pump. its perfect for PCB's as its has guide slots. All it needs is some end panels for the front and back.

New job new things to learn so I decided to  CAD up the enclosure shell into Autodesk Inventor CAD:

The best and simplest way to CAD this was to measure up all the dimensions of the profile of the enclosure, and then extrude them out. This way if I were to use the same enclosure I can just call up the outline and extrude to whatever length I want! Be useful for work related projects!

The end plates were a simple case of drawing them directly as part of an assembly so they fit the contour of the enclosure and then cut through the holes for fixtures and engravings:



From these parts I exported some DXF's and managed to find some scrap 3mm acrylic and cut them out on the laser cutter, plus some self tapping screws to bolt them to the enclosure and hey pesto:


I know the rating on the front is wrong, but I was between projects and got my spec's mixed up! The grill on the front allows ample air flow for the fan on the rear. there is a section of the fan grill where the centre of the fan blocks the centre of the grill and also doesn't match the CAD image, this is cos I amended the CAD after I realised the redundant cut outs and didn't bother re-cutting the panel.

What's next

Well the rest of the circuit! Testing the Fan control circuit, the temp control circuit and sourcing some more parts as well as getting the gerbers for the PCB done and milled out on the isolation router.

Amongst some of the parts I found these heatsinks, which'll be perfect for this design and enclosure.

Must Crack on!

Sunday, 12 April 2015

Update and Project Ideas

Update

well its been a while, yet again! Where's it in a nut shell:
  1. New Job! I now work as a lab Tech at the university of York's electronics department. Thus returning to the very place I obtained my degree! The amount of fabrication and development technology at my disposal is epic now and hope to deploy some of it for some up and coming projects (including a PCB isolation router)! The works good and taxing, but very satisfying! Another plus is I am now trained up on a new PCB CAD package: Proteus and having a crack at KiCAD on linux in my spare time.
  2. I'm getting married! (finally some would say!)
  3. Looking after the kids. Yes the small screaming things that I love dearly are becoming more of a handful each week and as such, the Daddy hat has to come out!
  4. Have had to come to terms with parting with the landy! I know but, its been sitting for ages and with the kids and everything, I need to do the last few jobs on here and she's going to a better place. I'd rather she here used more than gathering moss on the driveway. I can always pick up a new project in the future.
  5. The welder is still on the back burner. The reason for this is explained below.

Project ideas

Recently I've been watching some youtube vids and reading some articles on voltage standards, and test equipment.

After a quick stock take of my parts bin I found I had enough spare bits to build a constant current source. This lead onto looking at voltage standards and resistance boxes. All this is well and good but I'd also need a PSU to develop these projects - further digging in the scrap bin yielded some high value parts that would take the sting out of the projects total cost. A PSU would also help develop my welder project at home too.

So I set a mission brief:
Construct a PSU, Constant current source, voltage standard and resistance box for as cheap as possible and constructed out of as many recycled parts as possible. Maximum cost of parts must not exceed £20 for each piece of equipment.

Weather this is possible or not, I don't know, but I'm pretty good a scavenging! So i'll be fun to try and find these parts in other bits of broken old kit!

I'll post something up soon, bits and bob's later about progress I've currently made and will be making.

Tuesday, 19 August 2014

MIG welder rebuild update and Welding Practice (on a budget!)

Update



So I managed to get a screen on the Ardu-weld (which I have now decided to call Ardu-MIG) doesn't look too bad and can update the info on the display on the fly when adjusting feed speed and gas delay. I am implementing a latch mode and possibly a stitch mode, but will see how that goes.

Welding Practice

Even though I could wax-lyrical about how welders work, I can't weld for jack-shit! This is apparent in the fact that I have tried to weld the steering guard back on big blue 3 times and 3 times I've driven back from a trail with it in the passenger seat! Still better than it catching a lift on an AA truck with track rod in your hand!

I thought I'd look up welding tutorials on YouTube and came across this guy: +ChuckE2009 
The tutorials are a little long winded, but its necessary as there are lots of factors to consider when stick welding (drag angle, angle to the work, electrode types). He does seem to know his subject well, young enough to remember, old enough to be experienced, good balance!

Budget!

I am basically learning how to weld with my means here! I am skint, have limited space and am willing to learn, so as you'd expect, my kit is not the best, nor do I have the facilities so I have to make it do!

So after watching the playlist, I thought I'd have a go, and managed to scrounge some scrap from a neighbor. bit of a buff up with angle grinder to remove rust and it was good enough.

I already had a stick welder, which I manage to get for about £40 just a basic thing! It has seen better days, the electrode holder was on its last legs but the cabling was in good nick and the cooling fan did still work, so it was mostly cosmetic.

I bagged some electrodes at the local farmers auction! Probably 10kg of a mix bag for about £20! Bargain! Their quality couldn't be call on, as for all I know they could have been stored in a damp area, but they looked good, no signs of dampness!
Left to right: 2.5mm (unknown type), ESAB 30.25(?) 3.25mm, 6013 3.25mm, Stainless Steel 3.25mm
So for practicing I used the 6013 3.25mm as it suited the metal thickness I was using and was the only one I could identify from the welding tutorials!

So out in the Garden (after the kids gone to bed) I set-up my work space:
The reason I had to work outside the shed was:

  1. No welding within 3m of flammable materials - shed is full of bottles of various petro-chemical fluids from servicing vehicles, oh yeh and AND ITS A WOODEN SHED!
  2. Not enough room
  3. Ventilation - you need  a lot of ventilation when stick welding, the fumes given off are not nice!
I am aware that I am welding on a wooden board, but the the work is performed upon a large piece of scrap metal which make a good heat sink and only mildly scorched the board. As an extra safety addition I had a fire extinguisher on standby!

I didn't have a chipping/slag hammer, but the back end of a claw hammer did the trick. I do have a welders mask  which I bought new for about £15, just a flip down thing with a flipable lense. I also had:
  • a wire brush, to clear away loose slag
  • an angle grinder to cut and clean metal
  • some ear defenders - for when I'm using the angle grinder
  • some tough garden gloves I use when using the chainsaw
  • a piece of box section - I used this to rest on

Sparks Fly!

I set the amperage as per the ratings on the side of the box of sticks and the silk screen on the welder:

I measured the bare end of the electrode by eye with a steel ruler and came out to be about 3mm - so I took the size up for 3.25mm and wound the dial on the front till the pointer on the scale came to 3.25mm or about 115A

First off I decided to put a pad of beads down:
This was to get a feel of things, practice putting and arc down and generally observe if I was moving too slow or fast and if my arc was too long or short. As the pad got warmer I back the current off a bit by about a few amps, I couldn't tell really as there wasn't any scale to go by!

I decided that I was going too fast for the first 3 beads so by the 6th bead I was happy that I'd got my drag speed dialed in. Drag angle appeared to be ok and arc length was bang on.

After a bit of practice I then moved onto a fillet weld and then a triple pass fillet weld. I first tacked up 2 pieces of metal so one was perpendicular to the other:
Then began to weld my single pass fillet weld on one side:
For a first try its not too bad! I seemed to be moving too fast at the start, not enough cut in the middle and improved a bit toward the end.

I then did a multi-pass on the opposite side:
Hmmmm - keep practicing I guess! The light at this point was fading and I was getting thristy - dehydration is not a good thing when trying to learn new things!

Lessons Taken

Well I am better than before and I have learnt quite a bit more than I did, however there are still more techniques to learn (lap weld, open root, vertical up and overhead)

Also my kit did not fair well! The electrode got REALLY hot by the last weld! after taking it apart I found the contact between the cable and holder was tarnished and the grip had melted!! I took it off and ordered a new one for a a Murex stick welder - rated at 400A and much better contact material with brass cable clamping!

My gloves where not thick enough and found out they had holes! not good! ok if your operating a chainsaw, but not for welding! So I order a set of good welders gloves. The mask faired well too!
Old glove to new gloves; new electrode to old and mask
 Also, and I am a burk for doing this, I thought I wouldn't be long and welded in just a t-shirt! Bad idea, I got colossal sun-burn on me left arm! Welding arc's emit a fuck-ton of UV radiation! Please make sure you have a long sleeved top on if your doing this! Ideally one that's old! either that or wear sun-screen!

More practicing will follow soon and maybe another update on the Ardu-MIG!

If you have any comments or pointers on my welding, feel free do so, I'd be much appreciated! And may thanks to +ChuckE2009, keep up with the videos dude! Helping a lot!




Thursday, 31 July 2014

MIG Welder rebuild update

If you don't know already, I've been busy.....bouncing baby #2 arrived in June! Her name is Ferne. All is well with her and muumy!

So plodding on with this MIG welder (kindly donated by +Jezzmund Tutu's dad. Cheers Mark!), I managed to knock a milestone down: I have managed to develop a working system on the Arduino, with a development board I knocked up!

What I'm Aiming for

I basically want to try and run this, knackered, beat-up, SIP Ideal 180 Mig Welder, by replacing the electronics (as shown ) with my own, more modern and compact system, based around the same system as the Arduino (Atmel ATMEGA328P), with ability to upload an Arduino boot-loader and then use a serial cable to upload programs.

Electronics as it stands are shot, keeps blowing the fuse to the board, I believe there is a short on the rectifier for the motor control circuit. I never liked the way these things worked, so more the reason to design my own!
Proper old-skool electronics! who needs micro controllers!

All this will be stripped out, but am leaving the connections and wires to solder to the new board

Plenty of functions for a MIG, including latch trigger mode and stitch mode with duty adjustments. I'll be recycling the pots and rotary switches.

Basically the same way as done on Arduino, Stripped down and instead of a USB to serial circuit on board, use a USB-Serial Cable, available from most electronics hardware suppliers. Similar to what's done here: Nanino.

I want it to have all the basic functions of a MIG welder: Gas delay, Wire Feed control, Wire-Inch. The welder is a Conventional type, which means it has a HUGE, tapped, step down transformer, and a selector switch on the front to adjust the welding voltage (CV welding explained Here - Wikipedia on welding power supplies). As such, I don't need to worry about controlling the welding current and voltage from the electronics, just the gas and wire control.
Pretty beat up! Confident its just cosmetic! The number in the model name usually indicates its max current.

Left to Right: Voltage adjustment, "EARTH" clamp connection MIG/Spot welder selector, 3-Phase connector (dunno if its in or out?)
I did think about having a weld mode selector for stitch mode, stitch period on & off and latching trigger but I thought to start simple and then fit mode selections later.

Dev. Platform

Schematic - NB trigger button is separate on breadboard
Setup

The board is nothing special. Just a couple of relays with LED's. Relays are driven off 5V (as specified) by some transistors which in turn are driven off the Adrunio. Screw terminals allow easy fitting/removal of the wires to and from the Arudino and also from the bread board.

The  Inch button is located on the board and the trigger button is on the bread board with a bit of de-bouncing. I found a small motor so I could test drive the motor circuit I proposed to use. The motor so small and light that the solid core wires I soldered to it can hold it in the air!

I used 2 Trim-pots as gas delay and motor control. The motor driver circuit is quite simple too: the MOSFET (Q4) is constantly driven by a PWM signal from the Arduino. The relay (RL3) in its Normally Close position, shorts the motor out through a very low value resistor (R7). When the relay is energised, the pole is switched to the 12V supply and Q4 has some power to drive the motor with. Simple and effective.

Some Theory

R7 essentially holds the motor. If you tried to turn it by hand, it won't budge as all the current generated by the motor tries to flow through R7, essentially a short circuit. 

You ever tried to generate a voltage across a short circuit? Its bloody hard! 

If R7 were 1K for example, it would allow the motor to be turned by hand a little and the current generated from the  motor would give rise to a small voltage across it (ohms law).

So in the situation where the motor is running and then you remove the power, the motor will slow down over a short period of time. This is not desirable if its feeding your wire for welding as it could get stuck to the work! you want it to stop instantly!

So by shorting the motor through the high wattage, small value resistor, all the current generated in the field of the motor windings from the momentum of turning a big spool of wire gets dissipated as heat in the resistor and the motor will stop a damn-sight quicker! exactly like the brakes on a car!

I've seen similar things done with Triacs and long pieces of track whilst repairing boards from MIG welders. They are prone to blowing the tracks and the braking Triac alot! So if your MIG welders does not stop feeding wire when it should, that's the problem!

Arudino Sketch

/*
Ardu-weld - Arduino based welder control board
Author: Tronicus
Date: 13-May-2014
Ver: 1.0
web: tron9000.blogspot.com
*/

//files to include
#include <Wire.h>
#include <stdlib.h>

//definitions & declarations
#define in_TRIG 2  //trigger pin
#define out_WS 3  //Motor speed control pin
#define out_GAS 7  //Gas relay control pin
#define out_CON 8  //Contactor relay control pin
#define out_BRK 4  //Motor brake relay control pin
#define in_WF 12  //Wire Feed button input pin
#define in_DIR 5  //Wire feed direction control input - later version of development
#define out_DIR 6  //Wire feed control output - later version of development

//Variables
int WS_MIN = 20;  //Minimum wire speed
int WS_MAX = 255;  //Maximum wire speed
int GDEL_MIN = 10;  //Minimum gas delay time
int GDEL_MAX = 1000;  //Maximum Gas Delay time
boolean welding = false;  //flag to indicate has been or finished welding

//*********************************************Main Program*******************************************//

//setup
void setup() 
{
  pinMode(out_WS, OUTPUT);
  pinMode(in_TRIG, INPUT);
  pinMode(out_GAS, OUTPUT);
  pinMode(out_CON, OUTPUT);
  pinMode(out_BRK, OUTPUT);
  pinMode(in_WF, INPUT);
  pinMode(13, OUTPUT);  //LED Alive pin
  digitalWrite(13, LOW);
  //Serial.begin(9600);
}

void loop() 
{ 
  while(digitalRead(in_WF) == LOW){inch();}  //check to see if Inch button is pressed
  while(digitalRead(in_TRIG) == LOW){weld();} //check to start welding
  if(welding == true){dis_weld();} //if you have been welding: disengage
}

//******************************************Welder control******************************//
/*
Code for controlling the welder (Wire feed, contactor, gas solenoid, trigger type) goes here
*/
void weld()  //starts welding welding
{ 
  welding = true;  //now/was welding
  digitalWrite(13, HIGH);
  digitalWrite(out_GAS, HIGH);  //turn gas on
  //Serial.println("GAS ON!");  //uncomment as neccesary
  digitalWrite(out_CON, HIGH);  //close contactor
  //Serial.println(welding);  //uncomment as neccesary
  feed_wire();  //feed wire
}

void inch()  //feeds the wire
{
  while(digitalRead(in_WF) == LOW)
  {
    feed_wire();
  }
  digitalWrite(out_BRK, LOW);  //turn on brake
}

void feed_wire()  //function that feeds wire whilst allowing speed adjustment at same time
{
 digitalWrite(out_BRK, HIGH);  //Release Brake on motor
 analogWrite(out_WS, map(analogRead(0), 0, 1023, WS_MIN, WS_MAX));  //set the output speed of feed motor
}

void dis_weld()  //stop welding and finish with gas
{
  int del = map(analogRead(1), 0, 1023, GDEL_MIN, GDEL_MAX);
  boolean FLG1 = true;
  while(del > 0)
  {
    while(FLG1 == true)
    {
    digitalWrite(out_CON, LOW);  //turn off current
    digitalWrite(out_BRK, LOW);  //apply brake to motor
    FLG1 = false;  //make flag false so this isn't done again
    }
    delay(1);  //delay 1 ms
    if(digitalRead(in_TRIG) == LOW)  //read and check that trigger has not been pressed
      {
        del = 0;
        weld();  //if so weld
      }
    //Serial.println(del);
    del--;  //decrease del
  }
  digitalWrite(out_GAS, LOW);
  welding = false;
  digitalWrite(13, LOW);
}

Breakdown of Program

so in the main loop(), I'm constantly checking the trigger and inch switches for a change in state and then calling the appropriate function when one of those switches are pressed.

When the inch button is pressed it just calls the function to turn on the wire feed motor at the speed set from the analog input, mapped against the defined max and min wire speed, this only happens while the inch button is pressed. once the inch button is release it engages the brake for the motor.

when the trigger switch is press it calls the welding function: this function first sets a flag (in the form of a Boolean variable) to acknowledge that welding has/is happening/happened. It then turns on the gas solenoid output and then the contactor (which puts power to the lance for welding) and then starts to feed the wire at the mapped speed from the analog input. It does this till the trigger is released.

Once the trigger is release, it returns to the Loop(). It then checks that the welding flag has been set, if it has then it must start the welding disengage function. 

This function basically reads in the value off the second analog input to determine how long it needs to leave the gas on for, sets another flag to indicate it has turned off the contactor and apply the wire feed brake, and then checks at 1ms intervals if the trigger has been pressed whilst the gas is left on.

If the trigger has not been pressed during this interval, it decrease the integer: del. When del = 0, it turns the gas off and set the welding flag to false and returns to the loop(). If the trigger has been pressed, it clears the timer variable (int del) and returns to the welding function.

And the results can be seen for themselves:

As it can be seen, I Press the inch button and only the motor turns. I press the trigger and the Gas (green LED), contact (red LED) and the blue LED (sequence indicator, tells me when its stopped doing things) come one and the motor turns.

When the trigger is released the gas LED stays on for a while longer. I adjust the Gas pot and the gas on interval is now a lot shorter (practically 0).

I then adjust the motor speed pot from full, to half way and then minimum, and the motor speed responds accordingly. Notice that the motor recoils a little, that's the brake circuit kicking in!

Sorry I couldn't show the speed change on the fly, but I had to hold the camera!

Expansions and Extra features

So like I said before I could have included and stitch function and a latch function like the original, I might yet include a latch function.

I was also thinking of including a motor direction switch for inching only, so you can spool the wire back a bit if required.

I would really like to add one of the LVK204-25 LCD screens on it to display current and power. I have a few analog and digital inputs left and it'd be rude not to use them!

Problem with measuring current is I need a shunt capable of taking high current (most likely up to 180A), which in this case would be a brass bar with enough metal shaved off to give the right resistance. Seen them before, will have a look around. Also with measuring shunted currents and voltages up to 5x higher than the mirco-controllers supply voltage is isolation. I've seen monitoring circuits in welders go really badly when things let go!

Anyway, food for thought, until next time.

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!