1

I have a system built with a Raspberry Pi 4 and an Arduino to control its startup, shutdown and reset, I have already started to design a current monitor circuit (discussed here).

But one of the problem of the Raspberry Pi is that it will consumme a lot of current even after shutdown, I would like my Arduino to be able to stop the power going through after it is halted.

I was thinking to use a simple relay on high-side, but they make noise right ? A simple NPN or PNP, or MOSFET transistor may find difficult to deal with the current range (0 to 3A).

What would be the ideal solution ?

  • 1
    use a bigger MOSFET – Jasen Dec 23 '19 at 21:54
  • 2
    It won't "consume a lot of current" a Raspberry running 24/365 costs less than £5.00 to run for a year. Just leave it booted up unless you're running from a battery in which case buy a WittyPi2 controller. uugear.com/product/wittypi2 – Dougie Dec 23 '19 at 23:43
  • If I consider 1W of consumption when halted, it is less than 9kWh for a year so yes barelly 1$CAD where I live, still it would be interesting to stop it completely. – Varech Dec 24 '19 at 18:30
1

Ideal solution :) Seems as if you've already determined much of that with your decisions to use Arduino, and using resistors for dc current measurement. I won't try to give a detailed answer as it seems your question is approaching the "off-topic zone" for RPi, but I'll offer a few things you can think about:

  1. A relay on the high side will work fine for turning power on & off & they are completely silent - unless you're using something really strange. You're driving it from Arduino, so I assume you've got all of those details sorted... just remember to use a freewheeling diode across the relay coil to suppress the inductive "kick" when you switch the relay off. Transistors will also work, but the relay will be simpler and more reliable in this application.

  2. I would counsel re-thinking your scheme for using resistors to measure current. It seems (to me) silly to burn an additional watt of energy through a 0.1 ohm resistor to measure dc current into a 15 watt load. In addition, you've saddled yourself with the additional problem of regulating the voltage you deliver to the RPi after the drop you'll get due to RPi supply current flowing through a resistor. Not a huge problem to solve perhaps, but why do this when it's not necessary? Perhaps take a look at Hall-Effect devices instead of resistors.

Good luck, and let us know if you have any RPi questions.

  • But relays have a limited lifetime right ? Isn't it something like 1000 switching ? For Hall-Effect I didn't check yet, I was thinking to use 2 resistors of 0,05Ohm in parallel (so 0.025Ohm) which would put the loss at 0.1W – Varech Dec 24 '19 at 18:32
  • @Varech: Everything has a limited lifetime :) But your estimate of 1000 (switching cycles?) is way off for relays used in your application. For an authoritative source on relay reliability, see this reference. Several variables at work here, but I'd guess you'll get on the order of millions of cycles instead of thousands. Resistors v. Hall Effect... your choice; not to be dismissive, but in my case I've got better things to do than design circuits to measure dc current with a shunt & compensate for voltage drop. – Seamus Dec 24 '19 at 22:36
  • Thanks a lot for the link :) ! I'll look at that ! I am not experienced with power electronics (for me this starts above 0.5A). I'll check for Hall effect but is it expensive ? My goal is just to practice, I have no critical stuff behind the shunt. – Varech Dec 24 '19 at 23:44
  • As a learning exercise, it may have some merit. But if you're just getting started, I wonder if it might be a distraction. You can find many Hall Effect devices in all the usual places... I just did a quick search in Amazon for "Hall Effect Devices for Arduino" & they have many choices for less than $10. – Seamus Dec 25 '19 at 8:48
  • Yes I've found some cheap ones, but all the ones I see are used to detect passage of a magnet seems to me, how are you supposed to measure current with that ? – Varech Dec 27 '19 at 13:59

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.