RasTech-LOGO

RasTech Pi 5 Allsky Camera

RasTech-Pi-5-Allsky-Camera -product

Allsky Setup Instructions

Introduction

The Allsky cam is a project that monitors sky conditions by providing live images of the sky for the location the Allsky camera is located. This is done via a website. You can utilize a local website that is available only on the local network or optionally publish the website on the internet so it is available anywhere.

AllSky Cam Example

  • McYoder AllSky-01 – Typical Remote installation example
  • ArtCentrics Yoder Site Weather and Conditions webpage – Integration of skycam in website displays the latest camera image along with Astropheric Weather Forecast.

In addition to the immediate sky image the website can also optionally provide the following features: 

  • Constellation Overlay – Display constellation overlay on live view image.
  • Timelapse – A timelapse video of the previous night.
  • Keograms – A image that summarizes the sky conditions for the night by building a single image composed of a single row of pixels for each image taken through the night.
  • Startrails – A image showing the startrails for the previous night.

This document outlines the steps required to create your own Allsky cam. It lists the hardware purchased operating system installation and software installation and configuration. For this project the Raspberry Pi5 computer was used.

The build procedure for this project in order is:

  • Purchase Hardware
  • Hardware Assembly
    • Raspberry Pi 5 & Cam
    • Allsky Pipe Enclosure
  • Pi5 Operating System Installation
  •  Installation and Configuration of Supporting Operating System Applications
  • Installation and Configuration of the Allsky software
  • Remote Website Setup
    • Configuration of Remote Website
    • Configuration and Installation of Allsky Software for Remote Website
    • This project was a result of a lot of work by the developers of the Allsky project at Github. Please make a contribution to them to encourage further development!

References

  • YouTube: All-Sky Raspberry Pi – How my all sky cam works automatically in my backyard
  • Patriot Astrophotography: Build Your Own All Sky Camera
  • Github: Allsky project
    • Allsky Documentation
    • Discussions
    • Issues
  • Autodesk Instructables: Wireless All Sky Camera
  • Raspberry Pi5
    • Raspberry Pi OS

Hardware

Provided below is a summary of the hardware purchased to create the Allsky camera. In addition to the listed hardware the housing (PVC/ABS piping) for the Allsky cam needs to be purchased from your local hardware store.

Computer and Supporting Hardware

Item Cost Comments
RasTech Raspberry Pi 5 8GB Kit 64GB Edition $130 Latest version of Raspberry boards as of 2024-11-14. Comes with 64GB card but used higher capacity card.Raspberry Pi OS (64 bit): Debian Bookworm (2024-10-22 Release)
ScanDisk 256 GB MicroSDXC UHS-I Card $45 Large capacity card – Optional
Noctua NF-A4x10 5V PWM, Premium Quiet Fan $15 Article on installation and software here.
Gigabite USB Type C Active PoE Splitter $13 Option to eliminate P33 Hat if you don’t want to purchase the hat.
60W Gigabite PoE++ Injector $30 Required for utilizing Power over Ethernet for the P33 Hat
Arducam for Raspberry Pi HW Camera, 12.3 MP IMX477 $50 Will require minor configuration changes as detailed in instructions since this is a third party vendor.
Arducam M12 Lens Kit for Raspberry Pi HQ camera $100 This lens kit is overkill for what we need, but purchased a single lens, and it didn’t fit because it needed a CS-Mount adapter. This kit includes the adapter.
1.56mm f/2.0 5MP HD fisheye lens $15 This lens needs a CS to M12 mount adapter to use
CS to M12 Mount Lens Converter Adapter $2 This item takes a long time to ship.
Solid State Drive (256GB) $20 Can replace Micro SDXC card but requires Geeek Pi P33 addition to Basic Pi 5
Total $xxx

Allsky Cam Enclosure (Hardware Store Purchases) 

Item Cost Comments
3” PVC/ABS Pipe $13
PVC Pipe End Cap $4
PVC Cleanout Adapter with Cleanout Plug $12
3.3” Acrylic Dome $15
Dielectric Silicone Crease $12 Use on ethernet connection outdoors

3-D Printed components

