Go to Post "Ugly can win" - Mr. Lim [more]
Home
Go Back   Chief Delphi > Technical > Control System > Sensors
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-02-2008, 12:27
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Connecting custom sensor to RC dig I/O

Here's a question for you electrical gurus:

We made a signal sensor that outputs around 2.9 volts until a signal is received at which point the output goes up to around 3.8 volts. We didn't get a chance to hook this up to the RC before ship, but we are wondering what we need to do to make this output work with the digital inputs on the RC. The RC manual says that the input pins expect a 0v or 5v signal, so how do we make our tweener signal work?
Reply With Quote
  #2   Spotlight this post!  
Unread 26-02-2008, 14:36
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,766
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Connecting custom sensor to RC dig I/O

Dan,
It would seem that hooking this up to an analog input and adding a little software would do nicely. You just need to write some code to check that input. If the input rises above your set point then trigger your desired result.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
Reply With Quote
  #3   Spotlight this post!  
Unread 26-02-2008, 14:53
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: Connecting custom sensor to RC dig I/O

Quote:
Originally Posted by Al Skierkiewicz View Post
Dan,
It would seem that hooking this up to an analog input and adding a little software would do nicely. You just need to write some code to check that input. If the input rises above your set point then trigger your desired result.
Aha! Thanks Al, that solution should work great. And keeps us from having to do any more soldering. Shouldn't take much work at all to implement this during day one of our regional.
Reply With Quote
  #4   Spotlight this post!  
Unread 06-03-2008, 14:29
Mike.Allen Mike.Allen is offline
Registered User
FRC #2092
 
Join Date: Jan 2008
Location: Beaufort, SC
Posts: 7
Mike.Allen is an unknown quantity at this point
Re: Connecting custom sensor to RC dig I/O

We too have run in to the same problem. Could you please explain the "the exrtra software!"
-thanks
Reply With Quote
  #5   Spotlight this post!  
Unread 06-03-2008, 14:46
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,353
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Connecting custom sensor to RC dig I/O

Quote:
Originally Posted by Mike.Allen View Post
We too have run in to the same problem. Could you please explain the "the extra software!"
-thanks
A simple comparison function should do it.

