Tuesday, July 09, 2024

Broadband RF generator (AKA eBike charger)

My new eBike came with a charger. Even though it's about 10m away from my ham shack the radiated noise level is impressive. 

Here's the "transmitter":

Here's the inside view:

Even with external clip-on ferrites on the mains and output cable there is little difference. How can it be legal to sell noise makers like this? Are all the certifications fake or just incredibly poor standards?

As Ralph, VK3ZZC, suggested I have added 0.1uF silver mica capacitors across the large electrolytic smoothing capacitors on the output and this has made a noticable improvement on the radio.

Wednesday, July 03, 2024

Talked tech on ABC Radio Nightlife

I joined Philip Clark on ABC Radio's Nightlife program to talk about technology news including new legislation to combat faked sender IDs on scam text messages, YouTube live stream hacks to promote crypto scams and a look at the new ARM based Microsoft Surface laptops that are challenging Apple.

Audio here.

In the story I talked about trying out the new Microsoft Surface laptop powered by ARM. It's a nice looking and feeling laptop, quite similar to the M2 MacBook Air which I imagine it is competing with. Fit and finish is excellent. More ports than Apple and slightly better value in terms of price per GB of storage and RAM.

There's a new Microsoft only key on the right hand side for summoning Copilot AI features.

I pushed the key and not a lot seemed to happen but I guess, like Apple these new features are being rolled out over time.

Saturday, June 29, 2024

Micropython thermometer using MCP9808 and SSD1306 OLED display

This little post was triggered by reading Owen Duffy's post titled "Arduino thermometer using DS18B20 and OLED display". Even though I'm quite comfortable writing C or C++, I've been enjoying the clean MicroPython environment. These days I've pretty much switched from classic Atmel Arduinos to RP2040 based boards.

I implemented this little thermometer in just a few minutes with two easy to find and install libraries. Here's how it looks:

And here is the code:

import time

from machine import Pin, SoftI2C

import ssd1306

from micropython_mcp9808 import mcp9808

i2c = SoftI2C(sda=Pin(6), scl=Pin(7), freq=100_000)

display = ssd1306.SSD1306_I2C(128, 32, i2c)

mcp = mcp9808.MCP9808(i2c) # , address=0x18)


while True:

    temp = mcp.temperature




    display.text(f"{mcp.temperature:.2f}C", 30, 15, 1) # x,y,colour


The imported modules are mcp9808 for the i2c temperature board and ssd1306 for the OLED display.

I use Thonny for editing, uploading and debugging.

One mystery is that the hardware I2C isn't working for me on the RP2040 board but SoftI2C works fine.

When getting started I scan for I2C devices like this:

i2c = SoftI2C(sda=Pin(6), scl=Pin(7), freq=100_000)

devices = i2c.scan()

print("devices: ")

for device in devices:


Obviously adjust for the pins you've used. The RP2040 is a wonderfully powerful chip. The board I used here is from Seeed studio.

Cheers to Owen for all his great insights and sharing.

ChatGPT is very good at Micropython

While I'm here, an observation about the utility of the Large Language Models. I have been asking ChatGPT to write code to demonstrate how to do things and it's really good!

Around the house I have little devices that use Wifi to poll my solar inverter and show power use and generation. I've been using a third party JSON parser but I asked ChatGPT how to do it and it mentioned a built-in JSON parser that I wasn't aware of!

Built the Sputnik regenerative receiver

When I was a teenager and just starting to tinker with electronics I built a regenerative receiver kit from the local Tandy (RadioShack) store. It was a great success and I was able to listen to the big shortwave broadcasters on it.

I know that Bill often mentions that regenerative receivers may be haunted on his Soldersmoke blog. The DX Explorer site describes a rather neat regenerative receiver named Sputnik. The author also links to a way to order a very nice board from PCBWay. I ordered and quickly received five copies of a very nicely done board.

Most of the components I had but the ten turn pot had to be ordered in. I used a T50-2 toroid core rather than the air-core inductors. At first it didn't oscillate. My initial thought was that the tickler coil was not the right polarity but it turned out that my 2N2222s have collector and emitter reversed. Ralph, VK3ZZC, suggested that they might be fakes but the gain seemed fine.

The coil has a single turn that can be connected to a frequency counter. I have it going to my CRO and it's helpful for reading frequency and seeing when regeneration is starting. While you can, kind of, listen to single sideband, AM is best. Here's a bit from 7125 this morning.

I didn't have any 1N4001s in stock and tried another power rectifier that didn't seem to work as a varicap diode. I did have a genuine varicap in the junk box but it was too sensitive. Richard, VK3LRJ, gave me some 1N4004s and they work fine although tuning is very sensitive.

The radio is pretty hard to operate and one must juggle, RF gain, tuning and regeneration.

My memory might be rosy but the Tandy pegboard kit was easier to use than this design. It might be this one. There's a lot more electrical noise around these days and many of the big shortwave broadcasters have gone so perhaps the golden age of listening to BBC on a three transistor radio are over.

Monday, June 24, 2024

Flying like a bird, the joy of FPV drone operation

Some years ago I used to accompany Terry to a field in Sydney where he would fly amazingly fast while using a video headset. He would run through an obstacle course with hoops standing on the oval. I tried a few times but crashed immediately - I could never put myself in the drone and was always thinking of the sound.

My current drone is home built and rather bashed about but does the job.

One problem I've had is that I need my glasses to see the screen clearly and the solution was to sacrifice an old pair of reading glasses and apply some hot glue.

There is a bit of open space and a tree in the middle so I started slowly and have had a bit of a breakthrough. I was able to take off, fly around the tree, and return and land without breaking anything.

A few days on and I've probably had about ten successful flights and it is a real joy to experience.

Last night, after a hard landing, the drone was not flying well and I lost control. I couldn't see when it was but could see the video from its point of view. It was stuck in a tree. A squid pole was very handy in dislodging it. Next step is to add a buzzer so I can locate it after an uncontrolled landing.

Saturday, June 22, 2024

Listening to the BBC Antarctic Midwinter Broadcast

Tuned to 9585KHz and the BBC's Antarctic Midwinter Broadcast is on. A charming shortwave program with information and messages from family at home. Good signal here in Victoria.

I'm using an Airspy HF+ via SDR++ in server mode. Thanks to Stephen, VK2BLQ for the tip.

Thursday, June 20, 2024

ABC Radio spot about technology

Talked technology on ABC Nightlife with Dom Knight: AI seems to be taking jobs already, AI being used to protect call centre workers, NotebookLM a great new research tool and Adobe being sued for misleading customers.


Monday, June 17, 2024

USB-C cables have vastly different capabilities

USB-C is a wonderful standard. Apart from the ability to plug it in either way up, it supports Power Delivery and much higher speeds.  I've run in to some mystifying scenarios where a cable would charge but not carry data, would carry data but not charge, and lower than expected data throughput.

I'm a registered Apple developer and was keen to try out the macOS 15 Sequoia beta but I'm not an idiot so decided to install it on an external disk on my Mac mini.

The steps were:

  • Used Disk Utility to format a Samsung T5 drive as APFS
  • Downloaded the Sonoma macOS installer via the App Store
  • Installed Sonoma macOS 14 on the external drive
  • Booted from the external drive and enabled Beta Updates in the Software Update settings and chose macOS 14
  • When all that was done I booted from the external drive.
Sequoia seems quite stable and I've been able to build my applications with the Xcode beta.

But.... it did seem rather slow! I used the Blackmagic disk speed test to measure the drive and got Write: 38.9 MB/s & Read: 39.3 MB/s. 

The USB3.1 port is capable of 10Gb/s or 1,250MB/s so something is up.

Changing USB-C cables to one marked as 10Gbp/s I re-measured and got Write: 263.6MB/s & Read: 344.9MB/s. Almost 10x improvement but well short of what's possible.

Today, I bought a 1TB Western Digital drive. Blackmagic gave me Write: 804.1 MB/s & Read: 906.8 MB/s.

The Mac mini has two Thunderbolt/USB4 ports that are capable of up to 40Gb/s so I have ordered a Thunderbolt enclosure.

Oh, and just a note that the speed of the internal SSD on a mac is pretty amazing. Blackmagic measures the internal SSD as Write: 3049.6 MB/s & Read: 2856.4 MB/s. I guess that's why I noticed the slow speed.

Summary: If things seems slow, try another USB-C cable. (I wish they had a standard for markings on the cables with their capabilities).

Update: faster external disk

Wanting to get closer to the speed my interfaces are capable of I ordered an NVMe SSD stick and case from AliExpress. Plugged in to the USB-C socket on the back of the Mac mini I get the same speed plugged in to the USB-C hub outlets on my monitor so I'm using that. Speed is pretty good. Close to 1GB/s.

The enclosures are pretty nice. Mine came with a heatsink, sticky pad and even the screwdriver needed to open it. Not as small or neat as the Samsung T5 but five times faster.

Update 2: even faster external disk

On my quest for a faster external drive to boot from I ordered a SanDisk Professional drive and plugged it in to the USB-C socket on the back of the Mac mini. At 2,677 MB/s this is getting pretty close to the internal drive speed.

It came pre-formatted as APFS.