Adafruit DP310 Precision Barometer

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
SpeedPIC32
Posts: 252
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 2:35 pm
Has thanked: 36 times
Been thanked: 17 times

Re: Adafruit DP310 Precision Barometer

Post by SpeedPIC32 »

Hello,

Unfortunately, it's not working properly.
The temperature does not come at all.
Pressure shows a random value
Height does not work either.

need help
Greeting SpeedPic32
dps310.fcfx
(16.75 KiB) Downloaded 128 times

BenR
Matrix Staff
Posts: 1731
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 439 times
Been thanked: 602 times

Re: Adafruit DP310 Precision Barometer

Post by BenR »

Hello,

I've spotted a couple of minor problems in the project so I've edited them and hopefully that's made a difference.

dps310_PIC32_USB.fcfx
(15.95 KiB) Downloaded 133 times
Let me know how you get on.

I'm aware of a problem at the moment with hardware I2C so I've also changed the I2C channel to software for now until we can get to the bottom of that issue.

SpeedPIC32
Posts: 252
Joined: Thu Dec 10, 2020 2:35 pm
Has thanked: 36 times
Been thanked: 17 times

Re: Adafruit DP310 Precision Barometer

Post by SpeedPIC32 »

Hello and good morning,
see pictures
Once started, the value is always the same, even if I increase the temperature or pressure.
In the second picture green writing I switch off the PIC and restart it.
there are again random values that remain constant.
The average air pressure at sea level is 1013.25 hPa. a somewhat lower pressure should be displayed, as I do not live by the sea.
Why are there minus values?
Bild 1.png
Bild 1.png (175.58 KiB) Viewed 3872 times
bild 2.png
bild 2.png (148.08 KiB) Viewed 3872 times
greetings SpeedPic32

BenR
Matrix Staff
Posts: 1731
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 439 times
Been thanked: 602 times

Re: Adafruit DP310 Precision Barometer

Post by BenR »

Hello,

It looks like it's never updating the variables and what you're seeing is just an uninitialised variable. Hence the fixed random value.

It was all working fine for me here with temp and pressure giving good readings but that was via the API slave interface so I was talking to the sensor via the Flowcode simulation via an Arduino Uno. I'll do a compilation test and see if I can replicate the problem you're having.

SpeedPIC32
Posts: 252
Joined: Thu Dec 10, 2020 2:35 pm
Has thanked: 36 times
Been thanked: 17 times

Re: Adafruit DP310 Precision Barometer

Post by SpeedPIC32 »

hello

here is a recording of the data transmission to the sensor

dps310.png
dps310.png (78.6 KiB) Viewed 3858 times
greetings

BenR
Matrix Staff
Posts: 1731
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 439 times
Been thanked: 602 times

Re: Adafruit DP310 Precision Barometer

Post by BenR »

Hello,

Thanks for letting me know. I have replicated the issue. It works fine in API mode but not on the device itself so it's either some timing issue or a problem in the maths. I'm on with debugging it but so far no joy.

BenR
Matrix Staff
Posts: 1731
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 439 times
Been thanked: 602 times

Re: Adafruit DP310 Precision Barometer

Post by BenR »

Hello,

Right I've fixed the problem and now confirmed working on both an Arduino Uno and PIC32MZ in both software I2C and hardware channels. Ended up being mainly down to a fairly obscure corner case problem to do with array sizes. One to note and lookout for in future I think.

Let me know how you get on.

SpeedPIC32
Posts: 252
Joined: Thu Dec 10, 2020 2:35 pm
Has thanked: 36 times
Been thanked: 17 times

Re: Adafruit DP310 Precision Barometer

Post by SpeedPIC32 »

Hello Ben

The values are coming now.
Can you add the highest level with 128 measurements and oversampling?
It would also be nice to have the interrupt possibility
How do you create or modify such a sensor file?
Could you add the interrupt option yourself?

Greetings
SpeedPic32

BenR
Matrix Staff
Posts: 1731
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 439 times
Been thanked: 602 times

Re: Adafruit DP310 Precision Barometer

Post by BenR »

Hello,

Excellent, glad you're getting some sense out of it now.

The 128Hz and 128 Oversampling settings should be available already in the component properties. They can also be manually enabled during runtime by using the ConfigureTemperature and ConfigurePressure component macros.

I can make available the read/write register functions if you want to be able to do things like enable interrupt outputs. This way you can choose the specific interrupt you want to enable.

SpeedPIC32
Posts: 252
Joined: Thu Dec 10, 2020 2:35 pm
Has thanked: 36 times
Been thanked: 17 times

Re: Adafruit DP310 Precision Barometer

Post by SpeedPIC32 »

Hello

(I can make available the read/write register functions if you want to be able to do things like enable interrupt outputs. This way you can choose the specific interrupt you want to enable.)

Please add this function

Thank you

Post Reply