However, I've got a PMS5003 PM2.5 dust sensor coming from china, and looking at the spec sheet:
I believe there's potential for the sensor to draw too much current, so is hooking up a relay advisable for that too?
Active Current ≤100 Milliampere(mA)
Standby Current ≤200 Microampere(μA)
All guides I've read so far don't mention the potential high power usage, I've only seen a couple of comments from readers of the guides that make mention of it.
From what I can see you can use an external 5V power supply, just be sure the grounds are connected. If you need to switch the power a relay would work but so would a MOSFET.
What Arduino board are you using? For instance on a Nano, stick to something like 200mA absolute maximum on 5V and <5mA max on 3.3V (since 3.3V is made by the CH340 which is NOT a power supply).
Please keep in mind the PMS5003 wants to be fed with 5V, but should be interfaced with at 3.3V. So if you use something like a Nano, UNO etc or another 5V board be sure to use logic level converters between the Arduino and the PMS.
How would a relay help in this? A relay is simply a switch - it switches something on or off. It does nothing to change the matching of a power source to the demands of a module. If you want to supply something with power, even for a short period of time, the power supply needs to be up to it.
I don't think you need a relay here as it seems the PMS5003 can be put to sleep simply by pulling pin 3 low. No relay needed or anything.
Thanks. I've done a little more reading and relays are starting to make a bit more sense. This was really a double question as I've got multiple projects on the go at once. One I'm sure needs a relay (powering a 0.2a fan only when a door is closed...will hook into a usb cable to get a seperate power feed to the fan) and this air sensor project, which I now know won't need a relay, but depending on the power requirements of my combination of sensors, may need an external power source. I'll need to read up on logic level converters!
The kit I'm using at the moment is:
Arduino Mega
MQ2 Gas/smoke sensor
MQ136 H2S Sensor
CCS811 Air Quality Sensor
A screen (Possibly small TFT, if not, a few small OLEDs)
BME280 pressure/Temp/Humidity sensor
You don't need a relay for that. Just a MOSFET and a freewheel diode will do. A relay would add something like 50mA of holding current on top of the 200mA fan current; very inefficient.
Yeah, don't expect too much from this one in terms of powering all sort of stuff through its onboard regulator. I'd recommend putting a 5V power supply into your setup just to be sure, even though most of the stuff you list doesn't draw much current.