Micro Light Pollution: Disabling Activity LEDs on a Raspberry Pi 5

pi turn off lights

When using a Raspberry Pi 5 for astrophotography, light pollution from the onboard LEDs can interfere with your night vision and the dark conditions necessary for capturing the best images of the night sky. The Raspberry Pi 5, like its predecessors, comes with several LEDs that light up to indicate power, SD card activity, and network connectivity. While useful for regular use, these LEDs can be distracting in low-light settings and negatively impact your astrophotography efforts.

Luckily, you can dim or even completely turn off these activity LEDs to ensure that you’re not disrupting your dark-adapted vision during late-night sessions. In this blog post, we’ll walk you through how to accomplish this, allowing you to have a more seamless and distraction-free astrophotography experience.

Why Dim or Turn Off LEDs?

Astrophotography often requires precise control over lighting conditions, particularly when working in the field at night. The bright blinking LEDs on the Raspberry Pi can:

  • Affect your night vision, making it harder to see your surroundings or objects in the sky.
  • Introduce unwanted light pollution that can negatively affect your astrophotography setup, especially if you’re using a telescope with long exposure times.

By dimming or disabling the LEDs, you ensure that your Raspberry Pi doesn’t interfere with your dark-adapted eyes, helping you stay focused on your setup and capture clearer images.

How to Dim and Turn Off Raspberry Pi 5 LEDs

There are a few different methods to manage the activity LEDs on your Raspberry Pi 5.

1. Disable the LEDs via the config.txt File

The simplest method to turn off the LEDs completely is to modify the Raspberry Pi’s boot configuration file (config.txt), which controls hardware settings for the Pi.

Open the Terminal on your Raspberry Pi or connect to it via SSH then edit the config.txt file by typing:

sudo nano /boot/firmware/config.txt

Scroll to the bottom of the file and add the following lines to turn off the onboard LEDs:

# Turn off activity LEDs 
dtparam=act_led_trigger=none 
dtparam=act_led_activelow=off 
dtparam=power_led_trigger=none 
dtparam=power_led_activelow=off
dtparam=eth_led0=4
dtparam=eth_led1=4

What these settings do:

  • act_led_trigger=none: This disables the activity LED trigger (SD card activity).
  • act_led_activelow=off: This turns off the activity LED.
  • power_led_trigger=none: This disables the power LED trigger.
  • power_led_activelow=off: This turns off the power LED.
  • eth_led0=4: This turns off the green LED on the Ethernet port
  • eth_led1=4: This turns off the amber LED on the Ethernet port

After adding these lines, save the file by pressing CTRL+X, followed by Y to confirm, and Enter to exit the editor.

Finally, reboot your Raspberry Pi to apply the changes:

sudo reboot

After rebooting, the LEDs on your Raspberry Pi 5 should be turned off.

2. Dim the LEDs Instead of Turning Them Off

If you prefer not to turn off the LEDs entirely but still want to reduce their brightness to avoid interference, you can use the following method to dim them.

Open the Terminal on your Raspberry Pi or connect to it via SSH then edit the config.txt file by typing:

sudo nano /boot/firmware/config.txt

Scroll to the bottom of the file and add the following lines to turn off the onboard LEDs:

# Turn off activity LEDs 
dtparam=act_led_trigger=default-on 
dtparam=act_led_activelow=on
dtparam=power_led_trigger=default-on
dtparam=power_led_activelow=on

This configuration keeps the LEDs on but reduces their brightness, providing a much subtler glow that won’t interfere as much with your vision or astrophotography setup.

Save the file and reboot your Raspberry Pi:

sudo reboot

3. Use a Physical Barrier (For Extra Dark Conditions)

If you’re looking for a temporary solution that doesn’t involve modifying your Pi’s configuration, you can always place a small piece of electrical tape or a custom 3D-printed cover over the LEDs. This will block the light from the LEDs without changing any system settings. Another common approach is to paint the LED with a black Sharpie Marker pen, but do take care to ensure the ink is dry before connecting to power to avoid short circuiting!

Additional Tips for Astrophotography with Raspberry Pi 5

  • Minimize screen brightness: If you’re using a screen for your Raspberry Pi 5, consider dimming or turning it off entirely to reduce light pollution.
  • Use a remote connection: If you don’t need the Pi’s local display, use SSH to control your Pi remotely from another computer or mobile device. This ensures that no screen or LEDs will disturb your setup.
  • Ensure stable power: Use a reliable power source and manage cable clutter to minimize disruptions in your photography workflow.

Conclusion

By following the steps outlined above, you can effectively dim or turn off the activity LEDs on your Raspberry Pi 5, making it more suitable for astrophotography. Whether you’re in the field capturing the stars or working with sensitive camera equipment, reducing light pollution from your Raspberry Pi can help you achieve clearer, more focused images.

Happy stargazing and clear skies!

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top