6
\$\begingroup\$

I have an MCU operated at 3 volt with an input pin that is floating by default. I have an external pull down circuit with a 10K resistor connected to the I/O pin. I also have it tied to VCC using a push button. The microprocessor is sleeping until the button is pressed (it is configured to generate an interrupt when the I/O line become high).

The solution have worked flawless, have tested it for months. Last week however I soldered a new batch of 16 units and when I inserted them inte their plastic case I noticed that some of the woke up and started processing and I did not press the button. I now have two theories and would like to know how likely they are:

  1. ESD has damaged the MCU? Personally I do not think so, since I have seen the same problem on at least 7 devices occasionally. This combined with that they work flawless in all other aspects makes me think that this is not the case.

  2. ESD pulls the line high occasionally when I insert it into the plastic enclosure and in this way the interrupt is triggered in the MCU. Sounds reasonable, I guess a very short ESD near the pins would actually wake up the device. Maybe the reason I see it now and not before is because of winter and a more dry air?

Am I thinking correct here?

  1. I would also like to know if I need to protect the pin in some way and suggestions on how to do this if required. I read that the chip (TI cc2540) is ESD protected but I don't know if it is enough, maybe it needs more protection. Maybe it has enough protection but I still need to handle short spikes in software.
\$\endgroup\$
7
  • \$\begingroup\$ To protect the device from ESD, make sure all your staff are wearing antistatic wrist straps, and do not wear nylon clothes. You could also have the MCU in a socket. Do the soldering without the MCU, then put it in the socket for testing. This also allows for replacement and programming (not In-system) of the MCU. \$\endgroup\$
    – user60684
    Commented Jan 16, 2015 at 17:22
  • 1
    \$\begingroup\$ Put a 10k resistor in series with the pin. \$\endgroup\$
    – Andy aka
    Commented Jan 16, 2015 at 17:25
  • 1
    \$\begingroup\$ And to work with Andy's idea also consider adding a capacitor from the pin to GND in addition to adding the series 10K resistor. \$\endgroup\$ Commented Jan 16, 2015 at 17:45
  • 1
    \$\begingroup\$ @Some: No, he can't. As he said, the rising edge triggers causes the processor to wake from sleep mode. Software debouncing can't be applied here, since the processor is not running at the time. Running the processor is exactly what he's trying to avoid having a short spike do. \$\endgroup\$ Commented Jan 16, 2015 at 18:13
  • 2
    \$\begingroup\$ Or wake up debouncing go back to sleep \$\endgroup\$ Commented Jan 16, 2015 at 18:34

1 Answer 1

6
\$\begingroup\$

I think #2 is quite plausible, especially since you mentioned plastic case. You probably generated some static electricity while handling the plastic case, and that got discharged thru the switch line. The switch is probably sticking out more than other things, so would be more likely to get zapped.

If this only happens when you first install the board in the case, then you can just ignore if necessary. However, something is marginal, and I'd want to make the system more robust. There are various options:

  1. Make the pulldown stiffer. If this unit is not battery powered, then changing the 10 kΩ to 1 kΩ is a easy thing to do. That will use 25 mW when the switch is pressed. If this is line powered, than that's irrelevant.

  2. Put a capacitor to ground on the switch line. This will require more charge on the line before it gets to a logic high level. A 1 uF ceramic is cheap and small. Even with the 10 kΩ pulldown, that's still only 10 ms time constant, so is irrelevant in human time.

  3. Put a R-C low pass filter after the switch and pulldown. For example, another 10 kΩ in series followed by 1 µF to ground. The extra delay is still irrelevant in human time since you have 10 ms time constant towards the switch on state and 20 ms towards the switch off state. This will definitely filter out short spikes, and provides additional impedance for the pin protection circuitry to work against.

\$\endgroup\$
3
  • \$\begingroup\$ Nicely explained. May I have your opinion if we need TVS or schottky diodes or ESD suppressors in this case to prevent MCU from damaged by ESD? \$\endgroup\$ Commented Nov 6, 2015 at 12:02
  • \$\begingroup\$ @rich: That depends on how much expense is worth how much lowered probability of erroneous behavior. A TVS or zener can lower the chance of damage if done right, if it's given some impedance to work against. If damage is all you want to prevent, then the protection diodes in the micro might be good enough. Again though, they need some impedance to work against. \$\endgroup\$ Commented Nov 6, 2015 at 12:13
  • \$\begingroup\$ Yes I care about the damage very much. Are you suggesting adding series resistors between input and the MCU pin? If internal diodes are sufficient, do you think protections on USART are necessary? \$\endgroup\$ Commented Nov 6, 2015 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.