Homebrew, open source, repurposed, hacked, software defined, open hardware

Sunday, 4 December 2011

Client - Server model for software defined radios

having run some cabling from the bedroom to the study for the HPSDR
(USB extension lead primarily, plus a Cat6, Cat5, power, data and sundry audio for future mischief)

I could then run the HPSDR in the study

from the netbook in the bedroom. The netbook is running the ghpsdr3 software for the HPSDR, and in particular, the dspserver and hpsdr-server software which can allow clients on the network to access the HPSDR remotely

The white USB lead goes to the USB extension lead which goes to HPSDR in the study. The blue lead goes to the ADSL/router in the comms box...
And then the PC (ghpsdr3 software is installed too) hooked up to the TV is able to access the server application on the netbook, and is running QtRadio, the "remote head" part of the ghpsdr3 suite of software, which could also run on the netbook if I wanted to. End result, the TV in the lounge is now a remote head for the HPSDR!

The TV is tuned into a broadcast band AM station.

One can also run John Melton's (G0ORX) android remote HPSDR app, and here's the android tablet doing this over wifi:

Monday, 27 June 2011

Thoughts on tuned loop variable capacitors

While reading Jim VK5TR's article in July's Amateur Radio Magazine, Jim bemoaned the very narrow useful tuning range of butterfly variable capacitors, with fractions of a degree of rotation greatly altering loop tuning, necessitating the parallel addition of a fixed capacitor to the variable capacitor.

It occurred to me one could use cam or nautilus shaped plates in the variable cap on the loop.

Imagine, if you will, a capacitor with two plates which are circular. Rotating the plates axially 180 degrees relative to one another does not change the capacitance.

Now, add some lobes, like a cam in an engine, or like a nautilus profile in and old
school temperature controller or on nautilus  gym equipment.

Rotation of the cams from 0 through 180 degrees will yield the same capacitance
as the two circles when the cams  are at minimum engagement, and when the
lobes are at maximum overlap, the capacitance will be (the capacitance of the two circles at minimum engagement) + (the capacitance of the the two overlapping lobes).

Ideally, the cam profile should be calculated to allow a linear increase in frequency across the desired portion of the band through which the loop is to tune as the capacitor is rotated from 0 to 180 degrees . If you are really keen on a particular part of the band, the cam could be modified to "stretch" this part of the band, to allow finer tuning.

See attached picture. I have only shown a simple two plate cap, but obviously for
higher Q you would implement it with a rotor betwixt two stators, etc....

Excuse the graphics, the GIMP is not ideal for this sort of thing.

Something for the must try this sometime list.

Custom RF and AV wallplates

Commercially available AV wallplates don't always blend in with standard wallplates, and sometimes you simply can't get off the shelf wallplates with some types of RF connectors.

This is how I use blank wallplates which match my existing wallplates to make custom AV, radio and whatever wallplates.

First of all, decide where to put the connectors. This will depend on connector size, wallplate size, wallplate curvature, ease of connector use if closely spaced, and loss of strength if you swiss cheese the plate too much, and of course, aesthetics.

In this case, two N connectors will be mounted, with their centres spaced 13 mm from the centreline. A set of calipers is used to score the plastic. The wallplate has centrelines already moulded in.

Having done this, carefully drill pilot holes centred on the marks.

Next, a step drill is used to make a hole the right size for the connector body. Step drills are indispensible for this sort of thing.
Next, accurately mark the wallplate where the mounting screw holes have to be drilled.

Then carefully drill at the marked locations

Then mount your connectors

Then prepare your cabling for the connectors and mount the wallplate.

Then use it! This wall plate brings the quad band antenna to the FM8900.
N connectors are better than BNC or SO-239 connectors for VHF, UHF and microwave bands, as they are less lossy on account of better impedance matching as the RF makes its way through the connector, and can handle fairly high power levels.

Thursday, 9 June 2011

Fixing the OzRoll roller shutter controllers once and for all

To summarise, OzRoll (TM) make a pretty solid and nice roller shutter, which we wanted in our bushfire prone and cold location.

The roller shutter controller which comes with the roller shutters uses an ATMega to monitor for key presses, raise and lower the roller shutter, decide when the roller shutter has finished moving, and, decide when and for how long the NiMH battery pack needs charging.

Unfortunately, the NiMH battery packs seem to die fairly easily, and we had four or so dead on arrival, as the roller shutters were installed some time before the house was ready to move into. Googling revealed multiple sources of replacement packs for about AUD$80. Ouch.

An early enquiry made to the installer revealed that OzRoll, the local manufacturer, had said that after 6 months or so, the batteries were out of warranty, so tough luck.

Disassembly of some of the roller shutters was undertaken to exclude mechanical causes for excessive motor current requirements.

