A headlight to avoid

If you ever decide to put any kind of sensitive receiver on a bicycle, you’ll want to avoid this ugly duckling of the bicycle lighting world:

Nitelights Illuminator 900

Nitelights Illuminator 900

These lights are great from the illumination point of view, and they’re not badly priced either.  However, from an EMC viewpoint, they stink.  I was given one as a present some time ago.  The first night I got it, I mounted it on the helmet, charged up its battery, then went to work the next day.  That evening, tried using the radio on the bicycle as I rode home.  The interference rendered the radio totally useless.

At first I couldn’t figure out why the signals sounded so bad on receive.  I was stuggling to hear repeaters that were normally quite strong.  The only thing that was new was the headlight.  I got home, switched on the set in my room and tuned to 2m sideband, then put the headlight on flash.  The tell-tale static from the radio gave away the headlight as being the culprit.  Worst of all, the emissions weren’t conducted, they were radiated.

Since then I’ve spent the last few months trying to figure out ways to make this headlight less noisy.  The following page serves as a notepad, and I’ll keep adding to this as time goes on.

Initially when I used it I kept the battery in my shirt pocket.  This proved to be a fatal mistake, since the roughly ¼? power cable proved to be a very effective radiator of this interference.  I found winding the power lead up into a tight coil and moving the battery to the top of the helmet right behind the headlight helped things a bit.  Adding a 2.2mF capacitor in parallel to the headlight further reduced emissions to make it barely tollerable.

Then the battery pack died.  After a few weeks of non-usage, the cells collapsed.  So for a while the problem solved itself, I could no longer use the headlight.  The headlight’s battery pack runs at a nominal 7.2V (typical 8V).  Since I run a 12V supply on the bicycle, I set about making a step-down power supply that could drop my 12V supply down to 8V approximate to run the headlight.

Initially I tried using a LM7808 linear reg.  This worked, with one major drawback: the linear reg got bloody hot.  Turns out this headlight draws about 1A of current when at full brightness.  That means in order to drop 4V, the reg was dissipating 4W of power.  Ooops!  Poor thing.

I designed a crude switchmode power supply to do the work.  Using a voltage divider to provide a voltage reference, I used a LM311 comparator to detect when we were under voltage.  The output signal from this would pull down on the gate of a IRF9540N MOSFET which acted as the main switch.  Hysteresis was used to fine-tune the switching behaviour.  Capacitors at both sides would smooth the waveform.  470µF was used on the input side, 330µF on the output (we still have that 2.2mF capacitor not far away).  I also made liberal use of 100nF decoupling capacitors to try and control the rate of switching.

On the breadboard with a dummy load, my circuit performed pretty well.  A fairly smooth output with a bit of ripple at high load.  I mounted it in a box and tested it with the headlight, and presto, the headlight was back in service.  I mounted both on the bicycle directly, so as to minimise cable length and therefore radiation.

Since now the radio shared a power rail with the light, I knew there was potential for conducted emissions to cause problems as well as radiated.  The next evening I tried it out… 2m was lousy with the headlight turned on.  The good news is that it wasn’t much worse than before, but it still rendered the radio useless at times, particularly if the signal was weak from the repeater.

Recently, I added some 470µH inductors in series with the headlight and my switchmode power supply.  I also tried common-mode chokes to no avail.  A 1mF capacitor has been added in parallel to the 470µF capacitor in my power supply to further try and reduce the noise.

Low-pass filtering on headlight

Low-pass filtering on headlight: 2.2mF capacitor in parallel, 470µH inductor in series

Part of the problem was that I was shooting blind to try and find the interference.  Today, whilst tuning up the HF antenna, I decided to experiment and see what bands this headlight had an influence on.  To my (unpleasant) surprise, interference was severe right down to 80m.  I used the spectrum analyser built into the FT-897D to hunt for the culprit, and found it lurking at around 400kHz.  When the power supply initially starts up, it’ll be up around there, then it sinks down to 392kHz as the case warms up:

Noise from the headlamp detected around 400kHz

Noise from the headlamp detected around 400kHz

This appears to be the fundamental frequency for the switchmode power supply built into the headlamp.  It would appear to have a fairly sharp square-wave type pulse, as it contains very strong odd-order harmonics.  The same interference can be observed at around 1260kHz (3rd harmonic).

