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

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.

http://wsprnet.org/

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.