Shop OBEX P1 Docs P2 Docs Learn Events
12V A/D conversion — Parallax Forums

12V A/D conversion

Jimbo30Jimbo30 Posts: 129
edited 2010-01-19 01:41 in Learn with BlocklyProp
I am doing a project using a 12 volt oil pressure sensor 10 to 180 ohms and I am wondering if a 0-12 volt A/D converter IC can be used with the BSII, or is the BS only limited to 0-5volt conversion?

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-01-16 04:35
    Depends on what the output of the AD converter is. You could always use a voltage devider on the output.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Jimbo30Jimbo30 Posts: 129
    edited 2010-01-16 18:39
    Thanks franklin. Yes, I was planning on using a voltage divider to feed into a ADC for 0-12volts. On the parallax website all I see are 0-5volt range ADC IC's, so I guess my question would be can the BS handle a 0-12 volt range ADC chip? I am assuming so since all the output on the ADC chip is 0's & 1's, but I just want to make sure.
  • MSDTechMSDTech Posts: 342
    edited 2010-01-16 19:08
    Jimbo,
    You would use the voltage divider on the output of the sensor to bring it into range 0-5v. For example
    Sensor --/\/\/\/\/\/--|--\/\/\/\/\/\/-- Ground
    __________10K__to ADC__5K
    This would take your ADC input down to 0-4 volts fro a 0-12 Volt sensor output. You just have to remember to multiply the measured voltage by 3 to get the actual voltage from the sensor.
  • Jimbo30Jimbo30 Posts: 129
    edited 2010-01-16 19:29
    MSDTech, thanks! Now that you mention that I did read something about that last night on google somewhere. Luckily I saved the article in my project folder. My sensor is only a 10 to 180 ohms (0-80PSI pressure sending unit). Other than that I thank you both for your feedback.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-01-16 23:22
    One note to add to what every body has said in there post If you find that your reading are jumping around just add a .01 cap between the Input and
    analog ground that will smooth out your input Voltage

    Also you might want to get a ADC chip that has a analog ground and a digital ground


    Your analog ground· would go to your sensor and the digital ground would go to your Micro Controller

    This on the 4 input or more ADC Chips all unused pin put a 10k ohm resister between the Input and analog ground

    In a project that I am working I am using a MAX186 ADC chip and I am still testing some code as well as filtering the Input voltage

    BTW the MAX186 ADC Chip has a range of 0 to 4 volts not 0 to 5 volts

    BTW·· MSDTech

    You would use the voltage divider on the output of the sensor to bring it into range 0-5v. For example
    Sensor --/\/\/\/\/\/--|--\/\/\/\/\/\/-- Ground
    __________10K__to ADC__5K


    Thank You for posting this I need the info on how to·have a input more than 4 volts

    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • Jimbo30Jimbo30 Posts: 129
    edited 2010-01-16 23:37
    Yeah, I was fooling around with ohm's law to get the best range and it seemed 1.8V to 3.75V using a 100 ohm and 50 ohm resistor (10 to 180ohm sensor). It will have to do.

    Post Edited (Jimbo30) : 1/16/2010 11:42:08 PM GMT
  • Jimbo30Jimbo30 Posts: 129
    edited 2010-01-16 23:44
    sam_sam_sam said...
    One note to add to what every body has said in there post If you find that your reading are jumping around just add a .01 cap between the Input and
    analog ground that will smooth out your input Voltage

    Also you might want to get a ADC chip that has a analog ground and a digital ground


    Your analog ground· would go to your sensor and the digital ground would go to your Micro Controller

    This on the 4 input or more ADC Chips all unused pin put a 10k ohm resister between the Input and analog ground

    In a project that I am working I am using a MAX186 ADC chip and I am still testing some code as well as filtering the Input voltage

    BTW the MAX186 ADC Chip has a range of 0 to 4 volts not 0 to 5 volts

    BTW·· MSDTech

    You would use the voltage divider on the output of the sensor to bring it into range 0-5v. For example
    Sensor --/\/\/\/\/\/--|--\/\/\/\/\/\/-- Ground
    __________10K__to ADC__5K


    Thank You for posting this I need the info on how to·have a input more than 4 volts

    ·

    Thanks Sam!· I will keep the MAX186 chip in mind.· My range is 1.8V to 3.75V so that should work well.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-01-17 00:49
    Here is some code to get you started

    Here is the post where·I started·my work on the MAX186 Chip

    http://forums.parallax.com/showthread.php?p=846045

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 1/17/2010 1:07:19 AM GMT
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-01-17 02:13
    Jimbo30
    Thanks Sam!· I will keep the MAX186 chip in mind.· My range is 1.8V to 3.75V so that should work well.

    Why not power your sensor with 5 volt unless you also want the (...host...>>> meaning car or something else)·to also use this voltage

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 1/17/2010 2:19:00 AM GMT
  • Jimbo30Jimbo30 Posts: 129
    edited 2010-01-17 03:32
    sam_sam_sam said...
    Jimbo30
    Thanks Sam!· I will keep the MAX186 chip in mind.· My range is 1.8V to 3.75V so that should work well.

    Why not power your sensor with 5 volt unless you also want the (...host...>>> meaning car or something else)·to also use this voltage
    ·+ 24
    7812----RESISTOR
    |
    RESISTOR
    GRD
    ········ ·········|··········100ohm··········ADC················· 50ohm················ |
    ················ GRD·····························|············································· |
    ·················································· |
    |(
    |
    ·········································································· .01cap filter
    Sam, I will either be using 5V or 12V throughout the system so I will be using 7805s or 7812s in some areas.· I can certainly experiment with 5V--and my sensor being a thermistor type--there shouldn't be a problem with operating voltage·for the·sensor.··I had issues with wattage on some of the components and burnt out two 100 ohm resistors (not even sure the watt rating).· 5V would bring the amperage down considerably.· Either way I will have to experiment with the breadboard before I solder.

    Post Edited (Jimbo30) : 1/17/2010 3:55:04 AM GMT
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-01-17 14:54
    If I would where doing this Project I would start with 5 volts and see if could do the hole project with 5 volts

    the micro controller is 5 volts the ADC is 5 volts·I would try to ·make your sensors work off of 5 as well and run all of it with one regulator

    When I talk about using one regulator

    If you use the·BS2 OEM board kit that you put together your self just leave off the on board regulator

    and use a Switching Regulator·


    http://www.futurlec.com/Mini_Power.shtml

    [url=:popitup('../Pictures/ET-MINI_POWER_SUPPLY_600.jpg')]ET-MINI_POWER_SUPPLY.jpg[/url]····

    Here a small Switching Regulator Board

    above is the link to where you can buy them they are nice little board·I have used

    them in a few of my own project and works very well







    <<<<< Available now for only USD $6.90

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 1/17/2010 3:08:36 PM GMT
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-01-17 15:12
    Keep in mind that you want a·10·mill amp load on your sensor·at all time and if your sensor goes down to 10 ohms and the range is 100 to 10
    then when you calculate for your load

    You first calculate what you want the mill amp load to be·@ (.010 amps)··What··Volts·do you want to use (12)·
    Which would be·1300 ohms· so you sensor has a range of 10 to 100 ohms

    Now you

    Once you have this subtract the resistance of you sensor and calculate what your mill amp load would at the sensor·LOWEST resistance
    ( 10 ohms ) which would be .010 mill amps


    + 24
    7812----RESISTOR
    |
    RESISTOR
    GRD
    ········ ·········|········10 to 100·ohms··ADC········· 50·ohms···················· ·|·· will not work the way that you have it
    ················ GRD······························ |············································· |·· you have do this as if your where using an LED lamp
    ····················································· |
    |(
    |
    ········································································· .01

    + 24
    7812---- RESISTOR·
    |
    Sensor Resistance Range·
    GRD
    ····· >>>>>······|······1300 ohm·········· ·ADC············ ·10 to 100 ohms···························|· <<< your range is now·1210 to·1300 ohms
    ················ GRD·······························|·················································· ············ |
    ·····················································|
    |(
    |·
    ······················································································ ····· ·.01


    I would·try this set up first

    ·+ 24
    7805----RESISTOR
    |
    Sensor Resistance Range·
    GRD
    ········ ·········|··········500 ohm··········ADC················ ·10 to 100 ohm····························| <<<<< your range is now·510 to·600 ohms
    ················ GRD·····························|·································································· ·| <<<<<· your mill amps range is·8.3 to·10 mill amps
    ·················································· |
    |(
    |
    ········································································· .01

    ·

    I hope this helps

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 1/18/2010 1:48:18 AM GMT
  • Jimbo30Jimbo30 Posts: 129
    edited 2010-01-17 16:54
    Thanks Sam


    sam_sam_sam said...
    Keep in mind that you want a·10·mill amp load on your sensor·at all time and if your sensor goes down to 10 ohms and the range is 100 to 10
    then when you calculate for your load

    You first calculate what you want the mill amp load to be·@ (.010 amps)··What··Volts·do you want to use (12)·
    Which would be·1300 ohms· so you sensor has a range of 10 to 100 ohms

    Now you

    Once you have this subtract the resistance of you sensor and calculate what your mill amp load would at the sensor·LOWEST resistance
    ( 10 ohms ) which would be .024 mill amps


    + 24
    7812----RESISTOR
    |
    RESISTOR
    GRD
    ········ ·········|········10 to 100·ohms··ADC········· 50·ohms···················· ·|·· will not work the way that you have it
    ················ GRD······························ |············································· |·· you have do this as if your where using an LED lamp
    ····················································· |
    |(
    |
    ········································································· .01

    + 24
    7812---- RESISTOR·
    |
    Sensor Resistance Range·
    GRD
    ····· >>>>>······|······500 ohm·········· ·ADC············ ·10 to 100 ohms···························|· <<< your range is now·1210 to·1300 ohms
    ················ GRD·······························|·················································· ············ |
    ·····················································|
    |(
    |·
    ······················································································ ····· ·.01


    I would·try this set up first

    ·+ 24
    7805----RESISTOR
    |
    Sensor Resistance Range·
    GRD
    ········ ·········|··········500 ohm··········ADC················ ·10 to 100 ohm····························| <<<<< your range is now·510 to·600 ohms
    ················ GRD·····························|·································································· ·| <<<<<· your mill amps range is·10 to·14 mill amps
    ·················································· |
    |(
    |
    ········································································· .01

    ·

    I hope this helps

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-01-18 01:48
    Please look at my post again because·I found some mistakes that I fixed

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • Jimbo30Jimbo30 Posts: 129
    edited 2010-01-18 22:21
    Thanks, Sam.· I myself had a mistake.··The sensor was supposed to be 10-180ohms· I went ahead and tested the below circuit.··The current is now at a range of 11mA to around 18mA·and it should give me 0 - 2 V which should be sufficient for 0-80PSI.· The filter Cap didn't seem to·do much, but from what I remember it is always a good idea to filter any noise.· Furthermore, I kept my wattage down so it seems pretty efficient.··· I guess I learned a couple of things throughout this ordeal. hop.gif

    ··················································· ADC

    7805
    RESISTOR (270 ohm)
    |
    Sensor (10-180 ohm)
    GRD

    ················································· |
    | |
    |
    ···································································· .01 Filter Cap
    sam_sam_sam said...
    Please look at my post again because·I found some mistakes that I fixed

    Post Edited (Jimbo30) : 1/19/2010 12:27:44 AM GMT
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-01-19 01:41
    I am glad that you got it working· Please post your working code when you are done with this Project Thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
Sign In or Register to comment.