LoRa LoRa Laughs!

Due to the restrictions on airborne amateur radio operation in the UK High Altitude Balloon (HAB) enthusiasts have been forced to utilise licence exempt low power devices in novel ways to make radio trackers for their payloads. I have written plenty on this blog about my HAB tracking, the UKHAS distributed listener network and my own flights.

Until recently the preferred method was to use RTTY transmissions, however the advent of the IoT (Internet Of Things) has seen manufacturers of radio modules develop devices to increase both the range and reliability of communication between ‘connected’ embedded devices.

One such development are LoRa devices, primarily for devices to connect to a global wide-area network LoRaWAN, more information can be found at the LoRa Alliance in addition there are some open hobbyist networks such as The Things Network using these devices.

Using chirp spread-spectrum modulation these LoRa devices are marketed as being capable of robust, interference and fade resistant communication over longer distances and higher data rates.

The UK HAB community has begun experimenting with these devices and one of their keen proponents is Dave Akerman (M0RPI). Dave has developed both payload software for the “Pi In The Sky” PITS tracker along with Anthony Stirk (M0UPU) and gateway software in collaboration with Robert Harrison M0RJX. The ‘gateway’ is the necessary receiver element to upload the data to the tracking system. (all software is on the PITS Github page)

Dave gave an informative presentation on LoRa at the UKHAS 2016 Conference which is now available online (starts around 3 minutes in)


I had intended to fly a LoRa transmitter on my 2015 Hamfest balloon but it stopped working at the eleventh hour and hadn’t done anything else with LoRa till recently.

Spurred on by the conference presentation and the fact more and more flights are carrying LoRa I invested in one of the Raspberry Pi expansion boards sold by Uputronics and built up another prototype tracker with a working LoRa module.

I have done talks at various radio clubs and societies and demonstrated it working but hadn’t actually received a ‘real flight’ as opportunities have been scarce due to the weather. However in the few weeks I have tracked a couple of flights receiving both telemetry and image data, getting a couple of complete images from the imaginatively named ‘SPACE’ flight.

Dave Akerman also flew a flight experimenting with multiple payloads using Time-division multiplexing (TDM). It had 10 small of “AVRLoRaNut” trackers (of Anthony M0UPU’s design) all set to the same frequency (434.450MHz) and same transmission mode. The trackers took turns to transmit, with each one allocated a particular transmission slot in a 20-second cycle. The cycle was GPS-timed but, if any tracker lost GPS lock then it derived timing from the transmissions from the other trackers (the LoRa devices are also receivers) All 10 trackers were suspended from the same balloon. This was in preparation for the ‘Operation Outward‘ re-enactment next year (Steve Randall gave a presentation on it in the above conference video starts 1 hour 16 mins in)

I successfully received telemetry despite the flight not being local and constantly heading away from me as can be seen in the screen shots.

Always a busy man Dave also flew a flight with an experimental camera setup. The SSDV images this time came from a Nikon compact camera, connected to the Raspberry Pi via USB, and using gphoto2 software to take and transfer images to the Pi where they were stored, resized and converted to SSDV format for transmission. These were large images with a high quality SSDV setting so lots of packets per image, approx 1400 per image in testing. 

This flight was using a 868MHz LoRa device, rather than the usual 434MHz due to the IR2030 restriction on bandwidth and duty cycle. Dave was using his Turbo-X or Mode 4 setting which is as fast as LoRa will go within IR2030 bandwidth restrictions (approx 8 packets / 2k bytes per second)

I hastily ordered a 868MHz device and soldered it in the spare slot on my gateway and built a collinear for 868MHz similar to the one I built for ADB-S reception (see video here).

You can see it lashed up just below the dual-band collinear – not ideal mounting and it wasn’t tested in anyway, built blind!  The less than optimal setup at UHF, the insane data rate and the distance (>100miles) were going to make reception difficult, so I was pleased I did manage to receive telemetry and image packets.

 
Most of the current LoRa development in the HAB community has tended to be on the Raspberry Pi due to the use with SSDV and the easy availability of cameras and ready built kit. LoRa is of course available on the Arduino platform and I had purchased a couple of ‘Dragino’ shields (pictured below) with a LoRa device on.

