Troubleshooting


Wouldn't it be nice if everything always worked on the first try? You just bought a cool new sensor, wire it to your Arduino, upload the example code and without flinching, the sensor data starts streaming on the Serial Monitor window! It should work like that every time...

xkcd.com

xkcd: heaven

Now back to real life, you wire that new sensor to the Arduino, upload the example code and open the Serial Monitor waiting for that stream of data flowing endlessly from the sensor. But the Serial Monitor just stares at you with a blank face...

 

But there is no need to despair! This troubleshooting guide is here to help you find the cause of your troubles. Let's get started!

Troubleshooting: Connecting a Sensor to an Arduino


1. First situation: you upload an example code and after opening the Serial Monitor, nothing happens!

 

No communication with the sensor was established. This usually happens when the SDI and SCK pins are connected, but either the GND or the VCC or both pins are unconnected. 

Troubleshooting: Blank Serial Monitor

 

2. The Serial Monitor is also blank after uploading the code, but this time the voltage regulator is getting really hot!

 

The GND and the VCC pins are inverted! You really don't want that to happen. If the voltage regulator gets too hot, it will be permanently damaged!  

Troubleshooting: Voltage Regulator too hot!

3. After uploading the code, the Serial Monitor opens with an error message!

 

The error message is written on the example codes and is triggered when the Chip ID is not recognized. All BME280 sensors are programmed with an identification code, written in a specific register in the sensor. All sensors have the same ID code: 0x60. The example codes read this register and if something different than 0x60 comes back, this error appears.

 

If you are using the I2C bus, this can happen under three circumstances: 

  • The SDI or SCK wires are either missing or inverted. 
  • The example code is programmed with the alternative I2C address (0x76), but the SDO pin is not connected to GND.
  • The example code is programmed with the default I2C address (0x77), but the SDO is connected to GND.

If you are using the SPI bus, this can happen under these circumstances:

  • The VCC pin is unconnected.
  • One or more of the SDI, SCK, SDO or CS wires are missing.
  • The SDI, SCK and SDO wires are connected to the ICSP header, but the code is programmed to use Software-SPI.
  • The SDI, SCK, SDO and CS wires are all connected to digital pins, but the code is programmed to use Hardware-SPI.
  • The SDI, SCK, SDO and CS wires are all connected. But if you are using Software-SPI communication, the wires and the digital pins on the example code don't match.
  • The SDI, SCK, SDO and CS wires are all connected. But if you are using Hardware-SPI, the wires on the ICSP header are inverted.
Troubleshooting: Error Message

4. The measurement starts fine, but after a while the values from the sensor stop making sense and the Serial Monitor freezes.

 

If the Serial Monitor freezes immediately, then the VCC pin is no longer connected. If the GND pin instead is no longer connected, the measurement may keep running, but the values are nonsense.

Troubleshooting: Nonsense values

5. The measurement starts fine, but after a while, the data stops making sense. This time the code keeps running.

 

This happens when the communication is interrupted during the measurement. Either the SCK or the SDI wires or both are unconnected.

Troubleshooting: I2C miscommunication

Did this Troubleshooting guide help you? If you are still having difficulties, please write us about it (info@bluedot.space) and we will try to help you from here! 


xkcd.com

xkcd: hell

Comments

Please tell us what you think about our website and our products. We welcome your comments and suggestions.

Comments: 0