Raspberry Pi 4 with touchscreen and FLdigi

Raspberry Pi 4 with screen

I got a new Raspberry Pi v4 and the official touchscreen. The aim of this is to be able to run FLdigi and WSJT-X1 in a portable setup. Also to stop FLdigi getting hopelessly confused on my main PC – with two sound cards already adding a third sound card as interface for the radio meant portaudio, whatever that is, gets hopelessly confused on Windows and loses touch with the hardware intermittently.

Setting it up was surprisingly painless – blow a new 16Gb SD card with Raspbian, connect screen to the 5V and 0V on the GPIO and the ribbon cable to DSI. Normally you then have to remember to add the empty file ssh to the boot partition with the PC so you can talk to the damn thing, and perhaps wrangle the wireless config if the Pi doesn’t have Ethernet.

With the touchscreen I didn’t need all that. Although I started it up on ethernet, the onboard Bluetooth meant I could connect a Bluetooth keyboard using just the touchscreen, and then set up the wifi in the usual way. The touchscreen needs a reasonably firm press, this is no responsive smartphone screen, and being so small it is sometimes hard to get the right target, even with a conductive stylus, particularly as I set the font size a little smaller to use the screen area more.

It came up first time, the keyboard connected easily using just the touchscreen, which prompted entering a six-digit number on the keyboard to pair it.The screen starts upside down in the frame but this is easily fixable with

sudo nano /boot/config.txt to add the line

lcd_rotate=2

The Raspberry Pi official touchscreen is low resolution 800×480

and a lot of software just can’t believe you are running it on such a small screen, so the software window doesn’t get small enough to fit on the screen. The bottom and often the right is cut off. I thought this was a showstopper until I discovered the Alt-Space command, which can be followed by M to let you move the window with the touchscreen to see the otherwise inaccessible parts, which usually include the OK and Save Config buttons. It’s not the most convenient way of using a program, but it gets the job done. At home I can use RDP into the box to get a bigger screen on my PC. The various tricks to remap the screen size in /boot/config.txt like

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

don’t work on the Pi4 with Buster.

The main gotcha is that the raspbian menu bar pushes programs down by the width of the menu bar, which meant I couldn’t see the operational controls at the bottom of FLdigi. Under settings appearance setting the bar to medium and at the bottom of the screen meant it got out of the way when I was using FLDigi. For WSJT-X you just have to suck it up and move the program window up and to the left using Alt-Space-M

FLdigi 4.1.01 running on the Pi4
FLdigi 4.1.01 running on the Pi4

I installed the version of FLdigi from the Raspbian repository, but this is quite an old version, 4.1.01, it’s up to 4.1.13 at the time of writing, so I will probably uninstall this and compile. I needed to install pavucontrol from the repository and reboot the machine for it to actually recognise the USB audio interface, but after that it all worked fine. A USB serial connector for CAT (computer aided tuning) also appeared after rebooting. The USB sockets on the Pi are close together

Raspberry Pi 4 USB sockets are close together
Raspberry Pi 4 USB sockets are close together

which means you don’t get to use all of them if the USB plug has a dongle

Pi 4 USB sockets are close together
Pi 4 USB sockets are close together

or is thicker than normal.

With just a touch screen and keyboard you have no way of doing a right mouse click. So far that hasn’t caused me grief.

The Raspberry Pi4 is power hungry

It has a USB-C power socket. There’s a hoo-hah that the USB-C power socket doesn’t actually meet the USB-C spec in the original incarnation. Pi seem surprisingly cavalier about this, though you only experience the problem if using fancy high-speed data cables with active innards.It’s a shame Pi did this to save one 5.1k resistor though after this scathing article on get yer act together they seem to at least be changing it on future revisions.  I bought the official Raspberry Pi 15W PSU for testing, but need a way to run this from a battery in the field. It’s a shame everything seems to have standardised on 5V for powering, it suits no battery chemistry I know of. I can try with a 5V power bank, ideally I would run the Pi off the 12V radio battery or a car battery. From my days in studio engineering I realised that the fewer batteries you have in the field the more likely things are to work, it is easier to maintain one battery than makes sure all the smaller batteries in gizmos like microphones and radio packs are good to go. On that principle using a Bluetooth keyboard is asking for trouble, yet more batteries to look after. A small USB keyboard with mouse pad would be ideal, but you get mini with mouse pad wireless or mini without mouse pad wired.

A battery powered Pi

However, using a 5V power bank is probably OK in this case, as it also saves me from ground lift on the 12V supply if the radio (or the Pi) are drawing a lot of power. Unlike ground loops in mains powered equipment, which at leats warn you of the problem with obvious hum, ground lift in DC systems is much more subtle. It gives you odd effects and low frequency noises as power drain changes, until it gets so bad it overheats PCB tracks in some hapless piece of gear that doesn’t expect to be carry DC current as well as signal ground 🙁

My power bank is about five years old, and only rated at DC 2A/1.5A max[^3]. Don’tcha love specs like that, presumably the 1.5A is if both sockets are used. It’s 4.5A if you believe the magical thinking and iSmart in the ad for it. Since RPi couldn’t get the USB-C spec right in the first place they probably don’t have the fanciness to conspire with iSmart and get the 4.5A variant, so the lo-tech way of paralleling up sockets is more likely to work.

