Category: Raspberry Pi

Raspberry Pi single board computer

Booting from SSD – Raspberry Pi

A few weeks ago I purchased a USB 3.0 Solid State Drive (SSD). My intention was two-fold:

  • to add more storage to my Raspberry Pi and
  • to eventually use it as the boot disk for the Pi.

There are some advantages that come with booting from USB 3.0 SSD, most noticebly an increase in speed but also SSD’s are more reliable that micro SD cards and more cost effective on a $/Gbyte basis.

Early Raspberry Pi’s booted primarily from micro SD card. You wrote your operating system image to the card and inserted it into the Pi before booting up. Booting from a USB device was possible but involved a bit of MacGyvering. Since the introduction of the Pi 4B and the Pi 400, USB boot has been made easier.

I had been looking at this option for a while. I found numerous write-ups on the interwebs explaining how to accomplish the task. Some were more complicated than others. But it comes down to whether you have the most up to date Operating system (I have the new 64 bit “bullseye” installed) and up-to-date eeprom.

I found a set of instructions written by J. A. Watson at ZDNet called Booting my Raspberry Pi 4 from a USB device and it seemed to be the simplest and least confusing way to go about it. The author explained that your Pi4 must have bootloader eeprom firmware dated Sep 3 2020 or later. He also explained how to check this and I was able to confirm that mine was up to date. Watson also explained that you need to be running Raspberry Pi OS version 2020-08-20 or later, which I am with Bullseye.

So having confirmed both of the above, I decided to go ahead and make my SSD bootable. The process was simple. After running sudo apt update and sudo apt upgrade I used the SD Card Copier utility from my Pi’s Accessories menu and copied the contents of the bootable micro SD card currently installed in my Pi to the SSD.

When the copy process finished after a few minutes, I shut down the Pi using the sudo shutdown command from the terminal. Once the Pi shut down, I switched off the power supply and removed the SD card.

Now for the moment of truth. I made sure the SSD was powered on (it’s on a powered USB hub) and I powered up the Raspberry Pi. The boot process was smooth and I encountered no problems.

And I have noticed an increase in speed now that the Pi is running from SSD.

Homemade ADS-B antenna

I wasn’t really satisfied with the range of reception my ADS-B receiver was getting. With the kit antenna, I was receiving signals from aircraft up to about 50 nautical miles, but more reliably only really 30 miles. That was with the antenna situated inside my patio door. I found that moving it outside increased the range but it wasn’t a practical idea to have the patio door cracked open in March. I wanted a more permanent setup with even better reception.

After a bit of research on the interwebs, I decided to build myself a homemade “co-co” – coaxial collinear – antenna. I made my antenna based on a couple of YouTube videos and this excellent description at www.balarad.net

A collinear antenna consists of a number of equal length segments of coax cable joined by alternating the center conductor of one to outer sheath of the next. The ideal length of each conductor is calculated based on the frequency to be recieved (1090 MHz) and something called the coax velocity factor. Luckily there are calculators on-line like this one at jeroen.steeman.org

The videos and other resources I found had calculated the length for each antenna segment at either 116mm or 118 mm. So after careful consideration, I decided to split the different and go with 117mm. Fortunately, I had some unused RG6 coax cable which I was able cut into the required segments.

Assembling the collinear coax antenna

The antenna can have as many segments as you wish, but it seems that any more than 8 doesn’t offer a great deal of improvement. So I went with 8 segments. The photo above shows how the segments are joined with the center conductor of each inserted into the sheath of the next. A piece of electrical tape not shown here is placed between the conductors. Then each connection is wrapped with more electrical tape.

After assembling all 8 segments (the last one has an F-type fitting) the whole thing is inserted into a piece of 1/2″ ABS pipe about a meter in length. The top is capped and the fitting at the bottom is wrapped with electrical tape until it fits snug.

antenna mounted to deck

I mounted my new antenna outside on the corner of the wall of my deck and ran a 25 foot piece of RG6 coax cable into the house to the NooElec SMArtee SDR reciever on my Raspberry Pi 4B computer.

So was it worth it? Absolutely, my reception has gone from 30-50 nautical miles to 150-200 nautical miles. At times I have been receiving signals from over 100 aircraft. That’s a big jump form the 10-15 I was getting before.

My ADSB data is being fed to the flight tracking services of ADSB Exchange. If you check their website, you will see aircraft tracked by my ground station (and many others all over the world).

ADS-B antenna

Here’s a couple of screen captures that show the reception I had with the kit antenna (top) and with the new “co-co” antenna (bottom).

Reception with kit antenna
Reception with outdoor “co-co” antenna

Receiving ADS-B on my RPi

ADS-B is a signal that commercial aircraft transmit that indicates their speed, position and heading, among other things.

To receive it you need an RTL-SDR receiver and some decoding software. I recently bought at dongle from NooElec, the NESDR SMArtee. One end plugs into a USB port on the computer and the other end attaches to an antenna.

