"BreakoutBME68X: breakout not found when initialising" on brand new Badger 2040 / BME688 breakout

I’m getting “BreakoutBME68X: breakout not found when initialising” when running any scripts attempting to utilise a BME688 breakout sensor over I2C (connected via QW/ST) to a Badger 2040.

I’ve tried addresses 0x75, 0x76, 0x77. I’m using {"sda": 4, "scl": 5}.

I’m wondering if somehow the sensor was dead on arrival? Is there anything else I can do to test whether it works?

Looking at the schematic, pins 4 and 5 are the correct pins.
I’ve been editing my code examples as follows. I have a Tufty that uses the same pins for i2c.

from breakout_bme68x import BreakoutBME688
from pimoroni_i2c import PimoroniI2C
i2c = PimoroniI2C(sda=(4), scl=(5))
bme = BreakoutBME688(i2c)

This code “should” do an i2c scan.

import machine
sda=machine.Pin(4) # Explorer 20 Breakout 4
scl=machine.Pin(5) # Explorer 21 Breakout 5
i2c=machine.I2C(0,sda=sda, scl=scl, freq=400000)
 
print('Scan i2c bus...')
devices = i2c.scan()
 
if len(devices) == 0:
  print("No i2c device !")
else:
  print('i2c devices found:',len(devices))
 
  for device in devices:  
    print("Decimal address: ",device," | Hex address: ",hex(device))

The default address for the BME688 is 0x76
bme = BreakoutBME688(i2c) assumes this. Only edit / chnage it if you have cut the address jumper on the breakout.

2 Likes

Thanks that’s super helpful. Will save that away somewhere. Unfortunately it has returned No i2c device

So some additional background that might be relevant(?):

  • there were no QW/ST to QW/ST cables available in stock when I was buying, so I bought 2x QW/ST to Dupont header cables
  • I used electrical tape to put the dupont header for each coloured wire together, to make a make-shift QW/ST to QW/ST cable as I couldn’t get anything else by the day that I needed it
  • Once the event was over and I was back home, [and the purpose of buying the sensor passed 😔], I’ve undone the tape and used a breadboard in between rather than tapeing the pins together; still not working

Is there any protection on the BME688 breakout board? Could it have somehow been fried? Or is it more likely that it was dead on arrival?

There is reverse voltage protection on the V+ and Ground. And getting the i2c pins reversed won’t hurt it.
Do you have a raspberry Pi you could test it on?

Cool. That’s what I figured with these breakout boards.

I have a spare Pi 2B+, I’m assuming I’d wanna load micropython onto it and do the same as I’ve already tried?

Oh hrmmm. Doesn’t appear there’s an image for the fullsize boards. I’ll screw around with Python on top of Raspberry Pi OS then.

Yeah, you’ll have to use Python, not Micro Python. There are python examples for that breakout. I have several in use on Pi’s.
pimoroni/bme680-python: Python library for the BME680 gas, temperature, humidity and pressure sensor. (github.com)
sudo pip3 install bme680
bme680-python/examples at master · pimoroni/bme680-python (github.com)
Just run them from Thonny on that Pi.

1 Like

Works on the Pi 2!

…now to swap back to the Badger 2040 and see what’s going on…

argh I’ve figured it out… I’d mostly been leaving the QW/ST cable on the Badger 2040 disconnected, but had only connected it about 5 times. Just now I thought I’d inspect it a bit closer and noticed that it looked like the back pins of the connector were raised/spikey where I would’ve expected solder - so I unplugged the cable and gave the connector a bit of a wiggle…out it comes from its front anchors with no resistance on the solder pads whatsoever - it looks like the QW/ST connector wasn’t ever soldered on! oops!

…guess its time to dust off my very rusty soldering skills and borrow my neighbours soldering iron…

Thanks to @alphanumeric for pointing me in the right direction to rule things out and make this discovery.

Those tabs must have been bent up slightly when the board was soldered up in the oven. They weren’t touching the pads so they didn’t get soldered down. Bummer, but at least you know what’s up with that board now. Pun intended. I’d push / hold them down with a pin or needle, then reflow the solder with a your iron. I’d use a fin tip, if that’s an option.

1 Like

For the BME680 (and Badger 2040 W), I’ve put code here: badger2040/ieq.py at main · OpenDevEd/badger2040 · GitHub

The example works within the overall badger_os, but adding the temperature sensing as another “app”. I’ve tested this with BME680. If anybody knows how to test other sensors (e.g., BME280 as above, BME688 etc), and display the different set measurements accordingly, help is very welcome!