One sensor is interfering with another, creating noisy readings

I am trying to measure two sensors, one is a BME680 temp/humidity/pressure/gas sensor connected via i2c, the other is a PMS5003 laser particle sensor connected via serial TX wire. They are both wired to a Particle Photon using long solid core copper bell wire, about 6 feet of wire, to keep them away from its wifi chip generating heat. They are in the top of this photo in the yogurt container, wired to the microcontroller on the lower left:

The problem is that the PMS5003 has started to have very noisy readings lately. It started after I was moving the microcontroller on the bottom, trying to get it in a better position. Apparently this wiggled some wires just enough to make the readings on the PMS5003 get very noisy. The other day I disconnected the BME680, and noticed the noisy readings went away. This is a screenshot of the particle count readings from the PMS5003, to show how they were affected by the BME680. On the left half of this screenshot is when the BME680 is disconnected, and on the right half is when it is reconnected:

So I've at least narrowed down a cause. Problem is I don't understand how this is possible. The PMS5003 outputs serial data with checksums, that shouldn't be subject to interference whatsoever, it should either receive the true data or no data at all.

The PMS5003 is powered by 5v, despite outputting a 3.3v signal, to power its hefty fan and laser.

I have an almost identical setup indoors - BME680, PMS5003, and Particle Photon, that has no noise, and the graphs always look like the graph on the left of the above screenshot. The only difference is that it is using much shorter wires - 6 inches rather than 6 feet.

I have tried swapping out both the BME680 and the PMS5003 for brand new sensors, no difference.

I have tried moving the BME680 from the 3.3v outputted by my microcontroller, to 5v power straight from USB, since it has an onboard voltage regulator, to see if this would make a difference. It did not.

I have tried a myriad of different 5v power supplies with no difference.

And of course, I have tried wiggling and rearranging the wires, but I'm not even sure exactly which wire could be the culprit, since again, the serial data output from the PMS5003 has checksums and should be ironclad.

It could be the 5v line - if that voltage is changing a lot, it would change the intensity of the laser on the PMS5003, which would change its readings. But despite having a heater for its gas sensor, the BME680 is a low power device and shouldn't be able to cause such random voltage dips on its own. And it didn't used to, and it doesn't on the identical device indoors.

Where should I start looking? Does anyone know how this is even possible? How can a tiny little BME680 sensor create such strong random noise on the 5v line, even when powered by a separate regulated 3.3v from the main microcontroller?

keep cable short and wire twisted. optional: shielded and grounded.

2 Likes

At the wiring. It's probably just a loose connection or intermittent short circuit. All the analysis is probably pointless.

Also you're asking us to comment on an unknown circuit, as you posted mainly only words, and one overview photo. No schematic or wiring diagram.

If you are running I2C over 2 meters of wire, you need to take special precautions, on the face of it, i.e. just looking at the photo, you might not have done that.

Most sensors require a stable power supply. That is another thing your wiring might interfere with.

1 Like

Dont know if this can help but, keep wires as short as posible, twist the ground wire around data, maybe it can help

Checksum does not guarantee anything. Generally it is additional data sent with a message that is a sum or two's complement of the sum. They can be 8 bit, 16 bit depending on what the designer wanted. Your scope waveform to me indicates bad grounds, and a switching power supply that is not well shield or something like that. Hint: I2C was designed for on-board communications, not as a communication bus for external devices. I suggest you test it out on the bench with short wires 10" or less. You can also lower the value of the I2C resistors but check the current capability of the chips on the bus.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.