Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

How to utilize full range of Analog Input


  • Please log in to reply
3 replies to this topic

#1 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 28 October 2010 - 03:49 AM

Posted Image
I have a working circuit as above. R1 is a normal 10K resistor. R2 is a sensor with a variable resistance between 10K and 20K. Hooking J1 to Analog input works fine, but due to the way I wire up the circuit, the voltage at J1 is between 1.6 to 2.2V instead of 0 to 3.3V. What do I need to change to use the full resolution of the Analog to Digital converter? That is, mapping 10K thru 20K as 0 thru 1024. Thanks!

#2 bill.french

bill.french

    Advanced Member

  • Members
  • PipPipPip
  • 260 posts
  • LocationPrinceton, NJ

Posted 29 October 2010 - 12:04 AM

I'd be curious to know how to do this, too. My thoughts: 1. I believe you can use the aref to reduce the ceiling, so if you gave aref 2.2v instead of 3.3v, you could get 0-1023 mapped to 0-2200mV, which is a little better. 2. I don't believe you can raise the floor on the built in ADC... i think you'd need to use a differential adc for that? Or, what about this: (i have no idea if this would work at all) 1. Run j1 through a diode -- i wonder if the .7v drop across the diode would get your output from 1.6-2.2 to .9-1.5v? 2. Feed 1.5v to aref then, your 0-1023 would map to 900mV to 1500mV? IF that works, maybe two diodes? I suspect there's not enough current moving for the diodes to work. This is all wild guessing on my part.

#3 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 29 October 2010 - 12:23 AM

I'd be curious to know how to do this, too. My thoughts:

1. I believe you can use the aref to reduce the ceiling, so if you gave aref 2.2v instead of 3.3v, you could get 0-1023 mapped to 0-2200mV, which is a little better.
2. I don't believe you can raise the floor on the built in ADC... i think you'd need to use a differential adc for that?

Or, what about this: (i have no idea if this would work at all)
1. Run j1 through a diode -- i wonder if the .7v drop across the diode would get your output from 1.6-2.2 to .9-1.5v?
2. Feed 1.5v to aref

then, your 0-1023 would map to 900mV to 1500mV? IF that works, maybe two diodes? I suspect there's not enough current moving for the diodes to work.

This is all wild guessing on my part.

Hey, setting 2.2 as a ref is a good idea. I will try that. Thanks Bill!

#4 MattW

MattW

    Member

  • Members
  • PipPip
  • 23 posts

Posted 29 October 2010 - 08:44 PM

Let us know how you go. You ask a great question. :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.