Go to Post “Chasing perfection is like trying to find a unicorn. If you go all around the world, you will not find a unicorn. However, you will find a whole freak load of stuff along the way.” - Karthik - Jacob Bendicksen [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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-01-2007, 22:02
marcan marcan is offline
Registered User
AKA: Hector Martin
FRC #2117 (Wolvotics)
Team Role: Engineer
 
Join Date: Sep 2006
Rookie Year: 2007
Location: Carrollton, GA
Posts: 14
marcan will become famous soon enoughmarcan will become famous soon enough
Re: Digital to OI Analog

I could certainly use the digital inputs, but it would be a waste at only 16 available bits (I'd need to multiplex, and for that I'd need to either synchronize to the packet stream or go real slow, which would be a pain)

The digital pots do look like a good solution, and they're not too expensive either. Specifically, these (from Microchip, hah) look like a pretty good choice at $2.65 each (we'll probably use three or four of them to give 6 or 8 inputs).
http://www.digikey.com/scripts/DkSea...604125&Site=US
http://ww1.microchip.com/downloads/e...Doc/11195c.pdf

Thanks for the answer! I'd completely forgotten about digital potentiometers.

Out of curiosity still though, does anyone know what the input section of the OI looks like?
  #2   Spotlight this post!  
Unread 26-01-2007, 22:32
Mike Copioli's Avatar
Mike Copioli Mike Copioli is offline
You make it pretty We make it dance
no team (Retired(3539, 217))
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2001
Location: Romeo
Posts: 453
Mike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond repute
Re: Digital to OI Analog

)

Quote:
Originally Posted by marcan View Post
The digital pots do look like a good solution, and they're not too expensive either. Specifically, these (from Microchip, hah) look like a pretty good choice at $2.65 each (we'll probably use three or four of them to give 6 or 8 inputs).
http://www.digikey.com/scripts/DkSea...604125&Site=US?
http://ww1.microchip.com/downloads/e...Doc/11195c.pdf

If you choose to use the digital pots, make sure you read the data sheet very carefully. They have a tolerance of +-30%. So that means you could get a pot that has a value of 70k to 130k. Also in order to use the pots you must interface the to a device with SPI or I2C. Another words you will need a processor. Processors need power, usually more than the 10mAs supplied by the digital outputs. In short you will need an external power source, which you know, is illegal. This is one of the difficulties that we were faced with when developing the Chicklet.
__________________
Mike Copioli
CTRE Hardware Engineer
http://www.ctr-electronics.com

Team 3539 The Byting Bull Dogs
2013 Michigan State Champions
Team 217 The Thunder Chickens
2006 World Champions
2008 World Champions
2009 Michigan State Champions
  #3   Spotlight this post!  
Unread 26-01-2007, 22:56
marcan marcan is offline
Registered User
AKA: Hector Martin
FRC #2117 (Wolvotics)
Team Role: Engineer
 
Join Date: Sep 2006
Rookie Year: 2007
Location: Carrollton, GA
Posts: 14
marcan will become famous soon enoughmarcan will become famous soon enough
Re: Digital to OI Analog

Quote:
Originally Posted by Mike Copioli View Post
http://ww1.microchip.com/downloads/e...Doc/11195c.pdf

If you choose to use the digital pots, make sure you read the data sheet very carefully. They have a tolerance of +-30%. So that means you could get a pot that has a value of 70k to 130k.
Not a problem - all we need to do is calibrate to our specific parts.

Quote:
Originally Posted by Mike Copioli View Post
Also in order to use the pots you must interface the to a device with SPI or I2C. Another words you will need a processor. Processors need power, usually more than the 10mAs supplied by the digital outputs. In short you will need an external power source, which you know, is illegal. This is one of the difficulties that we were faced with when developing the Chicklet.
You are overestimating the amount of power a small MCU requires. Developing a USB Host device is much more complex than SPI which is a very simple protocol - a small PIC will do, which will definitely use less than 100mA of power. In Sleep mode (which is what the PIC should be most often in, if it doesn't have much to do and it's coded properly), the current is measured in single-digit microamps (yes, micro). With EVERYTHING enabled (not likely), running at 48Mhz (maximum, overkill) frequency, the maximum current drawn is 50mA. With a much more common 4Mhz frequency (plenty for most usages), current is 6mA. These values are for a PIC18F4550, which is a pretty big PIC. The digital pots use less than a milliamp each even under active conditions. The OI provides 100mA. You do the math.

Also, if we really wanted to use a high-current custom circuit, we could just buy the USB-Chicklet, and use it and a USB PIC to get 500mA.
  #4   Spotlight this post!  
