Go to Post there's no time like week 5 to learn programming :D - dcarr [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 19-01-2015, 17:18
topgun's Avatar
topgun topgun is offline
Registered User
FRC #2846 (FireBears)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Minnesota
Posts: 229
topgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant future
roboRio limited to 8 Analog Inputs

Looking at the roboRio I see only 4 Analog inputs on the controller itself and 4 available on the expansion port. This seems rather limiting. It's not like some of the sensors give us a choice on how to interface to the controller.

How can we get around this limit?
__________________
-T

Reply With Quote
  #2   Spotlight this post!  
Unread 19-01-2015, 17:22
AdamHeard's Avatar
AdamHeard AdamHeard is offline
Lead Mentor
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Atascadero
Posts: 5,494
AdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond repute
Send a message via AIM to AdamHeard
Re: roboRio limited to 8 Analog Inputs

Quote:
Originally Posted by topgun View Post
Looking at the roboRio I see only 4 Analog inputs on the controller itself and 4 available on the expansion port. This seems rather limiting. It's not like some of the sensors give us a choice on how to interface to the controller.

How can we get around this limit?
Using an external microcontroller (like an arduino) to read inputs, then pass values over i2c is doable.
Reply With Quote
  #3   Spotlight this post!  
Unread 19-01-2015, 17:46
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,719
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: roboRio limited to 8 Analog Inputs

What are you doing that requires 8 analog inputs? There may be other ways to accomplish the same goal without going to the complexity of an additional microcontroller.
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA
Reply With Quote
  #4   Spotlight this post!  
Unread 19-01-2015, 17:49
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 516
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: roboRio limited to 8 Analog Inputs

Talon SRX also has a single analog input. That might be another way to get the analog voltage into the RIO (over CAN bus). You don't need to use the sensor for closed-looping, you can just use CAN bus to get more analog inputs that way.

The analog in is 3.3V max but with the analog encoder breakout, you can wire a 5V signal (the breakout scales it to 3.3V).

Default update rate is 100ms, but that can be overridden depending on language. Also if you "select" the sensor programmatically, you can get it at 20ms per update.
Reply With Quote
  #5   Spotlight this post!  
Unread 19-01-2015, 23:38
Monochron's Avatar
Monochron Monochron is offline
Engineering Mentor
AKA: Brian O'Sullivan
FRC #4561 (TerrorBytes)
Team Role: Engineer
 
Join Date: Feb 2007
Rookie Year: 2002
Location: Research Triangle Park, NC
Posts: 887
Monochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond repute
Re: roboRio limited to 8 Analog Inputs

Quote:
Originally Posted by ozrien View Post
You don't need to use the sensor for closed-looping, you can just use CAN bus to get more analog inputs that way.
Huh, I hadn't realized that. You can just send the analog values back to the Rio to use?
Reply With Quote
  #6   Spotlight this post!  
Unread 20-01-2015, 00:54
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 516
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: roboRio limited to 8 Analog Inputs

Talon SRX always sends the analog value even if its not selected. See software referenc manual for details. But you can always call the getanalog* functions.
Reply With Quote
  #7   Spotlight this post!  
Unread 20-01-2015, 16:40
crake crake is offline
National Instruments
AKA: Chris Rake
no team (Athena)
Team Role: Engineer
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 184
crake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond reputecrake has a reputation beyond repute
Re: roboRio limited to 8 Analog Inputs

There are several ways to extend the IO capabilities of roboRIO. The use of I2C and SPI (both options on the MXP connector as well) and communication protocols such as CAN give a lot of flexibility. It is an excellent opportunity for the development of "value-add" accessories for the control system.
Reply With Quote
  #8   Spotlight this post!  
Unread 06-02-2015, 09:11
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,629
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: roboRio limited to 8 Analog Inputs

Quote:
Originally Posted by crake View Post
There are several ways to extend the IO capabilities of roboRIO. The use of I2C and SPI (both options on the MXP connector as well) and communication protocols such as CAN give a lot of flexibility. It is an excellent opportunity for the development of "value-add" accessories for the control system.

