BME280

For general Flowcode discussion that does not belong in the other sections.
B2CAP-V6
Posts: 49
http://meble-kuchenne.info.pl
Joined: Fri Dec 04, 2020 2:15 pm
Been thanked: 8 times

BME280

Post by B2CAP-V6 »

HI All,

Has anyone ever run the BME280 in hardware with a PIC microcontroller?
I ask because the simulation works perfectly in FC11, but it doesn't work in Proteus.
Thanks in advance for your answers.
Luc
Attachments
Thermo_Baro.fcfx
(25 KiB) Downloaded 301 times
(view online)
Capture d’écran 2026-02-09 095920.jpg
Capture d’écran 2026-02-09 095920.jpg (149.2 KiB) Viewed 4747 times

medelec35
Valued Contributor
Posts: 2487
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 796 times
Been thanked: 858 times

Re: BME280

Post by medelec35 »

Hello.
My Advice would be not to test with a third party simulation before posting on the forums.
It's always wise to test on embedded hardware first.

I have a 18F14K22 I can test BME280 on.
Last time I tested BME280 on ESP32 it worked as expected.
I will carry out some tests and let you know how i get on.
Martin

chipfryer27
Valued Contributor
Posts: 2152
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 478 times
Been thanked: 713 times

Re: BME280

Post by chipfryer27 »

Hi

Following on from above, have you asked Proteus as to why it does not simulate on their software? Surely they would be the best people to ask as they wrote the apparently non-functioning software?

Regards

Steve-Matrix
Matrix Staff
Posts: 2068
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 311 times
Been thanked: 479 times

Re: BME280

Post by Steve-Matrix »

In general, simulation within Flowcode (and with other software such as Proteus) is useful to get an idea if the project is working and to quickly experiment without needing to first create actual hardware. But it is not always 100% representative of how a project will work in real life and so there is no substitute to deploying and testing on a physical prototype.

BenR
Matrix Staff
Posts: 2343
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 647 times
Been thanked: 856 times

Re: BME280

Post by BenR »

In Proteus does the VDDIO & CS of the BME380 need a connection to the 3.3V supply rail?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel

medelec35
Valued Contributor
Posts: 2487
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 796 times
Been thanked: 858 times

Re: BME280

Post by medelec35 »

BME280 Working on embedded hardware as expected.

Code: Select all

Temp = 22.780000, Humid = 47.277343, Pressure = 987.909973
Temp = 22.780000, Humid = 47.289062, Pressure = 987.929992
Temp = 22.790000, Humid = 47.299804, Pressure = 987.900024
Temp = 22.770000, Humid = 47.280273, Pressure = 987.890014
Temp = 22.780000, Humid = 47.289062, Pressure = 987.929992
Temp = 22.790000, Humid = 47.298828, Pressure = 987.969970
Temp = 22.770000, Humid = 47.291992, Pressure = 987.909973
Temp = 22.770000, Humid = 47.301757, Pressure = 988.000000
Temp = 22.780000, Humid = 47.288085, Pressure = 987.969970
Temp = 22.770000, Humid = 47.300781, Pressure = 987.940002
Temp = 22.770000, Humid = 47.300781, Pressure = 987.929992
Temp = 22.780000, Humid = 47.301757, Pressure = 987.969970
Temp = 22.770000, Humid = 47.300781, Pressure = 987.929992
Temp = 22.770000, Humid = 47.302734, Pressure = 987.950012
Temp = 22.790000, Humid = 47.290039, Pressure = 987.960021
Temp = 22.780000, Humid = 47.299804, Pressure = 987.929992
The only issue I have spotted with the component which does not affect any of the readings.
It's just a cosmetic issue which I can fix since there are letters appearing between Temperature and Humidity when the component is placed on the 2D panel.

For other flowcode and Proteus uses, can you let us know if Bens suggestions works.
If not, then after reporting to labcenter support, can you please let us know what their solution is.
Martin

B2CAP-V6
Posts: 49
Joined: Fri Dec 04, 2020 2:15 pm
Been thanked: 8 times

Re: BME280

Post by B2CAP-V6 »

A big thank you to everyone.

Well, I connected (and you were right) VDDIO, SDO, and CSB to the 3.3V rail. It didn't change anything. I forgot to show in my previous post that I do have signals on SDA and SCL.
I haven't heard back from Labcenter. I'm going to try to build a hardware circuit (I'm still in a mess from moving, I have boxes everywhere). Thanks again, Medelec, for doing the test.

B2CAP-V6
Posts: 49
Joined: Fri Dec 04, 2020 2:15 pm
Been thanked: 8 times

Re: BME280

Post by B2CAP-V6 »

Hello,
I’m finally revisiting the BME280 topic. I had the PCBs manufactured, but—just like in the Proteus simulation—it isn't working. All readings return 0.
Has anyone here ever used this BME280?

medelec35
Valued Contributor
Posts: 2487
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 796 times
Been thanked: 858 times

Re: BME280

Post by medelec35 »

What about using the LCD as a diagnostic tool.
Print the return value of initialise.
I use the return value for all the components that have them.
Can you try that and let me know what the value is.
Martin

B2CAP-V6
Posts: 49
Joined: Fri Dec 04, 2020 2:15 pm
Been thanked: 8 times

Re: BME280

Post by B2CAP-V6 »

Good evening Martin,
Using the display as a diagnostic tool is a great idea.
I’m going to name the variable for the BME initialization—for example, `Init` of type `Byte`.
On the LCD, I’ll use `PrintNumber` to display the return value of the BME initialization function.
Is that correct?

Post Reply