Go to Post Lighten it up a little to bring it in under the 120 pound weight limit, and I think you will have something there! - dlavery [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 30-05-2005, 03:47
Orborde Orborde is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Apr 2004
Rookie Year: 2003
Location: Indianapolis, IN
Posts: 44
Orborde has a spectacular aura aboutOrborde has a spectacular aura about
Send a message via AIM to Orborde
Question Creative Misuse of Digital IO

I've been reading about how serial communications could be used for Good Things on the robot, and since I haven't figured out quite how to use the TTL/RS232 ports, I thought of writing a serial data transfer thingy for use between two IFI RCs over the Digital I/O ports. So the question is: what happens if I wire a digital IO configured for output directly to one configured for input? Does anything dangerous result? My electronics is a little shaky, so I'm not quite sure whether this might damage the RC.
  #2   Spotlight this post!  
Unread 30-05-2005, 07:38
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,648
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
Re: Creative Misuse of Digital IO

Quote:
Originally Posted by Orborde
I've been reading about how serial communications could be used for Good Things on the robot, and since I haven't figured out quite how to use the TTL/RS232 ports, I thought of writing a serial data transfer thingy for use between two IFI RCs over the Digital I/O ports. So the question is: what happens if I wire a digital IO configured for output directly to one configured for input? Does anything dangerous result? My electronics is a little shaky, so I'm not quite sure whether this might damage the RC.
This should be fine. Actually, when you are debugging, it is sometimes useful to loop the TX and the RX to eachother on one RC. It this way you can send data and check that you get it in the same program.

Joe J.
__________________
Joseph M. Johnson, Ph.D., P.E.
Mentor
Team #88, TJ2
  #3   Spotlight this post!  
Unread 30-05-2005, 12:56
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Creative Misuse of Digital IO

Quote:
Originally Posted by Joe Johnson
This should be fine...
Dr. J.,

I would disagree. The TTL port is meant to be used by a device which derives it's power from the RC (such as a SMiRF or CMU2cam).

I am unsure if the RC has an optocoupler on this port. I rather doubt it. and you don't want the power supplies of the RC's fighting each other...

Unless IFI says different, I would wirewrap a small optical interface board where the RX side of each channel was powered by the receiving RC's +5V and GND. There are many optoisolators which can be used. As an example, I would recommend the HCPL2300 IC chip with a 3.3K series input resistor and a output inverter/buffer for this task.

If IFI says it is OK, you could connect only TX RX and GND and not connect the +5 power between RC controllers.

Bottom line, I would not direct connect without talking to IFI first.

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #4   Spotlight this post!  
Unread 30-05-2005, 19:18
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Creative Misuse of Digital IO

Quote:
Originally Posted by Mike Betts
Dr. J.,

I would disagree. The TTL port is meant to be used by a device which derives it's power from the RC (such as a SMiRF or CMU2cam).

I am unsure if the RC has an optocoupler on this port. I rather doubt it. and you don't want the power supplies of the RC's fighting each other...

Unless IFI says different, I would wirewrap a small optical interface board where the RX side of each channel was powered by the receiving RC's +5V and GND. There are many optoisolators which can be used. As an example, I would recommend the HCPL2300 IC chip with a 3.3K series input resistor and a output inverter/buffer for this task.

If IFI says it is OK, you could connect only TX RX and GND and not connect the +5 power between RC controllers.

Bottom line, I would not direct connect without talking to IFI first.

Mike
Yes, optoisolators would be nice to have, and I certainly understand your worry about frying electronics if the ground potentials were different, but I can't see anything bad happining if everything is battery powered (and referenced to the battery's ground terminal). Bad things will likely happen if the two devices are powered by separate AC/DC converters, where the grounds can have very different relative potentials (I know you know this Mike, but I suspect a few people reading this don't).

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #5   Spotlight this post!  
Unread 30-05-2005, 21:52
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,648
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
Re: Creative Misuse of Digital IO

I would listen to Betts or Watson on this one. I am just an ME are heart. I was thinking about what I would do on my benchtop rather than the possible problems Mr. Betts brings up.

I would think all would be well if the ground wires for the RC's would be connected.

What do the Sparkies in the audience say?

Joe J.
__________________
Joseph M. Johnson, Ph.D., P.E.
Mentor
Team #88, TJ2
  #6   Spotlight this post!  
Unread 31-05-2005, 23:04
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Creative Misuse of Digital IO

Not to be a bugger, but I don't think he intends to use the TTL port...he meant using the Digital sensor input/outputs..at least thats what I got from his post. I'm no electrical guy, but I don't think that'd be a problem, I'd perfer to have someone a little more experienced confirm this, I don't want anyone chasing after me yelling "You blew up my $500 RC!"
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #7   Spotlight this post!  
Unread 01-06-2005, 01:10
Orborde Orborde is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Apr 2004
Rookie Year: 2003
Location: Indianapolis, IN
Posts: 44
Orborde has a spectacular aura aboutOrborde has a spectacular aura about
Send a message via AIM to Orborde
Re: Creative Misuse of Digital IO

Quote:
Not to be a bugger, but I don't think he intends to use the TTL port...he meant using the Digital sensor input/outputs..at least thats what I got from his post. I'm no electrical guy, but I don't think that'd be a problem, I'd perfer to have someone a little more experienced confirm this, I don't want anyone chasing after me yelling "You blew up my $500 RC!"
That is precisely correct. I assumed that the TTL ports would be built to be plugged into each other, but since I haven't figured out how to use those, I was wondering about the Digital IO.
  #8   Spotlight this post!  
Unread 01-06-2005, 07:42
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,795
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: Creative Misuse of Digital IO

Quote:
Originally Posted by Orborde
So the question is: what happens if I wire a digital IO configured for output directly to one configured for input? Does anything dangerous result? My electronics is a little shaky, so I'm not quite sure whether this might damage the RC.
I think what you are asking is "Can I use the relay outputs as a serial digital link to the digital inputs on another RC?" The answer is maybe but there are some other things that will get in your way besides just the electronic interface. I will let Mike or Kevin answer more on this, but the digital inputs are scanned. That means that the RC isn't looking at them all the time so to act as a serial port you will need to keep data there long enough to be accurately read. In normal serial communications, the transceivers "handshake" and both will know when data has been transmitted and when it is accurately received.
The relay outputs are really intended to control the IFI Spike relays. Being the kind of output that does not need to rapidly turn on and off, these outputs may in fact, be to slow for your use. That being said, we have used the digital inputs for data transfer from a custom circuit to the RC.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #9   Spotlight this post!  
Unread 01-06-2005, 09:00
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Creative Misuse of Digital IO

Quote:
Originally Posted by Al Skierkiewicz
I think what you are asking is "Can I use the relay outputs as a serial digital link to the digital inputs on another RC?" The answer is maybe but there are some other things that will get in your way besides just the electronic interface. I will let Mike or Kevin answer more on this, but the digital inputs are scanned. That means that the RC isn't looking at them all the time so to act as a serial port you will need to keep data there long enough to be accurately read. In normal serial communications, the transceivers "handshake" and both will know when data has been transmitted and when it is accurately received.
The relay outputs are really intended to control the IFI Spike relays. Being the kind of output that does not need to rapidly turn on and off, these outputs may in fact, be to slow for your use. That being said, we have used the digital inputs for data transfer from a custom circuit to the RC.
I don't think he meant the relay outputs either (I know I'm very annoying ) it would seem from the spec sheet for the RC that 16 digital I/O lines are just that, input/output lines, so you should be able to send a signal from them. These should be faster than the relay outputs right? I believe his intent was using purely the digital I/O lines, but I could be wrong. However if he is would I be correct in saying it's electrically safe/compatible?
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #10   Spotlight this post!  
Unread 01-06-2005, 09:08
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,795
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: Creative Misuse of Digital IO

Quote:
Originally Posted by Matt Krass
I don't think he meant the relay outputs either (I know I'm very annoying ) it would seem from the spec sheet for the RC that 16 digital I/O lines are just that, input/output lines, so you should be able to send a signal from them. These should be faster than the relay outputs right?
Yes, you are correct. The RC manual does indicate that digital inputs on the RC can also be outputs with some added code and no support from IFI. I was going for the simplest solution first. Per the RC...
"For advanced users, the first six digital I/O pins can be configured as hardware interrupts. While powerful, this feature can cause undesired operation if improperly used. Therefore Innovation First will not provide support for this feature. More details on using interrupts can be found by referring to the 18F8520 microcontroller datasheet and the MPLAB® C18 C Compiler User’s Guide. The Default Code has an interrupt handler written for these pins, but you must still configure and enable the interrupts to use them."
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #11   Spotlight this post!  
Unread 01-06-2005, 09:23
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Creative Misuse of Digital IO

Quote:
Originally Posted by Al Skierkiewicz
the digital inputs are scanned. That means that the RC isn't looking at them all the time so to act as a serial port you will need to keep data there long enough to be accurately read.
This was true on the old PBASIC RC, but is not accurate anymore since they switched to the PIC for the user processor. The digital inputs are inputs direct to the processor and are not scanned.
  #12   Spotlight this post!  
Unread 01-06-2005, 10:37
Sparks333's Avatar
Sparks333 Sparks333 is offline
Robotics Engineer
AKA: Dane B.
FRC #1425 (Wilsonville Robotics)
Team Role: Alumni
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Wilsonville, Oregon
Posts: 184
Sparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of light
Send a message via AIM to Sparks333
Re: Creative Misuse of Digital IO

Just a thought:
It seems to me that if one were to connect to the Digital I/O, you wouldn't want to choose the interrupt lines, whichever ports they may be. You wouldn't want to hook the +5v lines together, because of potential differences. How about powering both robots off a single battery, or hooking the batteries together? Both would be at the same voltage level, then. On the digital i/o only using ground and signal, it seems, may be a safe experiment.
This is outta my leauge, so I look forward to a response.

Sparks
__________________
ICs do weird things when voltage is run out of spec.

I love to take things apart. The fact that they work better when I put them back together it just a bonus.

http://www.ravenblack.net/random/surreal.html
  #13   Spotlight this post!  
Unread 01-06-2005, 10:45
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,795
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: Creative Misuse of Digital IO

Sparks,
The RC guide speaks about the interface activity for the Digital I/O ports. See page 9 for a complete description. In effect what takes place is the inputs are all pulled up internally so that external devices only need to supply closing contacts to ground for a low or an open (pulled up internally) for a high. As outputs, the description indicates a standard tristate device in which the pin can be either high, low, or open circuit. The RC guide also points to the Programming Reference Guide for software control of the pins.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #14   Spotlight this post!  
Unread 01-06-2005, 13:49
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Creative Misuse of Digital IO

Quote:
Originally Posted by Orborde
I've been reading about how serial communications could be used for Good Things on the robot, and since I haven't figured out quite how to use the TTL/RS232 ports, I thought of writing a serial data transfer thingy for use between two IFI RCs over the Digital I/O ports. So the question is: what happens if I wire a digital IO configured for output directly to one configured for input? Does anything dangerous result? My electronics is a little shaky, so I'm not quite sure whether this might damage the RC.
As I mentioned above, this won't be a problem if they're both battery powered. Do not try this using two AC/DC converters because the two RC grounds may be at very different potentials and much current may flow when you connect the grounds together (Many years ago, when I was a newbe engineer, I smoked some hardware when I attached a non-isolated oscilloscope probe ground to the circuit I was debugging <grin>). Furthermore, it would be pretty hard to fry the digital I/O pins because IFI uses 680 ohm series resistors to keep the current within safe limits.

BTW, I've written some code that implements a software serial transmitter that can use any I/O pin. You can find it here: http://kevin.org/frc.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
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
Digital Caliper as a Digital Readout on Small Mill sanddrag Technical Discussion 9 13-10-2005 22:51
Auton digital input ten3brousone Programming 7 20-03-2005 22:23
Dynamic Input/Output Changing Paolo Control System 6 23-09-2004 19:09
heres the code. y this not working omega Programming 16 31-03-2004 15:18
digital inputs not valid just after initialization? WizardOfAz Programming 2 26-01-2004 13:21


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

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