Various 3D printed components were developed for this project and are identified below.

  • Templates – These are created to place over appropriate components to identify drill and cut areas.
    • Bottom Template- This may have been replaced with the Screw Plate Template below; need to verify that.
    • Dome Gasket Template – Placed over PVC pipe end cap, these holes identify where to drill holes for screws holding down the plastic dome covering the camera. These also match with the holes in the gasket for the dome.
    • Screw Plate Template – Template place in the bottom screw in plug for the PVC pipe. These are vent holes. NOTE that you will also need to cut a center hole for the POE cable that is not identified in this template. Note the hole at the edge is for reference for alignment and should not be drilled.
    • Top Template – This template is placed over the top end-cap of the PVC pipe and identifys what holes need to be drilled to hole the camera, plastic dome, and vent holes to keep the dome from fogging. Note the large hole is just a trace hole used to identify where the small bubble level can go. NOTE: Need to verify the placement of the 4 camera holes and that they are in the proper location.
  • Bug Screen – Thin plate used to attach bug screen to. Center hole the passthrough for the short Ethernet cable used to connect the Pi 5 to the POE Eithernet line. Note the connector must be added after the cable is passed through the hole.
  • Compass Mount – A mini compass holder that grabs onto the PVC pipe so you can orient the camera North.
  • Dome Gasket – Gasket used to keep water out, it is place between the platic dome and the PVC endcap. Printed with TPY filament.
  • Mount – Used to attach AllSky PVC pipe setup to pole.
  • Platform – This piece goes between the Bug Screen and the PVC bottom screw in plug and is what the Pi 5 will sit on.Stand – A stand to place the AllSky /PVC rig while working on it so it doesn’t have to lie on the side.Top Spacer – Not currently being used, but designed for placement in the body of the PVC pipe between the top endcap(holing the camera) and the Pi 5 to make sure the Pi 5 doesn’t rattle around during transport. Currently excess cables go in this area and it appears this may not be needed.
  • Vent – This series of pieces are used to house the fan that is utilized to draw hot air out of the PVC body to keep the Pi 5 from overheating. Note a bug screen need to be place in here also

Hardware Assembly Instructions – Raspberry Pi5

Assembly is pretty simple, follow assembly instructions that come with the Raspberry Pi5 and add the Arducam camera with the fish eye lens. Pay particular attention to the orientation for the data ribbon between the Pi5 and the camera (see images below), if not installed in the proper orientation or seated in the connection correctly the camera will not be accessible for the Pi5 computer.

The following additional components will be added to the base Pi5 system:

  • Arducam for Raspberry Pi HW Camera
  • Noctua NF-A4x10 5V PWM, Premium Quiet Fan – This fan will help cool the AllSky cam enclosure.

 

RasTech-Pi-5-Allsky-Camera- (4)

Note: Instructions on installation of the baseline operating system (Debian Bookworm) along with configuration details and subsequent supporting applications along with installation of the Skycam application is provided in this document. However, I will take an image of a system that has the OS, supporting applications and basic Allsky cam installed already, so that really all one should have to do is install the stored image and make configuration changes to get to the point where the local Allsky website is working.

RasTech-Pi-5-Allsky-Camera- (1)

Pi5 Operation System Installation

Installation of the Pi 5 Operating system is accomplished by flashing the memory card with a PC utilizing the Raspberry Pi Imager application.

  • Insert the SD card that will contain the Pi5 Operating System in the PC.
  • Start the Raspberry Pi OS Imager application
    • Choose Device: Raspberry Pi 5
    • Operating System: Raspberry Pi OS (64-bit)
    • Choose Storage: Select the SD Card that will be used for the Pi 5
    • Select the [Next] button to continue
    • Use OS customization?
  • Select [Edit Settings]
  • [GENERAL] tab
    • Set hostname: AllSky-01.local
    • Username: {YourUserName}
    • Password: {YourPassword}
    • Configure Wireless LAN
  • SSID: {YourWiFi}
  • Password: {WiFiPassword}
    • Wireless LAN country: US
    • Set local settings
  • Time zone: America/Phoenix
  • Keyboard Layout: us
  • [SERVICES] tab
    • Enable SSH: {Checked}
  • Use password authentication: {Checked}
  • Select [SAVE] to save settings and return back to the previous menu
  • Would you like to apply OS customisations settings?
  • Select [YES] to continue
  • Data warning is displayed to make sure you want to overwrite the SD card. Select YES to continue
  • Once the date has all been written to the SD card you will get a message that it has been completed. You can then sut down the application and remove the SD card from the PC and insert it into the Pi5.
  • DONE

References

Remote Access the Pi5 with Secure Shell (SSH)