Dave has done some work on a AVR tracker software and a simple Arduino ‘Serial’ LoRa receiver. The receiver connects to a host PC appearing as a serial port and by running some gateway software the receiver can be configured via the serial link and received data is sent back to the gateway to be uploaded to the Habitat tracking system and SSDV system – the software can be seen here during the ‘Operation Outward’ test flight.

This gateway software is written in Pascal using Delphi and is not as functional as the Raspberry Pi Gateway software. Dave has made the source code available but I am not au fait at all with Delphi however I installed the free development IDE and intended to get in and make modifications but it seems to require a non-free(?) library for the serial comms so ditched the idea.

Instead I have spent the last few days developing a C# .NET version using Microsoft Visual Studio (the community version is free) and also have been modifying the Arduino code in the receiver to add functionality, such as storing the SSDV images locally.

It is still a work in progress but I have made a video showing the current state


Anyway as Cilla Black would say it’s been a Lorra Lorra Laughs!

First HAB flights were a success

Two years after discovering the hobby of High Altitude Ballooning I have migrated from being just a passive tracker and finally completed my first flights assisted by other members of the South Kesteven ARS.

Ready to launch

Back in March I posted about the opportunity I had to make a launch at this years Swaton Vintage Day and the 10th World Egg Throwing Championship

South Kesteven ARS were going to hold a special event station with the call sign GB2EGG. During the planning stage I jokingly suggested throwing an egg in to space on board a balloon, I shouldn’t have yoked…

The whole venture captured everyone’s imagination, sadly putting the special event station in the shade but we certainly got a lot of publicity for the club and amateur radio in general.

Featured on front page of local paper

There was certainly a lot to learn and get organised, not only did I have to design and build the flight computer which was the easy part but I had to build the payload containers get the balloon, parachute, cord the lifting gas (Helium) and build a filler assembly as well as getting official permission from the CAA for the launch.

The information on the UKHAS wiki as well as Dave Akerman’s High Altitude Ballooning, From The Ground Up (and back again) were invaluable.

The cost of this venture was not insubstantial and thankfully MADHEN – The Ultimate Party Band agreed to sponsor the flight which helped greatly and I received a nice donation from fellow club member Mark Orbell (M0OBL)

Months of work and lots of last minute hitches but I was ready.

Two flights were planned an altitude ‘burst’ flight with a raw egg payload with a parachute decent. The main tracker MADHEN would broadcast SSDV images and telemetry with a telemetry backup tracker EGG1 suspended below it.  The second flight was a foil party balloon ‘floater’ with a tracker kindly donated by Steve Smith G0TDJ of ProjectAVR

Both flights flew and were a great success, unfortunately the SSDV tracker failed early in the flight so no in flight images were received.

The main payload is pictured below before the flight resting on its side. The Styrofoam box contained the flight computer and radio transmitter with a camera attached to the Raspberry Pi and the “flying saucer” model which contained the egg was positioned to be visible.
 

As this test image shows the ‘egg saucer’ should have had the earth below it.

However the arduino based backup tracker which was suspended below it worked perfectly.

There were some issues with getting CAA approval because the sky was very busy on the day including the last remaining Vulcan Bomber VH-558 making its farewell flight in the area, cue jokes about the Vulcan getting scrambled… but approval was given for a morning flight, not ideal for the organisers but we were still a spectacle for the handful who were there early.

Starting the fill

Checking the neck lift, made difficult by the wind

Stewart (M0SDM) helping me tie off the balloon and payload cord
The strong gusty wind made launch difficult
Me and Stewart making a dash to assist the launch
Someone was on hand to capture it on video for The World Egg Throwing Federation

It started so well,  I was receiving telemetry and image packets and then transmission stopped

However as I said the other tracker worked brilliantly and this was the final flight path as visualised in Google Earth. The ascent and decent rate and the burst altitude were exactly as planned and predicted, so I know I got the neck lift measurement right even with the high wind on the day.

Path of MADHEN/EGG1

A splashdown at sea was inevitable due to the wind conditions, hopefully it it survived the landing it may wash up on a beach somewhere and we can retrieve the images.

With what little Helium remained I was able to lightly fill and launch a foil party balloon carrying a blown egg shell as a ‘floater’ which made a valiant attempt to reach the continent at 6-7km high travelling at 120+km/hr where it reportably hit bad weather and was downed.

