I wan't to reduce power consumption at max.
First i removed all LEDs from boards and I have multiple sensors that only work from time a time.
Some of sensors are: MQ-2 Gas, DHT22, Photoresistor, PIR Motion
They are only used to collect data every x seconds so they dont need to be ON all the time.
As i see some sensors like DHT22 uses 1/1.5mA thats not much but its always something.
So i'm asking if theres any trouble using DOUT pins to source sensors instead 5V (Always ON) and before a measurement send HIGH to switch on the module and after the read send LOW to disable sensor.
Also i know some sensors need some boot up time, maybe the PIR and the DHT??? Anyone have some experience in this workflow?
I plan to use a shift register and use same pin, only 1 measurement per time can occur.
It can be done for very simple sensors (a LDR, or a NTC, or a diode as temperature sensor). For more complex sensors you might get yourself into trouble.
As far as I know the PIR sensors require very little current.
I don't know about the DTH22, you have to measure that. Don't trust what you read on the internet. Sometimes you can't even trust the datasheet
Which Arduino board do you use ? The Arduino Uno has a number of components on the board that require current.
The MQ-2 is a gas sensor with a heater. That requires 150mA ?
Then it is no use to turn off a sensor that needs 1mA, if the gas sensor requires 150mA.
It is possible to turn off the heater, but after the heater is turned on, the sensor needs a few minutes settling time before valid data can be read.
Grumpy_Mike:
Yes there is.
First of all the current, the maximum you should ask a pin to provide is 30mA, at 40mA damage occurs.
Second the voltage drops as the current increases so you do not get the full 5V.
Finally if an output is connected to the sensor in any way then that must be switched to be an input before you remove the power.
Good point.
And if i use a transistor per sensor to drive the 5v directly from power supply and use digital pins to control it?
"Finally if an output is connected to the sensor in any way then that must be switched to be an input before you remove the power."
I didn't know about this part, can you explain why and what happen if i don't set it to input before cut power?
But its easy fixed as software rule all
Grumpy_Mike:
Well the data sheet says 86400 seconds, or to be more precise it says 24 hours.
Not my datasheet, and not my MQ-2 which I have tested for this 8)
As far as I remember, about 2 minutes was okay, but 5 minutes was better.
The preheat time of 24 hours is needed only once after buying the MQ-2.
Peter_n:
It can be done for very simple sensors (a LDR, or a NTC, or a diode as temperature sensor). For more complex sensors you might get yourself into trouble.
As far as I know the PIR sensors require very little current.
I don't know about the DTH22, you have to measure that. Don't trust what you read on the internet. Sometimes you can't even trust the datasheet
Which Arduino board do you use ? The Arduino Uno has a number of components on the board that require current.
Yes i have only saw the datasheet, i haven't made real measure.
Its sad to know datasheet can provide wrong info
I'm using Arduino Nano V3 (Chinesse) with removed LED and direct power feed in 5v pin with a 5v regulated power supply.
As I can build my own arduino with little hardware, the integrated 3.3v port and USB for fast reprogramming is a good thing. Also nano have more ports and is cheaper than build myself.
Peter_n:
The MQ-2 is a gas sensor with a heater. That requires 150mA ?
Then it is no use to turn off a sensor that needs 1mA, if the gas sensor requires 150mA.
It is possible to turn off the heater, but after the heater is turned on, the sensor needs a few minutes settling time before valid data can be read.
Grumpy_Mike:
Well the data sheet says 86400 seconds, or to be more precise it says 24 hours.
WOW 24h to heater setup?? That means 24h for make a good reading?
Or that 24h will only happen once? What if i power off all hardware and switch on again after 1 day? does it still need 24h to preheat?
The power consumer is the heater of the MQ-2 sensor.
You can turn off the heater with a transistor or mosfet, but only if you don't need to retrieve samples for a few minutes.
If you really want, you could switch the power to the LDR, but it won't hardly make any difference. I think less than 1% reduce in power.
Some (older) Bluetooth modules also require a lot current.
What if i power off all hardware and switch on again after 1 day? does it still need 24h to preheat?
I got it wrong, I looked at the data sheet and it says:-
When accurately measuring, the proper alarm point for the gas detector should be determined after considering the temperature and humidity influence. The sensitivity adjusting program:
a. Connect the sensor to the application circuit.
b. Turn on the power, keep preheating through electricity over 48 hours.
c. Adjust the load resistance RL until you get a signal value which is respond to a certain
carbon monoxide concentration at the end point of 90 seconds.
d. Adjust the another load resistance RL until you get a signal value which is respond to a CO
concentration at the end point of 60 seconds .
So yes it takes time to stabilise once you turn it off. Not for a low power application then.
Grumpy_Mike:
I got it wrong, I looked at the data sheet and it says:-So yes it takes time to stabilise once you turn it off. Not for a low power application then.