{"id":370,"date":"2021-12-15T10:19:05","date_gmt":"2021-12-15T10:19:05","guid":{"rendered":"https:\/\/samndave.org.uk\/ourdoc\/?p=370"},"modified":"2026-03-19T07:03:14","modified_gmt":"2026-03-19T07:03:14","slug":"astrophotography-with-a-raspberry-pi-part-1-basics","status":"publish","type":"post","link":"https:\/\/samndave.org.uk\/index.php\/2021\/12\/15\/astrophotography-with-a-raspberry-pi-part-1-basics\/","title":{"rendered":"Astrophotography with a Raspberry Pi &#8211; Part 1 (Basics)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Note: <\/strong>Updated March 2026 for Astroberry 3. Originally written for Astroberry 2, based on Raspian Buster.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One common form of astrophotography is to use a high frame rate camera to produce a video of an object then stack (process) the frames to compile together the clearest parts to produce one (hopefully!) crisp image. This is a particularly useful technique for solar system objects, such as the moon and planets.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Previously I had used a Netbook running Windows 7 and a ZWO ASI120MC astro-camera, but as age set in, the cheap little netbook started to struggle for battery life, updates were no longer available and it came time to look for a replacement. Unfortunately due to the success of the tablet market, nobody makes cheap little laptops any more, so a dedicated imaging laptop was going to get expensive.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Imaging with a laptop in the garden on cold winter nights also presents problems in that you need somewhere to stand it, like a table. So, I started to wonder, could I replace the laptop with a Raspberry Pi? Looking at what I had, I had a USB high frame rate camera, a beefy Celestron power tank, Celestron telescope and a phone\/iPad. If I could use a Pi to run the camera, power it from the power tank then use the long battery and high res screen on an iPad, it would make a cheap, lightweight imaging set up, which would also give the option of imaging from inside once set up.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Would such a thing be possible? Yes, it turns out loads of people have done this. Also using the Pi gives the option for telescope control and to use the GPIO header for additional devices, such as focus control or activating dew heaters. The Pi 4 is a reasonably powerful device, with a 1.5 GHz quad core CPU, 4 Gb RAM and USB 3, it easily outstrips my old netbook with a single core 1.33 GHz processor, 1 Gb RAM and a pair of USB 2 ports.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Below is the first in a series of blog posts covering how I built my astro-imaging rig as I set out to achieve the below objectives. All code, schematics and 3d print objects developed for this project are available in this <a href=\"https:\/\/github.com\/DaveHartburn\/astroberryAddons\">GitHub repository<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table class=\"has-background\" style=\"background-color:#f3f4f5\"><thead><tr><th>Objective<\/th><th>Essential?<\/th><th>Complete?<\/th><\/tr><\/thead><tbody><tr><td>Raspberry Pi with remote desktop from iPad<\/td><td>Essential<\/td><td>Completed, using Astroberry<\/td><\/tr><tr><td>ZWO ASI120MC camera support and imaging application<\/td><td>Essential<\/td><td>Completed, using FireCapture<\/td><\/tr><tr><td>Powered from power tank<\/td><td>Essential<\/td><td>Completed, but abandoned in favour of a dedicated battery.<\/td><\/tr><tr><td>Wireless and hotspot mode<\/td><td>Essential<\/td><td>Completed using Astroberry<\/td><\/tr><tr><td>Stellarium or other planetarium software<\/td><td>Desirable<\/td><td>Completed<\/td><\/tr><tr><td>Telescope remote control<\/td><td>Essential<\/td><td>Completed, usingKStars &amp; INDI in <a href=\"https:\/\/samndave.org.uk\/index.php\/2021\/12\/15\/astrophotography-with-a-raspberry-pi-part-2-remote-control\/\" data-type=\"post\" data-id=\"377\">part 2<\/a><\/td><\/tr><tr><td>Support for an external disk<\/td><td>Essential<\/td><td>Complete &#8211; just plug one in!<\/td><\/tr><tr><td>Focus remote control<\/td><td>Desirable<\/td><td>Completed, <a href=\"https:\/\/samndave.org.uk\/index.php\/2021\/12\/15\/astrophotography-with-a-raspberry-pi-part-3-focus-control\/\" data-type=\"post\" data-id=\"415\">part 3<\/a><\/td><\/tr><tr><td>Small screen to show network status<\/td><td>Desirable<\/td><td>Completed, <a href=\"#ScreenDisplay\" data-type=\"internal\">see below<\/a><\/td><\/tr><tr><td>Control and preview of Canon DSLR<\/td><td>Desirable<\/td><td>Completed, <a href=\"https:\/\/samndave.org.uk\/index.php\/2021\/12\/18\/astrophotography-with-a-raspberry-pi-part-4-dslr\/\" data-type=\"post\" data-id=\"426\">part 4<\/a><\/td><\/tr><tr><td>Auto-guiding Skyadventurer mount<\/td><td>Desirable<\/td><td><\/td><\/tr><tr><td>Build &amp; Casing<\/td><td>Essential<\/td><td>Completed *link*<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<h2 class=\"wp-block-heading\">Part 1 &#8211; System setup<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The first part covers the system basics, install, drivers, power and helpful admin tools. The steps were not taken in this order, lets face it, getting images up on the screen is far more exciting than some of the background work!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Server Options<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The premium option for imaging using a Pi, is using the <a href=\"https:\/\/astronomy-imaging-camera.com\/product\/asiair-pro\">ZWO ASIAir Pro<\/a>, this looks like an excellent piece of kit, with very good reviews, but with a price tag around \u00a3300, it is an expensive way to buy a Pi, and limits the choice of customisation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Initially I set out to do all this myself from scratch using the standard Raspian install, however the first time I started to search for drivers, I discovered two existing projects, <a href=\"https:\/\/www.astroberry.io\">Astroberry<\/a> and <a href=\"https:\/\/www.stellarmate.com\/\">Stellarmate<\/a>. Stellarmate looked good, is supported and well packaged, but comes with a \u00a350 cost. Astroberry is free. Comparisons say it is not quite as well polished as Stellarmate and sometimes is not updated as often, but it is good for people who know how to run a Pi or Linux device. I opted for the free Astroberry.<\/p>\n<\/div>\n<\/div>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Astroberry setup<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Getting Astroberry up and running was quick and simple. I found this quickly solved the first few objectives to get the Pi up and running, allow remote access from an iPad and linux desktop, with the ability to run in a hotspot mode.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Follow the instructions at <a href=\"https:\/\/www.astroberry.io\/docs\/install\">https:\/\/www.astroberry.io\/docs\/install<\/a> and <a href=\"https:\/\/astroberry.io\/quick-start-guide\/\">https:\/\/astroberry.io\/quick-start-guide\/<\/a><\/li>\n\n\n\n<li>I had problems connecting it to wireless. I was able to use hotspot mode, connect my laptop to the SSID &#8216;astroberry&#8217; and browse to https:\/\/astroberry.local, but each time I configured it to use my home network, it dropped the connection for a while and came back in hotspot mode. Eventually I used a network cable.<\/li>\n\n\n\n<li>Once connected, run <code>sudo apt update<\/code> followed by <code>sudo apt upgrade<\/code>, then reboot<\/li>\n\n\n\n<li>Configure the home wireless connection. In future it should default to this and then try hotspot mode if not available. The network cable was no longer needed.<\/li>\n\n\n\n<li>In Settings -&gt; Control centre, enable SSH, SPI and I2C\n<ul class=\"wp-block-list\">\n<li>Set local and timezone<\/li>\n\n\n\n<li>Another reboot will be required<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Test SSH access: <code>ssh astroberry@astroberry.local<\/code><\/li>\n\n\n\n<li>Previously I had used VNC, but now astroberry prefers the use of the web browser client. If need there is a guide at <a href=\"https:\/\/astroberry.io\/how-to-connect-with-vnc\/\">https:\/\/astroberry.io\/how-to-connect-with-vnc\/<\/a><\/li>\n\n\n\n<li>Ensure the file system fills the card by running <code>lsblk<\/code>\n<ul class=\"wp-block-list\">\n<li>If not <code>sudo raspi-config<\/code>, Advanced and Expand Filesystem<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Screen resolution and iPad support<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This section was written for the older astroberry. Resolution is fine when using browser mode, however this does not supply an on screen keyboard. Further investigation required, update soon.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Screen resolution can be changed from Preferences-&gt;Screen Configuration, however none of the default modes are iPad friendly. They look great on a 1080p monitor and fill the whole screen, however when using the iPad VNC app, you can not view the whole screen at one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For reference, a 1080p monitor is 1920&#215;1080, a lower resolution laptop screen is typically 1366&#215;768, but an iPad 5th generation is a much larger 2048&#215;1536, with a 4:3 aspect ratio.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Commenting out <code>dtoverlay=vc4-fkms-v3d<\/code> in \/boot\/config.txt gives better performance for Firecapture. Do this, then use <code>raspi-config<\/code> to pick a 4:3 mode and reboot.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Camera support and imaging<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I got different issues between Astroberry 2 and Astroberry 3.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Astroberry 2:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">My camera is the older version of the ZWO ASI120MC, supporting only USB2.0, and is known to be problematic under Linux. Astroberry comes with a few imaging applications installed, including FireCapture and oacapture. Both detected the camera, but failed to produce an image. With help from the <a href=\"https:\/\/www.indilib.org\/forum\">INDI forums<\/a>, I was able to finally get it running. (INDI is the underlying software control system, used to connect many types of astronomy software)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Other newer cameras should connect and be detected straight away and not require the following steps.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>sudo rpi-eeeprom-update<\/code>\n<ul class=\"wp-block-list\">\n<li>If this is the latest then it will cause a problem<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>See <a href=\"https:\/\/indilib.org\/forum\/general\/7656-solution-for-usb-2-0-camera-and-usb-hub.html\">https:\/\/indilib.org\/forum\/general\/7656-solution-for-usb-2-0-camera-and-usb-hub.html<\/a><\/li>\n\n\n\n<li>Prevent auto-updating of firmware with:<\/li>\n\n\n\n<li><code>sudo systemctl mask rpi-eeprom-update<\/code><\/li>\n\n\n\n<li>edit \/etc\/default\/rpi-eeprom-update to:<br><code>FIRMWARE_RELEASE_STATUS=\"stable\"<\/code><\/li>\n\n\n\n<li>Downgrade the firmware following:<br><a href=\"https:\/\/www.raspberrypi.org\/forums\/viewtopic.php?f=28&amp;t=250990\">https:\/\/www.raspberrypi.org\/forums\/viewtopic.php?f=28&amp;t=250990<\/a><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>$ unzip vl805_update_0137ab.zip\n$ chmod a+x vl805\n$ sudo .\/vl805 -w vl805_fw_0137ab.bin\n$ sudo reboot<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify on reboot:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo rpi-eeprom-update\nBCM2711 detected\nDedicated VL805 EEPROM detected\n*** UPDATE AVAILABLE ***\nBOOTLOADER: update available\nCURRENT: Thu 3 Sep 12:11:43 UTC 2020 (1599135103)\nLATEST: Fri 11 Dec 11:15:17 UTC 2020 (1607685317)\nFW DIR: \/lib\/firmware\/raspberrypi\/bootloader\/stable\nVL805: update available\nCURRENT: 000137ab\nLATEST: 000138a1<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Downgrade ASI firmware, Windows is required<\/li>\n\n\n\n<li>Download the firmware upgrade tool from <a href=\"https:\/\/astronomy-imaging-camera.com\/software-drivers\">https:\/\/astronomy-imaging-camera.com\/software-drivers<\/a><\/li>\n\n\n\n<li>Select the file with the -compatible filename<\/li>\n\n\n\n<li>Upgrade<\/li>\n\n\n\n<li>In KStars, EKOS, Camera -&gt; Controls, set the format to Raw 8 Bit and turn streaming on, you should see an image.<\/li>\n\n\n\n<li>Do you see monochrome with &#8216;graph paper&#8217; overlay?\n<ul class=\"wp-block-list\">\n<li>Under FireCapture, enable colour with the Debayer function.<\/li>\n\n\n\n<li>In oaCapture settings:\n<ul class=\"wp-block-list\">\n<li>Camera: force frame formet to RGGB8<\/li>\n\n\n\n<li>Demosaic: Demosaic preview and output data, set Bayer format to auto or GRGB8<\/li>\n\n\n\n<li>You may have to reset the camera or disconnect &#8211; connect.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Astroberry 3<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The ASI120MC worked out the box with Astroberry 3, which was a much better experience. Though there were a couple of glitches with Firecapture:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First start up did not detect the camera and give the dummy cam<\/li>\n\n\n\n<li>Second start up did detect the camera, but after giving an error message saying \/home\/pi could not be found, I was not able to select a different folder. The video stream ran, but I could not interact with the software. It had to be killed from the command line.<\/li>\n\n\n\n<li>I created a \/home\/pi directory and chowned it to astroberry:astroberry, which resolved the issue.<\/li>\n\n\n\n<li>The video did appear with the monochrome &#8216;graph paper&#8217; effect as described above.\n<ul class=\"wp-block-list\">\n<li>Go to Debayer settings and enable colour. Although it reports it will capture in monochrome, it does not.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">oaCapture is not present on Astroberry 3, AstroDMx Capture seems to be it&#8217;s replacement. Selecting my camera and RAW8 worked first time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To use, see First Light&#8230;&#8230;** LINK REQUIRED **<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ScreenDisplay\">Displaying the IP address \/ Hotspot mode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It would be useful if on boot, we could see what IP address the Pi had and if it had connected to the wireless network, or was running in hotspot mode. Otherwise it is just a box in unknown status.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SDD1306 0.96&#8243; OLED screens are usually well under \u00a35 and can be a quick and simple screen to show small amounts of output. They connect directly to the GPIO header, using I2C (make sure you buy the I2C version, not SPI). They come with 4 pins and are connected as follows:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>SDD1306<\/th><th>Raspberry Pi<\/th><\/tr><\/thead><tbody><tr><td>GND<\/td><td> GPIO pin 9 (GND)<\/td><\/tr><tr><td>VDD<\/td><td>GPIO pin 1 (3v3)<\/td><\/tr><tr><td>SCK  (or SCL)<\/td><td>GPIO pin 5 (GPIO 3 \/ SCL)<\/td><\/tr><tr><td>SDA<\/td><td>GPIO pin 3 (GPIO2 \/ SDA)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">We don&#8217;t want the screen on all the time, so a wake up push button would be useful. As GPIO 4 (pin 7) is free in a gap between that and ground, it makes a useful block of 5 pins together to use.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"874\" height=\"1024\" src=\"http:\/\/samndave.org.uk\/wp-content\/uploads\/2021\/12\/astroberryIO_breadboard_screenOnly_bb-874x1024.png\" alt=\"\" class=\"wp-image-662\" srcset=\"https:\/\/samndave.org.uk\/wp-content\/uploads\/2021\/12\/astroberryIO_breadboard_screenOnly_bb-874x1024.png 874w, https:\/\/samndave.org.uk\/wp-content\/uploads\/2021\/12\/astroberryIO_breadboard_screenOnly_bb-256x300.png 256w, https:\/\/samndave.org.uk\/wp-content\/uploads\/2021\/12\/astroberryIO_breadboard_screenOnly_bb-768x900.png 768w, https:\/\/samndave.org.uk\/wp-content\/uploads\/2021\/12\/astroberryIO_breadboard_screenOnly_bb-1311x1536.png 1311w, https:\/\/samndave.org.uk\/wp-content\/uploads\/2021\/12\/astroberryIO_breadboard_screenOnly_bb.png 1347w\" sizes=\"auto, (max-width: 874px) 100vw, 874px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Astroberry 2<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Install the python dependencies by following the steps at <a href=\"https:\/\/learn.adafruit.com\/adafruit-pioled-128x32-mini-oled-for-raspberry-pi\/usage\">https:\/\/learn.adafruit.com\/adafruit-pioled-128&#215;32-mini-oled-for-raspberry-pi\/usage<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo pip3 install adafruit-circuitpython-ssd1306\nsudo apt-get install python3-pil<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Astroberry 3<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the virtual environment guide at <a href=\"https:\/\/learn.adafruit.com\/circuitpython-on-raspberrypi-linux\/installing-circuitpython-on-raspberry-pi\">https:\/\/learn.adafruit.com\/circuitpython-on-raspberrypi-linux\/installing-circuitpython-on-raspberry-pi<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install python3-venv\npython3 -m venv astroPython\nsource astroPython\/bin\/activate\npip3 install adafruit-circuitpython-ssd1306\npip3 install Image<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Using the display<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Check out <a href=\"https:\/\/github.com\/DaveHartburn\/astroberryAddons\">the repository<\/a> onto the Pi, and try the test program:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone https:\/\/github.com\/DaveHartburn\/astroberryAddons.git\ncd astroberryAddons\/hw_testing\npython3 ssd1306_stats.py\nctrl-c\ncd ..\npython3 wifiStatus.py<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The status display program is called wifiStatus.py and should be run on start up. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Astroberry 2<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following line to \/etc\/rc.local:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>\/usr\/bin\/python3 \/home\/astroberry\/wifiStatus.py &amp;<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Astroberry 3<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Newer versions of Linux have dropped \/etc\/rc.local for start up scripts. Now anything which runs at start up, must be managed with systemctl. There are details about this process at <a href=\"https:\/\/blog.usedbytes.com\/2019\/11\/run-at-startup-without-rc.local\/\" data-type=\"link\" data-id=\"https:\/\/blog.usedbytes.com\/2019\/11\/run-at-startup-without-rc.local\/\">https:\/\/blog.usedbytes.com\/2019\/11\/run-at-startup-without-rc.local\/<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In <code>\/etc\/systemd\/system<\/code> create the following file called <code>astroberry-addons.service<\/code> or copy from the root of the git repository<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Unit]\nDescription=Astroberry Addons service\nAfter=multi-user.target\n\n\n&#91;Service]\nType=idle\nExecStart=\/home\/astroberry\/astroberryAddons\/serviceStart.sh\nRestart=always\nRestartSec=3\n\n&#91;Install]\nWantedBy=multi-user.target\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Test the service with <code>systemctl start astroberry-addons.service<\/code>, then if happy, set to permanently start with <code>systemctl enable astroberry-addons.service<\/code>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Reboot and on boot, the screen should show for 20 seconds, displaying the network status. To view again, press the button.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Hotspot mode<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If the configured wireless network is not available, Astroberry will revert to hotspot mode, acting as a wireless access point. If the device is out in the field and the home network can not be seen, this is how you will be able to access it. To simulate this, edit <code>\/etc\/NetworkManager\/system-connections\/Wi-Fi.nmconnection<\/code> and change your home SSID subtly. On reboot, the Pi should start in hotspot mode, as indicated on the screen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By default, in hotspot mode, the IP address will be 10.42.0.1.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are on a home network but have a weak signal, you may get performance issues when connecting. There is a script in my <a href=\"https:\/\/github.com\/DaveHartburn\/astroberryAddons\">GitHub repository<\/a>, called <code>hotspot.sh<\/code>. This must be run as root (sudo) with the parameter &#8216;on&#8217; or &#8216;off&#8217; to switch between modes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Powering the Pi<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The recommended power supply for the Rasbperry Pi 4 is 5v and 3A. However, while the Celestron Power Tank has USB power outputs, these are only rated at 1.5A. Trying this, it will power the Pi and it does seem to run with the camera. However it is well known that most random problems with the Raspberry Pi are due to faulty or under rated power. If we are going to power this from a battery, we need something beefier.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Power Tank has two 12v 10A car cigarette lighter style outputs, one of which I use for the telescope. There are two options. One is to get a 3A output car charger and power over the standard USB-C power port, or we can bring the 12V right up to the Pi, step it down and it gives us the option of drawing power for other devices. Note, I did not actually use this, see below.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A buck converter such as the KIS3R33S is a reasonably efficient way of stepping 12v down to 5v 3A. Many of these come with USB ports on one end. This can be used with a short cable into the USB-C socket on the Pi, removed completely or I soldered two leads onto the underside of the board, connecting to pins 4 (5v) and 6 (GND) on the 40-pin GPIO header. With a car to 2.1mm x 5.5 mm lead (the type of power connector used on a lot of CCTV cameras) and a matching socket on the input end of the buck converter, this should pack neatly into a case.<\/p>\n\n\n<div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"566\" height=\"535\" src=\"http:\/\/samndave.org.uk\/wp-content\/uploads\/2021\/01\/pi_tank_power.jpg\" alt=\"\" class=\"wp-image-392\" srcset=\"https:\/\/samndave.org.uk\/wp-content\/uploads\/2021\/01\/pi_tank_power.jpg 566w, https:\/\/samndave.org.uk\/wp-content\/uploads\/2021\/01\/pi_tank_power-300x284.jpg 300w\" sizes=\"auto, (max-width: 566px) 100vw, 566px\" \/><figcaption class=\"wp-element-caption\">Astroberry install running off a power tank<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Although this worked fine, I found that once completed and set up outside, I was getting a number of problems using the power tank. It should be able to deliver the required current, but once an external disk, focus stepper motor, a VNC client and a high frame rate camera had all been added, the Pi struggled, reported voltage issues and could not seem to run both the disk and camera together. It also seemed to cause telescope problems, with a flickering display. Some behaviour looked as if there could be some form of shorting going on and I generally was not happy with it. Perhaps the power converter was cheap or faulty?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the end I bought an Anker PowerCore Essential 20000 power bank. Supplying 20,000mAh and delivering high current with it&#8217;s fast charge socket it could handle an external disk, the Pi and the camera without a problem. It does mean using two power supplies, one for the telescope and one for the Pi, but that is not a major issue and increases overall battery life.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That has the Pi up and running with Astroberry and the ability to run from battery with a remote VNC connection. In the <a href=\"https:\/\/samndave.org.uk\/index.php\/2021\/12\/15\/astrophotography-with-a-raspberry-pi-part-2-remote-control\/\" data-type=\"post\" data-id=\"377\">next part<\/a>, I use Astroberry to control my telescope.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note: Updated March 2026 for Astroberry 3. Originally written for Astroberry 2, based on Raspian [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39,35],"tags":[38],"class_list":["post-370","post","type-post","status-publish","format-standard","hentry","category-astronomy","category-raspberry-pi","tag-astroberry"],"_links":{"self":[{"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/posts\/370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/comments?post=370"}],"version-history":[{"count":8,"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/posts\/370\/revisions"}],"predecessor-version":[{"id":1267,"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/posts\/370\/revisions\/1267"}],"wp:attachment":[{"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/media?parent=370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/categories?post=370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/tags?post=370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}