Meteor M-N2 Images

Tuesday, 31 December 2013

Arduino & AD9850 based WSPR transmitter - continued

Arduino & AD9850 based WSPR transmitter - continued

I have been improving the WSPR transmitter. I noticed that when setting it to transmit every other minute the code did not actually work. I think this was because after the tx period had ended the time that was in the serial buffer from the GPS was from before the tx period started. This consequently caused all sorts of problems.

There is no way to flush the serial buffer so I solved this by reading the time from the GPS for 1000ms after the tx period has completed. This allows the stale time to be read and discarded and the up-to-date time to be captured. After this 1000ms period a variable is reset to change the read time of the serial buffer back to 250ms.

The other significant change I have made is to what happens when the tx period has ended but it is not required to transmit in the subsequent 2 minute period. In the old version this was implemented crudely by using a delay of 5 seconds. This actually doesn't work because the tx period ends at around 51 seconds of the odd minute. Thus the delay actually needs to be around 15 seconds, to 5 seconds past the even minute to miss the tx period. I have now implemented this in code, this means that I can start to think about implementing a web based front end.

I don't intend to replace the delay of 682ms used to transmit each WSPR tone at the moment. As this is so time critical I will avoid it for now!

The code for the latest version (v6) can be downloaded here.
Note: you will also need to download and install a few libraries:

I made a homebrew Arduino shield incorporating the AD9850, the MAX232 chip and relay to switch the amplifier on, as shown below.

Sunday, 6 October 2013

Arduino and AD9850 WSPR Transmitter

I recently got an Arduino Uno. The glut of cheap AD9850 boards on e-bay made one an obvious first purchase to complement the Arduino. I made an Arduino and AD9850 VFO which was a good learning experience but I didn't have any immediate need for a VFO.

I have been wondering about the efficiency of my HF antennas recently and I fired up WSPR
on my pc one day. Immediately I realised that an Arduino and AD9850 powered WSPR transmitter would be possible.

Of course, someone had published a similar project on the Internet. George Smart, M1GEO, has posted a project on his web pages describing an Arduino based AD9851 WSPR transmitter. However, there are some crucial differences between the two chips and I also found that George's Arduino code didn't work well with the GPS I was using.

So, my project is based heavily on M1GEO's, but with additional help and information provided by other web pages. My own contribution is largely in enhancing the Arduino code and integrating the project from various sources.

Challenge #1 - accurate timing

WSPR relies on stations starting to transmit between seconds 1 and 4 of even minutes. Consequently an accurate time source is necessary. I already had a GPS 'puck' and it is a trivial task to connect a GPS to the Arduino using the TinyGPS library. However, the Arduino is expecting a TTL level signal from the GPS and my device outputs RS-232. Hence, a converter between the two voltage levels is required. Fortunately there is a handy chip that does this called the MAX232. Connecting this between my GPS and the Arduino meant that I was able to use the TinyGPS library to receive the NMEA sentences from the GPS. If you use a GPS module like the one described in this article, you will not need the MAX232 chip.

Challenge #2 - differences between the AD9851 and AD9850

There are two main differences to be aware of. Firstly, the AD9850 has a different oscillator frequency, it uses 125Mhz whereas the AD9851 uses 180Mhz. Secondly, the AD9850 requires a different set of pins to be set HIGH to enable serial mode, ie. to be able to write data to it serially rather than in parallel. Pins RESET, CLOCK and LOAD all have to be set HIGH (pins labelled RESET, H_CLK and FU_UD respectively on my DDS module).

Challenge #3 - switching an amplifier

The output from the DDS module is very low. I am feeding this to a QRP HF amplifier which generates around 250mW. However, I needed to switch the amp on and off in line with the times when the WSPR signal was being transmitted. It is easy to set a pin on the Arduino to HIGH at the start of the transmission sequence and to use this to drive a transistor switch connected to a relay, as described here. The relay switches the power to the amp on and off.

Challenge #4 - generating more power from the HF amplifier

To be continued, my amplifiers never seem to be able to output more than a couple of hundred milliwats so I need to do some more work here.

Challenge #5 - building an effective low pass filter

A low pass filter is essential to ensure no harmonics are transmitted. I've not had much success building these either so am going to work on this next. buy an LPF kit from Hans Summers, G0UPL For £2.50 you can't really go wrong. I bought filters for 20m and 30m so at some point I will implement antenna switching as well.

Arduino Sketch

The Arduino sketch I have modified and that works for the AD9850 and my GPS can be downloaded from here. You will need to generate the WSPR tones as described in M1GEO's post here and amend the sketch with tones specific to your callsign, location and power level. If you use this version please add a line to turn off the GPS interrupts during the WSPR tx period, add 'ss.end();' between lines 141 and 142.