The fact that this frequency is so low, probably suggests it is being intermodulated with a parasitic oscillation at some higher frequency.  This I have not yet found, the CRO showed some other hash over the signal, but I will need to do some further investigation, probably with a more sophisticated spectrum analyser than the primitive one found in my transceiver.

I’d be interested to hear from others who have had issues with these headlamps.  In particular, interference to AM/FM radio reception or transceiver operation would be quite useful if the need to persue this with the ACMA ever comes up.  The manufacturer of the headlights has so far been unresponsive to my queries, so in the meantime I can only recommend that people avoid using these headlights if they intend to use any kind of radio receiver whilst riding at night.

In the meantime, I’ll be chucking further notes here as I find more on this issue.

VK4MSL/BM: New HF antenna

Well, I figured I better post up pics and notes on the improved antenna design for my HF bicycle mobile station.  I spent some time tuning it up today, and without resorting to the autotuner, I’ve successfully managed to tune up all bands available to me from 40m through to 6m.  80m still remains ellusive however.

The new design incorporates a version of the autotransformer used in the earlier attempt, using more turns of wire on the same size former, and multiple output tap points.  This allows me to accomodate a very wide turns ratio to match the antenna to various bands.

VK4MSL/BM HF: The autotransformer

VK4MSL/BM HF: The autotransformer

 

Band Test Frequency Primary turns Secondary turns Approximate SWR Comments
80m 3.590MHz 1 90 Too high to measure This seems to get the strongest signals. Autotuner is able to tune from here.
40m 7.120MHz 26 48 ~2:1 +/- a turn on the secondary to cover the entire 40m band.
20m 14.210MHz 26 1 ~1.2:1
15m 21.200MHz 26 27 ~1.4:1 Slightly out, there is probably a better one.
10m 29.200MHz 26 27 ~1.1:1
6m 53.000MHz 26 52 ~1.2:1 +/- a turn on the secondary, able to hit VK4RBX with 10W from the driveway

 

On the top of the autotransformer are for selecting the secondary tap; one of 0 turns, 25 turns, 50 turns or 75 turns (caveat; I might be slightly out with my counts here).  Having done this I think in hindsight I’d have been better off moving the 0t one down to maybe 10t instead, as there aren’t too many bands that seem to work on the 0t setting.  The primary side is selected by means of a wire soldered on to a thumbtac.  The wire wraps around the tube with a piece of balsa wood for the pin to stick into.  You select the turn by piercing the insulation as you push the thumbtac through the wire and into the balsa wood behind.  Crude, but it works.

VK4MSL/BM HF: Primary tap

VK4MSL/BM HF: Primary tap

In place of the CB whip, I have taken a fibreglass whip and cut it down, stripped the winding, and used it as a support with a base-load spring to take any shock loads.  In place of the original antenna winding, is two sections of brass tubing which telescope out.  This allows for an antenna that can be partially dismantled and reassembled on the run, unlike the other antenna which was permanently fixed at 6′ length.

VK4MSL/BM HF: Mark II

VK4MSL/BM HF: Mark II

I have a third solid section I can insert in there too, which would further extend the antenna to 2.5m, but it becomes very top heavy when I do this.  The antenna can extend to 1.6m length, or for portable use I can throw a wire up into a tree, or support it using a squid pole and connect that wire to the autotransformer output taps.

I didn’t make any contacts while tuning the thing up, although I was hearing New Zealand on 20m quite strongly, and on 10m I could hear the VK8 (Northern Territory) beacon going quite well.  I tried a few calls on 28.390MHz, but had no contacts.

 

I’ve also re-inforced the antenna bracket.  Prior to doing this the antenna would sway wildly from side to side.  Yes, it meant the cars gave me a wide birth (something I greatly appreciate) but I fear had adverse affects on the signal, and probably was asking for trouble in the long run.  Putting a brace between the two brackets seems to steady things up just a little bit, and now I can rock the bike side-to-side quite violently without the antenna swinging too far.

I’m yet to go mobile with the new improved station.  Weather permitting, I shall give it a try Monday evening.  I have a meeting with Brisbane area WICEN.  Due to headlight QRM I may or may not be active while mobile, we’ll give it a shot, but I should be able to work portable once I get there.

Bootstrapping Gentoo/MacOS X (Prefix) – automatically

Well, I’ve done some tinkering with Gentoo/Prefix on MacOS X.  Not bad so far, although there’s a lot of packages not keyworded… (a bit like MIPS) and some packages I miss from regular Gentoo (e.g. crossdev).  However, we can work on sorting this out over time.

For those of you who aren’t particularly fond of going on a copy/paste fest from the documentation, I decided rather than sit there all night and manually do it, I’d code up a script to do it for me.  Behold: Gentoo MacOS X bootstrap script.

Usage:

$ export EPREFIX="${HOME}/.gentoo/amd64"
$ export CHOST="x86_64-apple-darwin10"
$ mkdir -pv "${EPREFIX}"
$ sh do-bootstrap.sh

Increasing costs

Well, today I got news that the Wireless Institute Australia has decided to change the cost of membership, not in the favourable direction either.  This, on top of a $1 increase in our annual license fees (to $66/year), and substantially blown out costs for obtaining a license.

For someone like myself, who is no longer a student but still not rolling in money, it means if we decide to get involved in this de-facto union, we’re coughing up $80/year.  That’s more than our radio license, which is expensive enough.  Now, I am not a member, never have been… and at the moment I find it hard to justify why membership to an organisation should approach triple figures, especially when one considers that amateur radio is a hobby.

Things like my membership to Engineers Australia, yeah fine, that’s considered a “professional membership” and I can write that off on tax.  (Although I am seriosly considering whether to cull that membership!)  The WIA however does not fall under the same umbrella.  I think things are getting a little extortionate.

Examinations are also a lot more expensive than they used to be.  Apparently if you’re going for a radio license today, you don’t get much change out of $300.  That’s for three examinations (two if you’re a Foundation candidate) and for a “callsign recommendation” (which costs $20 if you wish to choose a callsign, or $5 if you don’t).  If I had to cough up $300 back in 2007 when I went for my Foundation license, I would have left the examination paper on the table unmarked and walked away.  I would not have been able to afford it then, and I would not be a radio amateur today.

Part of this is the agreement that the WIA has entered into with the ACMA.  The ACMA apparently demand that the fees be representative of the cost of the service or some such nonsense.  Once again, I say, this is a hobby.  We’re not commercial enterprise.  We are not using radio communications to make money (in fact for most of us, it’s quite the opposite).  It is therefore not reasonable to treat us like one of your commercial clients.

Some would argue that one needs to support the hobby.  Here I whole heartedly agree.  You don’t however encourage people to join in if you make it financially out of their reach.  Supposing the WIA made the annual cost $200 instead of the near $100 it is now… would they expect to nett more members?  This seems to be the logic, that the status quo will get people rolling in.  Newsflash: it won’t.  It’s probably worth noting that there are some amateurs who will not join no matter what the cost – they believe the organisation is too union-like for their tastes.  This is understandable, and thus perhaps there’s this image problem that may be why attracting members is such a problem.

I myself try to support the hobby by being an active member, lending support to the clubs around me, and generally sparking interest that may entice others to come join us.  Part of this is why I take the callbacks for the WIA news service of a Sunday morning (0900 on 147.000MHz FM).  I hope that by encouraging others to get involved, the community can grow.  This requires minimal expenditure of funds on my part, and I think, is more effective.

Paying $80 to some group in Victoria probably won’t change much around me… but getting out on the bicycle with the radio on board… someone tuning around suddenly hears “VK4MSL bicycle mobile”… Hang on, haven’t heard that before… curiousity gets the better of them and some activity is generated.  Or if not that, it’s the general chit chat between groups about the projects they’ve been working on.

If the bands sound like a ghost town because we’re too busy earning a quid to afford membership fees, then the radio community will die, people will ask “What’s the point?  There’s nobody here!”.  The repeaters here in Brisbane already remain dormant most of the time, and activity on HF is sparadic at best.  Do we really want to encourage this?

I think we need to consider why people aren’t getting involved with their local clubs.  Do we perhaps adopt a model like some parts of Europe, wherein your membership to a given club includes membership in the national body?  Bundle some packages up to offer services more cost effectively?  I for one don’t care for getting involved at a administrative level and magazines aren’t of great concern.  I recognise however that the WIA provides funding for things like public liability insurance and major club projects.  Maybe for those who aren’t interested in politics, there’s room for a non-voting membership that just funds the services needed by our clubs without all the frills?

