Go to Post You hang for show; kick for dough. - Travis Hoffman [more]
Home
Go Back   Chief Delphi > Technical > Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #17   Spotlight this post!  
Unread 28-01-2007, 12:19
Dave K.'s Avatar
Dave K. Dave K. is offline
Engineer/Mentor
FRC #0930
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2005
Location: WI
Posts: 91
Dave K. is a splendid one to beholdDave K. is a splendid one to beholdDave K. is a splendid one to beholdDave K. is a splendid one to beholdDave K. is a splendid one to beholdDave K. is a splendid one to beholdDave K. is a splendid one to behold
Re: Digital to OI Analog

Quote:
Originally Posted by marcan View Post
Has anyone tried interfacing digitally generated signals to the OI? Everyone seems to be using potentiometers like the original joysticks, but using a DAC is obviously possible (see the USB-Chicklet). Does anyone know what the requirements are for the analog inputs of the OI? Given a schematic of the OI input section it should be very easy to design a circuit that works as intended, but I need to know what the inputs rely on to tell what the joystick value is.

My guess is they have a fixed resistor to GND and use the pots (wired to +5 on the joystick) to form a voltage divider, which is then measured using a PIC's A/D converters. In this case, driving a constant-voltage output (buffered using an op-amp if needed) would essentially make the resistor meaningless and allow you to directly control the input proportional to the applied voltage (from an A/D converter, for example). However, many other input systems are possible, including using capacitors to form an R/C circuit and measuring the time it takes to charge/discharge, or using a more complicated arrangement with resistors.
The following information is based on my own observations of the 2007 OI.

The analog joystick inputs are multiplexed at approximately 38Hz (which is the same as the PWM output period) into what appears to be a current sink, set for about 45uA. When 100K Ohms are presented between the +5Aux pin and the analog input, the resulting voltage will be approximately 0.5V.

Although IFI's documentation states that In the event that an analog value is less than 0.05V, a value of 127 will be generated., in reality that voltage is closer to 0.5V (500mV) than 0.05V (50mV). I measured something closer to 632mV.

When the 100K pot is at one extreme, the voltage at the analog input is obviously equal to the +5VAux voltage, and at the other extreme, will be in the 500-600mV range. For the sake of this discussion, I'll use round numbers and use 4.5V for the entire input voltage span. Dividing the span by 256 yields approximately 17.6mV per A/D count.

I should add a note at this point that unless you utilize something like an accurate oscilloscope to observe the analog inputs with just a pot connected, you won't be able to see how IFI's input circuit works.


Given that the analog input is driving a current sink and digitizing the resulting voltage, supplying the analog input with a voltage is relatively straight forward. The primary consideration is that the voltage source be able to handle the multiplexed current sink load, which should be no problem as long as the output impedance of your circuit is sufficently low.

How low is good enough you ask? If one A/D count is 17.6mV and the current sink is 45uA, then roughly 391 ohms of series resistance between an ideal voltage source and the analog input will result in one A/D count error.


Due to the fact that the +5Aux line is current limited, the other source of potential error comes from any voltage drop introduced by loading this power source. It appears that rather than using the +5Aux line as the upper reference of the A/D conversion, IFI is instead using the voltage from the other side of their current limiting circuit, hence the errors that are introduced when the +5Aux line is externally loaded.

By placing a few different resistive loads on this power output, I noted that the current limit may not strictly be something like a current sense resistor coupled with a high side switch, such as a MOSFET, as the impedance appears to vary slightly. Whatever it may be, I measure an effective resistance of 3 to 4 Ohms across a 10 to 100mA range.

Assuming a series resistance of 4 ohms, an error of a single A/D count would be introduced with about 4.4mA of loading on the +5Aux pin.

Clearly if an external circuit's current demand can be held to something in the 10-30mA range only a few percent of the overall A/D range is sacrificed.


The other source of "power" available on some of the joystick interfaces, are the eight outputs intended to be used for lighting LED's.

These outputs are current limited outputs but are NOT based on a 5V supply. The unloaded voltage on these outputs is approximately 2.5V less than the voltage supplied to the OI (as measured from the tether input... I didn't check the coaxial input, nor the competition port input). That 2.5V difference tracks fairly linearlly as the power applied to the OI is varied.

From a current limiting standpoint, the effective series resistance appears to be on the order of 500 ohms. So if the unloaded voltage were 5V, the short circuit current would indeed be limited to 10mA.

With the RC powered from 12V, the voltage at the OI tether input is about 0.5V less, and the unloaded LED output will be about 9V, and the short circuit current was measured at about 18mA.

IF a custom interface circuit were designed to power itself from the LED outputs, it would of course become dependant on the limitations of the RC programming to keep the interface powered. Multiple outputs could be combined (used diode blocking just to be safe) to increase the available current.


Returning attention to the more practical source of power, the +5V Aux line, one could design a boost supply and then regulate the output back down to +5V in order to drive the analog inputs across their full range... however one still needs to consider the tolerancing of IFI's reference voltage versus the voltage generated by the switching supply. For a one-of-a-kind design, clearly just providing a trim pot, or hand selecting components, to trim the supply to match an individual OI could work just fine, but on a production basis would not be practical.

The other potentially tempting method of matching the supply to the OI would be to servo the supply to one or more of the switch contact inputs which are internally pulled to 5V. The problem here is that the +5Aux voltage appears as though it may be seperately derived. The one I was working with measured about 50mV higher on the +5Aux power versus any of the other controller inputs or outputs measured on the other OI connectors.

A switching power supply would require some careful design so as not to adversely effect other devices dependant on the +5Aux power, as well as protection from generating voltages high enough to damage other inputs on the OI.


Additions and corrections invited.
__________________
--Dave
 


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
Analog-to-Digital Converter Code Kevin Watson Programming 29 17-02-2008 13:07
Analog to Digital Conversion Help Der Rowan Programming 4 23-01-2006 00:17
Accelerometer: Analog or Digital? psquared Programming 2 10-02-2005 16:38
Analog / Digital IO Connectors Aidan F. Browne Control System 4 06-02-2005 22:26
Analog vs Digital inputs? f22flyboy Programming 8 08-11-2002 22:18


All times are GMT -5. The time now is 05:40.

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