This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MacArthur hat with power module powerdown issue?
#1
I've installed my new MacArthur hat with the new power module and believe it is configured according to the Power Management section on page 8 & 9 of the documentation.  The system is functioning and communicating correctly with my IMU, DB18b20 1 wire sensors, etc.  I did reboot after configuring the Shutdown management. However, when I power-off with my external switch, it appears to shutdown instantly, meaning all the lights on the MacArthur hat and Raspberry pi turn off instantly.  Is this to be expected?  I belive the "last -x" command confirms that a gracefull shutdown has not occured!

  pi@openplotter:~ $ last -x
  runlevel (to lvl 5)  6.1.21-v8+      Fri Feb 16 14:43  still running
  pi      tty7        :0              Fri Feb 16 14:43    gone - no logout
  pi      tty1                          Fri Feb 16 14:43    gone - no logout
  reboot  system boot  6.1.21-v8+      Wed Dec 31 19:00  still running
  runlevel (to lvl 5)  6.1.21-v8+      Fri Feb 16 14:43 - 14:43  (00:00)
  pi      tty7        :0              Fri Feb 16 14:43 - crash (-19769+19:43)
  pi      tty1                          Fri Feb 16 14:43 - crash (-19769+19:43)
  reboot  system boot  6.1.21-v8+      Wed Dec 31 19:00  still running

This is from the [GENERAL] section of the ~/.opneplotter/openplotter.conf file:
  shutdown = {'gpio': '21', 'transition': 0, 'pull': 0}
  poweroff = {'gpio': '26', 'transition': 1}

How should I troubleshoot and resolve this issue?
Reply
#2
Attention, shutdown setting should be 'transition': 1

shutdown = {'gpio': '21', 'transition': 1, 'pull': 0}
poweroff = {'gpio': '26', 'transition': 1}

   

But you could also have a wiring mistake. I think your switch could be connected to "12V" instead of "12V SW" or connected to both at the same time:

   
Reply
#3
(2024-02-17, 10:42 AM)Sailoog Wrote: Attention, shutdown setting should be 'transition': 1

shutdown = {'gpio': '21', 'transition': 1, 'pull': 0}
poweroff = {'gpio': '26', 'transition': 1}



But you could also have a wiring mistake. I think your switch could be connected to "12V" instead of "12V SW" or connected to both at the same time:

Thank you for the response!
My switch is definitely connected to 12V SW. Additionally, I measure 12V across the 12V and GND terminal at he MacArthur hat when switch is off and system is off.

When I checked this morning I found GPIO 21 was set to low-high in the systems dialog. However, I believe it was high-low when I configured it yesterday. However setting/resetting it correctly today did not resolve the issue!

Current state after resetting Shutdown management and rebooting raspberry pi and then using the switch to turn off and then back on is:

See attatched image capture of settings dialog:
   
[GENERAL] section of the ~/.opneplotter/openplotter.conf file:
[GENERAL] section of the ~/.opneplotter/openplotter.conf file:
shutdown = {'gpio': '21', 'transition': 1, 'pull': 0}
poweroff = {'gpio': '26', 'transition': 1}

And it appears the switch is still causing a crash rather than a controlled shutdown sequence as shown here.
pi@openplotter:~ $ last -x
runlevel (to lvl 5) 6.1.21-v8+ Sat Feb 17 09:28 still running
pi tty7 :0 Sat Feb 17 09:28 gone - no logout
pi tty1 Sat Feb 17 09:28 gone - no logout
reboot system boot 6.1.21-v8+ Wed Dec 31 19:00 still running
runlevel (to lvl 5) 6.1.21-v8+ Sat Feb 17 09:28 - 09:28 (00:00)
pi tty7 :0 Sat Feb 17 09:28 - crash (-19770+14:28)
pi tty1 Sat Feb 17 09:28 - crash (-19770+14:28)
reboot system boot 6.1.21-v8+ Wed Dec 31 19:00 still running
shutdown system down 6.1.21-v8+ Sat Feb 17 09:28 - 19:00 (-19770+14:28)
runlevel (to lvl 5) 6.1.21-v8+ Fri Feb 16 21:05 - 09:28 (12:22)
So I’m still having the shutdown problem. Please suggest additional troubleshooting steps that I should try.

ALos here is the state of gpio's using 
pi@openplotter:~ $ raspi-gpio get 21
GPIO 21: level=1 fsel=0 func=INPUT pull=UP
pi@openplotter:~ $ raspi-gpio get 26
GPIO 26: level=1 fsel=1 func=OUTPUT pull=DOWN

So I’m still having the shutdown problem. Please suggest additional troubleshooting steps that I should try.
Reply
#4
Can you measure the voltage on GPIO26 (pin 37)? It should be close to 3.3V after the Pi booted up.

This is the pin, that the shutdown logic sets to high after boot, and then to low once Pi OS completed shutdown.

   

Also, can you state the model of your Raspberry Pi, and the version of OpenPlotter you are running.
Reply
#5
Rasberry pi 4 model B
Openplotter version: 3.6.6

After power up GPIO21 has 3.04V and GPIO26 has only 0.40V

What could be causing the low voltage on GPIO26?
Is GPIO21 lower than expected?
Thanks, and please advise next steps in diagnosing the issue.
Reply
#6
Raspberry OS version?
Could you post here the content of file /boot/config.txt?
Reply
#7
Raspberry pi OS version:
VERSION="11 (bullseye)"

boot/config.txt:
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

[all]
enable_uart=0
dtoverlay=w1-gpio,gpiopin=19
dtoverlay=gpio-shutdown,gpio_pin=21,active_low=1,gpio_pull=up






dtoverlay=gpio-poweroff,gpiopin=26,active_low=1
Reply
#8
Everything seems correct, can you check if a /boot/firmware/config.txt file exists and post the content here if it exists?
Reply
#9
that file does not exist...
pi@openplotter:~ $ cat /boot/firmware/config.txt
cat: /boot/firmware/config.txt: No such file or directory

Also /boot/firmware directory does not exist...

Could there be an issue with the power module?
I soldered it, but think I have good solder joints.
   
Reply
#10
Good. /boot/firmware/config.txt should not exist in your system.

Next test, type this in a terminal to see the state of all GPIOs:

raspi-gpio get

You should get:

GPIO 21: level=1 fsel=0 func=INPUT pull=UP
GPIO 26: level=1 fsel=1 func=OUTPUT pull=DOWN
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)