Powering a Raspberry Pi from 120VAC and 13.8VDC

Discussion in 'RFinderPi - Open Source radio interface based on R' started by W0RIO, Apr 20, 2020.

ad: L-HROutlet
ad: l-rl
ad: Left-2
ad: L-MFJ
ad: Left-3
ad: abrind-2
ad: l-BCInc
ad: L-Geochron
  1. W0RIO

    W0RIO Ham Member QRZ Page


    Here's another fun project I've been working on while stuck indoors during a pandemic during solar minimum.
    The photo shows a Raspberry Pi 3B+ in an Adafruit case with a 512GB solid state USB disk. There is also a
    Sabrent USB audio adapter (thanks to the Julian videos) and a Longrunner HDMI touch screen ($63 on Amazon).
    The setup works with either the USB touch screen that's built into the display or a standard USB mouse and
    keyboard. I surrounded the monitor with a grounded copper shield because I did not want to destroy it with
    static electricity.

    Power is supplied to both the Pi and the display using Micro B USB wires.
    When running on AC, the Pi and display are powered by a pair of switch-mode supplies.
    Running on 13.8 VDC requires a Meanwell SD-15A-05 switching voltage converter (Jameco.com)
    to produce 5VDC, that goes to a dual USB type A socket and a pair of USB A to Micro B adapters.

    For fun, the two USB type A sockets were hack-sawed out of a dead PC motherboard, it might
    be cleaner to cut the adapter cords and wire them directly to the converter. On a similar note,
    everything could also be run on a single AC power supply.

    I use this for a home/auto music player, hence the need for the 512GB drive, but one
    could also run ham radio apps like FLDigi or QSSTV on the pi, something I intend to do.

    The Pi is a really fun gadget.
    NE4EB likes this.
  2. KA9JLM

    KA9JLM Ham Member QRZ Page


    Where is the Fuse(s) ?
  3. AB2YC

    AB2YC Premium Subscriber QRZ Page

    You may want to look at Volumio as well

    I use a pi zero and can control it with my phone or tablet etc.
    US7IGN likes this.
  4. W0RIO

    W0RIO Ham Member QRZ Page

    Good question, the AC supplies (probably) have fuses on the AC input side based
    on their labels for UL and other testing/regulatory agencies.
    The DC-DC converter has a built-in fuse on the DC input side that is visible through
    the case perforations.

    It would be a good idea to add a fuse to the 5V bus.
  5. US7IGN

    US7IGN Ham Member QRZ Page

    I added hi-fi DAC for my hi-fi audio system from another SL-EH590 for case, Mean Well LRS-35-5 for power, Raspberry Pi 4 Model B 2 GB and HIFI ES9038Q2M Digital decoder board for Raspberry Pi I2S 32Bur 384K DSD128 powered by Volumio


  6. AB2YC

    AB2YC Premium Subscriber QRZ Page

    I've been getting into Audio a lot more than Radio lately and enjoying it quite a bit.

    I stumbled upon Volumio and It's pretty slick and quite easy to setup.
    I did find if you go through the effort of putting the album art in
    the root of each folder it makes the album screen load much faster.
    US7IGN likes this.
  7. US7IGN

    US7IGN Ham Member QRZ Page

    I do so, but the pictures are not important to me. But the sound quality I'm very happy. I can not hear the difference with the CD.

    Next level is to buy old SONY ES amp and matched speakers...

    And add Raspberry of course )
    AB2YC likes this.
  8. W0RIO

    W0RIO Ham Member QRZ Page

    About a year later, this project continues to work and has become a standard "appliance" in my
    collection of devices. I added a couple of switches on the GPIO header for quick shutdown
    and a "play next" button. Below is a simplified version of the code with just the shutdown function.

    The Pi should be shut down systematically, just removing power can potentially corrupt the
    operating system image. One of the two cars I use this device in powers off the cigar lighter plug
    when the ignition switch is turned off, so having an easy and quick way to shut down is helpful.

    The environment in the auto was noisy and resulted in unwanted shutdowns in the original setup, that was fixed
    by using an SPDT switch to pull the GPIO input to either of the power rails instead of just using a simple pushbutton
    and the internal pull-up resistor on the pi.

    Here's the GPIO shutdown code:

    # shutdown a Raspberry pi under control from a GPIO pin
    # Based on a script by George on the Ham Nation video series
    # Modified by G. Forrest Cook, W0RIO
    # Run this script from the /etc/rc.local file:
    # /home/pi/bin/PiShutdown.py &
    # Note that the Pi GPIO input pins are very noise-sensitive, even with the
    # internal pull-up enabled. GPIO inputs should be controlled by a spdt switch
    # with the ends connected to the ground and +3V rails, or to a transistor with
    # an external pull-up resistor tied to +3.3V so that the input always has a
    # low impedances path to the rails.
    # Pins used on the 40 pin Raspberry Pi header:
    # 1 - +3.3V: switch N.C. or an external pull-up resistor on GPIO 23
    # 14 - Ground: switch N.O. or reference ground for external transistor emitter
    # 16 - GPIO 23: shutdown switch center or external transistor collector

    import RPi.GPIO as gpio
    import time
    import os


    gpio.setup(SHUTDOWN_PIN, gpio.IN, pull_up_down = gpio.PUD_UP)

    def Shutdown(channel):
    os.system("shutdown -h now")

    gpio.add_event_detect(SHUTDOWN_PIN, gpio.FALLING, callback = Shutdown, bouncetime = 500)

    while 1:
    US7IGN likes this.

Share This Page