Path of EGGDX in comparison to MADHEN/EGG1

 All in all an eggscellent day!

Grantham ARC HAB Talk

Yesterday I gave my talk and demonstration at the Grantham Amateur Radio Club on High Altitude Ballooning and tracking.

This follows on from the South Kesteven ARS (SKARS) and the Spalding and District ARS (SDARS) talks I gave in May

It was very well attended with a large number of GARC members turning out. It was a case of everyone going in at the same time once the venues key holder turned up and I initially got a little stressed as I hurriedly tried to get everything set up while everyone sat patiently waiting.

Picture by Kevin Burton

The first issue I had was the projector seemed to be limited to just 800×600 pixels, which was fine for the PowerPoint presentation but for demonstrating reception using a RTL-SDR with SDRSharp and decoding using DL-FLDIGI and the UKHAS Habitat tracking system spacenear.us/tracker the lack of screen space was a problem, DL-FLDIGI couldn’t be shrunk down to fit, so there was a lot of scrolling about!  

The second issue was the venues wi-fi connection, my laptop stubbornly refused to connect to it (I wished I’d taken a ThinkPad laptop I have instead of the one I did as it has a better wi-fi adapter) so was forced to use my mobile phone as a tethered hotspot – while it worked the connection was painfully slow.

Despite these issues I was able to give the presentation about the HAB community and the technology. It contains a lot of information to digest but there is some light relief with its videos of Felix Baumgartner, Dave Akerman’s Babbage Teddy Bear free fall and wacky chef Heston Blumenthal’s ‘Spud-in-space’ feature from his recent television program.

I demonstrated Project Hab‘s VAYU-NTX tracker and thanks again to Steve Smith  (G0TDJ) for its loan.

I ran my own prototype tracker (NERDTEST) which I had updated to simulate a local flight, the transmission, reception, decoding and uploading to the UKHAS Habitat system was completely genuine, both using SDR and a traditional radio (Alinco DX-10) hooked up to the sound card. The only thing fictitious were the GPS coordinates and altitude.  (A programming error in the first version of this simulator had the balloon travelling at near 10km/s, thankfully I had corrected it to something more realistic)  

The poor internet connection cause issues with spacenear.us/tracker but was able to use Phil Crump’s (M0DNY) version at at habmap.philcrump.co.uk to demonstrate the real time map tracking.

Checking the spacenear.us map this morning and the receiver station at the club house and the demo flight could still be seen – it was programmed to take off from a nearby high point!

By lucky coincidence Chris Stubbs (M6EDF) had launched a balloon CARS-1 from the Chelmsford Amateur Radio Society meeting at Oaklands Museum where he was giving a talk and demonstration at the same time as my talk, so I was able to show how multiple receiver stations were tracking a real flight.

I was also able to demonstrate SSDV image decoding using some recorded SDR files of the HiPi flight

I thought I had overloaded the attendees with too much information, lots of references to Arduino, Raspberry PIs, SDR, dongles, GPS could be quite daunting to the uninitiated but again feedback has been very positive. Grantham Amateur Radio Club on Facebook

Now I just to sort out doing a proper flight!

HAB Talks

I was shocked when I realised it has been nearly two months since my last update. The pace of life really hasn’t let up and neither have the time pressures of work, however on with recent radio antics…

Last week I gave two talks and demonstrations at local radio societies on High Altitude Ballooning in the UK and how to track them.

The first was at South Kesteven ARS (SKARS) the club I am a member of. The second was at Spalding and District ARS (SDARS)

This was an updated version of the talk I gave last year at SKARS. Since then I have started work on my own tracker NERD-1. Sadly development has stalled and is still only at the prototype stage (NERDTEST) but I was able to use it to demonstrate reception and tracking using the UKHAS Habitat system spacenear.us/tracker

The SDARS venue had a projector and a decent WiFi Internet connection which allowed me to demonstrate how to set up DL-FLDIGI for a ground station and NERDTEST being received and both showing up on the map in real time.

My original PowerPoint presentation has been given a total makeover and I has included some videos of Felix Baumgartner, Dave Akerman’s Babbage Teddy Bear and wacky chef Heston Blumenthal’s ‘Spud-in-space’ feature from his new television program.

To show a real tracker Steve Smith (G0TDJ) of Project Hab had been kind enough to loan me his VAYU-NTX unit.

