OCCRA
Go to Post I began to see myself as an independent person who was not only being inspired, but able to inspire others and strengthen the FIRST program as a whole. - Jaine Perotti [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Events   CD-Media   CD-Spy   FRC-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-20-2003, 12:56 PM
crazycliffy crazycliffy is offline
Registered User
#0846
 
Join Date: Jan 2003
Location: San Jose
Posts: 11
crazycliffy is an unknown quantity at this point
Robot Controller Digital Input

The RC Digital Input is Not active (off) and set at +5V when it is not connected to ground.

The RC Digital Input is Active (On) when It is tied to ground, at 0V.


What happens when I apply an analog signal to this, from ranges from 0 to 5 volts? Does this mean that If I apply a 1.5V signal to the digital input, will the RC still think it is (Off), and thus Not Active? Obviously, If I put a 0V signal this is ground, and this is enough to trip the digital inputs?

The FullSize RC reference manual says, I can't apply a positive voltage to any of the digital inputs.. But I don't exactly know why they say we can't.

thanks for any help.
  #2   Spotlight this post!  
Unread 01-20-2003, 09:05 PM
Don Reid Don Reid is offline
Registered User
#0997
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Corvallis, Oregon
Posts: 45
Don Reid will become famous soon enough
The input circuit has some threshold. If the input is below this voltage, it will be seen as low (active), above it will be seen as high (inactive). I'd have to see a schematic for the RC to know precisely what this threshold is (or run an experiment), but many common logic systems switch at about 1.4V.

It is possible that the input has "hysteresis" where the high>low threshold is lower than the low>high one.

You should also realize that the threshold is not precise, it can vary from part to part and can change with temperature, voltage, etc.

The digital inputs have some pull up circuit, probably a resistor. This could affect the output of your analog circuit depending on its design.
__________________
Don Reid
  #3   Spotlight this post!  
Unread 01-20-2003, 11:24 PM
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 9,975
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
This is very common practice for interfacing unknown inputs to a complex circuit for digital or status inputs. The input circuit is designed to look for a closing contact to ground or common. The input is designed so that no voltage need be applied from the external circuitry and therefore no crosstalk or voltage interaction that could cause the power supply of the robot controller to induce misc data in any input or affect the operation of the controller. For this reason, applying any voltage, even if it is 5 volts or less, runs the risk of causing errors or damage to the controller or it's power supply.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
All is better now, NOS parts are working fine. Why does this year's game remind me of Violet in Willie Wonka? Hmmmm, I see blueberries!
  #4   Spotlight this post!  
Unread 01-21-2003, 08:57 AM
Lloyd Burns Lloyd Burns is offline
Registered User
FRC #1246 (Agincourt Robotics)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Toronto
Posts: 292
Lloyd Burns is an unknown quantity at this point
The inputs are standard TTL or CMOS digital inputs. Their thresholds are listed in Data Sheets on manufacturers websites. No mention has been made (re IFI equipment) of Schmitt trigger inputs, which have hysteresis, and which would change things only a little.

The highest threshold they would have is CMOS's half of Vdd, with the IFI system, about 2.5 V. TTL and CMOS with TTL-compatibility will switch at around 1.25 to 1.5 V. I haven't tested which IFI has, as it seems unimportant.

Any of these inputs acts like a high impedance input, with a 1 to 100 kohm resistor (depending on logic family) pulling it up to the +5V rail. Basically, the input voltage is either 5 V (but high resistance) when open, or zero when the switch is closed to ground. If you put a resistance from input to ground that is in the range of the pull-up, the state of the output would be practically indeterminate.

When the input is grounded, the fact is reported in the rc/oi_sw bytes as a one.

Analog (slowly varying) signals cause jittery outputs when near the threshold of non-schmitt trigger inputs, and the output snaps to +5V or 0V when the input voltage is further from the threshold. For large (steep slope) analog signals, the output appears as a square wave. Depending on your analog output impedance and voltage, you could have a low, a high, some jitter, or even a serious oscillation [possibly RF] (at the threshold, where the gate is biased to linearity, the gain of ttl gates is very, very high).

Since the IFI eqipment reads the values only every 26 ms (a value posted by others elsewhere in CD), you would not read the jitter near threshold, but the value would not be reliable.

Feeding a pot or a gyro into such a digital input is a poor substitute for using the analog inputs on the other connector. They have ADCs to read the voltage. Once you have a number, your program can compare to other values.

If you apply a positive voltage, say via a switch connected to +5V, you would be taking an input already pulled up to +5V, and switching it to +5V. You'd see no change, so it won't tell you about the switch closure.

BUT, if the +5V is more than half a volt higher than the input IC's +5V, say form a separate (external to IFI) power supply that fails and goes high (eg, to 12V), or a badly adjusted op-amp, you could cause a current flow into the IC's substrate, which would damage the IC permanently, so DON'T. Yes, there are series input saftey resistors in good practice, but good practice says don't depend on them.

So... don't put your daughter on the stage, Mrs Worthington (the outcome is predictably bad), and don't apply analog signals to digital inputs (the output is unpredictably bad).

Sorry for the length.
  #5   Spotlight this post!  
Unread 01-21-2003, 10:24 PM
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 9,975
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
Quote:
Originally posted by Lloyd Burns
If you put a resistance from input to ground that is in the range of the pull-up, the state of the output would be practically indeterminate.
Thanks LLoyd,
I should add here for anyone following this thread, if the input circuitry is CMOS and if you were to encounter the above scenario, this logic family has a nasty tendency to go into a linear region (acting like an amplifier instead of a digital IC)and that causes the IC to draw high currents from the power supply.
All in all, we must use the equipment as intended, digital devices to digital inputs.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
All is better now, NOS parts are working fine. Why does this year's game remind me of Violet in Willie Wonka? Hmmmm, I see blueberries!
  #6   Spotlight this post!  
Unread 01-23-2003, 06:11 PM
rosebud rosebud is offline
Registered User
#0115 (MVRT)
 
Join Date: Sep 2002
Location: California
Posts: 24
rosebud is on a distinguished road
would anyone mind repeating all that above in a language a poor robotics member (that has played with circuits but hasnt taken electronics and therefore wouldnt know the names for eveything) would understand?
  #7   Spotlight this post!  
Unread 01-24-2003, 08:45 AM
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
inputs

The binary inputs are designed to be used with contact switches and no other external components. They're actually doing you a favor, but it makes it a little harder to interface TTL level inputs.

If you want to connect a switch to a pin on the stamp (not the RC) you'd need a pull-up resistor so that the pin has a stable value. When the switch is closed, the pin is shorted to ground.

The pin is internally inverted byt the RC so it sees a 0 when the switch is open and 1 when its closed. Since the input is already pulled up to +5V, applying a voltage to it won't change the value. If you apply more than +5V you'll fry it.

If you have an external circuit that you want to interface with the binary inputs, you'll need to use a component that acts like a switch. I'm sure there are other ways to do it, but I know that an NPN BJT (bipolar junction transistor) as an open-collector switch works fine. You connect the binary input to the collector pin, a ground to the emitter pin, and your logic signal to the base. You also need to connect a ground from your external circuit to the emitter pin. When your signal goes high it closes the switch and when its low it opens it. You can get a pack at Radio Shack for a few bucks.
  #8   Spotlight this post!  
Unread 02-15-2003, 05:51 AM
dave_l dave_l is offline
Registered User
#1038
 
Join Date: Feb 2003
Location: Lakota East HS
Posts: 10
dave_l is an unknown quantity at this point
active interface to DI?

I *REALLY* want access to the Switch 1/2/3 LEDs on the operator interface.

I have _some_ electronics knowledge, and suspected that the DIs are open collector inputs with a pull up resistor.

I am wondering how involved it would be to use say an NPN (ie current sinking) switching transistor with one of the relay outputs to switch one of the digital inputs?

If possible, I would then use some of my unused relay outputs to control DI 1/2/3 and hence the three LEDs on the OI.

Can any electronics gurus out there suggest a simple circuit?

Thanks
  #9   Spotlight this post!  
Unread 02-15-2003, 06:05 AM
dave_l dave_l is offline
Registered User
#1038
 
Join Date: Feb 2003
Location: Lakota East HS
Posts: 10
dave_l is an unknown quantity at this point
DUH!

What seanwhite posted just clicked with me...

Questions:

Just the bare NPN BJT transistor?
No current limiting resistor?
No biasing?

Thanks!
  #10   Spotlight this post!  
Unread 02-15-2003, 06:56 AM
Lloyd Burns Lloyd Burns is offline
Registered User
FRC #1246 (Agincourt Robotics)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Toronto
Posts: 292
Lloyd Burns is an unknown quantity at this point
Re: active interface to DI?

Quote:
Originally posted by dave_l
I *REALLY* want access to the Switch 1/2/3 LEDs on the operator interface.

I have _some_ electronics knowledge, and suspected that the DIs are open collector inputs with a pull up resistor.

I am wondering how involved it would be to use say an NPN (ie current sinking) switching transistor with one of the relay outputs to switch one of the digital inputs?

If possible, I would then use some of my unused relay outputs to control DI 1/2/3 and hence the three LEDs on the OI.

Can any electronics gurus out there suggest a simple circuit?

Thanks
The OI Manual (.pdf from IFI) says that the switch LEDs represent the switch inputs on the RC and are not programmable in PBASIC.

On the other hand, if you used sw1 for the input from your pressure switch, for determining when the compressor should be turned on, you could see from the sw1 LED when the compressor was drawing the battery voltage down.

The "relay outputs" that show up on the OI are the signal the RC passed back to the OI. This same pair of bytes (RelayA and Relay B) are passed inside the RC to the bank of output circuits which control the relay outputs. Shorting one of these would short an output, but have no effect on the feedback bytes, nor on the LEDs. If you wish to use the relay LEDs, you'll have to use Relay1_fwd = 1, or Relay2_rev = 0, to do it

Have you thought of utilizing Out8,9,10 & 11 ? These are low-current outputs to drive your LEDs, and are available from Port1.

dave_l :

Yes just an OC NPN transistor, collector to the input, emitter to ground. Biasing in a digital connection is optional. Every RC digital input has a 10k pull-down resistor to +5V, and all the series resistance it wants, internally. for the sake of your transistor, some series resistance in the base circuit is recommended.

See the IFI site for a .pdf file of the equivalent input circuit.

This is the kind of output you have with the Banner sensors (discussed elsewhere on CD).

Last edited by Lloyd Burns : 02-15-2003 at 07:06 AM.
  #11   Spotlight this post!  
Unread 02-15-2003, 07:38 AM
dave_l dave_l is offline
Registered User
#1038
 
Join Date: Feb 2003
Location: Lakota East HS
Posts: 10
dave_l is an unknown quantity at this point
I'm already using all 8 of the PBASIC accessable LEDs on the OI. I want PBASIC access to the other three OI LEDS. Since they are hardwired to DI 1/2/3, I seek a way to switch those three DIs under program control. Hence my thought of wiring unused Relay Outputs to those three Digital Inputs. Thus, setting a relay out (under program control) switches the DI, resulting in control of the LED on the OI.

re: "some series resistance in the base circuit" - suggestions? couple hundred ohms?

re: "See the IFI site for a .pdf file of the equivalent input circuit" - which file? I've pulled and reviewed most of them, and can't think what you might be referring to...

re: "kind of output you have with the Banner sensors" - I'll check those docs out

Thanks again!
  #12   Spotlight this post!  
Unread 02-16-2003, 03:28 AM
Lloyd Burns Lloyd Burns is offline
Registered User
FRC #1246 (Agincourt Robotics)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Toronto
Posts: 292
Lloyd Burns is an unknown quantity at this point
Relay o/p are indeed 0V or 5V ! Connecting a relay o/p pin, either W/Y or R, to a digital input pin will indeed give you control of those LEDs.

I relied on the diagram IFI posted, showing the gate with 10k pullup to voltage.


BTW, a 2002 RC input switched the switch LED on the OI at 1V< Vin < 2V, so it is not a CMOS (4000 series or 74HCMOS) compatible input, unless IFI used 3V logic, and against that, the open circuit voltage of the pin is 5V. It could still be 74HCTxxx compatible.
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
How much planning goes into your robot? Jnadke General Forum 41 01-29-2006 08:29 PM
serious problem found - robot controller resets when jarred! KenWittlief Electrical 23 03-19-2003 12:30 PM
Robot Digital Input Mike Norton Technical Discussion 5 01-16-2003 01:31 PM
WASH Palm scouting at the Championship Mike Soukup Scouting 2 04-19-2002 02:14 PM
about how Drive Train push the robot... shouldn't the force accelerate the robot? Ken Leung Technical Discussion 12 11-26-2001 08:39 AM


All times are GMT -5. The time now is 11:06 AM.

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


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