SDS011 particle sensor

os3n6c
Posts: 4
Joined: Sat Sep 05, 2020 5:18 pm

SDS011 particle sensor

Postby os3n6c » Mon Jan 11, 2021 10:45 am

Hi,

I want to connect a SDS011 particle sensor to a SBC-NodeMCU-ESP32

The datasheeet of SDS011 says it needs 5V power supply. But my ESP32 doesn't have 5V power supply. There is a similar setup described here. They use the VU/VIN pin of the NodeMCU to connect it to the 5V input (pin 3) of SDS011.
I checked it, there is a voltage of 5V between VIN and GND.

Would it be possible to power the SDS011 via the VIN pin?

How do I have to connect the data pins?
R goes to RX0 and T to TX0?

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: SDS011 particle sensor

Postby PeterR » Mon Jan 18, 2021 11:57 pm

What do you have connected to 5V vin i.e. what power source?
The device needs around 70mA & so should be good with most power supplies.
ESP gets a little dodgy on USB power when running hot and with peripherals. An external PSU is recommended.
Is the device 5V or 3.3V logic? You might need level shifters.
A decent FTDI will have both 5V and 3.3V sources but check currents.
& I also believe that IDF CAN should be fixed.

os3n6c
Posts: 4
Joined: Sat Sep 05, 2020 5:18 pm

Re: SDS011 particle sensor

Postby os3n6c » Wed Mar 03, 2021 5:07 pm

I do have a 5V Power supply now.
The connections from SDS011 are:

not connected
not connected
5V -> + of 5V Powert Supply
not connected
GND -> - of 5V Power Supply
R -> RX0 (ESP32)
T -> TX0 (ESP32)

I have MicroPython v1.14 installed on ESP32.
If I start both - the ESP32 and the connected SDS011 the fan of the SDS011 starts rotating and the ESP32 shows:

Code: Select all

Device is busy or does not respond. Your options:

  - wait until it completes current work;
  - use Ctrl+C to interrupt current work;
  - use Stop/Restart to interrupt more and enter REPL.
If I turn off the power of SDS011 the ESP32 shows:

Code: Select all

MicroPython v1.14 on 2021-02-02; ESP32 module with ESP32
Type "help()" for more information.
What am I doing wrong?

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: SDS011 particle sensor

Postby ESP_Sprite » Thu Mar 04, 2021 1:53 am

Possibly your 5V supply is not powerful enough.

os3n6c
Posts: 4
Joined: Sat Sep 05, 2020 5:18 pm

Re: SDS011 particle sensor

Postby os3n6c » Thu Mar 04, 2021 4:59 pm

The power supply provides 5V, 2.4A, 12W and the SDS011 is the only device hooked to the power supply - I think that should be enough.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: SDS011 particle sensor

Postby PeterR » Thu Mar 04, 2021 10:03 pm

the fan of the SDS011
Sorry, missed the earlier clues.
Possibly a bit of EMC?
A scope on your power lines & signal lines will let you know if there is a 'kick', if you drop 5% below rail then you will need to take action.
Lots of cheap scopes on ebay etc.
I assume that your grounds are good.
You could also try moving the fan further away and checking fault frequency?

I know little about resolution. I have seen hardware engineers gather in their robes on a full blood moon with bags of capacitors, coils and ferrites muttering words to the dark lords of dynamic impedance but I cowered and hid behind my IDE .....
Double check the SDS011 reference electronic design against your own.
That usually works.

EDIT: Also (& as stated) if your device is 5V signal then you must have level convertors. You might get away with that error for most of the time but the ESP will eventually die and signal errors will happen.
& I also believe that IDF CAN should be fixed.

Who is online

Users browsing this forum: Vitalii_Bondarenko and 113 guests