I am not the most confident of people when it comes to public interaction and it was encouraging to see people genuinely interested in what I was talking about and keen to have a look and I have had some very nice feedback.

Thanks @nerdsville for an excellent talk on High Altitude Balloons and telemetry, look forward to your launch. pic.twitter.com/H8AevMNQ13
— Spalding DARS (@SDARS) May 16, 2014

Excellent talk at Club tonight by @nerdsville on high altitude balloons and radio data. Andrew knows his subject and enthusiasm infectious.
— Jim Scott G0HGH (@photoimagery) May 16, 2014

Giving these talks has spurred me to pull my finger out and get on with actually flying something and finishing the payload!

Another mothballed project is my Ultimate3 beacon kit, still being only a Foundation licence means I cannot use it to transmit but that may be about to change as tomorrow I am sitting my Intermediate exam which will allow me to properly experiment with transmitters. The exam was arranged through SKARS by Chairman Nigel Booth and the date came through a little sooner than I was expecting so perhaps not quite as prepared as I really should be, but with a decent electronics background and some quick revision it should be fine….

My operating has been largely limited to the UKAC VHF contests, setting aside a few hours per week is manageable and my results are gradually improving, even getting some complements on my operating.
  
Two weeks ago I was able to attend the local Dambusters Hamfest at Thorpe Camp and managed to pick up a decent rotator, this has proved invaluable for the UKAC as I don’t have to keep going outside the shack to turn the antenna.

Now if I hear someone calling CQ and can monitor a QSO to get the locator and the bearing a quick turn of the dial and I have a better chance. The program I use is BD_2004 from W1GHZ, running in console window it is a simple case of setting up your own locator and then entering other locators the bearing and distance are given.

As well as the weeknight UKAC there have been a couple of weekend VHF contests, I managed a couple of hours this weekend on the RSGB 144MHz May Contest and I had the best DX ever and nearly every QSO was in a new locator square!

I wasn’t able to spend more time on the contest as we took the dogs on a sponsored dog walk on Sunday in aid of the local hospice and on Saturday I attended the British Astronomical Association, Radio Astronomy Group General Meeting at the National Space Centre.

The notion of amateur Radio Astronomy is something that has fascinated me, up to now the only dabbling I have done has been with meteor detection using reflections from the Graves space radar (blog entry). This year some of the talks dealt with using RTL-SDR and Arduino/Raspberry PI in low-cost observation. Also at the meeting was a number of demonstrations and stands from other projects we I was able to garner a great deal of useful information.

Being able to detect ‘Hydrogen-Line’ emissions to map the Galactic plane using a FUNCube or RTL-SDR dongle is astonishing, not to mention low cost VLF receivers to detect Sudden Ionospheric Disturbances SIDs and magnetometers to measure the effect of the solar wind on the earth’s magnetic field!

It is all on the to do list, but it was a great day with some really fascinating talks and some exciting plans by the group. It was a shame I had to leave earlier than I wanted as I did miss some of the later presentations.

Anyway best get an early night! 

Cheap GPS module

Several of the Arduino projects I have been experimenting with have used a GPS module to provide accurate time and/or location information and in the case of the QRSS/WSRP QRP beacon a highly accurate GPS derived 1 second pulse is used for frequency calibration. A number of people have enquired about the GPS module I am using.

Most GPS devices have a limit on the altitude they work at, normally 60,000 feet or less. This is a legacy of the now defunct CoCom (Coordinating Committee for Multilateral Export Controls) restrictions. For my HAB project this restriction needs to be disabled and the GPS must be switched into ‘flight mode’ In the HAB community the favoured devices are made by U-BLOX

Therefore when I was sourcing a GPS I had search specifically for a inexpensive device using a U-BLOX.

s
The GY-GPS6MV2 as supplied

I soon found something called a GY-GPS6MV2, it appears to be a generic design and is readily available on eBay from suppliers in China, Hong Kong and Singapore and can be purchased at the moment for around than £10 (approx $15) including postage!

It is also available from domestic suppliers but often at a much more inflated price, but you don’t have to wait several weeks for them to be delivered.

There are many other GPS modules available but this module seems to be one of the cheapest available. it is often listed as a NEO6MV2 GPS Module Aircraft Flight Controller.

