• Rss feeds articles
High Altitude Balloon ► Tags ► "dl-fldigi"

NTX2 transmitter

24 05 2014   //   Written by Yannick   //   Classified in : HAB  //  Tags : dl-fldigi, ntx2, serial

Description

The NTX2 is a transmitter on the 434MHz frequency.


As seen in previous post, this frequency can be used without licence in most of Europe.
NTX2 power is 10mW wich is authorised in the sky.

According to the documentation, NTX2 is supposed to transmit only to 500m but with good line of sight, signal can be received from the sky at more that 40Km.

NTX2 is transmiting by applying a voltage on it’s TXD pin.
Changing this voltage let us change a bit the frequency used to transmit.

The module is factory-set to produce the specified FM deviation with a TXD input to pin 7 of 3V amplitude, i.e. 0V "low", 3V "high

So we can apply some voltage on TXD pin to represent a 0 and another voltage to represent a 1.
On the receiver side, we will see the frequency changing, and we will be able to decode 1 and 0.

The “factory” frequency (for exemple 434.650 MHz) is around 1.2V applied on TXD pin (not 1.5V)

When applying a voltage < 1.2V the frequency will be under 434.650Mhz, and applying a voltage > 1.2V, the frequency will be above 434.650Mhz.

The NTX2's TXD input is normally driven directly by logic levels but will also accept analogue drive (e.g. 2-tone signalling). In this case it is recommended that TXD (pin 7) be DC-biased to 1.2V approx.

As read on UKHAS, the better “shift” seems to be around 500Hz.
If we want 500Hz between 0 and 1, we shoud apply a difference of 0.25V on the TXD Pin.

FM deviation (peak) ±3 kHz

So we have 6KHz deviation for 3V range.

3V / 6000 = 0.0005V for 1Hz 500 × 0.0005V = 0.25V for 500Hz

So we can apply for exemple 2V for a 0 and 2.25V for a 1… (Or 1.25V and 1.5V etc..)

GPIO / Serial

According to UKHAS members , it’s not possible to use a regular GPIO output on the RaspberryPi to properly shift voltage to the NTX2 TXD. The reason is the Raspberry is not “real time”, so you will successfully change voltage (output of GPIO and voltage divider), but the timing will not be accurate enough to successfuly decode packets.

The “trick” is to use a serial connection.
The reason is the serial circuit has it’s own crystal that will produce an accurate timing.

Dave Akerman use the internal embeded serial available on the Raspbery.
As I wanted to keep the embedded serial, available for control, I used a Profilic PL2303 USB serial instead. This worked fine.

Note that the arduino as an accurate timing and don’t need the “serial” trick

Voltage divider

Output of the serial of the RaspberryPi is 3.3V level but output of Profilic PL2303 could be AFAIK 3.3V or 5V level.

In both cases, we will need a Voltage Divider to have the 0.25V shift within the range 0 - 3V.
For exemple we could have:
Low level (0V) -> 2.38 V
High level (5V)-> 2.63 V

See details on UKHAS wiki and see how to calculate resistors.

Using the serial device

Using serial is, I think, also nice, as we can easily sent data to the serial device.. It will be automatically “coded” to 0 and 1.
So having the NTX2 transmitting “Hello wold” is just:

  • Setting the RaspberryPi serial device to the correct settings (Baud rate, Bit par character, Parity, Stop bit):
man stty

  • Sending the text to the serial device:
$ echo "Hello world" > /dev/serialDevice

On the dl-fldigi side, we can easily decode by setting the same serial parameters into the RTTY tab

Decoding radio signal with dl-fldigi

24 05 2014   //   Written by Yannick   //   Classified in : HAB  //  Tags : dl-fldigi, gqrx

Introduction

dl-fldigi is a modified version of Fldigi to add some features related to HAB.

dl-fldigi use sounds created by Gqrx (see previous post ) to decode informations sent from the balloon, then is able to send these informations on a server on Internet.

If a request has been made this display the balloon on the map.

What is great, is the decoded packets can been sent by anyone, not only the owner of the balloon. This makes possible to send a balloon from UK, then track it for exemple to Ukraine with listeners in this area.

Installation

Informations on installation (compilation) of dl-fldigi are available on UKHAS wiki and are working fine on Debian too.

You need to enable deb-src in source.list then:

sudo apt-get update
sudo apt-get build-dep fldigi
sudo apt-get install git-core libcurl4-openssl-dev libjpeg62-dev autoconf
git clone git://github.com/jamescoxon/dl-fldigi.git
cd dl-fldigi
git submodule init
git submodule update
autoreconf -vfi
./configure --disable-flarq
make
./src/dl-fldigi

Test 1 - Decoding without the sound card

This UKHAS page provide the link of a record that can be used to test the configuration of dl-fldigi.

Menu Op Mode, RTTY, and for this sound, use the folowing settings

To load the downloaded wav file, select File/Audio/Playback to play it without using the sound card for first test.

This sound record of the 2 frequencies can be decoded and flight informations displayed.

If the decoding is fine, you can move to test #2

Test 2 - Decoding with the sound card

This test is close to a real flight where sound comes from Gqrx output.

Use pavucontrol (Pulse Audio Volume Control) to adjust the recording settings:

Bellow, dl-fldigi is listening (choose Monitor of… ) et select analog input.

Bellow, the output volume on the speakers:

Bellow, the mic disabled

Bellow,the volume of totem playing the wav file.

On dl-fldigi side:

It seems PortAudio is using ALSA.. which is using PulseAudio…
It’s also possible to directly use PulseAudio.

HAB mode

To start dl-fldigi in HAB mode which contain the list of registered flight, with all settings ready, use the folowing command:

./src/dl-fldigi --hab


Result of playing the wav file with totem with dl-fldigi in HAB mode.

In case of problem decoding with the sound card

/!\ During my fists tests, with several computers, several distros, the decoding with the sound card didn’t work.
After few days of tests, I solved the problem by changing the default-sample-rate to 48000:

sudo vi /etc/pulse/daemon.conf
; default-sample-rate = 44100
default-sample-rate = 48000
pulseaudio --kill