A collection of articles, mostly technical ‘notes to self’ that might be useful to others. The occasional bit of random commentary can also be found. You are welcome to share your thoughts in the comments section or directly by email.

  • Longan Nano (GD32VF103)
    This was an impulse purchase, because for some unfathomable reason I really wanted a RISC-V CPU to play with. Sipeed's Longan Nano, a small board based on the GigaDevice GD32VF103 SoC is just that; a RISC-V CPU with a bundle of decent peripherals. There are links below if you want details on this board. The GD32V implements an RV32IMAC CPU, where 'RV32I' refers to a 32-bit CPU with the Base Integer Instruction Set, the 'M' denotes the Standard Extension for Integer Multiplication and Division, the 'A' denotes the Extension for Atomic Instructions, and the 'C' refers to the Extension for … Read more
  • Seeed, 4PX, and Yodel – Really Quite Good
    So Seeed finally dispatched my Sipeed Longan Nano, a little RISC-V SoC that was too interesting to resist. I say finally not because they were tardy, but because it was on back order. I had to write a few words about the delivery, because while I've always been impressed by Chinese suppliers, the ability to track with the level of detail shown below, from Shenzhen to just south of Edinburgh, is particularly impressive. Here's the tracking from Shenzhen, China to Livingson, Scotland Aftership reporting on 4PX transit. So when it was marked as out for delivery with my local courier, … Read more
  • LXD eMail, SMTP/IMAP/WebMail with OpenSMTPD, Dovecot, and Roundcube.
    Email is one of those conceptually simple things that are a lot more complex in practise – get it wrong and you miss incoming mail, or your mail gets lost or junked, or spammers exploit your server. This post is intended for technical people who want to run their own personal mail server, and describes the steps required to get a basic server setup that can be run safely and reliably. The approach I have taken is to run everything in a single LXD container, so that the entire system can be backed up and restored, or even recreated, with … Read more
  • VirtualBox VMDK for Raw Disk Access on a Windows Host
    Do not act on this article unless you are prepared to trash your disks, or if you are absolutely sure you understand what you are doing. Messing with raw disk sectors is risky! VirtualBox allows us to use a disk device directly, rather than using a file as a virtual volume. For me, since I have two SSDs in my laptop, it meant I could tinker with virtual machines without risking my Windows 7 partition, while also being able to boot the VMs on real hardware if I wanted. I never fully got my head around VMDK formats for RAW … Read more
  • The MOS 6502’s Parallel Binary/BCD Adder patent
    The patent for the 6502's ALU adder circuits, now expired, I found while writing a BCD adder in Verilog to go with a toy 6502ish CPU I am designing. So, I thought I'd re-implement it loosely based on the MOS solution. U.S. Patent Nov. 9, 1976 Sheet 1 of 3 3,991,307 The following schematic is unlikely to be needed, but might shed some light on the details. The scans have been pasted together, but don't quite align towards the bottom. Some squinting will be required to make sense of it. There are a few lines that look unconnected, which I … Read more
  • Arduino Yun Reading WH1080 using AUREL RX-4MM5
    Here's the sketch, it just reads and dumps to the console, the bridge can be used to send the data to the GNU/Linux side of the Yun. See the other post on doing this with a Raspberry Pi for some code to turn the data into something useful. I'm using the MCU of the Yun to do the RF stuff, and using the AUREL RX-4MM5 (a proper OOK receiver), it seems a lot more dependable than the Raspberry Pi + RFM01 (or RFM12B). #include <Console.h> #define SHORT_PULSE 500 #define LONG_PULSE 1500 #define SHORT_MARGIN 300 #define LONG_MARGIN 300 int val = … Read more
  • Raspberry Pi reading WH1081 weather sensors using an RFM01 and RFM12b
    This article describes using an RFM01 or RFM12b FSK RF transceiver with a Raspberry Pi to receive sensor data from a Fine Offset WH1080 or WH1081 (specifically a Maplin N96GY) weather station's RF transmitter. I originally used the RFM12b, simply because I had one to hand, but later found that the RFM01 appears to work far better – the noise immunity and the range of the RFM01 in OOK mode is noticeably better.  They're pin compatible, but the SPI registers differ between the modules, in terms of both register-address and function. This project is changing to be microcontroller based, and … Read more
  • PIC/MOSFET PWM Model Train Controller
    Having been unable to resist buying some old Hornby OO Gauge bits from the second hand cabinet in a model shop, justification came from the educational value it would offer my son if I could make a speed controller, perhaps adding a sensor or two – the essence of industrial control and feedback mechanisms. Being three and a half, he just wanted to make the train fly off the track, but at least he enjoyed it. This is a project to create a model train speed controller using the Pulse Width Modulation (PWM) output of a PIC16F690 microcontroller, to drive … Read more
  • Braun ThermoScan Fix – Low Battery Warning Switch Off
    We have a Braun Thermoscan infra-red (IR) thermometer that has been working perfectly for about five years. It started complaining about low batteries and shutting off, despite me replacing with new batteries that I checked had plenty of charge. When I opened it, I discovered that the batteries connect to the circuit board via simple metal clip contacts, and that the contacts had some corrosion on them, which was preventing power from getting to the board, hence why it was complaining of low batteries. So a very simple fix is to just clean the corrosion from the battery terminals inside … Read more
  • LXD now runs my WordPress
    Here are some notes on how I used LXD to run a container for WordPress. This is (a lot) more convenient than using Docker, which was my original approach to getting my WordPress site into a container. The main advantage for me is that a single container runs all the components together – no need for the 'wiring' between containers for each process. There is a bash script that automates this at https://github.com/Kevin-Sangeelee/lxd-wordpress, and is a more complete description of the process since it automatically configures SSL/TLS and Exim. Getting LXD onto Debian Stretch LXD is installed on Debian via … Read more