The module consists of a small PCB 25mm x 35 mm size with a separate ceramic antenna connected by a small lead which is 25mm x 25mm in size. The Antenna is quite heavy and isn’t suited to Pico HAB payloads but for other uses is more than satisfactory.

On the board is a small button-cell battery to provide backup to the GPS chip and a small EEPROM connected to the GPS chip which I believe can store configuration(s). I haven’t used it myself just using the module in it’s default set up at the moment. For a schematic click here

The board has four connectors VCC, GND, TX (Transmit) and RX (Receive) and can be powered by the 5V supply on Arduino boards since it has a small regulator to provide the 3.3V needed. 

In most projects all that is required is data out of the GPS. The GPS TX (data out) being connected directly to the microcontrollers RX (data in) The (0V and 3.3V) level shift of the signal is compatible with the TTL input of the microcontroller.

The GPS by default will start up and output standard NMEA sentences at 9600 Baud, until GPS position lock is achieved the NMEA sentences won’t have a long/lat location. The module also has an LED which will start flashing once a lock is achieved.

There is no direct connection for the highly accurate 1PPS (pulse per second) signal that can be used for frequency calibration, but the flashing LED is driven by pin 3 of the GPS module which is the 1PPS (pulse per second) signal required.

The 1PSS signal, like the TX is either 0V and 3.3V, in order to use it a small lead will need to be soldered onto the board, either directly onto Pin3 of the GPS chip, or alternatively on to the small current limiting resistor used by the LED, as indicated below.

Showing the GPS 1pps points

Ultimate3 QRSS Beacon kit built!

At the start of the year I did some experimentation with cheap DDS modules based on the Analog Devices AD9850 connected to the Arduino board, making a rudimentary WSPR transmitter prototype.

My current licence restrictions prevent me using anything home-brew for transmitting except for commercial kits. So I ordered an Ultimate3 QRSS beacon kit from Hans Summers (G0UPL) thinking that it would be okay. I subsequently learned that any commercially available kit must satisfy IR 2028 which is all a bit vague and unclear but sadly I don’t believe this particular kit does.

All was not lost, building this kit should more than satisfy one of the practical assessments of the intermediate examination, which will get me around this problem.

The Ultimate3 kit is extremely popular and so I had to wait a little for delivery and it arrived on Friday. After the last few weekends of non-radio activities I had planned to get my antennas backup and do some proper operating. Like many people I had been forced to take everything down due to the barrage of storms and high winds the UK has been experiencing recently.

A tidy workbench

Saturday saw no let up in the wind, so I decided to spend a few hours building the kit instead.

The instructions were extremely clear and straight forward and soon had it built up, though it is high time I invested in new soldering station. I have a basic Antex 25W iron. I cannot remember exactly when I brought it but it is well over 10 years ago.  It was more than adequate to build this kit and for soldering connectors but I could do with something adjustable and more comfortable.

Taking shape

The only issue I had was winding the first toroid, 25 turns later I realised I had wound it the wrong way round so the leads didn’t line up with the holes in the PCB. I could have made it fit but nope I will do it properly so I unwound it and did it again.

I also made the mistake of not scraping the enamel off the toroid wire and tried the heat it and bubble it off method, except I think my iron just isn’t hot enough so ended up using a piece of wire wool to remove the enamel.

Lessons learned I soon had the other three toroids correctly wound and wire prepared for the low-pass filter board.

Close up of the LPF

   A final visual check and powered it up and it worked first time!

All built
It works!

Setting it up

Full of confidence I grabbed my trusty GPS module which has been pressed into service on a few Arduino projects including the HAB project. Quickly soldered some connecting wires and powered everything up.. all was well or so it seemed when the display suddenly went blank, backlight was on, just no characters.

Pressing the button I occasionally got some random characters and a flashing cursor! I de-soldered the GPS and still nothing. I suspected the display was faulty but trying it on the HAB prototype board confirmed it was okay. I checked the display connector continuity and everything appeared okay.

Out with the oscilloscope I started probing, everything checked out. Crystal was oscillating and data pulses on the display control lines. Then I checked the supply pin on the display and it was only reading 4.1V, this under-voltage would explain the odd display behaviour.

