Implementation of a standalone Radar display for Stratux Europe Edition. Can run on a separate Raspberry (e.g. Zero W or Zero 2 W). Reads the aircraft data from Stratux and displays them on the specified display. You can connect 3 pushbuttons to the device and use them for changing the radar radius, the height difference and sound options. A clock with a stop and lap timer, a g-meter, an artificial horizon, a compass (based on GPS) and a VSI display are also implemented.
Current supported displays are:
3.7 inch Epaper for 80 mm instrument hole | 1.54 inch Epaper for 57 mm instrument hole | Oled for 57 mm instrument hole |
---|---|---|
More displays can be integrated. You can find instructions how to build the full instruments in the wiki. The Oled-case is designed for a 2 1/4 inch mounting hole, the E-paper case is designed for a 3 1/8 inch (80 mm) mounting hole. Instructions e.g. how to build an all-in one 2 1/4 Oled case, or all-in-one 3 1/8 Epaper instrument, or Epaper 3 1/8 display only can be found in the wiki.
Find below a photo of the current supported displays
Oled-Display: Waveshare 14747, 128x128, General 1.5inch RGB OLED display Module
Radar | Stratux-Status | G-Meter | Flightlogs |
---|---|---|---|
Optional power supply suggestion: If you need a reliable display power supply in your airplane, I have good experiences with small step-down converters XL4015. Then you can use the aircraft power supply (up to 40V). Calibrate the XL4015 at home for a power output at 5 V e.g. using an old laptop power supply. XL4015 also work well for the stratux itself. If you encounter problems with radio noise, please ensure that the power cable to the display is twisted and if necessary use a ferrit-core at the power connection.
Connection | PIN# on Raspberry | Cable color |
---|---|---|
VCC | 17 | red |
GND | 20 | black |
DIN/MOSI | 19 | blue |
CLK/SCK | 23 | yellow |
CS/CE0 | 24 | orange |
DC | 18 | green |
RST | 22 | white |
Connection | PIN# on Raspberry | Remark |
---|---|---|
VCC | 17 | |
GND | 20 | |
DIN/MOSI | 19 | |
CLK/SCK | 23 | |
CS/CE0 | 24 | |
DC | 22 | |
RST | 11 | |
BUSY | 18 | |
PWR | 1 | e-Driver-Hat Rev. 2.3 only !!! |
Important remark for e-Paper Driver Hat Waveshare 13512 Rev. 2.3: Waveshare introduced a 9-cable connection since Rev. 2.3. The additional cable PWR (red) needs to be connected to 3.3 V. So connect it to PIN#1 on the Raspberry GPIO.
Remark: If you have a barometric sensor or ahrs connected you may have conflict with GPIO Pin 11. You can also use PIN 16 (GPIO 23) for the RST line.
To do that please modify in /home/pi/stratux-radar-display/main/displays/Epaper_3in7/epdconfig.py line 38/39:
# RST_PIN = 17 # if directly as hat
RST_PIN = 23 # for cable mounted in stratux on different GPIO 23, which is PIN 16
Pushbutton | PIN# on Raspberry |
---|---|
Left | 37 |
Middle | 38 |
Right | 40 |
All pushbuttons are used as pull down. Connect the other side of all buttons to GND (PIN39).
ssh pi@192.168.x.x
. Password is the same that you set in step 2.sudo apt install python3-git
git clone https://github.com/TomBric/stratux-radar-display.git
/bin/bash /home/pi/stratux-radar-display/image/configure_radar.sh
. This will take some time since it does an update on the pi. Depending on your display modify /home/pi/stratux-radar-display/image/stratux_radar.sh. In paramater "-c" enter the IP address of your stratux and in parameter "-d" the device. E.g.
cd /home/pi/stratux-radar-display/main && python3 radar.py -b -r -d Epaper_1in54 -c 192.168.10.1 &
The configuration script will configure the pi so that the radar display will start automatically after reboot.
stratux-radar-display can run also directly on your stratux device. You can find an example of a case with everything installed in the wiki. Connect the displays to the GPIO pins of the Stratux. Installation is only for expert users! To install the software perform the following steps:
sudo apt install git
git clone https://github.com/TomBric/stratux-radar-display.git
sudo /bin/bash /home/pi/stratux-radar-display/image/configure_radar_on_stratux.sh
It will take some time.nano image/stratux_radar.sh
The Oled display uses different GPIO-Pins as the baro-sensor, so there is no conflict. Also the e-Paper display can be connected (not the HAT version) with the baro and ahrs sensors in place.
You can connect your radar device with your intercom if it has an input for external audio (e.g. TQ KRT2 has one). This is possible on the Pi Zero with an external USB sound card. I used a simple "3D USB 5.1 Sound card" available for 4 Euro. The sound volume can be controlled via the option "-y 50" or can be modified with the pushbuttons under ->Status-> Net/Opt -> External Volume. The following link gives some good hints, which USB sound card can be used and it also shows how to solder it to the Pi Zero, if you do not want an adapter or space is an issue (https://www.raspberrypi-spy.co.uk/2019/06/using-a-usb-audio-device-with-the-raspberry-pi/).
If you are using a Pi3B or Pi4 for the radar-display you can use the builtin audio jack. To enable this, you have to specify "-mx PCM" (select mixer PCM) in stratux_radar.sh along with the option "-y 100" (for sound volume). If you are running the radar-display on the same Pi together with stratux this is currently not supported, since there are software conflicts.
stratux-radar-display will automatically connect the your headset if their bluetooth is switched on. Please keep in mind that the bluetooth drivers on some pi-s have bugs. Sometimes pairing is not performed properly.
First, once you need to do the pairing of a new bluetooth device.
There are two options for pairing:
Option 1: Directly on the device via buttons:
Change to Status-Mode (long press middle button, to change from Radar-> Timer -> AHRS -> G-Meter -> Compass -> VSI -> Status)
Press "scan" (right button). The display now scans 30 secs for new devices. Set your headset as visible and it will be detected (For Bose A20 this is a 5 second press on the Bluetooth-Button until it flashes blue-red)
A list of detected devices is shown, press "yes" for the detected device. Sometimes you need to repeat the scan until your headset is detected.
Option 2: via ssh and bluetoothctl
Logon on your radar as user pi: ssh pi@192.168.x.x
change to user root: sudo -s (bluetooth is running in system mode!)
Start bluetoothctl:
-> bluetoothctl
-> scan on set your device in pairing mode (for Bose A20, do a 5 sec press on the bluetooth button until it flashes magenta)
-> wait till your device is displayed, this will look like:
[NEW] Device 04:52:C7:02:C0:01 Bose A20, 04:52:C7:02:C0:01 is the device id, which will be different for you
-> scan off
-> trust <device-id> <replace with your device id>
-> pair <device-id>, eventually your pin is requested (for Bose A20 enter "0000")
-> connect <device-id>
If everything works fine, the pi displays connected and your device name.
-> exit
The bluetooth configuration is now ready and each time the radar has your device in reachability, it will connect. On the display the bluetooth symbol will be visible in the right corner.
Recommended setting for normal piston aircraft is 5 nm and 2000 ft.
right button short: start or stop timer (displayed in the middle)
left button short: start lap-timer (displayed on bottom)
middle short: change to countdown-setting. Here a countdown timer can be set. If the countdown runs down to 0:00, this will also be signalled by sound output in your headset
press middle short again to end countdown-setting. Countdown will be started, wenn timer is started. It timer is already running, countdown will start as soon as you leave the countdown setting mode
in countdown-setting mode:
- press short right to reset min and max values
- press middle for next mode
- press middle for next mode
- press middle for next mode
- on epaper: press right to reset max and min values
- press middle for next mode
- press right to start bluetooth-scan
- press left to show or modify network and other settings, press left again to select Options (external volume, registration, speak distance), press right to modify Network settings (Wifi, passphrase, stratux IP)
- press middle for next mode
- press middle for next mode
usage: radar.py [-h] -d DEVICE [-b] [-sd] [-n] [-t] [-a] [-x] [-g] [-o] [-i] [-z] [-w] [-sit] [-chl CHECKLIST] [-stc] [-c CONNECT] [-v VERBOSE] [-r] [-e] [-y EXTSOUND] [-nf] [-nc] [-ci] [-gd] [-gb] [-sim]
[-mx MIXER] [-modes DISPLAYMODES]
Stratux radar display
optional arguments:
-h, --help show this help message and exit
-d DEVICE, --device DEVICE
Display device to use
-b, --bluetooth Bluetooth speech warnings on
-sd, --speakdistance Speech with distance
-n, --north Ground mode: always display north up
-t, --timer Start mode is timer
-a, --ahrs Start mode is ahrs
-x, --status Start mode is status
-g, --gmeter Start mode is g-meter
-o, --compass Start mode is compass
-i, --vsi Start mode is vertical speed indicator
-z, --strx Start mode is stratux-status
-w, --cowarner Start mode is CO warner
-sit, --situation Start mode situation display
-chl CHECKLIST, --checklist CHECKLIST
Checklist file name to use
-stc, --startchecklist
Start mode is checklist
-c CONNECT, --connect CONNECT
Connect to Stratux-IP
-v VERBOSE, --verbose VERBOSE
Debug output level [0-3]
-r, --registration Display registration no (epaper only)
-e, --fullcircle Display full circle radar (3.7 epaper only)
-y EXTSOUND, --extsound EXTSOUND
Ext sound on with volume [0-100]
-nf, --noflighttime Suppress detection and display of flighttime
-nc, --nocowarner Suppress activation of co-warner
-ci, --coindicate Indicate co warning via GPIO16
-gd, --grounddistance
Activate ground distance sensor
-gb, --groundbeep Indicate ground distance via sound
-sim, --simulation Simulation mode for testing
-mx MIXER, --mixer MIXER
Mixer name to be used for sound output
-modes DISPLAYMODES, --displaymodes DISPLAYMODES
Select display modes that you want to see R=radar T=timer A=ahrs D=display-status G=g-meter K=compass V=vsi I=flighttime S=stratux-status C=co-sensor M=distance measurement L=checklist
Example: -modes RADCM