different voltaje a/d sensors


Closed Thread
Results 1 to 22 of 22

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    I think he wants full resolution of the A/D converter at 3.3v as well as 5.0v.

    Darrell had a real nice 10 to 16 bit selectable over sample routine. It seems the sites.picbasic.net site is having some issues, so right now you can not download it from there. It was here: http://sites.picbasic.net/index.php?...d=70&pageid=27 and it was called DT_Analog.pbp

    By going to 11 bit over sampling, you would effectively get the resolution back for your 3.3v devices, and no extra hardware. It does slow your sampling time a tiny "bit" for the extra bit.

    Here is the speed
    Last edited by ScaleRobotics; - 21st October 2009 at 02:16.
    http://www.scalerobotics.com

  2. #2
    Join Date
    May 2007
    Posts
    65


    Did you find this post helpful? Yes | No

    Default

    As PIC is 5v I was thinking to transform electrically all sensors to ranges to 0-5v with a "magical IC" that outputs an analog voltaje (not digital) proportional to the input.

    For example if a 3,3v device (accelerometer, sensor) outputs 1,65v (50% of 3,3v), then this "magical IC" will recive 1,65v and output 2,5v (50% of 5v).- Aswell if in another channel or other IC configured to transform 0-3v to 0-5v (if sensor says 1,5v my PIC will receive 2,5v). Of course I think this IC should be circuited for matching the desired specific voltaje range

    Maybe those "magical" IC's are OpAmps, as dhouston (thx!) commented. Can OpAmps make that function?

    "Realtime" processing is critical, so multisampling solution suggested by scalerobotics (thx!)is definitely not an option to my application. Interesting for another app anyway.

    And to shrink voltaje as mackrackit suggested (thx!) it would limit "natural" analog resolution. I prefer to amplify a voltaje than shrinking it. And I hope an Operational Amplifier (OpAmp) does that.

    So: Can OpAmps make that function?

    Thank you very much for your attention !
    "Beethoven had his critics too, see if you can name 3 of them"

  3. #3
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Sounds good. Certainly a lot of options.

    96.8 millionths of a second can seem like an eternity.
    Last edited by ScaleRobotics; - 21st October 2009 at 04:27.
    http://www.scalerobotics.com

  4. #4
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by RodSTAR View Post
    So: Can OpAmps make that function?
    See the Non-Inverting Amplifier in http://www.national.com/an/AN/AN-31.pdf.

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    You should be able to do it with three Resistors and two additional PIC pins...

    R1 connects between Vdd and VRef+.

    R2 connects between VRef+ and Digital PICpinX.

    R3 connects between VRef+ and Digital PICpinY.

    For additional stability, I would connect a 100nF Capacitor between VRef+ and 0v.

    Vref- connects to 0v.

    PICpinX and PICpinY are any available PIC pins that you have spare, that have full I/O capability and when in INPUT mode DO NOT have an internal Weak Pull-Up enabled.

    When requiring 5v on Vref+, set PICpinX and PICpinY to INPUT. A Vref+ of 5v is provided via R1. R2 and R3 are effectively not in circuit.

    When requiring 3.3v on Vref+, set PICpinX to OUTPUT LOW and PICpinY to INPUT. Vref+ is the product of Resistor divider chain R1 and R2. R3 is effectively not in circuit.

    When requiring 3.0v on Vref, set PICpinX to INPUT and PICpinY to OUTPUT LOW. Vref+ is the product of Resistor divider chain R1 and R3. R2 is effectively not in circuit.

    Resistors should be 1% or better. For absolute precision, make R2 and R3 hi-stab multi-turn pots and calibrate for 3.3v and 3.0v with their respecive PICpinX or PICpinY pulled OUTPUT LOW.

    In software, remember when switching between different VRef's, allow a short settling time before performing a new ADC measurement.

    Simple... cheap...

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    Simple... cheap...
    That is slick !!!
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    You should be able to do it with three Resistors and two additional PIC pins...
    I considered that but the OP seemed to be asking how to promote the 3.0V and 3.3V sensors so they are, in effect, 5V sensors. I don't think anything other than amplifying the signals accomplishes that.

    By changing ADCON1 on the fly (between AVdd & Vref+) you can simplify it further. Or, it can be simplified by using 3.3V for the thermistor circuit.

    However, it does assume that the OUTPUT LOW voltage is 0V which may not be the case. It may be as high as 0.6V @ 4.5Vdd.

  8. #8
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Actually you don't need to assume 0v. It can be 1v for all the divider Resistors care... choose the values for R2/R3 that will give you 3.3v/3.0v when that pin is LOW, if you assume 0.6v then you will be pretty close with a paper exercise. If it's a one-off build (or a product where a high degree of accuracy is required), the using Hi-Stab multi-turn pots and manually calibrating as I suggested is the way to go...

    Either way, it's just another suggestion thrown into the melting pot of ideas... another could be using an LM317 and using the PIC to switch-in different Resistor values for different voltages (depending on the current draw, that option could also power your Sensor as well as Vref+)... one could carry on throwing ideas around all night long...

  9. #9
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Mel is Right ( as always !!! )

    For a project I am developping these days ... I use a DAC to feed the Vref + of the ADC ( external ...) and GND or a fraction of Vref+ as Vref - ...

    Note Vref+ is to change with atmospheric conditions ( NO, I didn't tell it's a barometer, ... nooooo ... )

    just to artificially enhance the ADC resolution ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  10. #10
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    Actually you don't need to assume 0v.
    Yeah - I realized that just after posting.

Similar Threads

  1. 12f675 A/d Miseries
    By MARAD75 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 16th December 2008, 03:16
  2. 12F675 A/D and GPIO sleep interrupt
    By macinug in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th September 2008, 15:39
  3. Need advice on A/D
    By james in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 24th August 2007, 20:30
  4. A/D converter fails?
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th February 2006, 19:57
  5. 18F2525 A/D, Comparator and Vref modules
    By fbraun in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 21st May 2005, 00:17

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts