I'm trying to use the board to control a humidifier's on/off switch, depending on a DHT22's reading on humidity. Should be simple enough, then I realized I can't power the humidifier since it requires 5V and 300mA, which a digital pin can only provide like 5V 40mA.
So maybe I need to provide its power separately, what's a good way to do so? Do I have to buy anything else, like a controllable switch wired to digital pin?
I think the safest way to run it for extended period of time is the best way.
Does that mean I also shouldn't power it with Uno's 5V output pin? I measured the humidifier drawing 5V 140mA at peak.
Is that protection diode needed for flyback when switching off?
Yes, the magnetic field collapsing in the windings of the load, produces a reverse current that can damage the associated electronics.
The diode provides a short for the current around the MOSFET.
In this case, I'd have tended to put the protection diode across the load, that is the humidifier (R1 on the schematic). The mosfet has anyway a body diode in parallel with the "protection diode" the OP has drawn.
Oh. It looks like the whole thing is powered by a 9v battery!
It looks like this now. Protective diode across the load only. In this use case, humidifier shouldn't have any relay inside, so I guess it should be fine.
Hi @6v6gt,
Yeah it'll likely be powered either by a 9V cell or a AC-to-DC 9V adapter.