PSU output was 5V, micro-controller was 5V, DDS module had 5V. All very puzzling till I removed the DDS module and spotted a discoloured track on the PCB, touching it with a screwdriver and the lacquer fell away revealing a tell tale scorch mark, somehow I had made a nice resistor!

Burnt track to right of micro-controller

A quick wire link soldered in place and everything was back to normal.

What caused it? Checking the de-soldered GPS connecting wire I spotted a stray single strand of wire on the ground wire. I suspect this must have shorted to the adjacent 5V line and since I was using a nice beefy ex-PC PSU as a bench supply it had popped the track without the hint of a flicker. The GPS has been rewired properly and is working nicely, now to connect a dummy load and experiment some more.

Sunday was a lovely day, wind dropped so antennas have been put back up and I took the opportunity to tidy up the installation a bit. I also dug out an old fibreglass pole to put the M0CVO HW-20HP back up. I didn’t get to do any operating in the end as by the time I had done this and made up a couple of decent patch leads it was time for roast beef and all the trimmings and an evening in front of the TV.

The HW-20HP back up

Putting PL259 and N-Type connectors on coax is also part of the intermediate assessment, so perhaps I should have videoed making up the patch-leads as proof 😉

Another Day Another Arduino Project

Yes another day, another Arduino project (seriously this is a great development environment)

As I mentioned in passing yesterday I have a number of Arduino based projects buzzing around in my head. One of them is to produce a satellite antenna pointer/indicator.

I have used an Android AR tracking solution before (flaky at best) and can see the relevant information in Orbitron or SatPC32 to know where to point the antenna but it is difficult to see a PC screen when stuck out in the middle of the lawn!

My idea is this, I will make a large tripod to which I can attach appropriate antenna as I need, then during the satellite pass it has indicators to show where to point the antenna manually.

I envisage the azimuth indicator to be a large horizontal circle with 36 LEDs positioned at 10 degree intervals, the elevation will be a quarter circle with 20 LEDs positioned at 5 degree intervals. Then during the pass the appropriate LEDs will light and assuming I keep the antenna aligned to these I should in theory get the best signal… Crazy??

Yes I know I could make or buy an azimuth/elevation rotator, eBay is full of low speed high torque geared DC motors with auto-stop/hold and numerous software solutions exist to drive them but this would require a bit more engineering and isn’t something I can easily fabricate at the moment. My contraption would be much more rustic being made of rough cut timber!

Bright LEDs are ridiculously cheap and controlling this number from the Arduino will require the use of multiplexer drivers. The popular ones are the MAX 7219/7221

I won’t go into the details of exactly what multiplexing is, other than to say that each display element (LED) is driven one at a time but by switching the electronics at high speed combined with the persistence of vision make the viewer believe the entire display is continuously active.

This technique can be used for individual LEDs, an LED grid matrix, or for 7 segment displays. Last night I successfully got a MAX7219 based 8-Digit 7-Segment LED module working.

The next stage was to investigate how an Arduino could calculate the appropriate azimuth and elevation data. Thankfully a library already exists qrpTracker (code is here), within this library is a port of the Plan-13 algorithm first written in Basic by James Miller G3RUH in 1990, subsequently ported to C by Edson Pereira, N1VTN and further updated by Howard Long, G6LVB.

Plan-13 processes keplerian elements, time and (optionally) observer location, and uplink downlink frequencies; it outputs satellite latitude and longitude, azimuth and elevation, and Doppler shifted frequencies. At the standard 16 MHz Arduino clock speed, this code can complete these calculations in approximately 30 ms. This code is reported to be highly accurate, if provided with proper data.

The important data are the observer location (longitude/latitude) and the current time. Step forward my well used GPS module which once lock is achieved can supply that data.

The next is get the appropriate up to date Keplerian twin element sets (TLE) and extract the appropriate information from it and pass that data to the Plan-13 functions.
 
The standard TLE follows the following format

You need to extract the Epoch Year/Day (including partial data), Inclination, Right Ascension, Eccentricity, Perigee, Mean anomaly and Mean Motion for a calculation (drag/orientation aren’t critical) For the moment I have just extracted this manually from the latest TLE and entered it directly into the program.

After just an hour or so of research and programming I have the LED displaying the current azimuth and elevation of the FUNCube-1 satellite (AO73) based on the current position and time derived from the GPS!

