MPXA4115A picbasic code


Closed Thread
Results 1 to 40 of 104

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Location
    Thessaloniki , GREECE
    Posts
    61


    Did you find this post helpful? Yes | No

    Thumbs up

    Hi! Alain

    Sorry my friend but I hav not completely followed your idea.
    Do you mean sth like the attachment one?

    (ie: I have to 'expand' the range 200 , 50 and 32 'between' 0 - 3000 m I want to calculate?)

    I have to follow your idea, so help me out , as I can see you have a point here!
    Attached Files Attached Files

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Hi, Alexandros

    As a good drawing is worth ...

    see this XL sheet ...

    shows how things go on ...

    And Overall shows a differential amplifier is needed between Sensor and ADC, to get a good resolution ( see the very, very limited ADC result range ... if direct connexion ).

    Note @ sea level the 300 m altitude is less than .1 v change @ sensor Output. Not that good for noise impact on signal ...

    also note the mean value for altitude meters vs pressure change is precise enough for our use and so, we can consider it only depends on reference pressure @ ground level ... or even, that variation is linear ...

    From the datasheets, It looks the ADC ref ( V+ref - V-ref ) must be, at least 3 v ... no hope from the Vref- side.


    Another way could be to use the MS 5534 Intersema sensor, a NUMERIC output sensor whose resolution is ... 15 bits. Paying attention to noise would be cancelled too ...

    Note particular calibration data from factory is included in the chip memory ... so, no further calibration would be needed ...

    For the moment, I let you play with the calc sheet ...

    Alain
    Attached Files Attached Files
    ************************************************** ***********************
    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 " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default

    You may want to use Darrel's A/D Oversampling routine to get some more precision. It allows you to go all the way up to 16 bit, but you may want to stick to 14 bit. That would get you accuracy of about half a meter.


    http://sites.picbasic.net/component/...,70/pageid,73/
    Attached Images Attached Images  
    http://www.scalerobotics.com

  4. #4
    Join Date
    Jan 2004
    Location
    Thessaloniki , GREECE
    Posts
    61


    Did you find this post helpful? Yes | No

    Default

    So... Acetronics

    *your XL was perfect for make me understand many things!


    After a lot of experiment and according to your very usefull XL I finally decide to two different senarios

    Acording to your XL (and 10 , 12 and 14 bit results attached to xl file below)
    the 'resolution' is at 10bit -> around 8m, 12bit -> around 2m and 14bit -> around <1m

    So I am thinking of
    1st. just use simple pic 10 bit adc and Darrel's oversampling method (thank you scalerobotics for the link)

    2nd use an LM385 for example dual amp and take just 'a window' od the mesurements of MPX4115 between 0-2300 meters

    3rd compine LM385 and MAX187 (12bit) to get better resoloution

    My onle concern is that as I want to keep pcb at minimum of costs / and parts count if Darrel oversampling method works , it would be Great!

    I let you know.

    I am in the progress of schematic and pcb design BUT I have to decide the method first!!
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by bitmaniac View Post
    Acording to your XL (and 10 , 12 and 14 bit results attached to xl file below)
    the 'resolution' is at 10bit -> around 8m, 12bit -> around 2m and 14bit -> around <1m
    Not that it matters much, but in your graph, you are breaking it down to measurements every 0.10 mBar (not A/D conversion resolution). For every 0.10 mBar, your altitude changes by about 0.82 meters. However, this is not the resolution of your analog to digital converter at 14 bits. You will notice that from 0 to 22.13 meters altitude, your a/d conversion reading changes by 40. So ... 22.13 meters/40 = 0.55325 meters per 14 bit increment of your a/d converter. A lot closer to half a meter of resolution with a 14 bit conversion.
    Last edited by ScaleRobotics; - 3rd June 2009 at 17:14.
    http://www.scalerobotics.com

  6. #6
    Join Date
    Jan 2004
    Location
    Thessaloniki , GREECE
    Posts
    61


    Did you find this post helpful? Yes | No

    Talking

    @scalerobotics

    Of course you have not notice that in the last attached XL I upload there are three XL sheet in the file 10,12,14bit

    Test it

    My only concern is what method to choose (to start building) pic A/D with oversampling tehnicue , 12bit MAX and pic or DIF AMP + MAX + pic?

    I cannot decide yet.

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Hi, Alexandros

    I'd recommend you to read the Freescale AN 1646 ...

    Interesting matter !

    take care to the LM 358 output voltage range ... I think it's not the good choice ...
    LMC662 or AD 623 would be better ...

    Have a good Evening

    Alain
    Last edited by Acetronics2; - 3rd June 2009 at 19:42.
    ************************************************** ***********************
    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 " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by bitmaniac View Post
    @scalerobotics

    Of course you have not notice that in the last attached XL I upload there are three XL sheet in the file 10,12,14bit
    Actually, I did notice, and it looks to be 100% correct. I am only pointing out that the increments with the 14 bit is 0.553 meters (near sea level), and not the ~1 meter that you mentioned in your previous post.

    Thanks,

    Walter
    http://www.scalerobotics.com

Similar Threads

  1. sample code for AT45DB642D in Picbasic Pro
    By itsssyam in forum General
    Replies: 0
    Last Post: - 10th March 2010, 06:01
  2. 16f887 44 pin demo board code problem?
    By jessey in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 7th December 2008, 14:17
  3. How to configure SPI in PICBASIC PRO?
    By moogle in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 15th April 2007, 18:31
  4. PicBasic code problems with a 16F84A
    By Lauren Barta in forum mel PIC BASIC
    Replies: 3
    Last Post: - 30th May 2006, 22:50
  5. PicBasic Fundamentals
    By Billyc in forum General
    Replies: 9
    Last Post: - 4th May 2004, 10:04

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