The front panel was removed by drilling out four rivets. No dead rodents or invertebrates of note, even after lowering!

The roller shutter axle was easily dismounted from the motor and opposite spindle.

The physical build was very good. I couldn't fault the engineering. The motor was nice and solid looking, and the power cable inlet appeared to be fairly well sealed.

Continuous power to the nominally 12V DC motor was met with continuous rotation.

Testing found that the instantaneous turn on current when initiating movement - with the roller shutter disconnected from the motor! - was as much as 4 amps. So, even a partly cactus 1500mAH battery pack was going to struggle.

The roller shutter motor, it turns out, has no start or stop switches, and the controller's ATMega was smart enough to be able rely on a sudden increase in current from the power supply to determine if the roller shutter has finished moving.

I suspect the flashing red LED (D8) on the roller shutter controllers saying they needed charging kicked in at some point and gradually drained the batteries in the roller shutter controllers until they were dead.

There is a position on the circuit board for a small on off switch has been bridged with a very puny wire link in all the controllers - who knows, this simple switch may have saved four or five NiMH battery packs from dying, and who knows how many others in other customers' roller shutters that are now in land fill.

I made a subsequent call to the manufacturer, leaving a message asking about replacement battery packs, but was never called back.

Unfortunately, the charging algorithm in the controller seems a bit broken, and allows ongoing charging with about 160mA for a predefined period. It does not seem to turn off when a certain voltage is reached in the battery pack, or care about the battery pack temperature. This would probably explain why the battery packs get so darned hot with charging. I would have thought with such a capable microcontroller, they could have done a bit better with the charging algorithm

I was reluctant to spend another AUD $400 to get battery packs which would eventually die in service as a result of slightly brain dead charging and excessive current demands.

Anyway, a few minutes with a soldering iron, some cable, a solder lug and a DC barrel connector and you'll be able to run the the controller off an external SLA battery. If you cut the circuit board track going to the LED (D8) which flashes when the controller wants to charge battery, you won't be annoyed by the ATMega's complaining about its inability to initiate a charging routine.

I was surprised by how puny the wire link was where the switch was supposed to go - it had to handle up to 4 amps at times. Most of the time the current required was between 1 and 1.5 Amps, well within the rating of a 2.5mm DC barrel connector I intended to standardise on.

First of all, after disassembling with a Torx screwdriver, and removing the battery pack, the original charging socket is removed to make way for the new power lead, and the wire link is removed form the empty switch position to allow make a beefier terminal to be put in for the positive of the new power lead.
After desoldering these, a bigger wire link is put in where the small wire link was, and the original charger plug opening is widened enough for the new power cable.

Then, cut the track to D8, the red LED that flashes whenever power is disconnected from the ATMega, and whenever the ATMega decides a charging session is in order. This is superfluous when an external power supply is used, and is an unnecessary annoyance. 

Having cut the track to D8, you can then prepare a negative terminal for the power cable. The positive terminal using a bigger wire link was a no-brainer, but there was no big fat nice place to solder the negative lead. Luckily, the back of the board is a ground plane, and a mounting screw in the middle of it was perfect for holding a negative terminal to the ground plane. Lacking a suitable tab, a second hand 13mm = 1/2inch copper pipe clamp was soft annealed in the fireplace, hammered flat, and trimmed to suit a patch of ground plane which had the solder mask scraped away.

After this, the power lead can be soldered to the +ve and -ve terminals.

And then put it together.

The unit can then have a DC barrel connector attached, paying careful attention that you make the positive lead (white stripe in the above picture) go to the centre of the DC barrel connector, which is the usual convention.

I will have the DC barrel connectors plug into a blank wall plate to the left, with DC barrel sockets. These barrel sockets will be wired to a compact 12V 3.3Ah SLA battery (only AUD$20 from Altronics!) which will be located further down the wall, in the wall cavity, with a standard wall plate covering the battery enclosure.

It is very important to have an inline fuseholder with a fuse, close to the battery, as shown above, to avoid exploding batteries and/or fused wires in the event of  accidental shorts. Lead acid batteries can explode too, if hydrogen leaks and finds a spark, but hey, other battery chemistries can explode too.

With the battery being terminated in a DC barrel connector on the wall plate, it can be charged with an SLA fixed voltage and current limited charger plugged in on an occasional basis, or, additional wiring can be run to the same wall plate to bring a charging circuit to the battery from a central location, which can be turned on as required, or fat DC cabling can be run to the controllers from a central location.

As a bonus, there's 12 volts on tap in the wall whenever you need it (within reason given the 3.3Ah capacity) for a radio transceiver perhaps...

