Help to switch power to analog sensors

Hi, I need some help to resolve power switching to analog moisture sensors. I would like to use digital pins to control the switch what will forward 5v power from the Mega board to five moisture sensor. One of the opportunity to use relay,but I would like to switch in every 5 or 10 minutes. Every sensor use 4mA, so sum 200mA will be used. As digital pins can provide 40mA max, the current of the control should be 20-30mA. Maybe transistor switch would be more 'long lasting' than relay. Can anybody help to provide what circuit should be build? Sorry for my english...

You say 5 (five) sensors, 4mA each = 20 mA. Do you mean 50 (fifty)?

Oh sorry, I have made a mistake. Each sensor need 40mA max, not 4mA.

Google has plenty of circuits, you may choose one and post a specific question if there are any doubts.

If using a relay then add a diode to the input side to avoid wearing the relay faster. In this situation i would use optocouplers which are very much relays but they have a LED encased in a chip which shines light onto a phototransistor. Normally relays can take milliamps but check before you buy. If you are considering optocouplers then its wise to get a dual as you can switch more with one chip but should you need more inputs then go for a quad optocoupler.

Oh sorry, I have made a mistake. Each sensor need 40mA max, not 4mA.

200mA isn’t much. Any normal NPN transistor will do it.

Or if you have enough Arduino pins left you can power them directly from the Arduino pins (one pin per sensor).

40mA is at the limit of what an Arduino pin can can provide but it’s not really a problem if you only switch them on for a few seconds every ten minutes.

Tanks a lot for you help! It seems I have to change my mind a bit. Now I use moisture sensors, which creates electrolisys and those are not reliable...However I will try to start with a relay module to switch power to them... Is there any topic about a reliable moisture sensor without using DC?