15

I was trying to visualize a beginner circuit problem on my breadboard and I plugged in my circuit, touched a resistor and got a nasty shock. I am a cs student playing with circuits to build some logic gates so I really am a complete beginner.

The power supply is 5V 2 Amps Why did this happen? How can I prevent this from happening in the future?

enter image description here

enter image description here

random_0620
  • 289
  • 2
  • 8
  • 7
    Was it a single jolt, or a continued buzz -- if you turned the feeling into a sound was it a "**spap!**", or a "_BZZZT_". The former was static electricity, like you might get from a doorknob after scuffing your feet on a carpet. The latter indicates that wherever you're working, you've got grounding problems. That power supply should be isolated, so it should be about as dangerous as a rock of similar size (and for similar reasons -- don't whack yourself over the head with it). – TimWescott May 08 '21 at 00:25
  • 1
    @TimWescott I would say it was more of a single jolt. I pulled my hand away immediately. – random_0620 May 08 '21 at 00:28
  • 1
    And -- sorry for not mentioning this before -- *edit your question* with your elaborations. StackExchange likes nice tidy self-contained questions that don't require the reader to delve into the comments to understand. – TimWescott May 08 '21 at 00:30
  • And is that really a \$10\Omega\$ resistor that zapped you? – TimWescott May 08 '21 at 00:31
  • @TimWescott yes I put my fingers over the blue part and as embarrassing as it is to say attempted to pull it out with the power on. – random_0620 May 08 '21 at 00:31
  • 2
    Oh, I work on live 5V circuits from time to time. In a protoboard like that it's not a big deal. – TimWescott May 08 '21 at 00:33
  • @TimWescott could this have been a static shock? – random_0620 May 08 '21 at 00:33
  • 6
    @s_kirkiles It's the required "pri-to-sec" bridging capacitor, most likely. Class II product, I'll bet. You can easily test this. Put an analog (needle-like meter) voltmeter into AC mode and measure between your body and that shocking point. You'll probably read a substantial AC voltage and it will be fairly stable. Depending on the details of the supply, you may be able to reverse the plug and it will be lots better. – jonk May 08 '21 at 00:33
  • 1
    First guess is static (ESD). Especially if the air is dry in the location where it occurred. – user57037 May 08 '21 at 00:43
  • 1
    If it is a cheap two-prong power supply, it might have leakage current from mains-referenced common mode voltage. Most likely from a EMI filter capacitor between mains side and low voltage side. – Justme May 08 '21 at 08:37
  • If you *really* got an electric shock, the most likely reason is that your power supply is unsafe, or there is a fault in your house electrical wiring (e.g. a fault somewhere in the ground and neutral wiring or an incorrectly wired breaker). – alephzero May 08 '21 at 12:30
  • Most probably Y capacitor leakage. Can you ground the negative output to a sink, faucet, radiator or similar grounded part and see if you notice any difference. Preferably using a multimeter instead of yourself as the meter. – winny May 13 '21 at 20:35
  • Having different cables, using same for power lines is unwise. Black for ground and red for + are common. From PC PSUs, red for 5 V, yellow for 12 V and orange for 3.3 V. – greybeard Mar 25 '23 at 09:27

4 Answers4

51

OK. You say that it was a single jolt, and you pulled your hand away immediately.

It was one of two things -- either it was static discharge and a true shock, but exactly what you would have gotten from a doorknob, you burnt yourself, or it was an actual shock and I can't count.

You're running 5V through a \$10\Omega\$ resistor, which means that it's dissipating 2.5 Watts. That means it'll get hot in the thermal sense. That is, in fact, why it's a bit browned compared to the two 100 ohm resistors (which will dissipate 0.25 Watts at 5V). If you're expecting a shock, and you get burnt, you'll think you got a shock (trust me on this -- even if you've been doing it for 40 years, you'll still do it).

I'm pretty sure that's what you felt. It's hard to describe how to safely test a part that's sizzling hot for temperature -- it involves holding up the back of your finger to the part without touching it and feeling for heat, or briefly touching it and seeing if you feel heat afterwards. In extremis (I'm really bad about thermal safety) you lick your finger, touch briefly, and listen for a sizzle.

Had you hung onto the thing a bit longer, the "tss" sound, the bad-smelling smoke, and the shiny, resistor-sized spots on your thumb and forefinger would have let you know that it was thermal, not electrical.

TimWescott
  • 44,867
  • 1
  • 41
  • 104
  • 7
    Aha that makes so much sense! Looking at the resistor, and looking at the effect it had on my finger it really seems like this could have been the issue! Is there a certain wattage range I should make sure I stay in? – random_0620 May 08 '21 at 00:40
  • 6
    No -- the power dissipated by a resistor depends on the circuit. That 10 ohm resistor with one volt on it would dissipate 1/10 of a watt; those 100 ohm resistors with 20 volts on them would dissipate 4 watts each. Basically, if you're designing a circuit part of your job is to calculate the dissipation in each resistor, and select one with an appropriate power rating. – TimWescott May 08 '21 at 00:43
  • 8
    Sometimes you calculate the power dissipated by the resistor and realize you have to completely redesign the circuit because the dissipation will create too much heat for you to get rid of. It is not just a matter of saying "Oh, OK, I need to use a 100 watt resistor in my battery powered gizmo." If you find you are dissipating 100 W, you need to rethink everything. – user57037 May 08 '21 at 00:46
  • 1
    @mkeith unless it's a 1000W antique tube transmitter, in which case 100W is chump change. Or a 100kW power converter, in which case, again, 100W is insignificant. But -- yes. I've calculated a resistor dissipation at 1/10th of a watt and thought "dang, that's too much for this battery-powered circuit". – TimWescott May 08 '21 at 01:02
  • 6
    @TimWescott totally. I tried to head off that comment by saying "battery powered gizmo" but I 100% agree with what you are saying. I just wanted to emphasize to the newbies out there that when you calculate the dissipation, you don't just automatically say "OK, now I need a 100 W resistor." Sometimes you have to say "Oh, I can't afford to heatsink for 100 W" or "Oh, my battery won't last long if I dump 100 W into a resistor." Maybe I am just over-complicating the issue for the OP. If so sorry. ;-) – user57037 May 08 '21 at 01:10
  • 2
    @s_kirkiles It's the temperature that's a concern, not the wattage. Something with really good cooling can dissipate 500 watts and still be cool to the touch, while a resistor like that will get too hot to touch with only a watt or two. My rule of thumb is not to touch anything over 50°C, but since you can't easily measure temperature of a part unless you have an IR thermometer or IR camera, try holding a finger close to it and see if you can feel heat radiating off it. If it's too hot, blast air at it with your fume extractor, or even better, a shop vac in blow mode if you have one. – Hearth May 08 '21 at 13:17
  • 1
    True, hot components can simply be misinterpreted as shocking. Sometimes pointy solder joints also have a similar feel. The only thing I'm sure I'll always recognize is touching the 50Hz 230V mains, because that has a distinct feel you can't confuse. – Uncle Dino May 09 '21 at 00:03
  • @Sasszem230V plus hot in the thermal sense is interesting too: a laser that illegally routed mains (probably about 1A) through the interlock connector, which I tested using a paperclip to close the interlock. It was new but the design dated back to when that was legal, and the connector was rated to 120V but the internal PSU to 230V – Chris H May 09 '21 at 09:10
  • @Sasszem I once got myself with 120VAC and thought I'd just pushed down on something sharp at first, until I looked to see what it was and realised whoever put that socket together had left that side unshielded (though it did feel a bit weirder than getting poked, that was just the first instinct). Thankfully haven't felt 230 though. – llama May 09 '21 at 15:46
  • 2
    Possibly a spin-off (and stupid) question, but is the fact the resistor is browned an indication that it's suffered thermal damage, and/or would be if it was left to operate continuously? Should it be disposed of? – Xono May 10 '21 at 01:39
  • 3
    Straying from the original topic a little, but it should be noted that resistors have a power rating, and the pictured resistor is definitely not rated for 2.5 watts (probably it's 1/2 a watt or less). Using a sufficiently-rated resistor isn't going to guarantee it won't get hot, but it should guarantee that it won't get damaged. – IceGlasses May 10 '21 at 06:02
2

It was either just a static discharge, or it can't just shock you, you must have also been in contact with some other metallic structure, such as a radiator.

If it was a short sharp pain, then it was just static discharge. You get charged up moving in your chair wearing plastic clothing. Then you discharge when you touch something, like another person or this circuit in this case.

If it was more of a tingling feeling that lasted longer, aka as long as you were in contact then it really was your classic electric shock caused by touching a somewhat constant high voltage source.

It could be that there is a short between the primary and secondary circuit of your power supply causing the high voltage from your wall outlet to be present on the outputs. Since the power supply is doubly isolated (as indicated by the symbol: square in a square), it is very unlikely that there could be a short between the primary and secondary windings, without the whole primary circuit/winding being shorted as well, causing your circuit breakers to go off when you plug the thing in.

If it wasn't just a static discharge, than the most likely culprit are your switched mode power supplies in your PC, that can generate a voltage (compared to earth ground) on the metallic parts of the PC and all other things connected to these metallic parts. This occurs, if the PC is plugged into a wall outlet, that is not grounded. In this case, if you touch something in contact with the metallic parts of your PC AND also something metallic in the building structure (pipes, radiator, aluminum window frame), then the current will flow through you down to earth ground, as these things are grounded.

The first certainly, but I think the second as well should be caught by your RCCB, if you have one installed. So in conclusion, probably it was just a static discharge. If you have a multimeter, you can just measure the AC voltage between the power supply outputs and whatever metallic structure you were touching at the time.

Cerike
  • 561
  • 2
  • 12
  • 1
    I found with some cheap USB power supplies they had some leakage which is enough to feel without tripping anything, which is why I stopped buying them from ebay and switched to farnell. Also the symbol means 'doubly insulated' not isolated, though I'm not sure how you'd meet the requirement to not expose dangerous voltages without some isolation (the AC on the cheap ones was around 40V with no load so not 'dangerous', just tingly, seemed to be capacitive). – Pete Kirkham May 09 '21 at 09:40
  • @PeteKirkham One other way to make an know charger dangerous is using an USB ionizer product. these devices work by generating an high negative voltage, and then using carbon brushes to leak electrons into the air. These then find their way back to ground. The problem then is that there is no way back to the device, so the capacitor inside those chargers charges up beyond its safe levels and fails open, and which the transformer is the most likely to go, and develops a short between the primary and secondary – Ferrybig May 10 '21 at 11:10
2

You are using a switching power supply with a two prong mains connector. These often include a pair of (hopefully!!) Y1 rated capacitors bridging both poles of the mains connector to the output ground, for EMI suppression purposes. This lifts the output to half the mains voltage, if there are no further grounding provisions on the secondary (output) side. While the current should be limited enough to prevent any injury, especially with a 240V mains it can still sometimes be clearly felt when touching the output of such a power supply. And in some cases, it can damage circuitry that is connected to earth ground in some other place than circuit ground.

Connecting the ground (usually minus) pin of the output to actual earth/protective ground should eliminate this problem.

Consider getting a real lab power supply sometime - chargers, laptop power supplies, computer power supplies .... tend to make a bad substitute for them due to a) issues like this, b) usually non existent adjustable output current limiting (bad with AT/ATX computer power supplies, these can deliver car battery grade currents with very destructive results), c) dubious/not well defined short circuit handling (2.0A might NOT mean the current is limited to 2.0A, and short circuit proof might NOT mean overload proof!), d) sometimes actual safety problems with the cheapest models (eg internal insulation not up to code, or ordinary capacitors used where class Y1 would be required....) - such problems can be very bad if you use them for breadboarding where you expect to routinely touch bare, powered wiring).