As mentioned above, in a bushfire prone area, reliable roller shutters are important and mains power cannot be relied on in emergencies. Having a dedicated battery for each controller was an important consideration for us, and the mod described above even allows a separate power supply to be used with the controllers in case of emergency.

Cable, solder tag, and battery, about AUD$25. Even after adding a wallplate or two, some cable and a fuse and fuseholder, it sure beats a soon to be dead AUD$80 battery for each controller.

I'm sure the engineers were capable of making a more robust controller, but I can't help wondering if they had to contend with marketing who wanted a nice compact sleek unit, and went with 12x1.2Vx1500mAh AA NiMHs as a result.

I hope this helps similarly afflicted consumers out there, but it's not my fault if you void your warranty, kill your controller or hook up a high current power supply the wrong way around and melt something or burn the house down.

Thursday, 2 June 2011

Finishing off the SDR Cube transceiver part 2

Here's the softrock 6.3, built for installation in the SDR cube, with the plug in RX (receive) amplifier board installed (the one with the white rectangular relays on it), and with the TX (transmit) power amplifier (PA) board plugged in (the one with the black heatsinks).

Different amateur or shortwave bands occupy different parts of the spectrum, and the receive circuitry and transmit circuitry need to be fine tuned for those frequencies. The softrock design is modular and allows TXPA and RX amplifier modules to be built and plugged in for the particular band being used, in this case, the 80m band. The 80m band is not too far above the AM broadcast band, around the 3.5-3.7MHz portion of the dial, and like AM radio stations, improves at night.

The LPF board was built next, here's the top, followed by the underside. The LPF board jumpers provide selectable low pass filtering of harmonics when transmitting on various bands.

The next step was installation of the aluminium sub chassis to which the IO board and softrock attach. The already built and tested digital components are on the right of the enclosure.

Next is the wiring up of the DSP sub board:
Which then has its cables fed through the relevant bits of the chassis to get to the softrock

The IO board has already been attached to the sub chassis, along with the display board with the LCD and controls. Note the cable tie securing the high efficiency switch mode regulator to the sub chassis:

Next is the installation of the DSP board, the softrock, the LPF board, and finally, the attachment of the various cables:

And then putting the lid on the unit.

After assembly, the I/Q receive and transmit balance is adjusted to optimize opposite sideband suppression, output power is set to about 800mW, and the DDS is fine tuned using a known frequency, in this case, I used an AM broadcast station.

The software was also upgraded over the serial port enabling updated firmware to be installed with support for WSPR beaconing.


The WSPR beacon code was added to the SDR Cube firmware by Roland Etienne F8CHK.

This is the beauty of open source and open hardware projects. You can add whatever features you like because the code and design is open, and anyone in the world can join in.

I need to resist the urge to code tetris to run on it... a morse code practice module would be more practical....

Here it is, receiving an AM broadcast station on upper sideband. The software is "adding the carrier" and then performing "detection" to demodulate the audio, ending up with same outcome as a BFO (beat frequency oscillator) and detector (i.e. a diode or a cat's whisker in a crystal set) would in an analogue receiver.

This demonstrates nicely how all the information needed to transmit information (voice in this case) can be contained in just one sideband, with the carrier and the opposite sideband being basically redundant and a waste of transmitter power.

Monday, 30 May 2011

Finishing off the SDR Cube transceiver

I finally got around to starting the final bits of the SDR cube transceiver I started a while back. It's a self contained SDR (software defined radio) transceiver made from a kit.

see: http://www.sdr-cube.com

I have already built the Softrock 6.3 which mounts inside the SDR cube, and now need to make the transmit power amplifier (TXPA)) board, and the low pass filter (LPF) board, and the receive amplifier (RXPA) board.

I have started with the TXPA board, and first of all, the surface mount components.

Surface mount soldering used to be a bit scary, but this technique using a sub $40 hot plate (skillet to those of you abroad) and solder paste, and a simple 3mm (1/8 inch) aluminium heat transfer and lift off jig makes it a 10 minute process to solder the whole board.

You can see the full write up of the settings used and the process at my local amateur radio club - Adelaide Hills Amateur Radio Society -  website:


I have done many runs with this hotplate starting at room temperature, and have found with the help of thermocouple readings that starting at ambient on setting 4 gives you a really good approximation of the recommended JEDEC heating profile if you turn it off at 250 seconds, then allow the thermal inertia to continue for another 30 seconds, and then lift off the board at 280 seconds.

A commonly asked question is why not leave the whole lot to cool, and skip the lift off. The answer is that the thermal mass of the hotplate is too great, and will cook the board and components after 280 seconds have elapsed, but lifting off gives you the ideal cooling down profile.

