Software Defined Radio

I've been interested in Software Defined Radio for a long time, but haven't done much with it so far. I finally decided to take my first step in actually doing some software defined radio hardware. One DIY SDR kit that I've had my eyes on for a while is the Ensemble RX II. It can receive anything from 1.8MHz to 30MHz. It's a simple and easy to understand SDR. I'm not into building readymade kits, though. So I decided to build my own clone of it instead. I figured you'd learn a lot more that way. So here's the story of that.

The design is very much based on the Ensemble RX II that I mentioned before. I just decided to skip some parts, like the isolation between the digital and analog sides and I didn't implement any kind of band-pass filtering at all. I also changed the microcontroller from the attiny85 to an atmega88 and started the code from scratch. I also like surface mount components, so I decided to use those as much as possible.

Here's a flowchart of what's going on here.
Some explanations are probably in order. The Si570 provides a stable a high frequency clock. That clock goes to a circuit utilizing a 74ac74 D-type flip-flop. It provides two clocks that are both the input frequency divided by 4, but 90 degrees out of phase from each other. Those clocks run the Tayloe detector (implemented with a FST3253 analog mux), which is essentially a normal RF mixer, except it provides two outputs, one in-phase and one 90 degrees out of phase. Those are amplified and fed to a computer, which does all of the DSP magic.

Very crude explanation. If you want to learn more, the Ensemble RX II site might be a good starting point. Also google.

Clock Source

So the clock source is an important part of this particular kind of software defined radios. It needs to be accurate, stable and variable. A commonly used chip for this kind of applications seems to be the SiLabs Si570. The particular model I bought (the cheapest) can provide a variable clock from 10MHz to 160MHz (it can also go a bit below and above that range, if pushed) at CMOS levels. They're not cheap, especially in small quantities. I ended up ordering two of them from ~15GBP each. Because of their price, I wanted to try it out as simply as possible, so I made as simple as possible breakout board:
Having it on a simple board like that allowed me to familiarize with the chip before I started building a complex software defined radio around it.

After some testing and poking with a Bus Pirate and figuring out how to control it over i2c. I built a simple circuit on veroboard with an Atmega88 and some voltage regulators. That Atmega would get commands through UART and control the Si570. Then I wrote some extremely bare code to be able to change the frequency pretty much randomly. Better coding could wait until the end.

Tayloe Detector and Amplifiers

After a working clock source and some way of controlling it, I moved on to the tayloe detector. I designed a board, following the Ensemble RX II schematics very carefully. It lincudes the 74ac74 circuit for changing the single clock input to two clocks with their phase separated by 90 degrees, the Tayloe detector and amplification.
After milling it at my university, I moved on to soldering it, in small pieces. First the 74ac74 and testing whether or not it works.
Checking the clocks coming from the 74ac74 with my oscilloscope, it seemed to work just fine, so it was time to move on to the Tayloe detector.

The Tayloe detector was a bit more complicated to test. I used my previously featured USB function generator to generate a sine wave as the antenna input. If it is generating a 3.01MHz sine and the clock from the Si570 is 12MHz (which gets divided to 3MHz by the 74ac74), I should get a 3.01MHz-3MHz=10kHz output from both of the Tayloe detector outputs, with the other one leading by 90 degrees. If I set the function generator to output 2.99MHz sine, I should get an output frequency of 10kHz (2.99MHz-3MHz=-10kHz) on both outputs again, but the signal that was leading by 90degrees should be trailing by 90 degrees now.

In any case, here was my test setup.
As a matter of fact, it did not work for the first time, I just got some horrible waveforms. That was because I had some bad wiring in there. After noticing the flaw, I cut traces and addded jumper wires, after which it worked just fine. The error showed the importance of testing and knowing how to test whatever you are building.

In any case, it was time to move on to the amplifier. It was more of a piece of cake. It worked just fine. I'm using OPA357s as the amplifiers, by the way. The reason I'm using those instead of the LT6231 used in the Ensemble RX II is I had some OPA357s already and couldn't find a fast and cheap source for a LT6231. They're not as good, but close enough.


I built a dipole for the 20m band from some wire. It just so happens that I can just about fit it inside my city apartment. The software running on my compter was HDSDR. After tuning my Si570 to the band, I did actually manage to listen to some amateur radio conversations. All the way from France. Cool.

The noise floor was very high, though, around -70dB. I tried adding some copper shielding, but it didn't seem to help. I figured the fact that I'm in the middle of a city and I don't have any kind of filtering at all might have something to do with it. So after a couple of days I went to my parent's place, which is farther away from the city. The noise floor was closer to -100dB, a substantial improvement! I could hear a lot more and from farther away. Listening to ham conversations from Ireleland and Italy were not a problem.

Here are some pictures of the output. The wide green/red blobs are amateur radio operators sending voice modulated as SSB.
In the first picture the frequency displays are not correct, both of the pictures are from the 20m band.

Final coding

The final thing I moved on to was finishing up the coding of the Atmega88. The Si570 is not an easy chip to configure. I've uploaded all of the code to my GitHub account.