Go to Post Being rude is easy. Being a compassionate human being takes work. - Joe Johnson [more]
Home
Go Back   Chief Delphi > Technical > Control System > FRC Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-02-2009, 22:35
skidmarks skidmarks is offline
Registered User
FRC #0957 (WATSON)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Albany, Oregon
Posts: 19
skidmarks is an unknown quantity at this point
80 millivolt sensor on breakout?

Our main programming mentor (who can't make it today) said he found a voltage input we could use that would go to 80 millivolts (through the analog breakout). As far as I can see, the only inputs are +10 volts. Is it possible to use a more precise input, sacrificing range? If so, how? Thank you.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-02-2009, 22:52
Russ Beavis Russ Beavis is offline
Registered User
no team
 
Join Date: Nov 2005
Location: Manchester, NH - DEKA R&D Corp.
Posts: 341
Russ Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond repute
Re: 80 millivolt sensor on breakout?

The NI 9201 has 12 bits of resolution over a 20V input range - ie 5mV resolution. If you need more precision, you'll need to consider an amplifier to increase the signal level or, perhaps, a SPI or I2C A/D converter or similar. Or is 5mV resolution sufficient?

NI offers a number of analog converters similar to the 9201 but designed for greater precision. Unfortunately, these aren't available for FIRST teams to use (at least for this year since the FPGA is fully locked-down).

Russ
Reply With Quote
  #3   Spotlight this post!  
Unread 12-02-2009, 22:57
skidmarks skidmarks is offline
Registered User
FRC #0957 (WATSON)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Albany, Oregon
Posts: 19
skidmarks is an unknown quantity at this point
Re: 80 millivolt sensor on breakout?

Unfortunately, we probably need about 1mV precision. Since we probably don't have access to amplifiers and we don't have access to I2C A/D converters, I might have to use a different method. Maybe I can use a higher resistance=.02 Ohms, which would give just enough resolution (I'm calculating motor current).
Reply With Quote
  #4   Spotlight this post!  
Unread 12-02-2009, 22:59
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: 80 millivolt sensor on breakout?

You can also try to over sample to get the extra resolution, but that will get hairy quickly.
Reply With Quote
  #5   Spotlight this post!  
Unread 12-02-2009, 23:00
skidmarks skidmarks is offline
Registered User
FRC #0957 (WATSON)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Albany, Oregon
Posts: 19
skidmarks is an unknown quantity at this point
Re: 80 millivolt sensor on breakout?

What do you mean by oversample?
Reply With Quote
  #6   Spotlight this post!  
Unread 13-02-2009, 00:11
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: 80 millivolt sensor on breakout?

Are all analog to digital conversions handled through the
FPGA, whether they are direct reads or not?

Eugene




Quote:
Originally Posted by Russ Beavis View Post
The NI 9201 has 12 bits of resolution over a 20V input range - ie 5mV resolution. If you need more precision, you'll need to consider an amplifier to increase the signal level or, perhaps, a SPI or I2C A/D converter or similar. Or is 5mV resolution sufficient?

NI offers a number of analog converters similar to the 9201 but designed for greater precision. Unfortunately, these aren't available for FIRST teams to use (at least for this year since the FPGA is fully locked-down).

Russ
Reply With Quote
  #7   Spotlight this post!  
Unread 13-02-2009, 07:33
Russ Beavis Russ Beavis is offline
Registered User
no team
 
Join Date: Nov 2005
Location: Manchester, NH - DEKA R&D Corp.
Posts: 341
Russ Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond repute
Re: 80 millivolt sensor on breakout?

The A/D converter resides in the 9201 module. I believe that there is a serial interface between the FPGA in the cRIO chassis and the converter in the 9201 module. The FPGA is hard-coded to simply stream conversion values from all 8 channels and store them on the FPGA for you to query.

Oversampling refers to using the full 62kish samples/sec that the FPGA acquires from each 9201 and averaging, for example, 1000 at a time to effectively produce 1000x the resolution. This CAN work but it requires that the low-level signal has > 5mV peak-to-peak noise and that the noise is somewhat well-behaved.

Eric's suggestion can work in many instances but it requires that your sensor be a little noisy (it's obviously a bit counterintuitive since noise is almost always undesirable). You should DEFINITELY give it a try.

The only downside to oversampling is that it's a filtering process. You won't get the full 31kHz bandwidth as you would when using the raw 62k sample/sec stream. How much bandwidth do you need? If you only need about 100 samples per second from the sensor, you could consider averaging about 300 samples at a time for 62k/(300*2) = 100Hz bandwidth. That could also, theoretically, reduce your resolution from 5mV to 5/300mV = 17uV.

I'd recommend that you give oversampling a chance!

Russ
Reply With Quote
  #8   Spotlight this post!  
Unread 13-02-2009, 10:29
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: 80 millivolt sensor on breakout?

I am only using LabVIEW this year, since I don't know it yet. Hopefully a C++ user can chime in with the complement to this post.

In order to use Oversampling, you will need to use GetAverageVoltage instead of GetVoltage. You may also want to use SetAveraging from the advanced palette in order to dictate exactly how much oversampling you want. Use oversampling, not averaging.

This takes a number of bits rather than a number of sampling. If you choose (for example) 8 bits of oversampling, it will take (2^8=)256 samples at a time and theoretically give you 5mV/256 = 20uV resolution. Bear in mind that this makes huge assumptions about the quality of the noise, so don't think of oversampling as the golden hammer with which to solve all resolution problems.
Reply With Quote
  #9   Spotlight this post!  
Unread 13-02-2009, 22:38
skidmarks skidmarks is offline
Registered User
FRC #0957 (WATSON)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Albany, Oregon
Posts: 19
skidmarks is an unknown quantity at this point
Re: 80 millivolt sensor on breakout?

Okay, I'll try oversampling. The signal is from a motor, so there may be too much noise. I'll see if it works. Hopefully it does, as we have almost no other option. Also, what rate should I use (I will be sampling one ADC on each analog breakout) to get the best resolution? I'm confused, as there are several numbers and I want to know which to use. Is 62K as Russ Beavis says the fastest sampling you can get if you only need one signal, or can we go faster if we aren't using all the signals? Thank you.

Last edited by skidmarks : 13-02-2009 at 23:27.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wiring a potentiometer to the Analog Breakout rsisk Electrical 6 19-01-2009 12:49
Analog Breakout for sale? DarKCroNo FRC Control System 1 05-01-2009 16:39
Wiring analog breakout? excel2474 Electrical 5 31-12-2008 17:30
Pneumatic breakout question. IndySam FRC Control System 5 23-12-2008 17:10
5 Amp Fuses for Analog Breakout & Solenoid Breakout finman Electrical 3 10-12-2008 11:59


All times are GMT -5. The time now is 16:43.

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