If you have a bad 1N4002 diode in a piece of equipment being repaired, easily replace the diode with a 1N4004. The two diodes have the same physical size and packaging and share many electrical characteristics. They both have a maximum current rating of one amp. The 1N4004 has a peak reverse voltage rating of 400 volts, while the 1N4002 rates at 100 volts. Because the 1N4004s has a higher rating, you can make the substitution safely.
Turn off the electronics equipment containing the 1N4002 and unplug it from the electrical socket. Plug the soldering iron in and allow a few minutes for it to warm up.
Examine the 1N4004 diode. Note it has a band on its body closer to one lead than the other. This is the cathode lead. The other lead is the anode. Examine the 1N4002 diode in the equipment being repaired. Note the band on it and the device's orientation in the circuit. Make a quick sketch of the 1N4002 diode's orientation in the circuit, marking the location of the cathode lead.
Remove the solder from the 1N4002 on the circuit by heating the solder connections with the soldering iron and drawing off the liquid solder with the desoldering pump. Repeat this more than once to get the connections clean of solder. When done, let the diode cool for a moment.
Grasp the diode's leads with the long nose pliers and slowly work them loose from the circuit. Set the diode aside.
Prepare, if necessary, the 1N4004 by bending its leads 90 degrees to its body. Orient the diode according to your notes and insert it into the circuit. Make sure the cathode and anode sides match the replaced diode's. Solder the diode into the circuit, taking care to not overheat the diode or circuit board. Trim the excess lead material with the diagonal cutters.
Plug the equipment back into an outlet and turn it on.
Since the 1N4004 diode has a higher voltage rating than the 1N4002, be very careful in substituting the 1N4002 for a 1N4004. A reverse voltage higher than 100 volts will destroy the 1N4002.