Whatever happens, it is clear to me that the current trend is not sustainable.  The group and the community at large will continue to hemerage as the populace grows older and daily necessities compete for a chunk of our bank balance.  I think this area by far, is in dire need of reconsideration.

Fun with OS X 10.6

Alrighty… AU$40 and two bus trips later later and I’ve now got MacOS X 10.6.3 installing.

Interestingly, this MacBook’s DVD drive seemingly does not like this disc.  Whilst waiting at the bus stop, I figured I’d fire up the machine and have a look at the disc.  Powered on, inserted the disc, the moment it got to the log-in prompt it spat the disc out.  Fine, maybe that’s a “feature”.  I log-in, then re-insert the disc.  It sits there for a bit longer then spits it out again.

Right, down I march back to the NextByte store where I bought it, cantankerous MacBook in one hand, receipt in the other to try and sort out this disc.  It was then the machine decided it loved the disc so much, it wouldn’t eject it.

10 minutes later in their service centre (no charge thankfully) they managed to extract the disc, re-insert it, and it was happily reading it at that point.  It was suggested that these machines do not like being moved when the disc is spun up.  Probably related to the angular momentum developed by the disc and fine mechanical tolerances owing to the form factor.  I looked at doing an install, but as I was walking down the street I did notice that the drive made the odd noise or two, so I decided discretion was the better part of valor, cancelled, ejected the disc and shut down.

Get home, placed the machine on a flat surface, and repeated the steps earlier.  It did the same “spit the disc out” stunt 3 times in a row.  I have it installing from an external DVD reader, which seems to be putting along nicely — and at least the disc won’t get stuck in this one.  I’ll investigate the internal drive later.

It happily accepted other discs, and if need be, I’ll burn a copy of the Snow Leopard disc as a working copy, at least then I’ve got the original if disaster does strike.  The good news is most of the stuff on this machine will be involving network traffic and not the DVD drive.  And I’ve been informed from two sources that the disc I have includes the Xcode IDE with gcc, so I should be able to put Gentoo/Prefix on next.

And I thought Macs “just worked”? 😉

Apple MacBook first impressions

Well, I took the plunge this week.  One project I was possibly going to wind up working on involved the Unity game engine, which is available on two desktop platforms; Windows and MacOS X.

Being that I’m an absolute 1000% fan of Microsoft!!! (yeah, sarcasm got lost in the text there)… I’ve never used MacOS X, and someone was selling one second hand at what I thought was a reasonable price, I thought, what the hell.  Give something new a try.

I’ve spent the afternoon downloading the various applications that I’ll probably use.  First point of call was Firefox (I’m not a Safari fan) and Thunderbird (nor a Mail.app fan).  I’ve got a few other applications installed too, including VirtualBox 4 OSE, and I’ve moved my Windows XP virtual machine over from my desktop to the MacBook, and it’s happily running in its new home, installing updates.

The machine in question is one of the 2008 models.  Apple have the full specs here.  It’s a little bit lighter to pick up than the old P4 laptop, but solidly built.  Despite being second hand, the battery appears to have quite a bit of life in it too, and it easily trumps the P4 (and the Yeeloong).  I turned it on in the car on the way home (I wasn’t driving), and watched MacOS X flash up with “Welcome” in some 16 languages, before going through the process of creating the first user account and setting things up.

Some things have taken some getting used to, for instance, setting the hostname is done under “Sharing”, not “Networking” where I thought it would be.  The key bindings are completely new to me, and slowly I’m getting the hang of it.  Exposé and Spaces make switching easy.  The machine is nice and responsive running its stock OS X 10.5.6 installation.

I’m considering whether I buy the upgrade to OS X 10.6, I’ll probably take the opportunity to buy a new HDD, and will perform the new install afresh on the new drive.

I was a bit disappointed to discover that Apple do not make available a basic C compiler toolchain as a stand-alone download.  They offer Xcode in their “app store”, for $5.00, okay, fine, but how do I pay for it?  I don’t have a credit card, Pay Pal or other means.  Then I look and see it’s a 4.5GB download.  Bugger that on a 512kbps link.  I’ll see if I can purchase a disc of it from an Apple store, and may look at Parallelis at the same time (although VirtualBox is doing fine for now).

