Closed HyperDevil closed 4 years ago
HI
Have just compiled and checked example 2 to be sure. All works fine.
Do you have pull-up resistors on both SCL and SDA to 3V3? Do you power the SPS30 with 5V external ? the xxx behind the serial number did you add those manual ?
regards, Paul
Van: HyperDevil notifications@github.com Verzonden: woensdag 12 februari 2020 10:54 Aan: paulvha/sps30 sps30@noreply.github.com CC: Subscribed subscribed@noreply.github.com Onderwerp: [paulvha/sps30] auto-clean on esp8266 not working (#8)
10:53:26.255 -> Serial number : 79D40290B4DFxxxx 10:53:26.255 -> Product name : not available 10:53:26.255 -> Article code : not available 10:53:26.255 -> could not get clean interval.Protocol error 10:53:26.255 -> No Auto Clean interval change requested. 10:53:27.251 -> Measurement started 10:53:27.251 -> 10:53:27.251 -> Hit to continue reading 10:53:29.263 -> Hit to continue reading 10:53:31.248 -> Hit to continue reading 10:53:33.259 -> -------------Mass ----------- ------------- Number -------------- -Average- 10:53:33.259 -> Concentration [μg/m3] Concentration [#/cm3] [μm] 10:53:33.293 -> P1.0 P2.5 P4.0 P10 P0.5 P1.0 P2.5 P4.0 P10 PartSize 10:53:33.293 -> 10:53:33.293 -> 0.74 2.94 4.69 5.04 0.40 3.55 5.73 6.15 6.21 1.63 10:53:36.299 -> 0.79 1.49 2.01 2.12 3.92 5.58 6.26 6.39 6.41 0.89 10:53:39.297 -> 0.87 1.52 2.01 2.11 4.58 6.29 6.93 7.05 7.07 0.92
Using I2c on ESP8266.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpaulvha%2Fsps30%2Fissues%2F8%3Femail_source%3Dnotifications%26email_token%3DAD2GBPGZVTV7KRZO2HN4MFLRCPBOFA5CNFSM4KTWKQ32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IM4EGOQ&data=02%7C01%7C%7Cf6cd47070bba4aff680108d7afa19595%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637170980835214948&sdata=Y6MQvZlzpDylGj5PV18giZVBdtcJ3bHFZGr%2FsMjgZTI%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD2GBPGNL7TQ2JZQCQ2UZ3LRCPBOFANCNFSM4KTWKQ3Q&data=02%7C01%7C%7Cf6cd47070bba4aff680108d7afa19595%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637170980835214948&sdata=fOzD8UWooPiX%2Bay7gEFxvYjwKLSkOmog%2FMpHGU%2Bw%2FpE%3D&reserved=0.
Hi Paul,
Yes the pullups are there 10K to 3v3. I use the VIN pin on the ESP8266 which is 5V (from usb), my USB port can supply 3A. I checked with a multimeter, just also tried external 5v, no change in behavior. And yes i added the xxx (although it is not sensitive information).
11:13:38.032 -> SPS30-Example2: Basic reading + clean. press
It is clear the connection is working as you get the serial number and can read the results. I have just connected the ESP8266 and did the same test example2. and added some comments in between. My SPS30 answers to the request: I2C Sending: 0x80 0x04, where yours is not.
Try this : remove both power source, count to 10 and reconnect (5V first). Maybe the SPS30 is in state of flux. What happens if you try to set the autocleaning ?
regards, Paul
SPS30-Example2: Basic reading + clean. press
I2C Sending: 0xD0 0x33 I2C Received: 0x33 0x36 0x31 0x44 0x34 0x46 0x44 0x33 0x41 0x41 0x39 0x34 0x31 0x41 0x37 0x36 0x00 0x00 length: 18 PROBE = SAME AS ASKING SERIAL NUMBER
Detected SPS30.
I2C Sending: 0xD3 0x04 RESET
I2C Sending: 0xD0 0x33 I2C Received: 0x33 0x36 0x31 0x44 0x34 0x46 0x44 0x33 0x41 0x41 0x39 0x34 0x31 0x41 0x37 0x36 0x00 0x00 length: 18 Serial number : 361D4FD3AA941A76
Product name : not available NEVER AVAILABLE ON I2C
I2C Sending: 0xD0 0x25 I2C Received: 0x00 0x00 length: 2 Article code : not available
I2C Sending: 0x80 0x04 I2C Received: 0x00 0x09 0x3A 0x80 length: 4 Current Auto Clean interval: 604800 seconds
I2C Sending: 0x80 0x04 0x00 0x00 0x81 0x02 0x30 0x9D I2C Sending: 0xD3 0x04 RESET Auto Clean interval now set : 560 seconds
I2C Sending: 0x80 0x04 I2C Received: 0x00 0x00 0x02 0x30 length: 4 Current Auto Clean interval: 560 seconds
I2C Sending: 0x00 0x10 0x03 0x00 0xAC Measurement started
Van: HyperDevil notifications@github.com Verzonden: woensdag 12 februari 2020 11:14 Aan: paulvha/sps30 sps30@noreply.github.com CC: paulvha paulvha@outlook.com; Comment comment@noreply.github.com Onderwerp: Re: [paulvha/sps30] auto-clean on esp8266 not working (#8)
11:13:38.032 -> SPS30-Example2: Basic reading + clean. press
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpaulvha%2Fsps30%2Fissues%2F8%3Femail_source%3Dnotifications%26email_token%3DAD2GBPEFSY2LQMLNFQOXATLRCPDXFA5CNFSM4KTWKQ32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELQGSEQ%23issuecomment-585132306&data=02%7C01%7C%7Cefb131e7ba9c4ecbae2608d7afa44e0d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637170992520768279&sdata=nMKVezfUPYlHUd72WWm2%2FUPh7PLEXMfWTpogKvyMCBI%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD2GBPB5COBF3CKIYL45EBLRCPDXFANCNFSM4KTWKQ3Q&data=02%7C01%7C%7Cefb131e7ba9c4ecbae2608d7afa44e0d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637170992520768279&sdata=UDwG0qtWcydTqnBq%2BlZkEyo4wuTfUBw8vPqS7oDX3sQ%3D&reserved=0.
Ok i did that now:
11:49:10.725 -> SPS30-Example2: Basic reading + clean. press
I also tried another ESP8266 in case my board is faulty, but the same behaviour.
As discussed by email, add this to the sps30.cpp file on line 1144 ofter I2C_Setpointer() function. delay(5);
10:53:26.255 -> Serial number : 79D40290B4DFxxxx 10:53:26.255 -> Product name : not available 10:53:26.255 -> Article code : not available 10:53:26.255 -> could not get clean interval.Protocol error 10:53:26.255 -> No Auto Clean interval change requested. 10:53:27.251 -> Measurement started 10:53:27.251 -> 10:53:27.251 -> Hit to continue reading
10:53:29.263 -> Hit to continue reading
10:53:31.248 -> Hit to continue reading
10:53:33.259 -> -------------Mass ----------- ------------- Number -------------- -Average-
10:53:33.259 -> Concentration [μg/m3] Concentration [#/cm3] [μm]
10:53:33.293 -> P1.0 P2.5 P4.0 P10 P0.5 P1.0 P2.5 P4.0 P10 PartSize
10:53:33.293 ->
10:53:33.293 -> 0.74 2.94 4.69 5.04 0.40 3.55 5.73 6.15 6.21 1.63
10:53:36.299 -> 0.79 1.49 2.01 2.12 3.92 5.58 6.26 6.39 6.41 0.89
10:53:39.297 -> 0.87 1.52 2.01 2.11 4.58 6.29 6.93 7.05 7.07 0.92
Using I2c on ESP8266.