I connected the Pi to this with a no-name USB-A to USB-C cable. While it did grizzle about power, displaying a lightning flash i nthe top right corner of the screen for a few seconds in the booting process it did start and run fine, with the USB sound card and RS232 CAT interface plugged in.

A battery powered Raspberry Pi 4 running FLDigi
A battery powered Raspberry Pi 4 running FLDigi

I would probably be wise to get a short USB-C power cable, and not the cheapest China can supply too. Be nice if it had two USB-A plugs so I could use the 3A power capacity. According to the Raspberry Pi spec I am pushing my luck with the 2A limit, as I should really have a 2.5A supply if running USB peripherals. It worked, a more modern battery bank might be in order. In the meantime,  splurging £4 on one of these 2x USB-A to USB-C cables could help me stay in spec, however. Running 3A through a tiny USB-C connector gives me a bad feeling, it hardly looks like a 3A connector, but presumably they wrote the USB-C spec right 😉

2A BS546 plug
back in the days of BS546, a plug specified 3.6mm diameter pins to be able to handle 2A

You have to remember to unplug the Pi after powering it down, else the quiescent current of the LED2 and the Pi will drain the battery. Which is a bit crummy, when are Raspberry Pi going to finally realise than many field applications would greatly benefit from being able to reduce power to a more respectable level (say < 1mA) when turned … off?

All in all the Pi4 was a surprisingly easy win and much more painless to set up than normal, due to the touchscreen onboard Bluetooth and WiFi. There again, the combination is pushing the wrong side of £100, so you’d expect greater ease of use. It is surprising how much all the bits add up to that you need to make a Raspberry Pi work – the board itself may be $35 which is a remarkable achievement, but that easily doubles if you want to use it in the real world.


  1. WSJT-X is more demanding of processor power, I have had it running on a Pi3 but it was slow to decode, meaning you tend to miss the next 15s timeslot unless you have exceptionally good reaction times. Setting decode to fast rather than deep minimises this delay, but it’s still too much to be useful on a Pi3 IMO 
  2. about 30mA according to this 

4 thoughts on “Raspberry Pi 4 with touchscreen and FLdigi”

  1. This is probably a bit late but you can get a bit more processing power for these sort of applications by running a cut down window manager rather than the full fat Raspbian. For a recent project I used the headless Raspbian install with a minimal Openbox to run some apps in full screen. You also gain screen real estate this way because there’s no desktop stuff to get in the way.

    I ended up with three virtual desktops with an app running full screen in each. I had a mouse but no keyboard in the setup but I reprogrammed Openbox to switch between the screens with a middle mouse click but you may be able to use the screen gestures to do the same thing. I had the same issues as you trying and failing to find a suitable keyboard!

    It was ( eventually ) surprisingly easy and I can supply the incantations if you need.

    1. > It was ( eventually ) surprisingly easy

      Thanks – but the (eventually) strikes fear into the heart of this Linux noob 😉 Although I’ll bear it in mind as a workaround if I have a horsepower issue on the Pi. Now that I have discovered the Alt-Shift M command to move the window, I have run WSJT-X, and the extra grunt of the Pi4 means I can’t say I have any complaints.

      Indeed, it is more competent than my cheap HP Stream W10 notebook which was OK when I got it in 2017 and used to be able to run earlier versions of WSJT-X OK, but seems to have lost processing power with Windows updates. Or WSJT-X has got more CPU intensive.

      The Pi is also more reliable than my main PC for these programs- I have about three sound cards (inbuilt, main audio and a secondary audio for radio bits) and whatever portaudio is on Windows it loses it’s marbles regularly and loses touch with the right sound card. Another Pi4 without touchscreen in the shed away from the house would let be offload the problem and get the RF away from the house.

      The Pi4 seems a real step up from previous versions!

  2. Hi — I am about to get started loading fldigi and flrig on my RPi 4 with 11 inch touchscreen. For powering the pi, I bought USB hub that i powered by 12V. I delivers 2.5A 5v to the Pi. The touchscreen is also 12V powered.

    I am looking for explicit compile scripts to get from new Pi to running fldigi. I have not run fldigi on any machine yet. And I have the Pi running on the Pi 4 with lowered screen resolution for the 11.5 inch touchscreen

    73, Chuck WB7R

    1. Hi Chuck,

      I wasn’t so organised – I took the stock install first. I have a Pi3 in the shack at the end of the garden and it runs it fine. In the graphical desktop, hit the raspberry symbol take Preferences -> Add/remove software, type FLdigi in the box and hit return.

      After that I suspected there was a problem with the auto mode switching with other members of the radio club, so I uninstalled and followed

      http://www.kk5jy.net/fldigi-build/

      I am running 4.1.14. Works fine on my Pi3 over the Wifi LAN. KK5JY walks you through it. Enjoy. On the Pi4 I took the stock install and stayed with it, because my use case was less demanding, but there hasn’t been much opportunity to take it out and about this last few months…

Leave a Reply

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