I had a busy couple of weeks after Christmas. I interfaced pihpsdr to the USB version of HPSDR using an "Ozy" interface board. That didn't seem particularly difficult: the USB protocol uses frames of 512 bytes, while the Ethernet protocol carries a pair of 512 byte frames with the same format. All I needed to do was to queue up USB frames and present the same data to the software. The USB interface code came from "Ozymetis" from the HPSDR SVN repository.

This all worked OK, and John Melton incorporated it into the new build. The new build however introduced some different behaviour, that results in the audio sounding slightly modulated. After a lot of experimentation, I found that the core WDSP radio code operates with blocks of 1024 samples, and it was trying to transfer 1024 audio samples all in one go to the Ozy. That's fine with ethernet, but the USB interface quickly filled the Ozy FIFO and the data transfer stalled. That meant that for perhaps 40% of the time the code was unable to read new RX samples, and sometimes missed some. The solution is to have the USB transmit in a separate thread; that's now been incorporated into John's code base.

Next - a console. What I'm after is a radio with SDR innards, but a "knob and pushbutton" user interface. The pihpsdr design is certainly a big step in that direction. The Raspberry pi has software-accessible I/O pins, which is how John has interfaced his code. There is a commercially available console, but it's very possible to make your own. See here for an excellent example.

My console uses components mostly supplied by Rapid Electronics. A sloping front instrument case provides the home; the Raspberry pi with touchscreen display sits nicely on top. I've used PCB mounted pushbuttons for the menu buttons, and PCB mounted rotary encoders for the E1/E2/E3 knobs. These have a switch activated by pressing them. All of those are mounted onto veroboard inside the box. My "tuning" encoder came from ebay some time ago, and needs 5V rather than 3.3V (I suspect its LEDs in its optical detectors weren't lighting from the lower supply voltage). Its outputs are open collector, so they don't damage the Raspberry pi GPIO inputs which are not, apparently, 5V tolerant. All of my pushbuttons and encoders have 10K resistor pullups to 3.3V. there's no easy way to know in advance the correct orientation of the A/B rotary encoder wires, and I had all mine back to front so a clockwise rotation reduced frequency/gain etc. Those can easily be swapped in the GPIO menu when you first start the program. I used the largest tuning knob I could find - but it is very light; I plan to add a strip of lead behind it to make it more "spinnable".

pihpsdr console 2

Just to prove I've made some code changes, you can just see the Ozy identified as the radio at the top left of the screen:

pihpsdr ozy display

So - an SDR radio with knobs and pushbuttons; and I've written a tiny bit of the code. As and when I do get round to the Red Pitaya, I will know in a fair amount of detail what **should** be happening for the data transfers.

What next? I'd like the radio to have the IF shift & width controls on rotary encoders, so they're instantly accessible (in a contest the only controls that seem to be used are the VFO knob and IF shift/width, so I think they need prominence). The signal processing is already there; I think I know how to change the user interface. I had thought of a few other "usability" changes but John had already implemented them in the new "dual receiver" code.

The Raspberry pi runs happily with the same rate set to 192K samples per second, giving coverage of around half of the 20 metre band. If you turn on some of the noise blanker algorithms, you have to reduce the sample rate to 96000 samples per second. A possible future project would be to add an Atmel microcontroller into the console - for example using an Arduino board - and send the pushbutton/encoder settings to the computer through a USB serial port. That would also allow pihpsdr running on different hardware - eg my laptop, which runs at higher sample rates OK - to have the "knob and pushbutton" interface. It's easy to do, but I'd be getting distracted.....

Using This Site

Searching

The web site can be searched: type a search term (e.g. "DAC10") into the search box on the right hand side of the header, and hit enter. the search engine will find words matching the search string in the main body of the site, but it won't search attached documents (e.g. the product manuals).

"Read More"

Many articles are displayed one after the other. some are quite short, and say "read more" at the bottom. Click that to read the remainder of the article.