The first four digits is the azimuth, the second four the elevation.

The next stage is to sort out the LED disc indicators, build the antenna tripod and formulate a method to upload the appropriate up to date TLE files from the PC which can be stored in the EEPROM of the micro-controller.

 

Arduino, WSPR and AD9850 DDS experiments

Happy New Year!

Christmas is thankfully behind us so I can get back to what I enjoy doing once I have reorganised my workshop.

As you know I am currently developing a potential High Altitude Balloon (HAB) project and have been experimenting with the Arduino microprocessor platform and have constructed a basic prototype.

With the arrival of the GPS module(s) I have had it successfully working and even took it out for a test walk in the local area, receiving the data and uploading it to the UKHAS habitat system.

NERD-1 and Boris have just been for a walk, first time NERD-1 has had proper GPS and running on batteries. #hab pic.twitter.com/RaKsf1rQhr
— Andrew Garratt M6GTG (@nerdsville) November 23, 2013

This project has revitalised my interest in ‘hobby electronics’ and I have ideas for a number of other Arduino based projects and have been splashing out on components from eBay. Just before Christmas I purchased an Arduino Mega board, this has more I/O pins than the current Uno and specifically some extra hardware serial ports.

Do any internet search for Arduino based amateur radio projects and it will results in numerous mentions of projects using ultra cheap DDS modules based on the Analog Devices AD9850/AD9851 chipsets.

DDS means Direct digital synthesiser and is a type of frequency generation which can be used for creating arbitrary waveforms from a single, fixed-frequency reference clock. Read the Wikipedia page for more details.

In a nutshell the AD9850 is a chip that under microprocessor control can produce a sinusoidal wave from about 1hz to 40mhz. In other words it is an accurate microprocessor controlled VFO (Variable Frequency Oscillator) or signal generator.

VFOs are the main building blocks of radio receivers and transmitters, so not surprisingly a lot of projects have utilised these modules, rather than the traditional means. Intrigued I ordered a couple of these modules for the pricey sum of £3.50 each!

Using information on George Smart’s (M1GEO) website and Simon Kennedy’s (G0FCU) blog  I quickly had a simple WSPR beacon running!

Experimenting with Arduino and AD9850 DDS and GPS unit.. pic.twitter.com/rxDHQQ1aFd
— Andrew Garratt M6GTG (@nerdsville) December 29, 2013

The Arduino uses the GPS module borrowed from NERD-1 for accurate time and then controls the output of the AD9850 DDS to generate the WSPR signal.

Before anyone panics I know at the moment I only hold a Foundation Amateur Licence so the construction of homebrew transmitters isn’t allowed. This ‘beacon’ has no power amplifier and the antenna consisted of an inch or so of wire on the DDS output. I was able to verify the operation using my SDR receiver in the same room.

Construction of commercial kits is allowed under my licence so I have ordered a Ultimate3 QRSS kit from Hans Summers for the pricely sum of £17.50! This uses the same DDS module and same microcontroller as the Arduino.

In the meantime there is also more information and ideas on Eugenr Marcus’ (W3PM) webpage about the use of these DDS modules, including making frequency reference sources and calibration using the GPS module.

My new year resolution is to get my Intermediate Licence as soon as possible..  but it has been great to get down to some proper experimenting…

Cannot beat a picture of an oscilloscope to look techy.. my DDS experiments continue… pic.twitter.com/T9OLHOdTLW
— Andrew Garratt M6GTG (@nerdsville) January 1, 2014

NERD-1 development prototype

The NERD-1 HAB development prototype has been coming on in leaps and bounds. The first stage was to take the breadboard transmitter layout and construct a veroboard ‘shield’  the transmitter module plugs into some sockets and the addition of an enable control allows me to turn it off and on. What cannot be seen on the photo below is a dual-colour LED to indicate the fix status of the GPS.

Veroboard shield with transmitter fitted

I am still waiting for delivery of the uBlox GPS module/breakout board which is on a slow boat from China, but in the meantime I have purchased a number of other breakout boards (pictured below) to evaluate potential additions and to generally experiment.

Top-Bottom, SD Card module, RTC/EEPROM module and GY-80 IMU

These include a SD Card module, which will be used to log flight telemetry via the SPI interface. The board on the right is a Real Time Clock (RTC) including a button cell and some EEPROM memory accessed and controlled via the I2C/Wire interface. This really isn’t needed but was literally a couple of £s.

