How to turn a 12V/30mA sensor On/Off from Arduino (3.3V) digital output

Hi!

I have a 3.3V Arduino and I want to use one of the digital output ports to supply power to a soil moisture sensor (12V / ~30mA). The idea is that the digital port will be set to HIGH for a few seconds every hour, saving power so that the whole system can be battery powered.

So far, I have tried, without success:

  • Using a (LM2577-based) step-up DC/DC converted. This would be ideal but I am not sure whether my input voltage (3.3V) or current output from the digital port is too low for this. Is there any other kind of DC/DC converter that would work for this kind of I/O voltages/currents?

  • Using a 3V relay and a second (12V) battery. I also had to use a transistor (2N2222) for this to work since the output current from the Arduino was probably lower than that required by the relay. The main problem with this is power consumption. I have read a bit about latching relays but I am not sure if they would work. Any ideas? What about SSR?

I would be most grateful if you could give some pointers!

Thanks in advance,
Ioannis

Most DC-DC converter chips have an 'enable' pin.
Or you could try an 3.3V H-bridge with voltage doubler (trippler) or charge pump, with diodes and capacitors. For 30mA, I think that is possible, but you need an output stage.
This one is without output stage, using only the power of an Arduino pin, and it creates 12V of a few mA : toneAC v1.2 - Twice the volume, higher quality, higher frequency, etc. - #70 by Peter_n - Audio - Arduino Forum

The LM2577 starts working at 3.5V ?

What about this one : Pololu 12V Step-Up/Step-Down Voltage Regulator S10V2F12
I think that is perfect for you.

Where does your 3.3V come from ? Is that strong enough ?

Your open collector concept for driving the relay with a 3.3V logic signal from the arduino was ok but your idea of using the 3.3V arduino power to power the relay won't work. You have to find another way to power the relay.

Thank you very much for your suggestions!

My first attempt would be to try the easiest method (off-shelf pololu dc-dc converter). Hopefully the Arduino output will be able to drive this. The Arduino itself is driven by 3xAA batteries.

Thanks again, I will come back with more details when I get them.

Just make sure to power the converter from the battery and use the Arduino pin to control the SHDN pin.
Note the SHDN pin should be only driven low (for shutdown) or left floating (normal operation)

The chip in a old car charger would work about every one made has a mc34063 in them and most are so poorly soldered it easy to get the chip out of one. They work at 3 volts happily. http://www.onsemi.com/pub_link/Collateral/MC34063A-D.PDF

wou

MarkT:
Just make sure to power the converter from the battery and use the Arduino pin to control the SHDN pin.
Note the SHDN pin should be only driven low (for shutdown) or left floating (normal operation)

Thanks for the tip MarkT. If the required output current is not very high (eg 30mA) is it still better to drive the converter from the battery and not the Arduino output? If both methods work, do you have any idea which one would be best in terms of power consumption?

Thanks!

If you run it from battery it will work till the battery drops to less then 3.5 volts the chip I posted can go to 3 volts. But sum have used it to with lower then 3 volts its a good chip.
But the one your using will work from battery.
Then enable pin has to float or it will use power so set pin to float to turn it off.

I ve finally bought the Pololu step-up regulator (Pololu 12V Step-Up/Step-Down Voltage Regulator S10V2F12) and started testing it. It seems to work well BUT when I set the SHDN pin to low the quiescent current is quite high (~500uA) for my application.

According to the website, this is controlled by a 10 kΩ pull-up resistor from SHDN to VIN. Sorry for the noob question but is there a way to increase this resistance to reduce the current draw when the regulator is inactive? Will this have any significant side-effect?

Thank you all once again!

Arduino internal pullups are 50 k. I don't what the absolute maximum is. It' possible you could get away with 100 k or even higher. I honestly can't think oc a reason why it wouldn't work with 1 Megaohm.

Actually, after some probing with a multimeter, I think that the pull-up resistor between Vin and Shutdown pins is internal to the regulator chip (datasheet: www.semtech.com/images/datasheet/sc4503.pdf ). Any ideas on how to add a resistor somewhere and increase the total pull-up resistance?

Thanks!

Any ideas on how to add a resistor somewhere and increase the total pull-up resistance?

Well of course not. That's absurd. Consider Ohm's Law and the fact that any resistance added in parallel reduces the total resistance and using your statement that the resistor is internal
(don't know if that's true yet. The datasheet contains nothing to that effect) if that were true it is obviously not possible to add a resistor in series with the internal resistor (which I don't believe exists)

Shutdown and Soft-start Pin. Pulling this pin below 0.4 shuts down the converter. Applying more than 2V at this pin enables the SC4503. An external resistor and an external capacitor connected to this pin soft-start the switching regulator. The SC4503 will try to pull the SHDN/SS pin below its 1.4V switching threshold regardless of the external
circuit attached to the pin if VIN is below the under-voltage lockout threshold. Tie this pin
through an optional resistor to IN or to the output of a controlling logic gate if soft-start is not used. See Applications Information for more details.

FB

The inverting input of the error amplifi er. Tie to an external resistive divider to set the
output voltage.

Thank you for your help raschemmel, all.

I went probing again on the PCB and found the 10K resistor between Vin and SHDN. I desoldered it and placed an 1MOhm resistor and now getting 100uA current when in shutdown mode. I guess I could reduce it further with some Arduino code optimization but it is now in acceptable levels any way.

Thanks again!