Report
4 years, 9 months ago.

Dead pin - DigitalIn in PullUp mode

Hi there,

I am experiencing some difficulties with DigitalIn pins on my mbed. I have to connect a switch on a pin (actually, it's a response from a pressure switch on a pneumatic system). For convenience, I used the PullUp mode, so I connected the switch between the ground and the pin.

But when I test it, it works for a while and then the pin dies (like if it was always connected to ground) and I can't use it anymore.

Is it something I'm doing wrong ?

Many thanks,

Simon

posted by Simon Rohou 29 Jun 2014

Did you figurate out?

posted by J Daniel Martinez C 27 Apr 2016

I finally isolated mbed from strong components as car compressor or solenoid. Since then it seems OK, but I cannot surely say this was the problem. Maybe all of this is due to bad signals coming from elsewhere and propagated through the ground of my system...

posted by Simon Rohou 28 Apr 2016
Comment on this question

2 Answers

4 years, 9 months ago.

The first thing to do is make sure if your pressure switch/circuit is the issue, or your mbed..So when it reads zero, is there actually zero volt on that pin? If you disconnect just that pin and measure it with a multimeter (so the resistance of your switch), what do you see? If you reset your mbed, does it read it correctly again? (And if yes, do you completely restart your entire system, or is it only reading that pin). Did you try using another pin? What is the open resistance of the switch? If it is a physical switch it shouldn't be an issue, but the LPC1768 has quite large pull up resistors (well it doesn't actually got resistors, but their equivalent resistance is large).

Thanks Erik,

It is a physical switch. I try using another pin and it dies too. I think I can't use it anymore. I was wondering if using the switch without any external resistor was a good idea. But I read on this site that this was a good solution...

I think neither the pressure switch nor the mbed is the issue, but the way to connect it.

I use this kind of wiring (no external resistor - connected to ground): https://mbed.org/media/uploads/4180_1/_scaled_mbed_pb.jpg

If I disconnect just that pin and measure it with a multimeter, I see no resistance (on the pressure switch). Concerning the open resistance of the switch: there is no contact when the switch is open (I measured it with a multimeter).

posted by Simon Rohou 29 Jun 2014

This should normally work to connect switches. If you connected it like this, I don't see how it could be wrong. You are 100% sure the ground of the switch is connected to the ground of the mbed? (Although if not I would expect to see the opposite of what you describe).

Can you connect your multimeter in series with the switch, and then measure the current? If current is going through it (something like 50uA is the pull up current, it is fairly low), then that tells us something at least.

posted by Erik Olieman 29 Jun 2014
4 years, 9 months ago.

Simon,

You may want to consider using pin 40 3.3v out, rather than pin 2 Vin for your connection as seen from your pic above.

Dave.

Dave > I think the picture is misleading and I suppose the red wire is connected to the ground (and not Vin). This is a pic from mbed site. Anyway, this is what I did (ground - switch - mbed).

Maybe there is a bad signal going through the ground and destroying the pin connected to the switch. My mbed is also used for the activation of a compressor and a solenoid (with relays). Maybe there is some electrical responses with bad consequences... My compressor is now isolated on another circuit but the issue remains.

Erik > I will test it ASAP.

Thanks for helping out. Do you think a different type of wiring would be preferable?

posted by Simon Rohou 29 Jun 2014

To post an answer, please log in.