Let me stipulate that I am finding this problem late and that I should have discovered it sooner. I assumed the new shiny FIRST controller would come with enough IO to support using all the great new sensors that are becoming available to FIRST teams.

Philosophically, we are planning to have a pot provide analog position for pretty much every motor we're using (except for the ones that drive the wheels, which use quad encoders, of course). Given this philosophy, it is really easy to use more than 8 Analog input channels.

Does anyone have a solid solution to this 8 ADC limitation?

I am trying to decide if I should use an Arduino and if so, then which one?

Is it legal to use a Leonardo powered off the roboRIO's USB? If so, does the roboRIO have drivers that recognize he Leonardo's USB Serial Port? I know others have suggested using I2C to communicate with the roboRIO, but it seems to me that it would be simpler if the roboRIO code can get to Leonardo's USB Serial Port.

Another option is the REV RIOduino. Has anyone had luck using this? We are using navX MXP card which may block this solution.

IF NOT ARDUINO, THEN WHAT?

I was thinking of this I2C Breakout Board from Adafruit? Thoughts?

My team needs a solid, reliable easily implemented solution without a lot of fuss and muss. I am sure that this is not a unique problem. If you have figured this out, please share.

Joe J.

P.S. I don't want to hijack this thread but if we go with the Adafruit ADC option, what about powering it? Can I take power from the MXP or do I need to go through a fused line from the PDP as R30, R37 & R42 (collectively) imply?

* Looking at the pinouts, it looks like the REV RIOduino passes through all the MXP signals so I may be able to plug the REV RIOduino into the roboRIO then plug the navX into the REV RIOduino. I have two concerns. First, will they even physically fit together (see photo attached). Second, both want to use the UART lines -- The roboRIO TX line is no problem as I can have them both listen without a conflict. But I will have to let one or the other use the roboRIO RX line. Never a dull momemt.
Attached Thumbnails
Click image for larger version

Name:	navXPiggybackingOnREV_RIOduino.jpg
Views:	43
Size:	88.0 KB
ID:	18177  
__________________
Joseph M. Johnson, Ph.D., P.E.
Mentor
Team #88, TJ2

Last edited by Joe Johnson : 06-02-2015 at 09:17.
Reply With Quote
  #9   Spotlight this post!  
Unread 06-02-2015, 09:44
juchong's Avatar
juchong juchong is offline
Electrical Engineer
AKA: Juan Chong
FRC #2655 (Flying Platypi)
Team Role: Engineer
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Greensboro, NC
Posts: 104
juchong is a jewel in the roughjuchong is a jewel in the roughjuchong is a jewel in the rough
Re: roboRio limited to 8 Analog Inputs

What are you wiring up that requires more than 8 analog inputs? Maybe use encoders instead of potentiometers?
__________________
Teams I've worked with:My Website: http://www.juanjchong.com/
What I do: Analog Devices iSensor Product Engineer
Reply With Quote
  #10   Spotlight this post!  
Unread 06-02-2015, 10:02
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,509
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: roboRio limited to 8 Analog Inputs

If your appendages are using one manipulator or less, you could shift some of the analog pots to absolute encoders to lighten the load.
Reply With Quote
  #11   Spotlight this post!  
Unread 06-02-2015, 10:11
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: roboRio limited to 8 Analog Inputs

Quote:
Originally Posted by Joe Johnson View Post
My team needs a solid, reliable easily implemented solution without a lot of fuss and muss. I am sure that this is not a unique problem. If you have figured this out, please share.
How many ADC Total do you need?

The easiest solution I can think of would be to add a 2nd RIO to the robot and transfer the data over Ethernet to your primary. It's costly, but meets your requirements. Short of that, the adafruit device looks interesting (I'm now investigating this for us for next year).
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
Reply With Quote
  #12   Spotlight this post!  
Unread 06-02-2015, 10:12
Jefferson Jefferson is offline
Registered User
AKA: Jeff Clements
FRC #0016 (Bomb Squad)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Mountain Home, AR
Posts: 257
Jefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant future
Re: roboRio limited to 8 Analog Inputs

Quote:
Originally Posted by Joe Johnson View Post
Let me stipulate...
Joe,

