Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Analog Breakout? (http://www.chiefdelphi.com/forums/showthread.php?t=101323)

2869Robotics 27-01-2012 21:27

Analog Breakout?
 
We want to use a honeywell microswitch as a ball counter to determine the amount of balls the robot is currently holding. How do we connect this up and program for it? I think we connect this to the analog breakout but I'm not sure. Thanks in advance.
http://www.usfirst.org/uploadedFiles...icroswitch.pdf

jp1247 27-01-2012 23:07

Re: Analog Breakout?
 
What language are you using to program your robot? Also, you can just put that on a i/o slot on your digital sidecar, analogue breakout is more for values between 0 and 1, not high-low values.

2869Robotics 27-01-2012 23:10

Re: Analog Breakout?
 
We are going to program in java. And how would we connect the cables to the microswitch?

jp1247 27-01-2012 23:16

Re: Analog Breakout?
 
Then it should look something like this, probably not exactly though...

Code:

DigitalInput ballCounter = new DigitalInput(I/O slot);
As for wiring it, you're going to want to take a PWM cable, clip off the male end, and solder the red and black wires to either terminal on the switch. Then plug the PWM into the digital i/o slot on your digital sidecar in the appropriate slot, and orientation.

2869Robotics 27-01-2012 23:23

Re: Analog Breakout?
 
Okay, thanks

jp1247 27-01-2012 23:24

Re: Analog Breakout?
 
No problem.

Alan Anderson 28-01-2012 00:23

Re: Analog Breakout?
 
Quote:

Originally Posted by jp1247 (Post 1115041)
As for wiring it, you're going to want to take a PWM cable, clip off the male end, and solder the red and black wires to either terminal on the switch.

Don't do this.

Red is +5 volts. Black is the power return. If the switch makes contact, it'll short out the 5 volt supply on your Digital Sidecar. The supply is protected against this, so it won't be ruined, but everything else connected to +5 will lose power for the duration of the switch activation.

What you should use are the black (-) and white or yellow (signal) wires. Black goes to the Common terminal on the microswitch. The signal wire connects to either the Normally Open or the Normally Closed terminal.

ratdude747 28-01-2012 00:31

Re: Analog Breakout?
 
Quote:

Originally Posted by Alan Anderson (Post 1115075)
Don't do this.

Red is +5 volts. Black is the power return. If the switch makes contact, it'll short out the 5 volt supply on your Digital Sidecar. The supply is protected against this, so it won't be ruined, but everything else connected to +5 will lose power for the duration of the switch activation.

What you should use are the black (-) and white or yellow (signal) wires. Black goes to the Common terminal on the microswitch. The signal wire connects to either the Normally Open or the Normally Closed terminal.

Agreed x100.

I will add that it is IMHO good practice to use a pick to undo the red wire's clip at the female end and remove the cable and metal terminal from the plug... you could call it extra insurance against shorting.

jp1247 17-02-2012 22:06

Re: Analog Breakout?
 
I apologize for the misinformation, that was how i was told to do it by last year's seniors, glad i have never put it into practice myself. Thanks for the info.

slijin 17-02-2012 23:48

Re: Analog Breakout?
 
Quote:

Originally Posted by ratdude747 (Post 1115079)
I will add that it is IMHO good practice to use a pick to undo the red wire's clip at the female end and remove the cable and metal terminal from the plug... you could call it extra insurance against shorting.

My personal preference is to fold back the power wire and heat shrink it so that the wire can't ever complete a circuit unless it's immersed in saline.


All times are GMT -5. The time now is 09:51.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi