Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : BME-280
Author | Message | ||||
busa Regular Member Joined: 12/02/2015 Location: AustraliaPosts: 81 |
Have taken delivery of a couple of these boards recently and have been trying to get them to work on the Explore 100. Unfortunately all I get are nonsense values. The code I have been using is this one. BME280. Will they in fact work on the Explore 100 or am I out of luck? As an aside I have them working successfully with the Arduino so the boards are definitely not faulty. Regards all |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
What results are you getting? I ran Peter's code (on an MMX) and apart from changing the device address from &H77 to &H76 to suit my modules and I2C to I2C2 to suit the MMX, the code ran as expected. The pressure was slightly higher than my BMP180 and humidity and temperatures were close to my other sensors. All very believable readings. I am happy with the device and Peters code. Jim VK7JH MMedit  MMBasic Help |
||||
busa Regular Member Joined: 12/02/2015 Location: AustraliaPosts: 81 |
Thanks Jim, changing the device address from &H77 to &H76 seems to have done the trick. Left I2C as it was and now getting proper readings. Not sure what it all means but I think it has to do with the default I2C address that the module ships with. Would that be correct? Regards |
||||
busa Regular Member Joined: 12/02/2015 Location: AustraliaPosts: 81 |
Oops, not so fast. Now I find that when I remove the USB cable at con.2 for the serial monitor the readings go silly again. -143.83 for temp, pressure jumps between 700 odd hPa to 1600 or so and humidity jumping around from zero to whatever. Plug USB back in at con.2 and readings instantly stabilise to what they should be. I have the jumper off at con.2 and power is from a 5 volt plug pack at con.1. Not sure what is going on here, any ideas anyone? Regards |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9066 |
Do you have the RTC/Memory module plugged in? If so, remove it and see what happens. What is the current rating of your plug-pack at CON1? This is very odd. Unplugging the USB cable should not affect the running code, other then to lose you your console connection to the host PC. Do you happen to have one of those CP2102 USB-serial adaptors from eBay etc that fits on top of CON6? If you do, remove the USB on CON2, and plug in the 2102 module, and connect THAT serial to the console and see what happens - you won't be able to do this last one, if you don't have one of those 2102 modules, but it is worth asking. Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
I would suspect low voltage giving the odd readings although the BME280 can handle voltages as low as 1.71 volts. Low volts to the micromite itself? Next likely culprit is poor connections, missing ground wire etc. Regarding the address you had to change. The BME280 has a pin available for setting the address. Setting the pin to GND results in &H76, Setting it high results in &H77 My module has it set low and so does yours. Peter has a different module which had it set high. My modle has some solder pads which allow me to change the address. Even very similar looking modules are likely to be different. With a choice of two addresses, you can talk to two modules over the same I2C bus, something that can be very handy. Jim VK7JH MMedit  MMBasic Help |
||||
busa Regular Member Joined: 12/02/2015 Location: AustraliaPosts: 81 |
Thanks for the feedback @TassyJim @Grogster. I think I have narrowed my problems down to faulty connections. Embarrassingly in my haste to use the modules I have done a poor soldering job on the pins, probably because I didn't let the iron heat up enough. I have since redone said pins and so far so good. I can remove the USB connector without it interfering with the readings I am getting and the readings seem to be stable. I will leave the Explore 100 running overnight with the BME280 connected and hopefully by morning all will still be well. Regarding changing the address, I am not sure that I am able to on my module. What pin would I need to ground if I can change it Jim? Regards |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
Your module looks like it is fixed to the one address. Mine has small jumper pads that can be used to change the address. I don't think it anything to worry about unless you are trying to do differential pressure measurements. When I started mine today after a period without power, I noticed that the first set of readings were wrong. The second set a few seconds later were OK as are all subsequent readings. I will have to re-read the datasheet to see what it has to say about initial readings. Jim VK7JH MMedit  MMBasic Help |
||||
busa Regular Member Joined: 12/02/2015 Location: AustraliaPosts: 81 |
Jim wrote: I noticed that with mine also. However I put in a 3 second delay and that seems to have fixed it. Needs to warm up maybe?? bme280_init pause 3000 Would probably work with a shorter delay but that works ok for me so I will run with it for now. Regards |
||||
busa Regular Member Joined: 12/02/2015 Location: AustraliaPosts: 81 |
For the last few days I have been trying to get this particular BME-280 module working reliably with Peter's (matherp) code. Talk about frustration!! I had almost given up and thrown them in the bin when I came across a German website explaining exactly how they should be wired up. It is wired as explained in Peter's code except that SDO must be connected to Once I had done this the module has been rock solid with no change to Peter's code. Hopefully this will help others who may have been trying to get this module working. There seems to be a lot of different types of BME-280's out there in the wild and this is just one of many. Regards |
||||
Print this page |