I don't have any experience with the items you listed outside of the NAVX, but I won't let that stop me from throwing my opinion out there.

The REVDuino looks like a good option because it does state that you can stack the MXP boards using the provided connector. You could use I2C to communicate between the roboRio and the arduino to avoid any conflict in the UART. There are enough threads here on that very topic that it shouldn't be too difficult.

The I2C breakout board is intriguing. You should be able to power it using the 5V from the VRM. Seems like a cheap and simple solution.

I really hope you can power through the MXP. The NAVX we are both using is powered with it.

Talon SRXs are really the best option to extend the analog capabilities, but I'm guessing you aren't using them if you're still looking for more analog ins.

I know that wasn't super helpful. Maybe somebody can chime in who has some experience with those devices.
Reply With Quote
  #13   Spotlight this post!  
Unread 06-02-2015, 10:13
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,629
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: roboRio limited to 8 Analog Inputs

Quote:
Originally Posted by juchong View Post
What are you wiring up that requires more than 8 analog inputs? Maybe use encoders instead of potentiometers?

Suppose you have a lift? It would be nice to know where it is, yes?

Maybe you want to know where a tote is as try to align to it for a pick up or a drop off? Switches are nice, but analog values seem better don't they?

How about a chassis something akin to this one? Sure would be nice to know which way your wheels are pointing, yes?

Maybe you have something for picking up cans? Sensors to help position things or to discover the can location add up.

How about a gyro or two together with a 3 axis accelerometer?

Getting over 8 analog inputs seems pretty easy.

As to encoders, they are great but they have the problem of not knowing where they are when you wake up. I'm not saying that FIRST did a lousy job preventing brown outs with the new control system but I am saying that I wouldn't bet my season on the robot never going dark momentarily during a match.

Callin' 'em as I see 'em.

Dr. Joe J.
__________________
Joseph M. Johnson, Ph.D., P.E.
Mentor
Team #88, TJ2
Reply With Quote
  #14   Spotlight this post!  
Unread 06-02-2015, 10:46
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,112
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: roboRio limited to 8 Analog Inputs

Quote:
Originally Posted by Joe Johnson View Post
As to encoders, they are great but they have the problem of not knowing where they are when you wake up.
Absolute rotary encoders don't have this problem. Models with many different types of digital output are available: parallel Grey code, I²C, SPI, synchronous serial, etc. A quick look at the Digi-Key catalog suggests that something appropriate for an arm or swerve steering sensor costs about $25 (which is admittedly more expensive than a good potentiometer).

But you need to bring your toolbox up to date. The Talon SRX motor speed controller has sensor inputs built in, and that's a simple way to add more analog inputs exactly where they are needed.
Reply With Quote
  #15   Spotlight this post!  
Unread 06-02-2015, 10:46
dyanoshak dyanoshak is offline
Registered User
AKA: David Yanoshak
FRC #2158 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Austin, TX
Posts: 189
dyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond repute
Re: roboRio limited to 8 Analog Inputs

Quote:
Originally Posted by Joe Johnson View Post
* Looking at the pinouts, it looks like the REV RIOduino passes through all the MXP signals so I may be able to plug the REV RIOduino into the roboRIO then plug the navX into the REV RIOduino. I have two concerns. First, will they even physically fit together (see photo attached). Second, both want to use the UART lines -- The roboRIO TX line is no problem as I can have them both listen without a conflict. But I will have to let one or the other use the roboRIO RX line. Never a dull momemt.
Hi Joe,

The RIOduino does come with an extra connector giving you the ability to stack another MXP board on top. However, it is unlikely that the navX will clear the shield headers on the RIOduino.

One solution would be to use the REV MXP Extension Cable to mount the navX elsewhere.

Like others have stated, the RIOduino has both UART and I2C connected to the MXP. You can use I2C on the RIOduino and UART on the navX.

Be sure to check out our website for the latest documents and information about the RIOduino: www.revrobotics.com/product/rioduino
__________________
David Yanoshak
Co-founder REV Robotics | www.revrobotics.com
Reply With Quote
Reply


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


All times are GMT -5. The time now is 09:49.

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