The smaller board at the bottom is the really interesting one! It is a GY-80 IMU clone, containing a three-axis gyroscope, three-axis accelerometer, three-axis magnetic sensor and a temperature and pressure sensor, again all accessed simply via the I2C interface. Popular in aeronautical RC and personal UAV projects such as Quadcopters it seemed worthy of some experimentation.

All the devices were purchased from Etang Electronics on eBay and was impressed as it all arrived the day after ordering.

I am using the only proper serial port for the GPS data and  I wanted some method of getting debugging and instrumentation from the device during testing. I could have constructed a software serial port but I had an unused LCD character display so decided to connect it up (won’t be included on a proper payload!)

It looks nice and is ‘cool’ however the backlight LEDs do draw an awful lot of current so have been disconnected since the picture was taken.

LCD Character display

At the moment the whole thing is a little messy, but is functional and sits in it’s own foam lined box!

The prototype connected up (still no GPS module)

The software development has been pretty straightforward, I am no stranger to the use of I2C and SPI in my day job and there are plenty of software libraries and guides available. Once I have perfected the software and settled on the final design then I am planning on constructing a veroboard flight prototype with all the unnecessary parts removed.

I have also yet to investigate another transmitter unit I have purchased.  

NERD-1 HAB Development begins!

The prospect of developing a High Altitude Balloon payload doesn’t fill me with dread, after all “embedded software engineer” is my day job. It is a varied job including PC, Linux and other programming but it is mostly microcontrollers and associated electronics.

What did fill me with dread was the prospect of going out and getting some development kit! I like to switch off from work when I get home so I have never duplicated a development set up at home to resist the temptation to carry on working. So how was I going to go about this on a small budget?

The obvious solution was to use one of the educational and hobbyist systems like the RaspberryPI, Arduino, Propeller or BeagleBoards which have become increasingly popular. I hadn’t kept abreast of any of them but after examining the work of HAB enthusiasts and some very rudimentary research I decided to try one out and the cheapest was the Arduino route.

So a quick trip off to eBay and I got hold of an ‘Funduino’ (an Arduino UNO clone) board for £9 and ordered a uBlox GPS module/breakout board from China (which is still to arrive) as well as a couple of radio modules including the Radiometrix NTX-2 used in many HAB flights.

We call me impressed, after installing the Arduino development system I had the board flashing an LED within 30 seconds! When I was learning electronics and computing back in the early 1980s at school I would have killed for a platform like this!

I took the liberty of downloading Steve Smith’s (G0TDJ) ProjectHAB VAYU ino file as a starting point. This ino or ‘sketch’ file is Arduino terminology for a project. They may be called ‘sketches’ but rarely has any of my software ever been called a work of art!

This iteration of VAYU uses the RFM22B radio module controlled by SPI, whereas the NTX-2 is much simpler to control using a digital output and a few resistors. There are many handy guides on the UKHAS Wiki

The GPS data will be coming in serially on the UART the same as VAYU so it was trivial to make the modifications and remove the SPI control to get a barebones flight computer running. I was able to breadboard the NTX-2 and had it successfully transmitting from my lounge floor. It even passed its first environmental test of having one of my dogs lick the circuit board while powered up!

UNO and breadboarded NTX-2
The RTTY transmission being received in another room.

However the current payload might be a bit heavy even for a large latex.
 

The Payload!

The blue mouse shaped device on the left hand of the laptop is an old Haicom HI-204 GPS module which I have had kicking around for years. It is actually a serial device which once powered up starts outputting NMEA data at 4800 baud, this model has an intergrated serial-usb adapter.

When not running the Arduino IDE the UNO board appears as a standard serial port on the PC and can accept or output data, so all I needed to do was route the serial data from one port to another.

I of course made more work for myself by deciding to taking the open source SharpGPS C# based windows program and customising it. As well as decoding it can now forward the data and NMEA sentences from a GPS device on one port to another serial port. It can now log the raw data and play back logs to emulate a device for testing.

The nice thing is this program informs me of the location data, fix status and information about satellites and if and when I iron out some of the remaining bugs and quirks it will make a nice utility which I will make available. Here are some screenshots of it in action.

Now to the next stage….