Some people use small toaster ovens, but these were more expensive when I went into Cunningham's warehouse, plus removing the hot board with molten solder is harder with a toaster oven, and some people report overheating plastic components with the heat coming from on top of the board.

First, you apply the solder paste with a toothpick or needle:

Then you place the components - tweezers work well, others use vacuum pickup devices bodged together with pen barrels, needles and aquarium pumps:

Then you turn on the hotplate. This is a cheap ~AUD$40 Tiffany branded hotplate which follows the recommended JEDEC heating profile on setting 4, and is then turned off at 250 seconds, and then with the boards lifted off at 280 seconds to cool, it works a treat.

The hotplate is unplugged at 250 seconds, and at 280 seconds, the boards are gently lifted with the simple jig made up of a 3mm (1/8 inch) aluminium carrier plate, and some support arms with a handle at the left and a fulcrum at the right. The jig can be gently lifted up and supported to get the boards away from the heat source.

The carrier plate spreads the heat nicely, allows the boards with the still molten solder to be gently lifted without dislodging the components, and allows the heat source to then be removed after it has been chocked, in this case, with the nearest thing handy - a tissue box.

After things have cooled enough to allow the boards to be handled, you can move onto the through hole components.

So, in summary, surface mount soldering need not be expensive, difficult or scary for the newbie. It really can be this quick, easy and cheap to do at home.


specs for the hotplate / skillet used for the SMD reflow. The unit weighs 2.4kg, and apart from the hot plate with embedded element, there is little else to it, other than the sheet metal enclosure, knob, and plastic feet. It is nominally rated at 1500W, and appears to use a bimetallic switch for heat regulation. I suspect my setting 4 is actually "always on" for the 250 second runs. The hot plate portion is 190mm round, and quite magnetic, suggesting that it is iron, as opposed to cast aluminium.

Friday, 27 May 2011

USB sniffer made from a USB power injector kit

I liked the idea of a USB bus sniffer that could be interposed between the computer and the peripheral, as described in a recent silicon chip magazine. I thought it might come in useful for anticipated Arduino hacking in the near future.

I thought about what was needed to make a board to fit the USB A and B connectors, and then having to source the connectors from dead hardware like a discarded printer, and then find a suitable enclosure which would allow USB port accessibility. Hmmm. I then saw a USB power injector kit on sale at Altronics for AUD$12



well, this was 90% of the work already done, and all that was needed were some banana posts for the D+, D-, 5V and Ground terminals, and as a bonus, it could inject power for whatever peripheral I was working on.

An extra switch seemed worthwhile to switch between the PC 5V USB supply and external plugpack 5V power injection.

Here's the modified circuit, with due deference to Silicon Chip's original circuit.

How the board comes:

How the board comes bottom side view. Not a lot of space for four connectors, but just enough, it turns out:

Holes were drilled where space was kind of available for the banana post stems for the D+, D-, 5V and Ground connections, and an extra hole to allow a 10uF tantalum to sit out of the way of the Ground banana post:

The box lid was drilled using the circuit board as a template to match the banana post locations, and for the DPDT miniature switch. When finally assembled, the red banana post does not have the nut attached, as it would likely short out the LM7805 heat sink:

The lid was then put together followed by the board trackwork being cut to allow the external 5V supply to be switched in and out, and to allow the banana posts to be connected, and to keep components which would get in the way to be re-routed:

The board was then populated with components on the top side, and the DPDT switch was then wired to allow pass through for the USB B -> A power, or via the power injection circuit. One of the tantalum cap legs had to go into one of the new holes drilled to keep it out of the way of the Ground banana post, and two resistors had to go under the board to keep them out of the way of the D+ and D- banana posts:

The underside of the board was finished off, and the 5V banana post got its own PCB island just north of the LM7805 heat sink for the wiring from the switch, which then went on to the Type A USB connector. Hint for young players - the stems of the banana posts wet very easily with solder if you spin some 180 grit sandpaper or similar around them to get through the oxide layer on the electroplating before you solder to them. Scraping with something sharp will also do the trick:

Finally assembled:

The switch allows selection of the 5V source, and the red and black banana terminals gave 5.15V from the netbook and 5.01V from the internal 7805 regulator when running off an external plugpack.

Green and white are D+ and D-.

The original article describing the bus sniffer showed a 1 ohm resistor that could be placed in series or shorted with a jumper to allow measurement of the current being drawn by the device. This seemed a little superfluous if a power supply with a current readout and/or current limiting is used for external powering of the USB device with this unit, but a jumpered resistor could be shoehorned into the box if one were really keen.

So, in conclusion, if you want to build a USB bus sniffer, a power injector my be an easy way to do it, with the added bonus of not frying your USB host if things go a bit haywire with power requirements.

I suppose I should get my hands on an arduino now.