Switch on/off temperature sensor

I have a temperature sensor that is connected to Arduino nano. I want to switch on when I want to take measurements and after that switch it off. Any ideas?

Just write a code that makes one measurement when You plug in power and then stops, and You unplug the power.

Railroader:
Just write a code that makes one measurement when You plug in power and then stops, and You unplug the power.

Can a relay work on this idea? when it is time to get a measurement to connect VCC of the sensor and when it finishes to disconnect the VCC of the sensor, by using the relay.

Why a relay? Just plug and unplug power.

The system works alone on certain timestamps and gets measurements.... I am not near it to control it...

Read the first topics like "How to use Forum". It tells You to give us a complete description of the project. This way we waist time to dig out info from You. That info should be presented in the first post.

Ok... can the method, that I described in post #4, work?

Yes.

My concern is this: the temperature sensor has 3 pins: VCC, GND, OUT. If I "play"only with connecting/disconnecting the VCC, is there any affect/problem by the current coming from the other pins of the sensor?

There should be no problem but you could always probe it with a multimeter for fun.

Good practise is to never do like that. Disconnect both signal and Vcc.

Ok, apart from using relay, is there any other IC that does this work?

Read reply #5 again. Why all the secrets, why not describing the entire project?

Now there are no secrets! :slight_smile: My question is very clear this time...

Which temp sensor.
Temp sensors are designed for very low power, because power would self-heat the sensor.
If you don't sleep the Arduino itself, then sleeping a temp sensor won't make any sense.

If you MUST,
A 3-pin temp sensor draws so little that you can power it from an Arduino output pin.
Leo..

DS18B20

alex5678:
DS18B20

750nA (0.00000075Amp) standby current.
Only draws 1mA (< 1 sec.) when asked to get the temp.

Not worth switching it off.
Leo…

Hi,
Do you want to disconnect the sensor?
OR
Power the hole project down then up to make a reading?

What is the application?
Why can't you leave you project running all the time and poll the sensor when you need a reading?

Tom... :slight_smile:

Wawa:
If you don't sleep the Arduino itself, then sleeping a temp sensor won't make any sense.

Ain't that the truth! :roll_eyes: