04-25-2017 01:40 PM
I want to make a very rough guess at the resistance of a switch as it closes, and I'm using a USB-6009 to do it. A technician was testing these (pressure) switches by monitoring the resistance while slowly increasing the pressure and I was able to identify the ones he identified as "bad" using this method. Will I lose my Engineer card for this? I had half a mind to post this to the Rube Goldberg thread, but that's the half I'm using to do this quality work.
I did say "very rough guess"... But! It does give very useful results!
Good switch (very clean transition from open to closed):
Bad switch (notice the noisy line where the "good" switch was vertical):
Bouncy switch (this one is a very bad switch):
Bad witch:
04-25-2017 01:56 PM
So it looks like you are using P0.0 as a power supply? Not sure I like that since you are current limiting the digital output. It would be better if you put a resistor in series with P0.0 (AI1 still tied directly to S1). You could also use the +5V output of the USB-6009 instead of the digital line.
04-25-2017 02:09 PM
@crossrulz wrote:
So it looks like you are using P0.0 as a power supply?
No. I'm using that as a digital input to know when the switch closes/opens (so I can record the pressure transducer connected to AI0). Let me think about your suggestion. Half a mind...
04-25-2017 02:18 PM
@jcarmody wrote:
@crossrulz wrote:
So it looks like you are using P0.0 as a power supply?
No. I'm using that as a digital input to know when the switch closes/opens (so I can record the pressure transducer connected to AI0).
Ok, that makes a lot more sense. And then you just depend on the built-in pull up resistor on the digital input (4.7kOhm to +5V, yep you're good).
04-25-2017 09:10 PM
Now all you needs it to apply some smart processing and automatically reduce the entire measurement to a simple boolean output: GOOD or BAD.
04-26-2017 01:14 PM
It was not silly until I saw bad (s)witch. Very nice touch by the way.
On a related thought...
My eldest G-daughter loved that movie when she was way young (she is a whole eight years old now). We were sitting down for another viewing when I quizzed her...
Grampa: "Olivia, which of the characters do we see first?" (expecting her to say the Scarecrow.)
Olivia: "The lion".
And to Grampa's surprise, she was right! As the movie opened the MGM Lion roared and taught me she was smarter than I thought!
Ben
04-26-2017 02:09 PM
Jim:
11? 🙂 Not so silly if it works reliably.
Ben:
And on the Lion's 3rd roar that is when you start playing 'The Dark Side of the Moon'! It is uncanny.
-AK2DM