Go to Post Keep arrogant, belittling and misspelled bragging off these boards. - Mike [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 01-02-2007, 10:40
SoD SoD is offline
Registered User
FRC #2230
 
Join Date: Jan 2007
Location: Israel
Posts: 15
SoD is an unknown quantity at this point
Re: Microswitch problem

Printf. And there are 3 plugins in the microswitch right? We connected the yellow one to the upper one, nothing to the middle one, and the red one to the lowest one
  #2   Spotlight this post!  
Unread 01-02-2007, 10:45
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Microswitch problem

Quote:
Originally Posted by SoD View Post
Printf. And there are 3 plugins in the microswitch right? We connected the yellow one to the upper one, nothing to the middle one, and the red one to the lowest one
Should be black and yellow, no red at all.
Use only the outer wires at the RC digital input side.

The red is power and used only by devices that need power to work. A switch doesn't need power. It simply connects the signal wire (yellow) to the ground (black) or not to close or open the circuit.

If you have a multimeter you can use it to test that the switch is wired correctly.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 01-02-2007 at 10:50.
  #3   Spotlight this post!  
Unread 01-02-2007, 10:55
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: Microswitch problem

Thanks! We've got it working!
  #4   Spotlight this post!  
Unread 01-02-2007, 11:28
SoD SoD is offline
Registered User
FRC #2230
 
Join Date: Jan 2007
Location: Israel
Posts: 15
SoD is an unknown quantity at this point
Re: Microswitch problem

Darn we now have a new problem

if (rc_dig_in01 == 0)
{
relay1_fwd = 0;
relay1_rev = 0;
}

else
{
relay1_fwd = 1;
relay1_rev = 1 ;
}

This is the code we are trying to use atm, but we have a problem. When the motor works foward, and i press the microswitch, it changes from 1 to 0 and the motor stops working. But when the motor is working backwards, and I press the microswitch, the microswitch turns to 0 but the relay1_rev remains 1 ;s

Whats wrong?
  #5   Spotlight this post!  
Unread 01-02-2007, 11:34
Andrew Morris's Avatar
Andrew Morris Andrew Morris is offline
Oh hey, it's build season!
FRC #0177 (Bobcat Robotics)
Team Role: Student
 
Join Date: Nov 2006
Rookie Year: 2005
Location: South Windsor
Posts: 16
Andrew Morris will become famous soon enough
Re: Microswitch problem

What motor? You haven't mentioned a motor before.

Andrew
__________________
2010 Newton Division & Championship Winner w/ 67 & 294
2009 CMP Champion - Newton Division
2008 CMP Champion - Archimedes Division
2007 Newton Division & Championship Winner
  #6   Spotlight this post!  
Unread 01-02-2007, 11:55
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Microswitch problem

Here is a table of how to set the relay values to get the different results possible. It's from the IFI Spike document: http://www.ifirobotics.com/docs/spik...uide-sep05.pdf

We don't usually set both "rev" and "fwd" to 1 at the same time.

Both fwd=0;rev=0; as well as fwd=1;rev=1; should mean the motor is off.

This code will execute one section only as long as the switch is depressed and the other whenever the switch is not pressed.
Attached Thumbnails
Click image for larger version

Name:	SpikeControl.jpg
Views:	23
Size:	92.6 KB
ID:	4990  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
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
G.T.S ..... (problem) Ami Schwartz Programming 3 28-01-2006 17:01
A linking problem T Shap Programming 6 15-01-2006 00:23
Problem Hailfire CD Forum Support 7 06-10-2002 15:02
PROBLEM!!!!!!?????? Clark Gilbert CD Forum Support 9 02-12-2001 12:43


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

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