You don’t have to be physically in front of your Pi5 to configure it. There are three means of connecting to your Pi5 remotely (see references below). Here we will utilize the Secure Shell (SSH) method since it doesn’t require any installation of software on the Pi5 (we already enabled SSH in the Pi5 Operating System Installation procedure and SSH is included in the Windows Operating System under the Command Shell.

  • Make sure you Pi5 is powered and connected to your local network.
  • On the Windows PC
    • Make sure the Window PC is on the same network as the Pi5
    • Start the Command Prompt application
    • At the command line enter the SSH command to connect to the Pi5
  • SSH {YourUserName}@AllSky-01.local
  • You should be prompted for the password selected when creating the Pi5 operating system image.
  • Note: as you type the password it will not be displayed
  • After entering the password you should have a prompt that looks like this:
    • {YourUserName}@AllSky-01:~$
  • You have now remoted into the Pi5 system and it is ready to receive commands
  • When completed and ready to log out of the Pi5 enter
    • Exit
  • You will be returned to the Windows Prompt
  • You can now exit the windows shell application
  • Exit
  • DONE

Implementing VNC for Remote Desktop Control

Another way to connect to the Pi 5 besides utilizing Secure Shell Method (SSH) is through Virtual Network Computing (VNC) where you can manage your Pi5 through a desktop interface. VNC is part of the Bookworm operating system in the Pi5, but needs to be enabled. Additionally, a VNC program must be installed on the external computer to access the Pi5 through VNC.

Note: It is assumed that the PC and the Pi5 are residing on the same network for these applications to communicate.

Enable VNC on Pi5

  • Remote into the Pi 5
  • Execute the raspiconfig program Sudo raspi-config
  • Select Interface Options menu item
    3 Interface Options Configure connections to peripherals
  • Select I3 VNC menu item
    I3 VNC Enable/disable graphical remote desktop access
  • Would you like the VNC Server to be enabled?
    <Yes>
  • Confirmation Message
    • The VNC Server is enabled
  • <ok>
  • Back at the main menu select <Finish> to exit and be returned to the command line
    <Finish>
  • DONE with the Pi5 Configuration!

Install VNC application on your computer
There are a number of VNC applications you can use to access your Pi5. I utilize the TigerVNC (free) application

  • Visit the GitHub website to download the latest TigerVNC version for your operating system.
  • Follow the installation instructions.
  • Connecting to the Pi5 through VNC will utilize the same login credentials as you do with SSH.
  • DONE!

References:

  • Raspberrypi.com: Remote Access
  • TigerVNC viewer website
  • GitHub TigerVNC project webpage

Setup Samba Server on Pi5

Setting up a Samba server on the Pi5 will allow you to access the user directory on the Pi5 through your home network so you can access files on your local computer once you map the drive.

  • Remote into the Pi 5
  • Install Samba Server on Pi 5
    • sudo apt install samba samba-common-bin
  • Configure Samba on the Pi 5
    • sudo nano /etc/samba/smb.conf
  • Update Samba Configuration file
    • Add the following section at the bottom of the file
    • AllSky-01] path = /home/{YourUserName} writeable = yes browseable = yes public=no
  • Save & Exit [ctr-X] Y
  • Setup user to access file share
    • sudo smbpasswd -a {YourUserName}
      • YourPassword}
  • Restart Samba Server
    • sudo systemctl restart smbd
  •  In windows, Map new network drive with following values:
    • Folder: \\AllSky-01\{YourUserName}
    • Add login credentials when requested
  • DONE!

References:

  • How to setup a Raspberry Pi Samba Server

AllSky Cam Enclosure Cooling Fan Software Installation

Install the application on the Pi5 to run the cooling fan for the enclosure.

Note: connection for the fan to the Pi5: The fan should be connected to pins 4,6 & 8 (see Raspberry Pi5 Pin Out Diagram).

  • Remote into the Pi5 system with SSH
    • In SSH control
  • git clone https://github.com/mklements/PWMFanControl.git
  • cd PWMF an Control
  • cp FanProportional.py ~/FanProportional.py
  • cp FanStepped.py ~/FanStepped.py
  • crontab -e (Edit using nano and add the following line at the bottom of the file)
  • @reboot python3 /home/pi/FanProportional.py &
  • Save changes to crontab, remove the downloaded folder and reboot
  • sudo rm -rf PWMFanControl
  • sudo shutdown -r now
  • DONE!

References:

  • The DIY Life: Connecting a PWM Fan to a Raspberry Pi
  • Hacatronic.com: Raspberry Pi5 Pin Out diagram

Install Gparted Application to Format

Gparted is a free, graphic partition manager that is often used on Linux systems. It can be installed on Raspberry Pi via the package manager, and used to reformat the SD card as needed.

Note: You need to run this application from the desktop not the command line once it is installed. Install Gparted Application

  • In the Terminal interface type the following commands
    Sudo apt update
    Sudo apt install gparted
  • After following the online instructions Gparted should be installed on your system and is accessible via the desktop under | System Tools | GParted |
  • DONE

References:

Backup Pi5 as a Disk Image