rackandboneman
  • 3,085
  • 9
  • 13
  • You can't have a capacitor between the primary and the secondary in doubly insulated supplies and Y1 wouldn't be put in domestic appliances anyhow (X2 and Y2 are the domestic grades). I also don't see how connecting one of the output poles to the mains via capacitors would help with EMI... The filter caps go from the mains to earth ground and the metallic chassis to decrease common mode noise and radiation. – Cerike May 10 '21 at 14:34
  • 1
    https://electronics.stackexchange.com/questions/216959/what-does-the-y-capacitor-in-a-smps-do explains well that a) yes, you can and it is not uncommon, b) for doubly insulated (aka class 2), Y1 is good practice. – rackandboneman May 10 '21 at 17:32
  • 1
    @Cerike Yes you absolutely can and this is most probably the culprit in this situation. – winny May 13 '21 at 20:33
0

In 1953 I was in grade 8 taking a class, "Radio and Electricity". Lesson 1 was how to safely disconnect a shock victim from high voltage and how to apply artificial respiration. (They did not have heart revival in those times.) We were also not taught these rules for working with electricity:

  • always work alone (a pretty girl trained in electrical rescue may be present)
  • always work barefoot, with both feet immersed in a grounded metal tub of salt water.
  • lick your fingers before using them to test for high voltage. That will minimize the burn if it is 900 volts instead of 9 volts.
  • make sure the capacitor is charged to 300 volts before you toss it to your buddy
  • do not be repelled by the intoxicating smoke of burning rosin flux or failing resistors.

And then there was the time when I got my hands on 100 9 volt batteries. It seemed unbelievable that I could just clip them together and get 900 volts. I tried it, and almost died! But I came away a true believer in the theory of hooking voltage sources in series. I quietly disassembled the stack and never told my folks about that accident. It was bad enough getting scolded for doing CW at 3 AM.

. . . k6yvl

richard1941
  • 632
  • 3
  • 7