I have since added a 4 line by 20 character I2C LCD display. I have also fixed the timing issue that didn't seem to occur without the LCD but is caused by interrupts from the GPS delaying the internal clock thus making it useless for WSPR. The updated version can be downloaded here.

Note: you will also need to download and install a few libraries:

If you open the Arduino serial monitor when the sketch is running you will see the timing string from the GPS and when the WSPR tx is activated.

Here is a picture of my Arduino Uno, AD9850 DDS board and breadboard with the MAX232 chip and amplifier power switching circuit - ugly at the moment but it works.

Wednesday, 14 August 2013

The trials and tribulations of HF portable

Recently I bought an FT817. There were two reasons for this, firstly, to drive the 70 Mhz transverter I have built, and secondly so I could do some portable HF operating.

After paying ML&S a princely sum for a Wonder Wand antenna to go with the 817 I was underwhelmed with its performance. I will be generous and attribute this to the less than stunning take off from my QTH. However, I knew I could do better.

On trawling the Internet I came across the HF Pack website and found the page relating to their antenna shoot-out. The PAC-12 antenna designed by James, KA5DVS performed well compared to the reference vertical and James has published the design here.

It took me some time to produce my own version but I now have a reproducible design. 

The 72 inch telescopic whip from the Wonder Wand has been reassigned as the top section of my PAC-12. I have built three loading coils, for 40m, 20m and 17m. For the coils I used 16SWG enamelled copper wire. For some reason I found that I needed a lot more turns on the coils than James's design to make the antenna resonate at the appropriate frequency.

My version of the PAC-12, with coils for 40m, 20m & 17m.

My version does not need the threads cut into the rods as in James's design as for the bottom section I used a hollow rod which started life as the support for a light. That, some black tubular conduit that I found in my shed and some 15mm plastic water pipe and end-stops are the other main components.

In Clas Ohlsen I found brake pipe connectors, which I have used inserted into the water pipe end stops to mount the telescopic antenna into. Ideally these would have been about twice as long and if I find a suitable alternative I will replace them. At one end of these brake pipe connectors is a smaller hole, through which I inserted a small bolt with a solder tag and nut on the lower side to solder to the top of the loading coil, see picture below.

Through the end stop and the brake pipe connector I drilled a small hole to take a screw that is used to retain the telescopic section.

The bottom end of each coil has a solder tag type connector attached to the end of the coil and this is threaded through the bolt that goes through the top of the hollow rod that forms the bottom section of the antenna.

The hollow rod fits neatly inside the plastic conduit and I have a bolt through the conduit that the rod rests upon. The plastic conduit can then be tie wrapped to a tripod for support or just supported by a couple of large rocks.

Through the very bottom of the hollow rod I have a self-tapping screw to connect a piece of wire which is then taken out to an SO239 connector. I also have a phono socket connected to the screen of the SO239, my counterpoise wires are attached via a phono plug to the socket.

In the garden at home and on the balcony of our holiday apartment the antenna works well.

However, the connections failed the ruggedness test. On holiday in Switzerland we were surrounded by 4000m peaks. We were at 1800m so there was over 2km of towering rock for any signals to get through. As we were close to the border with Italy 40m was always full of Italian stations, in the apartment there was a lot of interference on 20m, and I heard a few station on 17m (most notably one from Bahrain running 1kW).

So it seemed like there was a need to get higher. One day we caught a cable car up to around 2700m to a point with a fantastic take of in most directions. The picture below is of the TV transmitter about 200m below the location.

So with the antenna set up I had a listen around on 20m. There was a UK station just completing a contact with a US station. However, my SWR seemed a little too high so I decided to switch to 40m. I immediately heard a portable DL station calling CQ SOTA. He was very strong. However, I had a noise figure of S0 rather than the more normal S7 so I was suspicious. A quick whistle into the microphone confirmed that my SWR was very high. Further investigation showed a small design flaw in the connection of the hollow rod to the SO239 that I could not resolve. During a quick tune round I heard an French portable station also calling CQ SOTA.

I'm sure I could have made a few contacts but I need to make some alterations so that the antenna passes the ruggedness test. When I have made these alterations I am looking forwards to taking the antenna out portable away from home. We live in a bit of a hole in the ground and I am intrigued what HF reception I will get on one of the high points in Surrey.

Monday, 22 July 2013

Homebrew 70Mhz transverter

This is my homebrew 70Mhz transverter made from the design by EI9GQ in the Radcom Homebrew column in June/July 2009. Watch the video for a tour of the unit.

Power output is 50mW, which is a little low, next step is to build an amplifier to boost this to around 15W. It will then drive my Pye A200 amplifier to deliver a final output of around 60W.

Thursday, 21 February 2013

Triggertrap Timewarp mode - clouds over Allalin

