• Rss feeds articles
High Altitude Balloon ► Categories ► HAB

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

SDR - Software Defined Radio on GnuLinux with Gqrx

24 05 2014   //   Written by Yannick   //   Classified in : HAB  //  Tags : gqrx, sdr

Introduction

SDR (Software Defined Radio) is a radio communication system where components that have been typically implemented in hardware (e.g. mixers, filters, amplifiers, modulators/demodulators, etc.) are instead implemented by means of software on a personal computer.

The main advantage of SDR is the reduced cost.

In France (and many countries in Europe), we are free to use the 433MHz frequency (433,050 à 434,790 MHz).

This way we could be able to receive signal sent from the balloon, then decode the signal to get the coordinates etc...

Hardware

I ordered a USB dongle DVB-T RTL2832U+R820T:

  • 7 € on Ebay (shipping included)
  • Include antenna (and unused remote)
  • Able to receive from 24 MHz to 1766 MHz.
Product: RTL2838UHIDIR
Manufacturer: Realtek
Realtek Semiconductor Corp. RTL2838 DVB-T

The dongle is supposed to be RTL2832 but report on lsusb and dmesg RTL2838


Software

I use Gqrx (GPLv3) to visualize and hear radio signal.

To install all dependencies I used this script.
I modified it a bit for my LinuxMint Debian Edition distro.
On my computer I take 1 hour and half to compile.

We can test with:

$ rtl_test
Found 1 device(s):
0: ezcap USB 2.0 DVB-T/DAB/FM dongle
Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle
Found Rafael Micro R820T tuner
Supported gain values (29):

To install Gqrx:

$ git clone https://github.com/csete/gqrx.git
$ cd gqrx
$ qmake
$ make
$ sudo cp gqrx /usr/local/bin/

Starting Gqrx:

$ gqrx
linux; GNU C++ version 4.7.2; Boost_104900; UHD_003.005.002-56-g34052015
gr-osmosdr 871f0cc2 (0.0.1git) gnuradio 3.6.4.1
built-in device types: file fcd rtl rtl_tcp uhd
etc...

Then we can test by listering a “regular” radio:

We can see the space of few hundreds of KHz between radio channels.

We can change the volume of Gqrx with pavucontrol

Timelapse video of the flight

27 04 2014   //   Written by Yannick   //   Classified in : HAB  //  Tags : timelapse, camera, canon, photos, video

The flight is available on video (timelapse of best pictures assembled with music)

Download video

Mkv file created with the folowing command:

mencoder mf://*.jpg -mf fps=1:type=jpg -ovc x264 -x264encopts bitrate=2400:threads=2 -o outputfile.mkv -oac copy -audiofile /home/yannick/Antony_Raijekov_-_Lightin.mp3



Download video / 2nd version

mp4 file created with the folowing command:

fmpeg -i music.mp3 -r 1 -i img%04d.JPG -s 1920x1200 -vcodec libx264 -crf 25 -metadata title="HAB" -metadata artist="Uggy" out.mp4

Note: It has been reported the 2 versions of this video are not playing properly on Windows OS.. I should take a look later...

Flight chain

26 04 2014   //   Written by Yannick   //   Classified in : HAB  //  Tags : payload, cord, parachute, balloon

Payload

The payload is made with foam, then protected with flashy orange tape for maximum visibility (in the air and on the ground).

A label explaining it is harmless, with contacts details is outside and inside the box.

The payload contain:

  • Raspberry Pi Model A
    • Some unused connectors have been removed (RCA..)
    • Running Raspbian
    • MicroSD 8GB
    • SD to microSD adapter
      to limit the risk of the regular SD to be moved away of the slot.
    • Additional capacitor (more details provided in a future post)
    • default 3.3V regulator (could be improved for a future flight)
  • USB Hub
  • 2 x Prolific PL2303 USB toSerial for Radio and GPS.
  • Raspberry onboard serial interface on GPIOs used for administrative tasks.
  • GPS UBLOX MAX-7Q
    • Can go over the 18 Km CoCom limit
    • Commands sent to enable the “Flight mode”
  • Radio Radiometrix NTX2 434.650 MHz
  • Homemade quater wave ground plane antenna
  • 3G USB Key Huawei K3565 used to send coordinates by SMS on the ground
  • Relay to control power of 3G/SMS USB Key (powered only after burst and under 2000m)
  • Sensors
  • Raspberry PI Camera - 5MP
  • Canon A590IS - 8MP
  • Battery Romoss 5V / 5200 mAh

Cord

  • Braided Nylon Cord 1mm
    Required by French Civil Aviation Authority / ICAO - Separation force limit 230 N

Parachute

Balloon


previous page 2 of 3 next