Unread 27-01-2007, 00:31
Mike Copioli's Avatar
Mike Copioli Mike Copioli is offline
You make it pretty We make it dance
no team (Retired(3539, 217))
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2001
Location: Romeo
Posts: 453
Mike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond repute
Re: Digital to OI Analog

Quote:
Originally Posted by marcan View Post
Not a problem - all we need to do is calibrate to our specific parts.


You are overestimating the amount of power a small MCU requires. Developing a USB Host device is much more complex than SPI which is a very simple protocol - a small PIC will do, which will definitely use less than 100mA of power. In Sleep mode (which is what the PIC should be most often in, if it doesn't have much to do and it's coded properly), the current is measured in single-digit microamps (yes, micro). With EVERYTHING enabled (not likely), running at 48Mhz (maximum, overkill) frequency, the maximum current drawn is 50mA. With a much more common 4Mhz frequency (plenty for most usages), current is 6mA. These values are for a PIC18F4550, which is a pretty big PIC. The digital pots use less than a milliamp each even under active conditions. The OI provides 100mA. You do the math.

Also, if we really wanted to use a high-current custom circuit, we could just buy the USB-Chicklet, and use it and a USB PIC to get 500mA.

Actually you are over estimating the power output of the joystick port. I'm not quite sure were the 100mA is coming from. I assure you it is not from the joyports.


LED Drivers (see pinouts on pages 7-10)
PORT 1 and PORT 3 each provide four LED output drivers. These LED drivers allow the connection of external LEDs that duplicate the function of the top eight Robot Feedback LEDs on the Operator Interface. The LED drivers provide 5V that is current limited to 10mA. Connect the LED’s anode to
the desired LED drive pin. Connect the LED’s cathode to any ground pins.

The LED drivers are the only way for you to get Power. They are limited to 10mA. If you are thinking of using the 5Vaux pin, that is limited to a value in uA. So unless you are sleeping your processor 90% of the time, you can not get enough power to run your device. Trust me, If there was a way to get power off of the O/I we would have. I guess if you can get your power consumption below 10mA you would be ok. But you still have to deal with the abysmal tolerances of the MCP42100.
__________________
Mike Copioli
CTRE Hardware Engineer
http://www.ctr-electronics.com

Team 3539 The Byting Bull Dogs
2013 Michigan State Champions
Team 217 The Thunder Chickens
2006 World Champions
2008 World Champions
2009 Michigan State Champions
  #5   Spotlight this post!  
Unread 27-01-2007, 01:02
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,653
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Digital to OI Analog

Mike,

The 100ma is coming from the OI reference Guide. It says the current limit on the +5V aux pin is 100ma for all 4 ports. If the practical limit is significantly lower than this by a factor of 10 for some reason... well it'd be nice to know, and it'd be nice if IFI updated the reference.

EDIT: Finished your post. MICROamps on the 5V aux? The reference clearly says 100mA. If the limit is truly microamps, then IFI really needs to update this document.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter

Last edited by Kevin Sevcik : 27-01-2007 at 01:05.
  #6   Spotlight this post!  
Unread 27-01-2007, 01:17
Stuart's Avatar
Stuart Stuart is offline
#include coffee.h
FRC #1745 (P51- Mustangs)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Dallas, TX
Posts: 414
Stuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond repute
Send a message via AIM to Stuart
Re: Digital to OI Analog

well Ill give credit to where credit is due.

the reason I suggested using a digital pot is because I spent most of last semester(in bits and peaces on weekends) building team lightnings ps2-15pin analog adapter.

so not only is it possible to run digital pots with a micro controller . . its been done and tested.
__________________
Proud mentor of Team #1745 the P-51 Mustangs

If at first it doesn't work, use a hammer.
If that doesn't work, use a bigger hammer.

Last edited by Stuart : 27-01-2007 at 01:29.
  #7   Spotlight this post!  
Unread 27-01-2007, 03:10
marcan marcan is offline
Registered User
AKA: Hector Martin
FRC #2117 (Wolvotics)
Team Role: Engineer
 
Join Date: Sep 2006
Rookie Year: 2007
Location: Carrollton, GA
Posts: 14
marcan will become famous soon enoughmarcan will become famous soon enough
Re: Digital to OI Analog

I just tested my OI to 100mA from Port 1 Aux (pins 1 and 4) running two (overloaded) white LEDs. Multimeter measures 100mA, voltmeter measures 4.5V. Okay, so the voltage does drop a bit, but I intend to run 3.3V circuitry using a switching buck regulator anyway, and 4.5V will still work fine for most 5V ICs too. My calculations say worst-case the aux circuits will draw 100mA at 3.3V, which is 66mA at 4.5V and 60mA at 5V (remember, this is a switching regulator, not a linear one, so it ideally does not waste any power). Even with some extra stuff thrown in (LEDs, DC-DC inefficiency, etc), I still have room.
  #8   Spotlight this post!  
