2
\$\begingroup\$

I am using the Arudino Uno board as a trigger/delay pulse generator to drive a laser. I read the input pulse train sequence from a test point on the external device using pin 12 set as INPUT. The Arduino and the external device share the same ground.

Now, when the power is on, everything works fine. But when I power off the Arduino board, it seems that pin 12 starts to distort the signal on the test point of the external device which wrecks up the device's normal operation. This only happens when the Arduino is grounded. When I power On the Arduino or disconnect its ground from the common ground, the external device works fine again. As a result, I cannot have the Arduino connected to the device when it is powered off.

If I check the resistance between pin 12 and the ground, it is infinite when the power is ON and about 16MOhm when it is OFF.

Does anyone have an explanation/cure for that?

\$\endgroup\$
  • \$\begingroup\$ What is your "external device" actually doing? Can you please describe more of what that is, and how it exerts a signal into the Pin 12 if your Uno? I suspect that it's a floating pin when the ATMEGA goes Tr-state when turned off. The floating pin might somehow feed back to the external device and upset it's ability to generate signals. Still very strange though. \$\endgroup\$ – KyranF Oct 3 '14 at 13:08
  • \$\begingroup\$ the "external device" is a mass-spectrometer. I hook up a crocodile clip to one of its test points on an RF electronics PCB. From this point I read a 5V trigger signal that is also triggering other stuff that is happening and that I want to synchronize the laser with. So if something weird gets connected to this test point, it can potentially screw up internal triggering, and that is what I think is happening. I still have to try Dave's solution with the resistor. Any other ideas? \$\endgroup\$ – Andrey Dyachenko Oct 3 '14 at 13:53
3
\$\begingroup\$

Digital CMOS chips, including microcontrollers such as the one on your Arduino, are sensitive to ESD (electrostatic discharge), so as a protection measure, each pin typically has a pair of diodes that clamp its voltage range to the supply rails.

When the chip is powered, these diodes do not conduct unless the voltage on the pin tries to go below ground or above Vcc by more than the forward voltage drop of the diodes. But when the power is removed from the chip, both Vcc and Gnd are effectively at ground potential, and the input voltage is clamped to a range of about ± 0.65 V.

The simplest way to prevent this from affecting the signal source is to put a resistor in series between the source and the pin, which will limit the amount of current that can flow through the protection diodes when they conduct. Picking the value for this resistor depends somewhat on your application. Typical values would be in the range of 10 kΩ to 100 kΩ. Larger values allow less current to flow, but they also can interact with the input capacitance of the pin to create a low-pass filter that slows down the signal edges. Smaller values minimize this effect, but increase the loading on the signal source.

If you can't find a value that works acceptably well in your application, you might need to add an active buffer to the signal path — either a transistor or one of those "single gate" ICs.

\$\endgroup\$
  • \$\begingroup\$ Thanks Dave, I will try to add the resistor and post the result here. \$\endgroup\$ – Andrey Dyachenko Oct 3 '14 at 12:00
  • 1
    \$\begingroup\$ 22k resistor in series between the source and the pin solved the issue. Thanks a lot! \$\endgroup\$ – Andrey Dyachenko Oct 6 '14 at 9:09
-1
\$\begingroup\$

Power off state of GPIO ports is usually undefined. Just don't power the Arduino off.

\$\endgroup\$
  • \$\begingroup\$ Thanks, that would be an obvious solution. But I am still looking for some more elegant workaround. \$\endgroup\$ – Andrey Dyachenko Oct 3 '14 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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