1
\$\begingroup\$

I've cobbled together a diesel pump controller and timer from various bits and pieces and now I'm improving the design. The biggest issue is minimising battery use, because in the wet season the pump rarely starts so the battery is not charged, and cloudy conditions prevent solar charging.

The controller/timer is an Arduino with a relay switching the starter motor circuit and a servomotor that actuates the engine's pressure relief valve.

The trigger is a garage remote fob and a little circuit board containing a radio and a relay, all powered by 12V DC. The relay is connected via debounce to a digital input of the Arduino.

There is no requirement to operate the pump at night so there is no need for any part of the control system to have power. The objective of this question is to arrive at a simple circuit that disconnects both the remote relay radio and the Arduino from the pump's battery while it is dark.

Supply is 12VDC and the combined draw from the Arduino and the garage remote relay radio is between 80 and 100mA although the relay probably pulls more than that while it's actuating. So lets say 500mA peak, that's 6W peak, 1W continuous.

Using a photoresistor to bias a transistor is pretty common but usually this is a low current input sensor arrangement. Has anyone tried switching power like this and if so are there any gotchas I should know about while designing? The forward voltage drop over the MOSFET won't matter, I'm regulating it down to 3v3 and 6V anyway.

Would you suggest some other arrangement like a photodiode or a phototransistor?

This is your classic hobby nightlight.

Dark activated

My first thought is something like this but swapping the photoresistor and the fixed resistance (100K in the diagram).

\$\endgroup\$
7
  • \$\begingroup\$ So: When there is daylight (some level you can set), you want the 12 V power supply attached to your Arduino and other components. But when it is dark (some other level), you want all these things disconnected from the 12 V power supply? \$\endgroup\$
    – jonk
    Aug 27 '19 at 5:07
  • \$\begingroup\$ @jonk Yes, exactly. No battery drain at night. It's a 17AH SLA battery, and if you don't abuse the battery that means there's 8.5AH available. At 100mA, that gives me 85 hrs which is only 3.5 days. Disconnecting it at night will give me a week before I have to run the pump for half an hour to charge the battery. \$\endgroup\$
    – Peter Wone
    Aug 27 '19 at 21:52
  • \$\begingroup\$ It can be done, of course. You'll need hysteresis in the design (baked-in or setable) and the ability to adjust the designed light level around which switching takes place. This would be either one or two separate potentiometers, unless you are willing to swap out resistors by hand until you get it right. \$\endgroup\$
    – jonk
    Aug 27 '19 at 22:09
  • \$\begingroup\$ Other than that, the only other question I have is this: Can you consider using lower-power MCUs? I only ask because I don't have exact and full details. For example, an MSP430 can run on microamps. But perhaps the radio component dominates and cannot be replaced. But if all you want is doubling the time, perhaps you should consider an Arduino alternative with 100-1000 times less current draw. Just a question I have to ask you. All ideas should be on the table, right now. \$\endgroup\$
    – jonk
    Aug 27 '19 at 22:10
  • \$\begingroup\$ @jonk Compared to the RPi used in the first evolution of this controller, an Atmel 328P is a low power solution. I think I will tie this one off by leaving the Arduino running, with a photoresistor in a voltage divider to an analog input, and use a digital output and a MOSFET to switch power to the radio. If you post an answer to the effect that the MSP430 is better suited to low power applications I will accept it. Perhaps reference the Wikipedia page which gives a good overview in context. You might also mention the fact that it's available as a USB stick. \$\endgroup\$
    – Peter Wone
    Aug 27 '19 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.