Sunday, 3 October 2010

Beacon DDS

I'm pleased to be able to report that the multi-mode beacon (Blogs passim) now has its own h/b Direct Digital Synthesizer...

As regular readers will recall, the m0xpd beacon has been using the excellent SDR Kits USB synthesizer. Whilst being a perfect solution in a PC-based system, the USB Synth is not so handy in the context of microcontrollers (which don't have USB as a matter of course) or stand-alone beacons. An internal DDS would give me freedom from the PC on start-up (previously, I'd had to set up the synth via USB) and flexibility to make the beacon multi-band and frequency-agile.

I decided to use the same Silicon Labs Si570 device featured in the SDR Kits synth (not least because Jan, g0bbl, sells them). However, in making that decision, I was forced to accept a couple of challenges...
  • the Si570 is 3.3V powered and so would need level conversion to interface to my 5V PIC environment
  • the Si570 is a surface mount device - so I would have to enter the scary world of MICRO electronics - no mean feat for somebody who has worn spectacles since age five and has an intention tremor (at least I had an intention tremor - but that has been much improved since my physician prescribed Beta Blockers for migraine prophylaxis)!
The first challenge was easily solved using a simple circuit I found on the 'net (as used in a nice little level converter module available from Sparkfun)...

I could only get hold of the MOSFETs in surface mount packages, so that really sealed the deal - I HAD to adopt surface mount technology! Anyway - here's the proof that the level converter circuit works as intended...

and here's my completed schematic (with level conversion on the data and clock lines)...

Although I'd never played with surface mount before (in an h/b context) my trusty Eagle PCB package could handle it effortlessly and a PCB design was soon produced...

(In truth this was the second design - I had not bothered to read the data sheet for the LP2950 LDO regulator I chose to generate the 3V3 line and so missed out the loading capacitor which stabilises it!)

Here's the finished board in the development context plugged into a breadboard...

Once I'd confirmed operation of the hardware I could look at the software required to make the Si570 do its stuff...

The synth module was designed to interface to my controller board over the Si570's two-wire I2C interface. I was delighted to find that Andrew, g40ep had trodden this path before me and has generously posted a mine of useful information and software on the 'net. It is (as Sir Isaac understood) good to be able to hitch a ride on the shoulders of giants - thanks Andrew! Follow this link to see Andrew's Si570 resources.

I borrowed heavily from some of Andrew's I2C routines (simplified somewhat by my bi-directional level converter on the serial data line). I decided, however, to take a simple brute-force approach to setting the Si570's frequency to get things running quickly...

I had noticed that one of the PC utilities provided with the original SDR Kits USB synth produced register contents associated with any frequency setting...

Accordingly, I simply programmed my new PIC 16F873 in the controller board (the original 16F872 has been replaced, as I wanted to duplicate the system on the external breadboard and the junk box only had one 16F872!)...

to send the "brute force" register contents to the waiting Si570 and - Hey presto - the beacon is up and running with its own internal DDS...

Michael, dl5ocd, was first to spot the beacon in its new configuration.

Now I'm ready to extend the operating flexibility of the system - but first I have to arrange some switches to tell the beacon what I want it to do!

This has been great fun (so much so that I've ordered a complete set of 1206 resistors and a set of caps) and I've learned a lot along the way.

...-.- de m0xpd


  1. does the first circuit diagram operate only from right to left?



    1. Dave
      No - it is bidirectional.
      73 m0xpd

  2. You say "I could only get hold of the MOSFETs in surface mount packages". I use 2N7000, from eBay (£2.00 + £2.50 p&p for 50x). They are 'traditional' through-hole devices. BTW, the design seems to originate from Phillips - see AN97055 - which specifies that device.



    1. Hi Pete. I meant I could only get the BSS 138 in SMT - I wanted to start with the specified device. Pleased to hear the 2N7000 works - I've got heaps of those! However, it has been nice to use the small parts in making "quad" and "octal" versions of the level converter :