Running OP25 in a vehicle, RPi power supply question
Perhaps this question would be better suited for an RPi Forum, but I’ve seen several threads where people discuss running OP25 in their vehicles, so I thought I’d start here.
I am new to OP25 and new to RPi’s. I have OP25 set up and running on an RPi 3B+, listening to the Ohio Marcs system.
As I (slowly and painfully) learn about RPi’s, I keep seeing numerous comments about the importance of not just pulling the power cord, but rather of going through the formal shutdown process, (Raspberry logo, Logout, Shutdown). There are numerous comments about potentially trashing OS files, (and potentially OP files, also?), from a non-graceful power down. I understand that.
I would like to put an RPi based OP25 monitor in my car. I can’t, however, just power it via the “ignition” bus, (car on, or in accessory usage mode), as when I turn the car off it would instantly kill power to the RPi.
The goal is for this to be a seamless operation. Turn the car on, the RPi and OP25 start up automatically. Turn off the car and they shut down without user intervention.
I anticipate this eventually being a “headless” system, and certainly no keyboard, mouse, etc. My current thought is to have a small 8-bit micro act as a power controller. When the “ignition” bus drops to 0V, (i.e. the car is turned off), it will generate an interrupt on the RPi, via an I/O pin. The interrupt will then perform a shutdown command, nicely closing OP25 and the OS. It will wait 5 seconds, (or whatever), and then disconnect power from the RPi, (and hence also the SDR dongle).
So, now the question: Is that a reasonable approach? How do others manage this situation?
RPi (Idle).........................................390 mA........GUI interface running, OP25 not running.
RPi (Web).......................................740 mA.........RPi running its WiFi and a browser, for comparison.
RPi SDR OP25 & Fan.................840 mA.........The System up and running, RPI, single SDR, tiny fan.
Mini-Fan @ 3V............................30 mA............The tiny fan’s current draw.
RTL-SDR, Idle...............................20 mA............The SDR’s current draw, plugged in, not running.
RTL-SDR, OP25............................420 mA.........The SDR’s current draw, while in use.
I am not looking for code or schematics, etc. I am just interested in feedback on whether the above approach might work, and if there are any hidden hurdles that I am oblivious to given my RPi and SDR newbie status. Designing the “power controller” part of the project is doable for me, but I’m still at the early, conceptual, phase of this project.
Feedback, thoughts, comments, guidance, or “The Standard Approach” to handling this situation is … are all appreciated.
Please ignore the bullet points above... They weren't intentional... Newbies! What can you say.
Thank you,
JC
Perhaps this question would be better suited for an RPi Forum, but I’ve seen several threads where people discuss running OP25 in their vehicles, so I thought I’d start here.
I am new to OP25 and new to RPi’s. I have OP25 set up and running on an RPi 3B+, listening to the Ohio Marcs system.
As I (slowly and painfully) learn about RPi’s, I keep seeing numerous comments about the importance of not just pulling the power cord, but rather of going through the formal shutdown process, (Raspberry logo, Logout, Shutdown). There are numerous comments about potentially trashing OS files, (and potentially OP files, also?), from a non-graceful power down. I understand that.
I would like to put an RPi based OP25 monitor in my car. I can’t, however, just power it via the “ignition” bus, (car on, or in accessory usage mode), as when I turn the car off it would instantly kill power to the RPi.
The goal is for this to be a seamless operation. Turn the car on, the RPi and OP25 start up automatically. Turn off the car and they shut down without user intervention.
I anticipate this eventually being a “headless” system, and certainly no keyboard, mouse, etc. My current thought is to have a small 8-bit micro act as a power controller. When the “ignition” bus drops to 0V, (i.e. the car is turned off), it will generate an interrupt on the RPi, via an I/O pin. The interrupt will then perform a shutdown command, nicely closing OP25 and the OS. It will wait 5 seconds, (or whatever), and then disconnect power from the RPi, (and hence also the SDR dongle).
So, now the question: Is that a reasonable approach? How do others manage this situation?
- I -> assume <- that I can write a MicroPython program to trigger an ISR to run a script to shut down the RPi, and that that won’t tie up a core on the RPi in an endless wait loop, wasting processing power. (I’ve flashed an LED with MicroPython, but not yet learned any more of the language, and I don’t know C.) The current draw of the 8-bit micro is a trivial load, 2-3 mA, (or even much less if the micro “sleeps” between activity.
- Some preliminary current measurements show that the RPi & SDR system is pretty power hungry, and I don’t want to leave the system energized when not in use. These measurements were made with a 0.05 ohm current sense resistor in series in the 12V wall wart power lead:
RPi (Idle).........................................390 mA........GUI interface running, OP25 not running.
RPi (Web).......................................740 mA.........RPi running its WiFi and a browser, for comparison.
RPi SDR OP25 & Fan.................840 mA.........The System up and running, RPI, single SDR, tiny fan.
Mini-Fan @ 3V............................30 mA............The tiny fan’s current draw.
RTL-SDR, Idle...............................20 mA............The SDR’s current draw, plugged in, not running.
RTL-SDR, OP25............................420 mA.........The SDR’s current draw, while in use.
I am not looking for code or schematics, etc. I am just interested in feedback on whether the above approach might work, and if there are any hidden hurdles that I am oblivious to given my RPi and SDR newbie status. Designing the “power controller” part of the project is doable for me, but I’m still at the early, conceptual, phase of this project.
Feedback, thoughts, comments, guidance, or “The Standard Approach” to handling this situation is … are all appreciated.
Please ignore the bullet points above... They weren't intentional... Newbies! What can you say.
Thank you,
JC
Last edited: