mDot Sensornode Firmware Ready to use

@halfbrain Do you have access to an Arafruit BME280 ?
If not … Can you readily get one?
If not … Where do you live? If need be I could send you one…

I think it may be a good thing for you to have the ‘same hardware’ so we an ‘directly troubleshoot’.
Thoughts?

@Halfbrain I ordered this version


and will have it tomorrow night…

I’ll give it a try and let you know the results…

@skramer
Ok.

One thing you could also do is testing your bme280 with an adafruit bme280 library to check if bme280 at least works with their library.

Let me know your results. I dont know how much time I will have for the project until weekend.

@halfbrain I purchased this version of BME280
In an attempt to solve the BME280 issue I decided to setup ONLY the BME280
and
Diymall Bme280 Pressure Temperature Sensor Module with IIC I2c for Arduino
It has exactly four pins VCC/GND/SDA/SCL

I have wired this up …
BME280 <==> mDot
SDA <=====>PC_9
SCL <=====>PA_8

Adafruit FTDI <==> BME280
GND <========> GND
3.3V <========> VCC

I have the Application Mode set as follows:
application.init(APPLICATION_MODE_3);

and the results are the same as before… No Values reported:

I have also attempted by changing the address as both:
#define BME280_SENSOR_ADDRESS 0b11101110 /< Sensor address */
and
#define BME280_SENSOR_ADDRESS 0b11101100 /
< Sensor address */

So we now have three sensors 2 Adafruits and one diymail… ALL with the same behavior on mDot
that does not report values…

I’ll await your advice. Thank you

@skramer
Does the adafruit BME280 work with their library could you test that?

One thing you could do with the diymail Sensor is to use two pull up resistors.

From the Q&A of the amazon product page:

Question: I2cdetect does not detect my device after wiring this to my pi. do i just wire (scl to scl, etc) directly, or am i missing something?
Answer: You likely need a pull up resistor on the data line, don’t remember the reconended resistance off hand

From wikipedia i2c on how to connect pullups

https://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/I2C.svg/425px-I2C.svg.png

they recommend 4.7k resistors but you can also use higher ones or something around this 4.7k but not to low.
for example we’ve used 10k resistors on our hardware.

From my experience such i2c issues are always hard to solve without an Oscilloscope. :confounded:

For me it looks like a Hardware issue because we’ve used the same sensor and connected it according to the offical BME280 Datasheet from Bosch. I don’t know how adafruit and diymall connected the BME280 on their Breakoutboards.

@Halfbrain At your recommendation

I have purchased
http://www.ebay.com/itm/302039868354?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
It seems this used with:
https://sigrok.org/wiki/Main_Page
and here is a video using it to decipher I2C


I’ll have it in a week and see how I can Troubleshoot this and lean Analyzer at the same time

2 Likes

Surely a good investment for your own lab. :+1:

Have you tried the pull ups i mentioned?

@nicoschtein_rga

Because you asked about deep sleeping.

Can tell you that now deepsleep() is implemented and tested in the actual version of my Firmware on the mBed Project Page.

This wiki tells you how to use it.

Let me know if there are some Questions.

@x893 and @nicoschtein_rga

Did you also use the Firmware? If so did you have the same or other problems than skramer?

Would really appreciate any kind of Feedback from you if you used it too. To improve the Firmware and its documentation if necessary.

Hi,
software looks good. But mbedos need 39K flash and it too big. Some codes from your lib very helpfull.

Thanks
Also some problem with build standalone project under Keil 5.2

@x893
Thank for your Feedback.

Why are 39K to big for you?
The mDot has got 512kB. I’m afraid I’cant shrink mBed rtos :stuck_out_tongue_winking_eye: .

Did never use Keil 5.2.
Did the project export from mBed Compiler to Keil IDE work?

I use 128 flash MCU.
I export (or make update to latest version in web ide) to Keil 5 and build fail. But i use some functions for accelerometer and magnetometer. Now i test board with size as iM-880A (30x22mm) with GPS, accelerometer, magnetometer and altimeter, 128 Mbit external flash, micro-USB and solar power controller. So can’t use large size MCU

I have setup deepsleep

It runs and compiles properly…

Q: How can we ‘demonstrate’ its ‘sleeping’?

@skramer

If you have a poweranalyzer you could analyze the input power of your node. You should see that most of the time when no measurment task runs and no data is sent via lora the node only uses a few mW Power.

No I have not tired the ‘resistors’ …
My plan is to wait for the Analyzer so I stop ‘shooting in the dark’
I was told it should arrive by weeks end…

Thank youI’ll report my results…

I see the options for sleep and deepsleep …

What is the option for ‘Stay Awake’?

@skramer Just comment out sleep() or deepsleep() inside the function so that it does “nothing”

@halfbrain I just got this reply (please look at bullet 1) from @kersing regarding the encoding of LoRa packets…

Might it be that ‘mDot Sensornode Firmware’ is sending ASCII instead of Binary?

Should that be the case would you be able to edit your code to send ‘Binary’?

I will take a look at my Code this week if I find some free time.

@halfbrain I have some results to report… While waiting for my Analyzer to arrive… I was learning about I2C… and came across I2C_Scanner on mBed.org I2C Scanner
It compiles and runs correctly… I currently have the following three sensors attached:

a) Max44009
b) BME280 Adafruit
c) MPU9250

I get this back from I2C_Scanner:

device found at address 0xCI2C
device found at address 0x4AI2C
device found at address 0x68I2C
device found at address 0x77

Then I remove all BUT the BME280
and get
I2C device found at address 0x77

so we know BME280 is on Address 0x77…

I edit BME280.h in sensornode project for:

#define BME280_SENSOR_ADDRESS 0b11101110 /< Sensor address */ I I think this is 0x77 and I have also tried
#define BME280_SENSOR_ADDRESS 0b11101100 /
< Sensor address */

and neither reports values back…

Also tried the other BME280 I have:


It reports back in I2C_Scanner as:
device found at address 0x76

I also tried both addresses for this and neither produces any changing values…
Same negative results … unfortunately…

+++++++++++++++++++
Waiting patiently for Analyzer … thanks