Power external sensors on demand
I'm new to mysensors and wonder myself if it's possible to power up an external sensor (moisture, rain, etc.) only on demand just a few seconds before the readout.
As the most external sensors come with their own PCB / μC they drain battery. So my idea here was to power them up when I really need them with
- a transistor
- or a MOSFET
by pulling up the gate with a digital output of the arduino.
Do you have any experiences which MOSFET (and additional resistors, preferably not SMD) are well suited to switch the sensors on with an 3,3 V arduino mini pro TTL?
Many thanks in advance
@hensing Welcome to My sensors.
It is possible and done before. Although not advisable, some sensors draw very little current so you could power them directly from an Arduino pin. But be careful with that, the Arduino can only deliver a small amount of current per pin.
As to your second question, I've done it with a transistor. I think it was a BC547, the one that was included in the Arduino kit. Transistors will work when you've lgot ow power and current sensors. I think I did it with a battery powered soil moisture sensor.
I wouldn't know a specific Mosfet for your needs, but maybe one of the hardware specialists can help you.
The question I ask my self in these situations is, do I really want a battery powered node? Or do I have access to a power outlet in the final location of the node. I prefer using phone adapters above power battery sensors. Simply because I tend to forget to swap batteries I only use battery powered node's for sensors that are not critical in terms of, it's okay if they don't report for a couple of hours because of an empty battery.
If the sensor doesn't use more than the pro mini TTL can give you should be able to use the TTL otherwise you need to use a e.g. MOSFET
Thank you for you quick response!
I tried to use the TTL directly and it works
But now I'm afraid that I could kill the arduino by doing this all the time.
The moisture sensor used here is a sensor of this type ebay article with a LM393 comparator chip.
That I am also using.
@hensing just look at the data sheet.
Features • Wide Single−Supply Range: 2.0 Vdc to 36 Vdc • Split−Supply Range: ± 1.0 Vdc to ± 18 Vdc • Very Low Current Drain Independent of Supply Voltage: 0.4 mA • Low Input Bias Current: 25 nA • Low Input Offset Current: 5.0 nA • Low Input Offset Voltage: 5.0 mV (max) LM293/393
I wouldn't worry about the LM393 destroying your Arduino.