My primary goal of this project was to envelope modern SDR software and hardware in a traditional package, making the user experience less "black boxy" and more familiar to those of us who've spent our lives operating what's now considered "Legacy" hardware. In other words, I want the operator to sit in front of a RADIO rather than a computer monitor, keyboard and mouse.
What I'm finding to be a challenge is in how to integrate "off-the-shelf" systems and hardware into the form of a traditional radio. Getting it working is only half the battle, the other half is getting it to work the way I want it to.
An example of that is the simple matter of turning the rig on and off.
Backing up a bit: Architecturally, the "back-end" of the rig is a modified SoftRock RXTX V6.2 connected to a Raspberry Pi and 7" touchscreen via a USB sound card. This makes for a fully-functional "black-box" transceiver on it's own, but it's hardly a traditional package; I want knobs, switches, and the ability to cover all HF bands (possibly including 6 meters...) That's going to take some more hardware - and a LOT of noodling!
Since I've already built several rigs using Arduino controlled Si5351 synthesizers, that was a natural place to start - I've already got working code to handle this, plus switch the necessary filters and all that jazz. The trick was in getting the Arduino to talk to the Pi so that the frequency displayed by Quisk would track that tuned by the Arduino.
Getting that working wasn't as bad as I'd thought, thanks to Pavel, CO2WT's FT857D library. By integrating this with my Arduino code, I was able to take advantage of the off-the-shelf Hamlib libraries to get the Arduino talking to the Pi: Quisk think's it's controlling an FT-857.
So, at that point, I had two single-board computers talking to each other and the encoder/synthesizer and all was good. All was good, except that I had no clean way to turn them all on and off together... That took a few nights to figure out!
Referring to the diagram above, switch S1 is a momentary pushbutton that, initially, is shunted by 1/2 of K1. When S1 is pressed, power is applied to the Arduino and Pi through a DC/DC Converter (more on this later.) Once the Arduino is initialized, port D5 goes high, turning on Q1, energizing K1. Meanwhile, the Pi is still booting; once it does, it, too, sends a high (from GPIO23) to the base of Q1. In that manner, Q1/K1 will be turned on when the Arduino OR the Pi are running.
Why the wire OR? This drove me nuts: When a serial connection is being established to an Arduino, the first thing it does - by design - is force a reset. So, what would happen is that the Arduino would boot first and suck-in the relay, but when the Pi'd boot a few seconds later, the whole thing would shut down. The "Wire OR" keeps the relay energized while communications between the devices are being established.
Once powered-up, the "cold side" of S1 is re-routed through the 2nd set of K1's contacts to Q2 and Q3. So, pressing the switch will then turn those transistors ON, placing logic LOWs on Arduino port D4 and the Pi's GPIO24. Code in the Arduino switches port D5 Low, and a daemon running on the Pi initializes it's shutdown sequence such that it's final act is bringing GPIO23 LOW, de-energizing Q1 and K1, killing power to the DC/DC converter module.
It took a hell of a lot of head scratching to get this working, but man, is it ever cool!
Going back to the DC/DC converter for a minute: My first pass at providing regulated 5V used a LM-317 driving a TIP3055. It worked, but ran hot, and I really didn't want to have to bury a large heat sink in what'll eventually be the bowels of the rig. So, I sat down and started designing a switching regulator, and looked over at the tray on my desk that holds paper-clips and other such office effluvia - everyone's got one of those... Anyway, in that tray was one of those USB converters that plug into a car's cigarette lighter; I'd gotten it as a hand-out at a trade show and never used it. Checking the specs, it was rated for 3.4 Amps at 5V - perfect! I cracked it open and installed the guts in a small shielded box that I bent out of galvanized flashing, and, as they say: Bob's your uncle.
With this milestone out of the way, I'm looking forward to the next, and relatively simple task of designing/constructing the audio amplifier stage.
73!
Robert is indeed your father's sibling! Well done Steve. I liked the solution to the 5V problem. But the rest of the post was stressing me out. 73 Bill N2CQR
ReplyDeleteSorry about the stress... Try visualizing the soft, warm, friendly glow of a 6SJ7GT. That always relaxes me when I get wound-up.
ReplyDelete