Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sleep PMSA003 via SET pin #6

Open
mckochan opened this issue Oct 15, 2021 · 6 comments
Open

Sleep PMSA003 via SET pin #6

mckochan opened this issue Oct 15, 2021 · 6 comments

Comments

@mckochan
Copy link

I want to preserve the life of my PMS sensor by letting it sleep and getting a measurement every 5 min or so.

Blog post mentions: "some high side P channel MOSFET that would allow me to turn off the various sensors if I wanted to make this battery powered and needed more power management."

My understanding is the TTGo T-display does NOT have any GPIO's with built in 10k pullup like the D1 mini has.

Do I need to add a high side P channel MOSFET or a 10k pull up resistor somewhere in order to accomplish this?

@Ralphy140
Copy link

If you get the hardware design done i have re-wrtiiten the ESPHome YAML to to enable deepsleep and run on battery, but the sensors consume too much power even with the ESP is in deepsleep to make this work. I will publish the code into the main branch as a new subset code

@kylemanna
Copy link
Owner

The hardware design has support for a high side P-channel MOSFET to completely remove power to the PMSA003. I've never tested it, but I suspect it'd work and I can help answer questions if anyone wants to try it out!

Here's the relevant portion:
schematic

To use it you'd need to do the following steps:

  1. Order parts for Q2 and R2 (recommend quantities of 10x for price breaks):
    1. Si2371EDS or similar MOSFET
    2. 0805 100k resistor
  2. Cut the JP8 trace with a knife, currently this is the path the current takes to power the PMSA003. This is how it's constantly powered.
  3. Populate R2 and Q2, they should be pretty reasonable to solder as far as surface mount components go.
  4. Update the software to drive PMS_PWR / GPIO12 low to turn on the PMSA003

Note: to prevent leakage you may need to put PMS_RESET, PMS_RX, PMS_TX and PMS_SET into high impedance mode or drive them high or low.

@kylemanna
Copy link
Owner

Also it's worth noting that the PMS_SET pin will put the PMSA003 in to a sleep/sleep mode if it is driven low with no hardware modifications.

Data sheet says that active current is < 100 mA and that the standby current is < 200 μA.

There's also CMD=0xe4 which allows you to command sleep mode via the UART, but I figure that driving the PMS_SET pin is considerably easier.

@mckochan
Copy link
Author

mckochan commented Oct 18, 2021 via email

@thecheatah
Copy link

Also it's worth noting that the PMS_SET pin will put the PMSA003 in to a sleep/sleep mode if it is driven low with no hardware modifications.

Data sheet says that active current is < 100 mA and that the standby current is < 200 μA.

There's also CMD=0xe4 which allows you to command sleep mode via the UART, but I figure that driving the PMS_SET pin is considerably easier.

How exactly do you turn on sleep mode? You mention there is no hardware modification, is there an esp configuration?

@mckochan
Copy link
Author

mckochan commented Oct 18, 2023

There is now a way to set the wake interval via the TX pin on the PMSX003 sensor.
This might not save as much power as cutting power completely, but it will save some and also wear on the fan/laser.

for the sniffer project, all I had to do was add:
tx_pin: GPIO26 under the UART section
and
update_interval: 120s under the PMS sensor

see here for sample config:
https://esphome.io/components/sensor/pmsx003.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants