Red Pitaya Based WSPR Beacon for Antarctica DP0GVN
Inhaltsverzeichnis
1 Project Scope
We want to deploy a WSPR beacon in Antarctica. There are two phases of the project:
- Deployment of an initial version
- Deployment of a higher integrated version
I have the honor to design the initial version, only with one Red Pitaya. Pictures below.
2 Important Links
- https://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi/using-uart-instead-of-usb
- http://www.danmandle.com/blog/getting-gpsd-to-work-with-python/
- http://www.itechlounge.net/2017/10/linux-how-to-add-rc-local-in-debian-9/
- http://www.box73.de/product_info.php?products_id=3737
3 Credits
Thanks to:
- Michael Hartje DK5HH for comprehensive support regarding Pitaya and FPGA code
- Rainer Englert DF2NU for support on construction details
4 Software
4.1 Network Config
IP-Adresse: 192.168.33.90 bis 192.168.33.95 Netzmaske: 255.255.255.0 Gateway: 192.168.33.254 Nameserver (DNS): 192.168.38.46 Timeserver (NTC): 192.168.33.40 Timezone: UTC Call: DP0GVN GRID: IB59UH
4.2 Band Config
cat write-c2-files.cfg
// frequency correction, from -100.0 ppm to +100.0 ppm corr = 0.93; // comma separated list of bands // trailing commas are not allowed bands = ( // { freq = 0.137500; chan = 1; }, // { freq = 0.475700; chan = 1; }, { freq = 1.838100; chan = 1; }, { freq = 3.594100; chan = 1; }, { freq = 5.288700; chan = 1; }, { freq = 7.040100; chan = 1; }, { freq = 10.140200; chan = 2; }, { freq = 14.097100; chan = 2; }, { freq = 18.106100; chan = 2; }, { freq = 21.096100; chan = 2; } // { freq = 24.926100; chan = 1; }, // { freq = 28.126100; chan = 1; }, // { freq = 50.294500; chan = 1; } );
4.3 Temperature Control
We found that the CPU is becoming really hot and the board smells like burned electronics :-) Not good.
Accordingly a fan solution was created. Here is an interesting recommendation how to do that:
- https://rroeng.blogspot.de/2014/03/keep-your-red-pitaya-cool.html
- http://redpitaya.readthedocs.io/en/latest/developerGuide/125-14/cooling.html
In order to read out the CPU temperature, I found a little script. Note that it requires the installation of the "bc" package.
root@pitaya1:~# cat get_temp.sh #!/bin/sh # # from http://www.kkn.net/~n6tv/xadc.sh # updated by Michael Hirsch, Ph.D. # # works in Ash (Red Pitaya ecosystem 0.95) and Bash (ecosystem 0.97) # path to IIO device XADC_PATH=/sys/bus/iio/devices/iio:device0 # Note: used "cat" to work in Ash instead of the typically recommended Bash "<". OFF=$(cat $XADC_PATH/in_temp0_offset) RAW=$(cat $XADC_PATH/in_temp0_raw) SCL=$(cat $XADC_PATH/in_temp0_scale) FORMULA="(($OFF+$RAW)*$SCL)/1000.0" VAL=$(echo "scale=2;${FORMULA}" | bc) echo "in_temp0 = ${VAL} °C"
4.4 Preamplifier control
We are using two preaplifiers. Pavel Demin's i2c-write command only allows to address one single preamp. For this reason, we duplicated this code. The original code was renamed into i2c-write-60 since the I2C bus ID of the preamp is 60 and 61. The duplicated code was edited accordingly and the binary was saved into the file i2c-write-61.
root@pitaya1:~# cat i2c-write-61.c #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <fcntl.h> #include <sys/ioctl.h> #define I2C_SLAVE 0x0703 /* Use this slave address */ #define I2C_SLAVE_FORCE 0x0706 /* Use this slave address, even if it is already in use by a driver! */ #define ADDR_DAC0 0x60 /* MCP4725 address 0 */ #define ADDR_DAC1 0x61 /* MCP4725 address 1 */ int main(int argc, char *argv[]) { int fd; char *end; long number; uint8_t buffer[2]; errno = 0; number = (argc == 2) ? strtol(argv[1], &end, 10) : -1; if(errno != 0 || end == argv[1] || number < 0 || number > 4095) { printf("Usage: i2c-write [0-4095]\n"); return EXIT_FAILURE; } if((fd = open("/dev/i2c-0", O_RDWR)) >= 0) { if(ioctl(fd, I2C_SLAVE_FORCE, ADDR_DAC1) >= 0) { buffer[0] = number >> 8; buffer[1] = number; if(write(fd, buffer, 2) > 0) return EXIT_SUCCESS; } } return EXIT_FAILURE; }
4.5 Receiver Initialization
In order to load the FPGA code and in order to initialize the preamplifiers, a start script was created:
root@pitaya1:~# cat /etc/rc.local #!/bin/sh -e cat /root/sdr_transceiver_wspr.bit > /dev/xdevcfg /root/i2c-write-60 4095 /root/i2c-write-61 4095 exit 0
To ensure that the script is activated on boot, the following file must be created and the service must be enabled. See this link:
http://www.itechlounge.net/2017/10/linux-how-to-add-rc-local-in-debian-9/
root@pitaya1:/# cat /etc/systemd/system/rc-local.service [Unit] Description=/etc/rc.local ConditionPathExists=/etc/rc.local [Service] Type=forking ExecStart=/etc/rc.local start TimeoutSec=0 StandardOutput=tty RemainAfterExit=yes SysVStartPriority=99 [Install] WantedBy=multi-user.target
And then, make executable:
chmod +x /etc/rc.local
Enable on boot:
systemctl enable rc-local
Invoke the script, make sureyou don't get any errors:
systemctl start rc-local.service
If you hit errors, check it again:
systemctl status rc-local.service
5 Shopping List
5.1 Planned Items
- 2HE 19" Good Quality Metal Case
- http://www.gie-tec.de/downloads/db_133030.pdf
- https://www.conrad.de/de/19-zoll-baugruppentraeger-4365-x-200-stahlblech-schroff-multipacpro-20860-120-1-st-546378.html
- Bodenblech sollte 1-2mm dick sein, wg. Senkkopfschrauben
- https://schroff.pentair.com/de/schroff/zubehoer-baugruppentraeger-gehaeuse
- Schroff 20860-645
- Front Panel Connectors:
- Neutrik RJ45 thru
- 4x Neutrik USB
- SMA -Durchführung mit Pigtail uFL
- 240V Switch
- Mains Line Choke (Netzfilter + Kaltgeräteanschluß)
- Fuse
- 2x Telegärtner 75V N/N thru
- Mikrotik RB450G or similar
- MeanWell RD-125A Dual Coltage Power Supply
- Raspberry Pi V3
- 6x MicroSD 64 GB
- GPS Antenne Active mit SMA Connector
- Adafruit Ultimate GPS Breakout - 66 channel V3
- uFL SMA pigtail
- 2x Stemlab 14Bit RedPitaya
- 4x 30dB Attenuator SMA
- 4x PreAmp for RedPitaya
- 34 StandOff M3
- 6x 64GB USB Stick
- 14 Relais Wechsler bistabil 5V
- 28 Freilaufdioden
5.2 Open Items
- Flachsteckhülsen
- 2,5m² Kabelverbinder
- 19" 2HE Metal Case
- Neutrik RJ45 thru
- 3x Neutrik USB
- SMA -Durchführung mit Pigtail uFL
- 2x Telegärtner 75V N/N thru
- MeanWell RD-125A Dual Coltage Power Supply
- Raspberry Pi V3
- Raspberry Pi V3
- 6x MicroSD 64 GB
- GPS Antenne Active mit SMA Connector
- Adafruit Ultimate GPS Breakout - 66 channel V3
- uFL SMA pigtail
- 2x Stemlab 14Bit RedPitaya
- 4x 30dB Attenuator SMA
- 4x PreAmp for RedPitaya
- 34 StandOff M3
- 6x 64GB USB Stick
- 14 Relais Wechsler bistabil 5V
- 28 Freilaufdioden
5.3 Provided to the project
- Mains line choke 3 €
- Mains switch: 2 €
- Fuse holder: 2 €
- SHT15 incl. headers: 45 €
- 1x Neutrik USB thru: 9 €
- 1x Neutrik RJ45 thru: 9 €
- Mikrotik RB750GL: 55 €
Total: 125 €
5.4 Purchased
- 2x Red Pitaya Stemlab 125-14
- 16x Wechsler bistabil 5V
- 6x MicroSD 64 GB
- MeanWell RD-125A Dual Coltage Power Supply
- Raspberry Pi V3: 42 €
- 2x Überspannungsableiter Telegärtner J01028A0044: 142 €
- Schroff multipacPro 20860-127 2HE 340T: 102,60 €
6 Images
6.1 Phase 1
Please note the integrated service equipment (white MicroUSB cable for a serial diagnostic connecton):
Now with integrated spare parts:
After Rainer DF2NU's modifications concerning power supply and temperature control (fan):
6.2 Phase 2
-- no pictures yet --