It came in a bundle with some cheap antennas for listening to broadcast radio as well as one that’s tuned to 1090 Mhz where the ADS-B broadcasts are located.

I installed software called dump1090 on my RPi 4B which decodes the signals from the aircraft and plots them on a map (see below). Pretty cool.

I also installed PiAware which connects to the FlightAware website and transmits the data received to them, which they use to track aircraft all over the world and display on their website. In exchange for feeding them data FlightAware offers a free premium subscription.

I had a problem with the PiAware installation and I don’t have it working properly yet, so I’m not able to connect to FlightAware. But I have noticed that my data is more up to date than what is displayed on the FlightAware website.

But you can see from the screen capture below that I am getting some good data from the aircraft in the area. We live in a busy air traffic area, so this should be interesting.

Pi OS 64 bit

Raspberry Pi’s new 64 bit operating system (OS) was released about a week ago. Today, I decided to upgrade my RPi 4B to the new 64 bit OS.

While the RPi 4B is a 64 bit machine, the previous version of Pi OS was 32 bit. I was having some issues with my 4B occasionally freezing up, especially when surfing the web with the Chromium browser. I installed Firefox-esr to see if it worked any better, but it was only available in ver. 78 and some sites didn’t render properly, notably Amazon.ca

After installing the new 64 bit Pi OS, I noticed a significant improvement. Performance wise, the RPi seems a bit faster, but most importantly the freeze-ups are non existent!

And I was able to install an up-to-date version of Firefox. Web browsing is greatly improved.

I will continue testing, but I think I’m going to be happy this version.

One of the reasons, I bought the RPi 4B was to try different Llinux distributions, known as “distros”. I will give some of the other 64 bit distros a try and I’ll post about the ones I like or don’t like.

Another Pi

A while back, I posted about my new Raspberry Pi 400. I was so impressed with what this all-in-one single-board computer could do, that I wanted to explore other options.

Raspberry Pi’s are available in a number of flavours from the Pi 4B, Pi 400, Pi 3B+, Pi Zero 2W and even the miniscule Pi Pico. That is, if you can find a retailer with one in stock. They can be hard to find in these days of chip shortages and supply chain stress.

The Pi4B is the latest from the Raspberry Pi Foundation. It comes with either 2Gb, 4Gb and 8 Gb of RAM. I was able to get a kit with a Pi4B with 4Gb from PiShop.ca so it is functionally the same as my Pi400.

The kit included a case, a power supply, an HDMI cable and some heat syncs. I wanted a cooling fan too, so I ordered one of those separately.

HighPi Fan

The case that came with my kit wasn’t configured for a fan, so I had to do a bit of customization. I measured the fan diameter and used my CNC machine to cut an opening in the case lid to match. I also CNC drilled 4 holes for the mounting screws.

The fan is a 5V DC PWM fan, which means it can be controlled via software. The red wire is connected to one of the Pi’s GPIO 5V pins. The black wire to a Ground pin and the blue wire to GPIO Pin-14. That pin can be used to control the fan. I set my fan to come on when the CPU temperature reaches 60 Deg C. It then runs until the CPU temp drops to 50 Deg and then shuts off.

I bought a wireless keyboard and mouse combination from Amazon.ca to complete my setup.

So far, I have been using the Pi4B as a desktop computer, connected to my LG monitor – the HDMI image is beautiful. I’ve been using Chrome and Firefox to surf the interwebs, and open-source programs like LibreOffice for word processing, spreadsheets and presentation, and GIMP – GNU Image Manipulation Program photo editing software. I’m used to Photoshop, but GIMP looks like a great alternative.

I have set up CNCjs so I can use the Pi4B to control my CNC machine.

I have also installed Filezilla so I can transfer files via FTP or SFTP to the websites I manage or to other computers on my network.

I will probably eventually set up this Pi4B as a NAS – Network Accessible Storage, but I need to learn more about that. I currently have 2 drives attached to the Pi4B, a 2 Tb and a 200 Gb HDD that I salvaged out of an old laptop. So using this as an NAS makes sense.

Shark Coochie

A friend sent me an image of a charcuterie board someone had made with an image of a menacing looking shark and the words

Shark Coochie Board

Because no one can say char-cu-te-rie

Shark Coochie board

I couldn’t find the same shark image, but I did find one that looked a bit more friendly. I imported the image into Carbide Create then added the text. Next I created toolpaths for a 90 degree V-bit.

I had a nice maple cutting board on hand so I set up my CNC machine and carved it. I think it came out OK, but if I do another one, I will make the carving a bit bigger so that it is at least 80% of the width of the board.

Just as a footnote, this post marks a number of firsts for me. After taking the images above with my phone, I used an FTP app to transfer them wirelessly to my new Raspberry Pi 4B. I then edited them using GIMP, the GNU Image Manipulation Program. And finally, this post was made using the Pi 4B.