Code:
{
char a;

if (rc_ana02 <= 615)
{
    a = 0;
{
else 
{
a = 1;
}
}

This just looks at an analog input and assigns a value of 0 to a variable if the input is less than a threshold, otherwise the variable is set to 1.
I chose 615 because the analog inputs to the RC are 10 bit, or, 1024 values. 615 is 60% of 1024, the same as 3 volts is 60% of the reference 5 volts.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #6   Spotlight this post!  
Unread 06-03-2008, 15:17
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: Connecting custom sensor to RC dig I/O

Yes... As an update on this we put together a gadget that responds to visibile light...uh in light of the IR problems being reported We tested it per Al's suggestion and it works great in bright ambient light using code similar to what billbo posted although polling the analog port directly gave strange values. We used (for testing) Get_analog_port (port#) from some OLD code that either originated from the default code or Kevin Watson's code.
Reply With Quote
  #7   Spotlight this post!  
Unread 31-03-2008, 12:08
Un Luchador's Avatar
Un Luchador Un Luchador is offline
Electricity is my pastime
AKA: Gustavo
FRC #2543 (TitanBot)
Team Role: Electrical
 
Join Date: Mar 2008
Rookie Year: 2008
Location: San Diego
Posts: 22
Un Luchador is an unknown quantity at this point
Send a message via MSN to Un Luchador
Re: Connecting custom sensor to RC dig I/O

Quote:
Originally Posted by TubaMorg View Post
Yes... As an update on this we put together a gadget that responds to visibile light...uh in light of the IR problems being reported We tested it per Al's suggestion and it works great in bright ambient light using code similar to what billbo posted although polling the analog port directly gave strange values. We used (for testing) Get_analog_port (port#) from some OLD code that either originated from the default code or Kevin Watson's code.
What does this gadget accomplish?
__________________
Reply With Quote
  #8   Spotlight this post!  
Unread 31-03-2008, 12:25
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: Connecting custom sensor to RC dig I/O

Quote:
Originally Posted by Un Luchador View Post
What does this gadget accomplish?
Well, as suggested in my previous post, we made the visible light sensor to use instead of the IR sensor in hybrid mode. We used 4 sensors spread apart in a diamond pattern on the back of the robot and handed a 2 million candle power flash light to our robocoach. The sensor module would detect whether a light sensor was receiving a signal then pass it along to its respective analog port (as described above). In accordance to the rules, the robot would respond in a repeatable manner to each sensor. We weren't super ambitious as our programmer mentor (not me this year) was reluctant to make use of the full array of sensors we had installed. So in default, our robot attempted to run laps. One light sensor said "continue autonomous", another said "strafe right", third "strafe left", and the last "pause autonomous".

Problems we had:
Field lighting was brighter than pit lighting, so we had some trouble adjusting the sensitivity of the sensors. In a few practice matches the robot would begin OK then apparently drive to a slightly brighter portion of the field and begin strafing left and right. By qualifying matches we had the sensitivity adjusted fairly well except for one match. Normally we wanted to start with the robot against the Robocoach fence, but in one match we started against the driver station wall closest to the lane divider line. Evidently light reflected off the diamond plate and hit the strafe left sensor, so our robot promptly violated G22 before the Robocoach was able to give it a pause signal.
Reply With Quote
  #9   Spotlight this post!  
Unread 31-03-2008, 12:34
Un Luchador's Avatar
Un Luchador Un Luchador is offline
Electricity is my pastime
AKA: Gustavo
FRC #2543 (TitanBot)
Team Role: Electrical
 
Join Date: Mar 2008
Rookie Year: 2008
Location: San Diego
Posts: 22
Un Luchador is an unknown quantity at this point
Send a message via MSN to Un Luchador
Re: Connecting custom sensor to RC dig I/O

That's smart, I didn't even know we were allowed other communication devices between the robocoach and the robot besides the remote control. Thanks for enlightening me, this should open quite a few doors for us during hybrid mode and sorry if I repeated a question, I wasn't sure if I completely understood what you meant.
__________________
Reply With Quote
  #10   Spotlight this post!  
Unread 31-03-2008, 12:51
adamdb adamdb is offline
Registered User
#1583
 
Join Date: Feb 2005
Location: Parker, CO
Posts: 64
adamdb has a spectacular aura aboutadamdb has a spectacular aura aboutadamdb has a spectacular aura about
Re: Connecting custom sensor to RC dig I/O

As suggested, I would definitely hook it up to an analog port and do the comparison as shown. We tried to use a homemade IR sensor two years ago that had similar on/off voltage ranges and apparently the "off" wasn't off enough for a digital input. The reading from the sensor never changed when connected to the digital port. We ended up not using the sensor as it was a last minute thing and we didn't think to hook it up to an analog port and try it that way.
__________________
Adam Bryant
Programming Mentor
Team 1583
Ridge View Academy Rambotics
Reply With Quote
  #11   Spotlight this post!  
Unread 16-04-2008, 16:30
dgitz dgitz is offline
Registered User
FRC #2219
 
Join Date: Apr 2008
Location: Carbondale, IL
Posts: 9
dgitz is an unknown quantity at this point
Re: Connecting custom sensor to RC dig I/O

If you need the room for an analog i/o or just want to do it a different way, you can use a comparator and calibrate it to cut off on when your signal reaches the higher voltage.
Reply With Quote
Reply


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
Dashboard with analog and dig inputs Andrew Schreiber National Instruments LabVIEW and Data Acquisition 1 13-02-2006 22:48
gear tooth sensor connecting problem nirty Electrical 2 23-01-2006 12:17
Connecting Switch to RC Mr. Steve Control System 2 28-01-2005 22:37
Edubot-sensor wiring & connecting cadets Electrical 2 08-01-2004 10:01
hey Battlecry-goers.. who's up for shin-dig after?! archiver 2000 0 23-06-2002 23:07


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

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