Unread 27-01-2007, 08:36
Mike Copioli's Avatar
Mike Copioli Mike Copioli is offline
You make it pretty We make it dance
no team (Retired(3539, 217))
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2001
Location: Romeo
Posts: 453
Mike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond repute
Re: Digital to OI Analog

Quote:
Originally Posted by marcan View Post
I just tested my OI to 100mA from Port 1 Aux (pins 1 and 4) running two (overloaded) white LEDs. Multimeter measures 100mA, voltmeter measures 4.5V. Okay, so the voltage does drop a bit, but I intend to run 3.3V circuitry using a switching buck regulator anyway, and 4.5V will still work fine for most 5V ICs too. My calculations say worst-case the aux circuits will draw 100mA at 3.3V, which is 66mA at 4.5V and 60mA at 5V (remember, this is a switching regulator, not a linear one, so it ideally does not waste any power). Even with some extra stuff thrown in (LEDs, DC-DC inefficiency, etc), I still have room.

You may get lucky for about a minute of continuous use, but I assure you you will be operating the O/I out of spec. A good design sould be created so that it meets the specs called out by the data sheets and operational specifications. If your TOTAL current consumed by ALL 5v AUX pins is greater than 100mA you run the risk of the voltage being clamped to 300mV.
We have done extensive testing with the O/I and this does happen.
__________________
Mike Copioli
CTRE Hardware Engineer
http://www.ctr-electronics.com

Team 3539 The Byting Bull Dogs
2013 Michigan State Champions
Team 217 The Thunder Chickens
2006 World Champions
2008 World Champions
2009 Michigan State Champions
  #9   Spotlight this post!  
Unread 27-01-2007, 08:46
Mike Copioli's Avatar
Mike Copioli Mike Copioli is offline
You make it pretty We make it dance
no team (Retired(3539, 217))
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2001
Location: Romeo
Posts: 453
Mike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond repute
Re: Digital to OI Analog

Quote:
Originally Posted by Stuart View Post
well Ill give credit to where credit is due.

the reason I suggested using a digital pot is because I spent most of last semester(in bits and peaces on weekends) building team lightnings ps2-15pin analog adapter.

so not only is it possible to run digital pots with a micro controller . . its been done and tested.
Yes, I remember you guys from nationals. I believe you used a multiplexing circuit of some kind. You were in our division last year. You had a pit on the same end as us right on the isle. Yes, It is possible. That is not being disputed. I was just pointing out that you most likely will not get the full range from the digpots due to there tolerances.
__________________
Mike Copioli
CTRE Hardware Engineer
http://www.ctr-electronics.com

Team 3539 The Byting Bull Dogs
2013 Michigan State Champions
Team 217 The Thunder Chickens
2006 World Champions
2008 World Champions
2009 Michigan State Champions
  #10   Spotlight this post!  
Unread 27-01-2007, 08:31
Mike Copioli's Avatar
Mike Copioli Mike Copioli is offline
You make it pretty We make it dance
no team (Retired(3539, 217))
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2001
Location: Romeo
Posts: 453
Mike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond repute
Re: Digital to OI Analog

Quote:
Originally Posted by Kevin Sevcik View Post
Mike,

The 100ma is coming from the OI reference Guide. It says the current limit on the +5V aux pin is 100ma for all 4 ports. If the practical limit is significantly lower than this by a factor of 10 for some reason... well it'd be nice to know, and it'd be nice if IFI updated the reference.

EDIT: Finished your post. MICROamps on the 5V aux? The reference clearly says 100mA. If the limit is truly microamps, then IFI really needs to update this document.

I was basing the aux rating on information given to me by IFI. And you should read this more carefully.

[5] The current limit of the +5V Aux from all 4 ports is about 100mA. The Aux Fault Led will start illumination when the current draw from the +5V Aux Outputs total about 120 mA and the +5V Aux voltage will have dropped to about 4.5 volts. Worse case, short condition: after about 30 seconds, the voltage will be at about 300 mV with a current of about 250 mA.

The limit from ALL FOUR PORTS is 100 mA. (This means all four added together.) When the outputs exceed 120mA the Fault LED will Illuminate. And it clearly states that after 30 seconds the voltage will be clamped to 300mV. If you do further testing you will come to the inevitable conclusion that you cannot get 100mA from one joyport continuosly.
__________________
Mike Copioli
CTRE Hardware Engineer
http://www.ctr-electronics.com

Team 3539 The Byting Bull Dogs
2013 Michigan State Champions
Team 217 The Thunder Chickens
2006 World Champions
2008 World Champions
2009 Michigan State Champions

Last edited by Mike Copioli : 27-01-2007 at 08:39.
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
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 20:23.

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