This Triggertrap Timewarp mode is quite cool assuming all the technology works together, meaning mainly that the batteries of the camera and phone don't run out.

This video is of clouds over the Allalin mountain in Saas Fee.

Wednesday, 20 February 2013

Triggertrap - Timelapse video

This video was captured using my Canon EOS 400D, a Triggertrap dongle and Android app using the Timelapse mode. It was processed using Stopmotion and Winff open-source software on a Samsung netbook running Lubuntu 12.04.

It shows skiers at Morenia in Saas Fee, Switzerland. The temperature when I shot this was about -14 Celsius but in bright sunshine so I'm not sure it is focussed exactly.

Triggertrap - hints and tips

These hints and tips relate to use with the Android app and a Canon 400D.

If you enable mirror lockup (Custom function 7) and use Triggertrap in Bulb mode with Cable Release (and probably other modes as well) and have the camera Drive mode set to 'Single shooting' you have to press the 'shutter' button twice to get the camera shutter to open. If you set the camera drive mode to 'Self timer/Remote control' then the shutter fires 2 seconds after the Triggertrap button is pressed.

So, the approach for long exposures in Bulb mode where you want to lock the mirror to prevent shake is to set the drive mode to 'Self timer' and accept a 2 second pause before the exposure starts.
Timewarp mode - the app takes exposures faster, then slower and then faster, depending on the type of easing selected and the associated curve. It calculates the number of pictures to take based on the total number of exposures you select and the overall time period.

However, the major failing of the app is that the number of seconds between exposures at the beginning and end of the sequence can be very small, i.e. < 1 second. The app really should take this into account and default to a minimum number of exposures per second (or a minimum number of seconds per exposure) rather than make it look like it is taking exposures when the camera has no chance of keeping up (not withstanding that different types of camera might be able to cope with different timings). Also, on looking at the app when it has settled down to (in this case) about one exposure every 12 seconds it was occasionally displaying something like "1012213344 seconds to next exposure"! I think the algorithm needs some work!

General comment on app design.

The Android app is almost unusable in bright light outside. The controls are very, very small and difficult to see. The uber-cool grey and black design might look good in the office but it does nothing for usability. Forget trying to use it with gloves on. I've had a quick look at the Apple app and the fonts are bigger. Maybe this is something to do the way the app has been ported to Android - most Android screens are bigger than Apple ones... 

Triggertrap - Android version - bugs

Timelapse mode

The first screenshot show how the app works without a Triggertrap dongle attached (presumably, how it should work) showing the number of seconds until the next exposure and the number taken so far.

The next screenshot shows the screen when attached to my Canon 400D, taking pictures but not showing anything useful on the screen.

The app sometimes shows the option 'Buy the Dongle' and sometimes not, even with a dongle connected.
To exit the app takes many presses of the Android back button sometimes, when on the main menu. However, this may be a problem with Android/my Sensation XE as it does seem to occur on other apps.

Monday, 18 February 2013

Triggertrap - second attempt

Here's my second Triggertrap photograph of half a full moon, the movement of the moon during the exposure makes it look more like a full moon. This time 6 shots of 5 minutes each with a delay of 10 minutes between each exposure. Aperture is f5.0, ISO 100, the images were combined using gimp. 

The temperature was -6.5 Celsius when I took this so much further investigation at night is going to have to wait until the temperature is a bit warmer!

Triggertrap - first impressions

This is my first photograph taken using my Triggertrap. It is a view of Plattjen taken from Saas Fee in Switzerland. It was produced using a combination of 7 images and processed in gimp following instructions on the Sandcurves blog. You can see the star trails and the trail left by the headlights of the piste machine.

My initial observations of the Triggertrap are that it is a fantastic platform for innovative photography. However, the Android version of the software needs work to polish off the rough edges - more specific details will follow in another post. The drain on the battery for long exposures is severe and this needs to be addressed if possible. I'll try to borrow my daughters iPod Touch to try the Apple version of software.

First post

I am going to post here any jottings or musings I have about my hobbies of amateur radio and photography. They may be of use to other people, as I have found out plenty of useful information from other blogs.

My ham radio callsign is G0FCU. At the moment I am particularly interested in QRP homebrew and software defined radio (SDR) using a FunCube Dongle Pro. For  the computer part of the SDR set-up I use Linux as the operating system with gqrx as the decoding software. I intend to buy an RTL2832U dongle to further experiment in this area, particularly with ADS-B reception to decode details of the aircraft that pass over our house.

I have a Double Sideband (DSB) transceiver to complete and I also have the components to build the transmit part of my homebrew 70Mhz receive converter.

On the photography side of things I have recently bought a Triggertrap. This clever device allows me to control my camera (Canon EOS 400D) from my Android mobile phone (currently an HTC Sensation XE). This will allow me to experiment more with High Dynamic Range (HDR) and long exposure photography.