GithubHelp home page GithubHelp logo

Comments (23)

paulvha avatar paulvha commented on July 18, 2024 2

I suspect the power supply, especially as it runs well in standalone. Not sure whether you power from a lipo but if all the sensors en WIFI do "something" at the same time it can draw too much current and cause a voltage drop. Maybe just for debug, use a strong 5V, e.g. from the USB pin if connected for test to SPS30.

regards
Paul

from sps30.

paulvha avatar paulvha commented on July 18, 2024

from sps30.

yukimach avatar yukimach commented on July 18, 2024

Hi, so I connected
SPS30 pin External ESP32

  • 1 VCC -------- 5V
  • 2 TX -----------------------RX 17
  • 3 RX -----------------------TX 16
  • 4 Select ----- Not Connected
  • 5 GND -------- GND --------- GND

I've tried with SERIALPORT1 and SERIALPORT2 also tried setting the pin rx tx to 0.

from sps30.

paulvha avatar paulvha commented on July 18, 2024

from sps30.

yukimach avatar yukimach commented on July 18, 2024

Will try .. but Its a custom board now and yes supplied from 5v usb.
It was definitely functioning previous to updating the code just today..

from sps30.

paulvha avatar paulvha commented on July 18, 2024

from sps30.

yukimach avatar yukimach commented on July 18, 2024

Yes I changed that part. I'll retry it again on a feather huzzah this evening.

from sps30.

yukimach avatar yukimach commented on July 18, 2024

Trying to connect
Sending: 0x7E 0x00 0xD0 0x01 0x03 0x2B 0x7E
TimeOut during reading byte 0

I should be receiving a reply from the sps right? so the communication is not working?

from sps30.

paulvha avatar paulvha commented on July 18, 2024

from sps30.

yukimach avatar yukimach commented on July 18, 2024

Thanks, I might order another sensor just incase its that.
Could it be that my espsoftwareserial isn't the right library? its hardwareserial so this shouldn't matter right?

from sps30.

paulvha avatar paulvha commented on July 18, 2024

from sps30.

paulvha avatar paulvha commented on July 18, 2024

Fixed in version 1.3.7

from sps30.

silviupanaite avatar silviupanaite commented on July 18, 2024

Hi, I'm having the same issue (could not probe/connect with SPS30.). I have tried i2c on ESP8266E and serial on ESP32. Is there a way to test to see if the SPS is damaged or my doggy wiring?

from sps30.

paulvha avatar paulvha commented on July 18, 2024

hi,
Maybe it is broken.. but maybe it is another issue.

How did you connect the wiring?
What sketch do you use?

regards,
Paul

from sps30.

silviupanaite avatar silviupanaite commented on July 18, 2024

On ESP8266 (NodeMCU 0.9) I used the Example13_sps30_BasicReadings_any_I2C.ino with D1, D2 pins and pull-up resistor 10K and also tried with 4k7 using external HW-131 Breadboard Power Module 3.3V/5V witch also powers the module, I used the diagram from https://www.14core.com/wp-content/uploads/2019/09/senserion-sps30-particle-sensor-schematics-diagram.jpg. For the serial, I tried on Wemos Lolin32 Lite pin (16,17) and (25,26) (switching the pairs around) without the pull-up resistors.

I managed to get some readings once without the pull-up resistors but I was fiddling with the SPS30 power connector (I was using the Arduino-SPS library) but couldn't start it again, I also tested the cables for continuity and V and found no issues. Is there anything more I can try?

from sps30.

paulvha avatar paulvha commented on July 18, 2024

I don't have a NodeMCU 09, but see that D1 is CLOCK, D2 SDA. However on other drawings I see they D1 is SDA and D2 is SCL. Have you tried to switch the SDA /SCL line just for debug?
Have you connected other I2C devices before and did that work?
is you I2C init something like Wire.begin(1, 2); // sda, scl ?

Doing a pull-up to 5V is not a good idea, it should be to 3v3. The SPS30 absulutely needs pull-up to work.

regards,
Paul

from sps30.

silviupanaite avatar silviupanaite commented on July 18, 2024

I don't have experience with I2C. But thins are looking stranger and stranger, I connected the NodeMCU 3.3v and the power supply 3.3V on the same side from which the pull-up resistors are connected... and the library managed to: Detected SPS30. -> Serial number: CE7A73B4FFA7A053 -> Product name: 00080000 -> Can not read version info.

Now the StatusCheck() returns false. (ret = sps30.GetStatusReg(&st); Serial.println(ret); witch is 136);

If I bypass that ( if (st == 0) return(true);) it showed some readings at the beginning, but now they're showing 0.0.

from sps30.

paulvha avatar paulvha commented on July 18, 2024

from sps30.

silviupanaite avatar silviupanaite commented on July 18, 2024

On the serial, I did remove the pull-up resistors but it didn't work I will work on the I2C for now. Thank you for the support.

from sps30.

rictolcrow avatar rictolcrow commented on July 18, 2024

Hi. Was there any definitive solution to this problem? I have SPS30 connected to Serial1 UART on Feather M0 WiFi that has intermittent connection; sometimes it connects, other times it reports "could not probe / connect with SPS30."
I also have in the system: BME280 (i2c), SCD30 (i2c), featherwing SD-RTC (SPI and i2c), and an Adafruit Miniboost to get the 3.7V to 5V. The SPS30 seems ok if I run it on a plain FeatherM0 with nothing else. I've tried multiple components and behavior is the same. Any ideas? Please, I'm pulling out my beard over this one.

from sps30.

rictolcrow avatar rictolcrow commented on July 18, 2024

Thanks Paul. I also suspected power. I've run it from the USB power and an independent supply with the same intermittent results. Interestingly, it seems to consistently connect to the SPS30 right after connecting the USB and turning on by de-grounding the ENable pin on the Feather's 3.3v regulator (a switch on the Featherwing Terminal block). However, if I just reset the Feather, it won't connect. Even if I turn off and on, it won't work. I have to do the whole magic pass of turning off, disconnecting the USB, reconnecting USB, and turning on to get a successful connection to the SPS30. I'll get an o'scope to sniff the RX/TX but I don't know what I'm looking for. More later...

from sps30.

paulvha avatar paulvha commented on July 18, 2024

maybe the SPS30 enable wire, which switches the protocol between Serial and I2C has some impact. The SPS30 reads this wire at power-up to determine its protocol. When not connected/floating, it uses Serial. Maybe, somehow, it gets confused and moves to I2C due to a voltage drop/spike.

from sps30.

rictolcrow avatar rictolcrow commented on July 18, 2024

I figured a workaround. It turns out that the SPS30 needs to restart in order to connect. If it isn't powered down the UART will not respond to a new connection. This I don't know why.
When I was running it from USB power, disconnecting the USB cable effectively depowered it and restarted it and it would reconnect ok. When I was running it off the 5V from the Miniboost it never got de-powered because the Miniboost has a large capacitor and when turned off its output voltage drops slowly. Hence, when I'd hit reset on the Feather M0 it never would reset the SPS30!
The workaround is to use the ENable pin on the Miniboost. In void setup() I pull this pin to LOW for 10 secs to allow the 5V to drop to ~0.5V and then HIGH to get the 5V for the SPS30 and restart/reset it.

from sps30.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.