Instructions provided here outline the process of backing up your Pi5 to a image file that can be used to retore to a new usb drive utilizing the Raspberry Pi Installer on your local computer.

  • Format a USB Flash or the best hard drive as NTFS
  • Drive Name: Pi5Backup
  • Connect the drive to the Pi5
  • Install pishrink.sh on the Pi5 and copy it to the /usr/local/bin folder
  • Check the mount point path of your USB drive
    • lsblk
  • sda8:0 1 953.6G 0 disk
  • └─sda1 8:1 1 953.5G 0 part /media/JamesJr/Pi5Backup
  • Copy your data to an img file by using the dd command
    • sudo dd if=/dev/mmcblk0 of=/media/{YourUserName}/Pi5Backup/ImageName.img bs=1M
  • Navigate to the USB drive’s root directory and list contents, your image file ImageName should bethere.
    • cd /media/{YourUserName}/Pi5Backup
    • ls -l
  • Use pishrink with the -z parameter, which zips your image up with gzip (this may take a fewminutes). when it is done, you will end up with a reasonably sized image file called myimg.img.gz.You can copy this file to your PC and us it in the Raspberry Pi Imager application to image a newusb card.
    • sudo pishrink.sh -z ImageName.img
  • Shutdown Pi5 and remove usb drive. You can now copy the .gz file to windows for utilizing in thePi Imager to duplicate the card.

References: 

  • How to Backup Your Raspberry Pi as a Disk Image

Images 

Name Size Summary
01-OSInstall.img.gz 1.8 GiB Operating System, Fan Control, Sumba Server
02-AllskyInstall.img.gz 2.6 GiB Allsky package install. No configuration
03-AllSkyConfig.img.gz 2.7 GiB Allsky configuration for local server only

Remote Website Setup: Sub Domain Setup

Before we can install the Allsky website on the remote website we need to setup a sub-domain for the website to reside in. This involves the following steps:

  • Create Directory Structure for Sub Domain
  • Create the allSky Sub-Domain
  • Create an Administrator Account to Manage the Sub-Domain

RasTech-Pi-5-Allsky-Camera- (5)Prerequisites

  • Remote website and domain ownership

Create Directory Structure for Sub Domain

  • Log into the hosting website with the master account (A2Hosting)
  • In the [cPanel Quick Login] section select the ArtCentrics.com [cPanel Login] button to open the ArtCentrics [cPanel] page.
  • In cPanel in the [Files] section select [File Manager] to open the File Manager application.
  • In the File Manager application create the following folders:
    • /public_html/AllSkyCams
    • /public_html/AllSkyCams/Yoder
  • Note: In this example the Yoder directory is the directory that will be used to house and administrate the allsky sub-domain. It is the parent directory to the allsky directory.
    • /public_html/AllSkyCams/Yoder/allsky
  • DONE

Create the allsky Sub-Domain 

  • Log into the hosting website with the master account (A2Hosting)
    • In the [cPanel Quick Login] section select the ArtCentrics.com [cPanel Login] button to open the ArtCentrics [cPanel] page.
    •  In cPanel in the [Domains] section select [Domains] to open the Domains application.
    • In the Domains application select the [Create A New Domain] button to create a new sub-domain with the following values:
  • Domain: allsky-yoder.artcentrics.com
  • Document Root: /public_html/AllSkyCams/Yoder
  • DONE

Create an Administrator Account to Manage the Sub-Domain
An account needs to be created that has the ability to add/remove directories and files to the folder (allsky) that will contain the website and associated files. This account should be separate from the Master account used to manage the parent domain and website. This task is completed by creating a ticket for the website hosting service.

  • Log into the hosting website with the master account (A2Hosting)
    • Select [Open Ticket] option
    • Create a ticket with the following information
  • I need a new ftp account setup to administrate the sub-domain “allsky-yoder.artcentrics.com” that resides at /public_html/AllSkyCams/Yoder.
    • After the ticket has been submitted you should receive notification the task is complete. Make note of the login ID and password.
    • DONE

Sub Domain Administration Account Information

Use FTP application such ad FileZilla client to log into the account and verify the directory is available.

Remote Website Setup: Install Remote Website
These Instructions detail the process of migrating the allsky website to the remote website.

(This section is incomplete) 

Prerequisites 

  • Remote Website Setup: Sub Domain Setup – Remote Sub-Domain administrator account, file structure, and sub domain should have been created already.

References 

  • Allsky Documentation: Preparing a Remote Server

AllSky Setup Instructions.docx

Frequently Asked Questions

  1. Q: Can I use a different camera with the Allsky cam setup?
    A: The recommended camera for this project is the Arducam for Raspberry Pi HW Camera, but you may explore other compatible options with necessary configuration adjustments.
  2. Q: Is it possible to integrate additional sensors for more data collection?
    A: While not covered in this manual, you can potentially add sensors to expand the functionality of your Allsky cam setup with appropriate software integration.
  3. Q: How can I troubleshoot connectivity issues with the Allsky cam?
    A: Check your network settings, ensure proper power supply to the Raspberry Pi, and review software configurations to address any connectivity problems.

Documents / Resources

RasTech Raspberry Pi 5 Raspberry GB Starter Kit [pdf] Instruction Manual
Raspberry Pi 5 Raspberry GB Starter Kit, Raspberry Pi 5, Raspberry GB Starter Kit, GB Starter Kit, Starter Kit

References

Leave a comment

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