Go to Post I think it's important to keep FIRST's most important award as the top point getter [in Fantasy FIRST]. It's help reinforce that the Chairman's award, Engineering Inspiration and Woodie Flowers award are actually important and FIRST is about more than just the robots. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-02-2009, 19:01
iSnoopy iSnoopy is offline
Registered User
AKA: Alec
FRC #2554 (WarHawks)
Team Role: Electrical
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Edison
Posts: 2
iSnoopy is an unknown quantity at this point
Micro Switch + PWM = Button?

I have put together a "joystick" or a "button" by soldering a PWM to a micro switch(from the KOP). However, we cannot get the robot to read the button input. We do not believe the code is wrong (It might be wrong) and I'm wondering if its just the way the micro switch is connected to the Driver Station. I did a continuity test and it does have current flowing through it when the switch (button) is pressed. Is it possible to use the micro switch as a button for shooting? Is using a PWM the problem? Please reply ASAP
  #2   Spotlight this post!  
Unread 14-02-2009, 19:15
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 240
BitTwiddler is on a distinguished road
Re: Micro Switch + PWM = Button?

This year, the driver station does not have pull-up or pull-down resistors on the digital inputs therefore they tend to float at an undefined state when no voltage (or ground) is applied.
Here's a diagram showing how switches connected to the Driver Station digital inputs can be connected successfully. Note, this does not necessarily apply to the cRIO digital inputs since they do have pull-up inputs.
see here:

http://www.chiefdelphi.com/forums/attachment.php?attachmentid=7369&stc=1&thumb=1&d=1 234143000
  #3   Spotlight this post!  
Unread 14-02-2009, 19:19
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 240
BitTwiddler is on a distinguished road
Re: Micro Switch + PWM = Button?

Disregard this response please.

Last edited by BitTwiddler : 15-02-2009 at 17:33. Reason: Duplicate information
  #4   Spotlight this post!  
Unread 14-02-2009, 22:09
MrForbes's Avatar
MrForbes MrForbes is offline
Registered User
AKA: Jim
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Sierra Vista AZ
Posts: 5,949
MrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond repute
Re: Micro Switch + PWM = Button?

how did you connect it? I think the way you want to connect it is to have the NO connected to red, NC to black, and COM to white. This will switch the signal input wire from ground to +5v when you push the button.

If you connected it a different way, let us know.
  #5   Spotlight this post!  
Unread 15-02-2009, 00:57
phobozad phobozad is offline
Registered User
AKA: Burger
FRC #0537
Team Role: Alumni
 
Join Date: Jan 2009
Rookie Year: 2005
Location: WI
Posts: 4
phobozad is an unknown quantity at this point
Re: Micro Switch + PWM = Button?

Do you have a pullup resistor for it? This years OI (or DS if you prefer) doesn't have them built in like previous years.
  #6   Spotlight this post!  
Unread 15-02-2009, 10:06
MrForbes's Avatar
MrForbes MrForbes is offline
Registered User
AKA: Jim
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Sierra Vista AZ
Posts: 5,949
MrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond repute
Re: Micro Switch + PWM = Button?

If you connect all three terminals, you don't really need the pullup resistor, but if you only connect two, you might need it.....depending on how you connect it.
  #7   Spotlight this post!  
Unread 15-02-2009, 21:01
iSnoopy iSnoopy is offline
Registered User
AKA: Alec
FRC #2554 (WarHawks)
Team Role: Electrical
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Edison
Posts: 2
iSnoopy is an unknown quantity at this point
Re: Micro Switch + PWM = Button?

I connected the white signal of the PWM to the top left plug (when the ground is on the left and the metal switch is pointing down on the right)
I also connected the black ground of the PWM to the plug sticking out the left side.
I have not connected the red wire of the PWM anywhere is this the problem?
When connected to the DS, it is placed in the Analog section, 1 slot right of the black plastic piece, with ground...well facing the ground (on the bottom)

ill try to get pictures ASAP
  #8   Spotlight this post!  
Unread 15-02-2009, 23:35
MrForbes's Avatar
MrForbes MrForbes is offline
Registered User
AKA: Jim
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Sierra Vista AZ
Posts: 5,949
MrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond repute
Re: Micro Switch + PWM = Button?

The switch has two terminals next to each other, they are NC and NO (normally closed and normally open). There is a third terminal on the other side of the switch, which is COM (common). If you connect the white signal wire to COM, the NC to the black wire, and the NO to the red wire, then it will switch the signal from ground to +5 when the lever is pressed.

The way you have it now, there is no voltage going to the signal input, so it will not show anything in the program when you close the switch.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Micro Switch Code dboisvert C/C++ 2 13-02-2009 13:34
button Switch GunfighterJ Programming 10 10-02-2009 19:39
using a switch/button to turn on a motor smcmahon NI LabVIEW 3 26-01-2009 18:42
push-button switch on robot Conan Electrical 4 10-02-2006 22:03
Need Help Wiring Micro Switch/Limiting Switch Windward Electrical 2 07-02-2006 18:26


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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