Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   roboRio limited to 8 Analog Inputs (http://www.chiefdelphi.com/forums/showthread.php?t=133177)

GeeTwo 06-02-2015 11:07

Re: roboRio limited to 8 Analog Inputs
 
I certainly see no difficulty in making a robot that wants 8+ analog inputs. One of our earliest analyses with sensors was to figure out which things we could do using DIO or a camera, and we managed to get down to four analogs (two rangefinders to square up on totes, a tape measure potentiometer for the lift, and a gyroscope).

There are a variety of Arduino solutions, including my favorite, the sparkfun pro micro which can give you four analog inputs in a package not much bigger than a stick of gum, and send it over I2C or USB or probably a DIO line if you were willing to write a driver. Their pro-mini has 8 Analog pins and isn't much bigger, and only costs $10, though it does not have USB. If you need many more than that, the Leonardo and Due support 12 analog inputs, and the Mega has 16 analog inputs. When driving an arduino on an FRC robot, I would advise an external regulator, or at least some sort of voltage divider so you're feeding the tiny on-board regulator between 8 and 10 volts rather than over 12. If you hurry to a closing Radio Shack, you can get one of these on closeout.

In addition to Arduinos (look at the micros as well as the original), you could use an xBee module, which I believe can have 7 analog inputs. You wouldn't be using the radio on it, just sending the inputs to the RIO. Disclosure: I've never done this, but it seems like it should work.
I'm not familiar with STAMP or the full variety of boards out there, but a bit of googling should turn up a dozen different ways to get there.

Joe Johnson 06-02-2015 11:40

Re: roboRio limited to 8 Analog Inputs
 
Quote:

Originally Posted by Alan Anderson (Post 1439236)
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.

For our applications, most sensors use 8 turns of a 10 turn pot, so things are a bit tricky.

The Talon SRX looks amazing but we have a bunch of legacy Talons SRs and Victors 888s to use (and we are on a limited budget).

I am leaning toward the REV RIOduino at this point I guess.

Thanks for the input...

Jared 06-02-2015 13:57

Re: roboRio limited to 8 Analog Inputs
 
With clever code, a capacitor, and a resistor, you can read a potentiometer with a digital input.

This document describes how to do it with a basic stamp.
http://www.dummies.com/how-to/conten...from-a-po.html

The roboRIO can likely do this with interrupts/timers.

techhelpbb 06-02-2015 14:54

Re: roboRio limited to 8 Analog Inputs
 
Another point to make: you don't need to sample and pass all the digital data back to the RoboRIO. You could put some of the conditions that the analog value triggers into say an Arduino.

So for example:

RoboRIO tells Arduino that the upper limit it 100 and the lower limit is 25 (out of 8 bit A/D).
Arduino communicates back when the trigger limits are passed to the RoboRIO.

In this way a really silly number of analog inputs can be serviced because of the coprocessing capability added.

ozrien 06-02-2015 15:08

Re: roboRio limited to 8 Analog Inputs
 
Hey Joe, I understand the need for more analog.

I'm sure it's not a surprise, but I've been using Talon SRX's for my analogs when testing things, but honestly its because my sensors are close to the Talons and I'm lazy when it comes to wiring. Also 20ms was sufficient for what I was doing at the time. Also I like being able to use the self-test in the RIO web-based config to quickly-peak at sensor values (Self-test works even with no robot code, I love that).

What do you think the fastest resolution teams typically will need?
If you need faster than say a sample per 10ms, then the MXP extensions might be better, though I haven't actually used them yet.

EDIT : FYI, I saw your post about your budget. But I figured I'd chime in anyway for teams that did have SRXs.

slibert 08-02-2015 23:31

Re: roboRio limited to 8 Analog Inputs
 
Quote:

Originally Posted by Joe Johnson (Post 1439174)
* 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.

The navX MXP has a few dip switches on it; if the UART switch is moved to the disabled position, the navX MXP will completely stay off of the MXP TTL UART lines.

If the navX MXP UART access is disabled, you can still communicate to the navX MXP via the USB port, or you can use the I2C and SPI interfaces. The Labview navX MXP library supports any of these interfaces, however the Java/C++ navX MXP I2C/SPI libraries are not yet released.

Dale 09-02-2015 00:10

Re: roboRio limited to 8 Analog Inputs
 
An analog multiplexer might be all you need. These are available in chip form or this handy breakout board for $4.95 from Sparkfun https://www.sparkfun.com/products/9056

You just select the line you want to monitor using a digital address from your DIO and then the multiplexer acts like a really fast rotary switch to select that line which you'd feed into one of your analog inputs.

This one from Sparkfun switches in nano seconds so your ability to monitor multiple channels is likely limited by what the RoboRIO can deal with.

This particular chip/breakout board gives you 16 channels.

Joe Johnson 09-02-2015 08:25

Re: roboRio limited to 8 Analog Inputs
 
Great replies. Thanks everyone.

In the end, the coding team has come to the rescue. They have been working on a project that will need a Beaglebone Black as a coprocessor. They've already got the communication link bits worked out so really it was pretty simple to have them add some analog data to their scheme.

I hate that we have a new shiny CPU on our robots and still have to do work arounds like this but It Is What It Is.

Thanks again for all the feedback.

Dr. Joe J.


All times are GMT -5. The time now is 20:33.

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