Multimedia has always been Apple’s forté, and this machine does not disappoint.  I did a quick test with the internal microphone, and found the audio to be very clear, with no AC mains hum or other artifacts.  They only provide sockets for headphones and a line-in, surprisingly.  I thought maybe the line-in was switchable to provide the microphone bias needed for a headset, but no.  That said, a couple of mating USB connectors, two resistors and two capacitors, and voila, I should be able to interface a standard headset to the MacBook’s line-in no problem.  It’ll certainly be nice though when it comes to recording some of my LP records to CD.  It also could play DVDs out of the box, something Microsoft Windows XP (in my experience) could not do.

I’ll be looking around at an alternative to iChat.  It has crashed at least a dozen times in the time the laptop has been on the network, and I only turned the machine on for the first time at after 1PM today.  Given its 100Mbps Ethernet between XMPP server (running OpenFire) and MacBook, I don’t see why it should be so unstable.

I have Fink installed, I plan to look into Gentoo/MacOS X when I get gcc installed (even if I have to cross-compile it from my Linux/AMD64 desktop), and for now things are putting along nicely.  I might look at dual-booting (or tri-booting) when I upgrade the HDD, as 160GB doesn’t give me a lot of breathing room.

For now though, I’ll see what the native OS does for me.

The Hypnotist

It was entertainment night at the Senior Citizens Centre.

Claude the hypnotist explained: “I’m here to put you into a trance;
I intend to hypnotize each and every member of the audience.”

The excitement was almost electric as Claude withdrew a beautiful antique pocket watch from his coat.
“I want you each to keep your eye on this antique watch.
It’s a very special watch.
It’s been in my family for six generations”

He began to swing the watch gently back and forth while quietly chanting,   “Watch the watch, watch the watch, watch the watch. .. .” The crowd  became mesmerized as the watch swayed back and forth, light gleaming off its polished surface.
Hundreds of pairs eyes followed the swaying watch, until, suddenly, the chain broke, it slipped from the
hypnotist’s fingers and fell to the floor, breaking into a hundred pieces.

“SHIT!” said the Hypnotist.

It took three days to clean up the Senior Citizens Centre.
Claude was never invited back to entertain

uclibc-0.9.31 + Loongson 2E + bzip2 + -Os CFLAGS = crash

Well, one thing I’ll need to investigate… I’ve been battling a slightly broken bzip2 which when compressing some files, would cause the whole machine to lock up.  Environment is µClibc-0.9.31 based, using gcc-4.5.2.

Everything compiled with the CFLAGS: “-Os -pipe -mips1 -Wa,-mfix-loongson2f-nop”.  The latter flag is really for Loongson 2F but I find it helpful on 2E as well.  Things seemed to go well, except that I had no end of problems with the machine locking up when running bzip2 on some files.  I found it reproduceable while building autoconf within Catalyst stage 1.

It would appear it’s a compiler issue, as when I rebuilt bzip2 using the CFLAGS: “-O2 -march=loongson2e -Wa,-mfix-loongson2f-nop”, it worked fine.  I will have to investigate this further.  I don’t think it’s a MIPS-I vs Loongson 2E issue, my hypothesis is that -Os generates some instructions that Loongson 2E doesn’t like, as I normally don’t have any problems running MIPS I binaries… the thing that’s significantly different is -Os vs -O2.

Gentoo/MIPS µClibc stages

Well, it seems I might have µClibc stages going again, at least for little endian initially, then I might fire up one of the SGI boxes and see about a big-endian version.  For a long while, Gentoo/MIPS support for this lightweight C library was all but missing ever since an ABI change broke the µClibc port back around 2006.

I’ve tried on several occasions to build a new environment, and often I was met with technical difficulties which prevented me from producing a working environment.  Recently, I downloaded Rob Landley’s Aboriginal Linux distribution, both big and little endian variants, and took it for a spin.  Having done that, I’m pleased to report that I now have a µClibc chroot that’s merrily compiling various components of the Gentoo system, and will soon be sufficient to make a seed stage for bootstrapping the port once again.

This should mean new netboot images in the medium term for all little-endian ports (and proper ones too, not glibc-based hacks) and new images for SGI Indy (R4000) and O2.  In theory, support for Octane and Indigo2 R10000 is possible, however the systems I have are no longer functional, only my Indy and O2 still work, thus it’s impossible for me to test media for other systems.  Fingers crossed this initial build will go to plan, and we’ll have shiny new stages shortly.