MS5607 barometer problem

Hey! So I recently created a custom PCB using the atsamd21e18 micontroller. The pcb works quite well and I can get correct data using the BMI088 IMU. However, the ms5607 does not appear to be working. What I mean by this is that the IMU fails to initialize after calling the .begin() function in the library.


I am using the MS5607 Library for Arduino by Uravu Labs and here is the specific sensor I am using: https://www.digikey.com/en/products/detail/te-connectivity-measurement-specialties/MS560702BA03-50/4700931

Code:

#include <Arduino.h>
#include <MS5607.h>
#include <Adafruit_NeoPixel.h>
#include <Wire.h>

MS5607 P_Sens;
Adafruit_NeoPixel pixels(1, LED_BUILTIN, NEO_GRB + NEO_KHZ800);

float H_val_prev = 0;

void setup(void){
  pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
  pixels.show();
  pixels.setBrightness(50);

  if(!P_Sens.begin()){
    pixels.setPixelColor(0, 255, 0, 0);
    pixels.show();
  }else{
    pixels.setPixelColor(0, 0, 0, 255);
    pixels.show();
  }
  delay(800);
}
float P_val,T_val,H_val;
void loop(void){
  P_Sens.readDigitalValue();
  T_val = P_Sens.getTemperature();
  P_val = P_Sens.getPressure();
  H_val = P_Sens.getAltitude();


  Serial.print("Temperature :  ");
  Serial.print(T_val);
  Serial.println(" C");
  Serial.print("Pressure    :  ");
  Serial.print(P_val);
  Serial.println(" mBar");
  Serial.print("Altitude    :  ");
  Serial.print(H_val);
  Serial.println(" meter");

  float altChange = abs(H_val - H_val_prev);

  if (altChange > 0.01) {
    pixels.setPixelColor(0, 255, 255, 255);
    pixels.show();
  } else {
    pixels.setPixelColor(0, 0, 255, 0);
    pixels.show();
  }

  delay(100);
  H_val_prev = H_val;
}

Since I have not properly installed any bootloader, I have been using the neopixel as a debug led (I know not optimal) along with a Jlink edu mini.

Have you run the I2C scanner and if so what was the result. Are your non existent per your schematic pull up resistors in the 3K range?

pull up resistors are 4.7kohm. I have not run an i2c scanner since im still trying to install the arduino bootloader and I cant access serialcoms via swd(jlink)

Why aren't they shown in the schematic?

1 Like

In the future, it would save time to post details that are relevant to the problem in your first post, and not some other details.

Yes, you DO need the 100 nF cap.

Yeah sorry. really? I saw adafruit schematics and other ones people made and they didnt have them. Its onyl the 1uF you ACTUALLY need i believe.

If you want your projects to work reliably, spend a bit more time researching the topic of decoupling. It is an advanced topic, taken very seriously by the professionals.

I also suggest to be skeptical of the examples posted by misinformed beginners on YT, Instructables and the hobby forums, though. If something works once, that is usually fine for them.

aight

im gonna get the usb bootloader so I can actually read serial output. I think im nearly there (might even be success) with the adafruit uF2 bootloader but ill mess around with it more tmr

Hi, @JRD_Propulsion

Have you checked that the MS5706 library is compatible with the microcontroller you are using?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

So I dont think the micro controller matters too much. I know people who have used atsamdx1 mcus with this library so it should work.

I2C scan detected BMI088 but not MS5607 :confused:

Also I got the usb bootloader to work :slight_smile:

Okay so I think I know the problem. I tried soldering a new barometer and it shorted 3.3v. This has happened twice so far.

But what did I do wrong? can anyone find the 3.3v short? Photos of my schematic are above. It is not a solder short since it happened mutiple times.

Do you have a short if your remove the IC and clean the solder pads?

Tom.. :smiley: :+1: :coffee: :australia:

wait what do you mean? the solder pads on the pcb? Yeah I cleaned them each time.