View Single Post
  #5   Spotlight this post!  
Unread 25-01-2009, 18:14
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Drivers Station Magical Current

Quote:
Originally Posted by 3DWolf View Post
There's no current or signal flowing from ANYWHERE.
It's exactly as magical as radio.

The Driver Station digital inputs present essentially no load to whatever is connected to them. They respond to voltage, not current. This means that the teeniest amount of current is capable of bringing the voltage on the pin up or down to the point where the DS sees a signal. A fingertip, a short piece of wire, or an insulated pair of pliers is perfectly capable of acting as an antenna and providing enough current from ambient electromagnetic fields to affect the DS input.

The DS is a high impedance input. If you are also using a high impedance signal source, like an open switch, it is necessary to provide an external load on the pin so that the voltage doesn't go randomly bouncing around due to those few stray electrons. A resistor to either ground or +5 volts is the proper solution. Kevin's diagram will match the closed state of the switch with a logic "1" in software. Reversing the +5 and ground connections will instead make it a logic "1" when the switch is open, if that makes more sense for your application.