From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

On a scale of 1 to 10, how silly is this?

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.

 

circuit.png

I did say "very rough guess"...  But!  It does give very useful results!

 

Good switch (very clean transition from open to closed):

good switch.png

 

Bad switch (notice the noisy line where the "good" switch was vertical):

bad switch.png

 

Bouncy switch (this one is a very bad switch):

bouncy switch.png

 

Bad witch:

bad witch.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 1 of 7
(4,598 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(4,588 Views)

@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...

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 3 of 7
(4,576 Views)

@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).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 7
(4,571 Views)

Now all you needs it to apply some smart processing and automatically reduce the entire measurement to a simple boolean output: GOOD or BAD. 

 

0 Kudos
Message 5 of 7
(4,539 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 7
(4,487 Views)

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

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 7 of 7
(4,479 Views)