Normal view

There are new articles available, click to refresh the page.
Before yesterdayElMarko says things

Let people enjoy things!

Hello - havent't been here for a while. I found this old post from 2021 recently and have decided to publish it. It all started when people at a local radio club opined on a new digital repeater opening up. This is clearly not the worst thing in the world, but for these people it was. And it made me angry.

It has been said for a number of years (or decades?) now that amateur radio is a dying hobby. So goes the story: as communications technology improved and with each successive generational iteration there's been less interest in the hobby because everyone's on their mobiles and Nintendo Switches. Then the world had the unfortunate luck to be sent down the pandemic rabbit hole and many folk decided they needed a new hobby - or wanted to pick up a hobby from earlier in their lives - to fill the endless hours looking at their four walls.

With better technology and fantastic volunteers who remotely administer exams there's been an increase in new licensees this year compared to previous years. The bands around my local area have been full of new, bright-eyed and bushy-tailed foundation licence holders who have put out calls on the calling channels and some local repeaters. The RSGB reports that 2,774 people passed their foundation licence in 2020. Many of them have been children, and I've had the pleasure of talking to two young teenagers recently who seemed keen to learn. Those people are being caught at just the right time in their lives, with it hopefully giving them a push into the STEM field if they so wish.

Many people will join their nearest local club, talk on regular radio nets in their area, and hope to gain lots of knowledge from other amateurs, perhaps getting some ideas on how they can progress in the hobby and where to go next. This advice can be in the form of equipment suggestions or the improvements to an antenna system. These kinds of topics are invaluable to someone just starting out in the hobby, allowing them to progress to the next stage sooner.

One of the first places many people go to is their nearest repeater. For the uninitiated a repeater is like a relay: it takes in signals and it rebroadcasts them over a wider area. Situated usually high on either a tower or a tall building these devices are useful for the kind of starter radio most beginners end up buying, mostly handhelds with small antennas that are used in a mobile fashion. Battery-driven radios of this type won’t be capable of having much of a range given their low-powered output.

And repeaters often can be very social places. Those radio nets mentioned earlier - large conversations between a group of people - can often be found on a repeater, as well as a localised community that may well be listening at other times of the day. Without a large antenna on the roof the efficient siting of a local repeater can often mean it is the only contact a newly-licensed operator can reach - thus allowing them to talk to a much larger potential group of people for help and advice.

Which is why it's so surprising that the launch of a new system like this can provoke reactionary thoughts from the type of hypocrites that are very happy to throw the word "snowflake" around while responding in a way that suggests they think the sky is falling (they always shout the loudest, don't they?).

Essentially their argument is that repeaters are responsible for a “dumbing-down” in operator quality. They say that beginner operators get stuck on their local repeater and use the system more as a kind-of chatroom. To them the technical aspect of the hobby is more important than the social aspect. And that’s okay, because there’s a huge amount of fun to be had for someone sufficiently nerdy enough or inquisitive enough to be into that. Tracking down pirate radio stations, sending a signal halfway across the room with barely any power, *bouncing signals off the bloody Moon* - that’s definitely appealing.

Through my own experience of talking to new foundation licence holders they’re always super good with their phraseology, they know what to do, and take advice very well. And I’ve heard a lot of old timer GM0 using operating styles that could be described as lazy. Not QSYing away from .500 when established. Not giving callsigns after a series of short overs so you’ve no idea who you’ve been listening to. It's incredibly presumptive to make sweeping generalisations about people's skill levels and aims in the hobby.

And it’s also really unhelpful to think that people are using radio in a way that “isn’t enough” or learning fast enough - all applications are valid and people will progress at their own pace. And of course, for all of the comments about "spinning the dial" if you hear something you don't like, the same is true here. If you don't want to use those repeaters, or interact with the people who do... then don't. It's really quite simple.

It's also another example of people not understanding or accounting for other scenarios, for other people's experiences and situations. We can't all stick a beam up, we can't all afford a huge multi-mode, multi-band transceiver. We work with what we've got and we adapt, and at the end of the day isn't what this hobby is all about? Especially for those of us primarily working with /P operations on a budget.

There’s a little bit of an issue of language here too, driving people away and generally making people feel unwelcome. Now, I’m not going to try to police anyone: just asking folk to consider that maybe talking about people’s stations in terms of being “weak” and “feeble” or “pitiful” isn’t really useful. We know there’s a huge variation of stations and locations, and many will wish they could improve it. It isn’t always our fault and we’re sorry if we’re somehow spoiling your fun.

Of course, many of these issues aren't related to amateur radio specifically. They're societal issues, the result of standard human psychology and a changing world around people that have never really had to consider folk other than themselves. A lack of willingness to consider other people's situations, and a brain wrapped up in a blanket of cognitive bias. Barrelling along with opinions without any inquisitiveness. Reactionary whilst throwing the same charge at people who have the gall to administer some consequences for opinions, or some suggestions on how to widen the scope of someone's thought processes.

There's a huge amount of people now linking amateur radio with other hobbies, using their hacker/maker skills to make all sorts of interesting projects. These people are going to feel ostracised and unwelcome if people are happy to just cast them aside as not worth bothering with, or assuming that those people are in amateur radio for what they consider the "wrong reasons" or using using the technology in a way they don’t find acceptable. I've decided I won't be renewing my membership to my local club: the atmosphere is too toxic and I don't have to put myself in that situation if I don't want to. Personal choice and all that.

The older members of the Amateur Radio community have a choice to make: stop moaning about a dying hobby and do more to encourage folk with kindness, or continue to drive off newcomers like many of them have been doing for years. If wanting people to feel welcome in this community makes me a snowflake then pick me up and put me between two pieces of glass for preservation - I'll wear the badge with pride. I'm very capable of ignoring people's comments and doing my own thing, but I also want the hobby to be inclusive.

And so should everyone else.

HF Spectrum Analysis - Weather Fax

The first thing we’ll look at in the recordings are the weather fax broadcasts. There are several transmitters around the world broadcasting pictures of the weather to all manner of users, but mostly mariners. A variety of images (called “products” in meteorology) are available, with lots of charts, graphs and satellite photos available to decode. The signal is fairly easy to spot with its tone-infused-with-ticking, kinda like a Geiger counter. There’s a tone for white and a tone for black. The ticking on each black pixel will be familiar to owners of dot matrix printers in the past. Solid black, horizontal lines will come in with a full black tone for the duration.

Essentially you get a start tone first of all to help with IDing the start of the image, then some phasing tones to help with timing and where the lines start and end. Then comes the image itself, with the tones for black and white pixels (you'll mostly hear the white of the image coming through, and the black pixels will sound like the aforementioned ticking, unless there's a lot of black like a solid line. Then you may hear a full black tone as it draws that line. You'll get a feel for it soon enough.

There are two main catches for European listeners, DWD out of Germany and the Royal Navy here in the U.K. Sadly the skip zone seems to prevent decent reception of the U.K. stations within the U.K. itself, except for late at night sometimes (which may well be groundwave reception in the end - I’m learning a lot about propagation lately). Its signals are noisy and inconsistent. The German Deutscher Wetterdienst station broadcasting from a site near Hamburg is an easier catch. This tends to boom in, allowing very good quality images to be received, sometimes with an indoor antenna.

A rarer catch, and one I’ve never been able to reproduce again, was the NWS station in Boston. This was a combination of being there at the right time of day on the right frequency for that time. I had some great images with a bit of noise and fading - which is to be expected perhaps, given the distance. Subsequent catches have had the wire set up at different angles, which may not help, but I’ve never been able to get this station again.

And I thought that was my lot, just the three stations. And then, scrolling through a later recording made on the 9th December 2021, I heard a noisy but feint signal with the telltale sound of Wefax bursting in. You get to recognise what signals sound like after a while, and I could hear the ticking of the black pixels coming through with the white tone behind it, even through the noise floor.

Incredibly, after looking at what came through, it seemed to be a Chinese station, with the South China Sea text and the outline of Taiwan clearly visible. I’ve never been able to receive any other stations, so I’ll have to try and receive some of the other ones closer to me now. In future I may try aiming the wire broadside towards some of these stations and try to pick them up at appropriate times for each frequency.

Here's an image gallery from the 22nd Nov with two stations found between 9 and 15 MHz: 22nd Nov 2021 - part 1. Also one single image so far from the 29th - I haven't really finished decoding everything yet, because sometimes it is hard to know where to start.

A full list of all of the world’s Marine Wefax stations is available here from the NWS website: https://www.weather.gov/media/marine/rfax.pdf

I’m not really sure how many users are left who need this technology, but it is envisaged that they won’t last much longer. Years? Decades? Who knows… But for the time being they remain a fun target for HF listening and decoding, with strong signals (stronger than amateur stations, not as strong as broadcast stations) allowing for a fairly easy copy. In terms of software there’s a few choices, but for Windows the easiest is probably FLDigi, although Sorcerer is good too.

Take note of the different parameters for the signal you're decoding - DWD seem to use a different shift, for instance, of 425 hz for each colour, rather than 400. Apart from that it's a really easy mode to decode, and they make nice printouts if you've got a big plotter. If you can read Japanese you can even get news delivered to you in this format, although that is in IOC-288 mode rather than IOC-576, for the increased clarity of the Japanese characters.

Now I need to pick another type of signal to investigate. I'm tempted to look at the weather and marine navigation text broadcasts next as they're another easy decode and plentiful across the bands.

HF Spectrum Analysis - First Look

If you missed part 1 of this, here it is.

For the purposes of this blog I’m going to be looking at the first spectrum recording I made on the 22nd Nov 2021. It has taken longer than I thought to identify, decode, and confirm parameters for a lot of the log, which also goes some way to showing how much information is available in the data. Indeed, I haven't even finished the sheets for both days yet. All of the signals are (mostly) found and logged, but I havent decoded everything yet, and some signals may never ne decoded or confirmed.

The first thing I notice looking at my spreadsheets after colour coding them is how obvious certain band plans jump out at you. Those big chunks of blue and red for broadcast and amateur radio, with occasional large blocks of green for military stations. All of these bands are worked out by international agreement, and generally the system works well to allow a wide range of use across a wide range of frequencies, which suits different propagation at different times.

This isn’t always the case, and there are countless examples of things seemingly “out of band” from where they should be. Some of these bands are shared allocations, but sometimes things appear to just be in the wrong place. Occasionally these stations are legacy arrangements that just survive to the day. Sometimes they are clandestine in nature.

The number of individual signals I seem to have picked up would seem to be around 300-350, it’s hard to say exactly. There were many signals consisting of just a weak carrier with no discernible audio. Sometimes these turned out to be images of other signals produced within the electronics of the SDR. Others exhibited fading as the conditions changed in real time, confirming them as genuine. If I counted all of those I’d have many, many more lines in the log.

The other issue that may hamper data collection is signals appearing fleetingly - not constantly broadcasting but only sending a message when necessary, such as the signal shown in this image. I have to be looking at the waterfall at the right time to see that signal pop up at a particular frequency. I’ve taken to watching the waterfall zoomed out by a fair amount to notice when lines appear, and then winding back to check what it was.

It’s worth remembering that this was supposed to be a kind-of art project as much as anything else, and I’m really surprised how much information there is in here. The audio of the broadcast stations alone would seem to be a useful snapshot of the world on that day, from locations as diverse as Africa, Eastern Europe and Asia. The movement of the aircraft is a huge treasure trove of data. The weather reports and fax images, while a little hard to understand in their broadcast format, are very interesting, and it makes me think of some guy on a small boat out at sea with a little radio and a printer, waiting to see if he can come home safely yet.

We can see from a quick analysis of the 150ish signals I identified with my first recording that the vast majority of stations/carriers seen were from broadcast stations, and it’s been fun and frustrating trying to ID most of those. Pro tip for next time: listen over an hour boundary. But there’s also a lot of military in the mix too, followed closely by weather-related stations. Marine seems quite absent - a lot of it is on lower frequencies that were ill-suited to the antenna. They also use a lot of satellite communications now - as the aviation industry is moving to lately - as well as just not always needing to chat unless they’re in trouble, which is rare.

In later posts I’ll be going through each category of signal and looking at the decoding of them and noting what I’ve learnt along the way. Hopefully the verbose journey I’m taking you on is useful if you’re also getting into this yourself and looking for ideas. It goes without saying that other people on the internet have much more to say and it will be more useful, but it will stand along as a log of my own progress too so I can compare the results later.

I’ll also post some updates about further work that I’ve completed since - the 9:1 unun arrived and I have used it to great effect with much lower noise and just as many signals coming in. I have also experimented with using a length of RG58 feedline and a clip-on ferrite choke to start the antenna higher up rather than on the ground, allowing for a more horizontal configuration. This helped a great deal, and the SWR curves seen in the last post started to drop, revealing a better match across huge sections of the HF bands. Pulling the antenna to a more straighter, tighter setup was, I found, also very important.

I *think* we’ll do the weather fax stations first, because they’re all decoded and there aren’t many of them. When I get around to writing it. There was also a VERY nice surprise in there...

43 Mins of the HF Spectrum

A few days ago I embarked on a little project born out of necessity. I wanted to get into proper HF (High Frequency or "Shortwave") Listening for a while, monitoring radio frequencies between 3-30 MHz. The kind of radio waves that exploit the atmosphere to propagate across thousands of miles. Unfortunately my operating location is a little compromised, a rented flat with no way to get cables outside (not least in November) and a high-density residential area with all sorts of RF noise. In short: I needed to get outside.

I have been using my SDR outside as I’ve documented on the blog recently for capturing weather satellite transmissions. I had wondered whether I could go out and use the same kit for SWL. I had a fiberglass pole, and I had a little SMA-BNC-wire terminals adapter thing so I could attach long lengths of wire to my SDR. Shortwave monitoring requires antennas designed for long wavelengths, tens of metres or more, and so the antennas tend to be quite large.

Luckily that’s only for making an efficient antenna. Broadcast shortwave signals tend to be high-powered and so in reality any sufficiently long length of wire will pull in signals. The wire will - of course - work better at one particular set of frequencies and its harmonics. It should also pull in lower-powered signals well as the SDR is very sensitive and away from interference and other electronic devices.

I opted to eliminate the feedline coax from the antenna to minimise loss, attaching it instead directly to the SDR. I could have run the coax of the wire to the top of the pole and started my antenna there, but would also then have to run a long wire back to ground down the pole, which is extra work. The whole setup took around 10 minutes including checking things with my NanoVNA.

This meant that the antenna configuration was a sloping end-fed wire with a counterpoise that seemed to do something, but wasn’t perfect. I hit record and waited for 43 minutes (until I decided it was too cold to continue standing outside). Pack up took 5 minutes with this setup.

I opted to use SDR++ as I do for all of my SDR work, and the recording was done in its native 16-bit mode. By restricting the bandwidth of my SDRPlay RSP1A to 6 MHz this meant I could use the full 14-bit dynamic range of the device. The recording came out at 58 GB - yikes. Clearly if you’re going to this a lot you need some storage system for it and a good system for organising. But it was a complete success and the waterfall from the first scan looked amazing:

So many lines! Let’s hope some aren’t images or internal oscillations… I also recorded 20 mins worth of 4.8-10.8 MHz that revealed just as many stations. The time of day wasn’t perfect for propagation there, though, so performance was definitely lower.

Five days later I repeated this experiment again, only I went out for an evening trip and also a much lower frequency coverage. I made ten minute recordings of both 0-6 MHz and 7-13 MHz. I also made a 30 second recording of 0-2 MHz with a narrower bandwidth and slightly better signals in to the SDR, making a few stations stronger (or the propagation changed - not sure) and revealing others. A large amount of signals in the MW broadcast band were booming in from Spain, and we’ll investigate this (and other goodies) in later posts.

So, what to do with this data? Well, apart from the technical aspect the project was to see how much information there is in 6 MHz chunks of spectrum. How much image data, text data, voice data and whatnot. How many stations are there, where are they, what are they all doing, and how much can we access. It’s as much an art project than anything else - a block of time frozen and recorded, with content fed in from all over the world.

Going forward I need to think about a better antenna configuration for this to improve the results. I’m essentially using an end-fed antenna without the required unun, so there’s an impedance mismatch. I’ve ordered a Nooelec 9:1 balun and will cut a trace on the PCB to use it in UnUn mode, since it’ll be an unbalanced antenna. Unfortunately I won’t have the space to make a fully-balanced dipole, which would need the PCB in balun mode.

This is also all good practice for when I eventually get transmitting on HF, so I’ll have an idea of what antennas work best and how to go about matching impedances - I’ve never cared for this kind of thing before but it’s important for reducing noise on receiving and hugely important for efficiency and not damaging your rig when transmitting.

I did find the performance on MW outstanding at night, but for serious monitoring I’ll need something a bit more directional, so I’ll be looking into a tuned wire loop for this - lots of loops of wire with a variable capacitor across the ends before it meets the coax feedline to tune it to resonate at a wanted frequency. A bit like those ones you used to get with hifi systems but better. I’ll also be able to rotate the loop to point at the signals I want, or away from unwanted signals to reduce them.

In short I’ve had an absolute blast this week, and I definitely recommend trying something like this in an open area. If you usually operate HF radio portable (perhaps on SOTA/POTA) then why not bring a laptop and an SDR and record some spectrum for when you get home? It isn’t that much extra kit to bring, and you’ll double your fun.

I’ll be blogging my finds over the next few weeks, but I’ve put the two spreadsheets that I'm working on here for you all to look at. You’ll see that I’m decoding data and adding links to it all, and IDing stations if possible where I go.

22nd Nov 2021 - https://docs.google.com/spreadsheets/d/1-Kn1HYU7JaWKGnFhF_Bo9p1GUHMkEPtERuxZL4-GfIg/
29th Nov 2021 - https://docs.google.com/spreadsheets/d/1bMeuhqPOgLfnyG-xEbaMLMlB6S0Nqf9f_9J56PII-aY/

Shitty Amateur Electronics - Part 15: Data Mode Radio/PC Interface

A post where I can finally meld electronics and radio and make something useful, hooray!

I've been tinkering for a while on a simple audio interface for connecting up to my handheld radio. Essentially this means I can use the computer as a microphone source, or send tones for data modes like RTTY and SSTV instead of just voice. The only issue is that experimenting with things means building shitty bits of stripboard and wire links, burnt fingers and a lot of frustration: no thank you. So after finally managing to bodge one together that worked I immediately started working on an upgrade to a PCB version that wasn't stuffed into a toothbrush case.

The original source for the circuit is here: https://k0rx.com/blog/2017/11/baofeng.html (David Andersen, K0RX) and it works really well. I had to experiment with resistor values as David says on his website, but eventually I got something working in a prototype form that gave great audio in and out and have used this to do some SSTV Summits on the Air activations. David was also nice enough to clear up some questions about the grounds via email, as some of them need to be kept separate (the RS232, mostly).

Transferring his very simple design into KiCad was quite easy, although I wanted a proper 3D preview of things so I had to find some models to import into the software. I also had to make a few new footprints AND design a 3D model from scratch in FreeCAD for the 1:1 audio transformer used in the circuit. But after a few weeks the PCB fairy came from China and delivered 5 new boards through my door.

I went for red boards this time, and it looks great. It's about 4cm on each side. I immediately started tearing apart my working prototype rather than buy new parts to make one up (some would say a bad call) and thankfully it all worked first time, minus the optocoupler bit as I don't have a USB to RS232 interface yet. So instead there's a slide switch to change between Tx and Rx.

I've chosen a TRRS socket as you can see to work with modern laptops, although it'd be good to find a solution to connect it to a tablet for the ultimate in lightweight portable data mode operating. You could also break it out into 2 X TRS for separate mic/output sockets if required. The 2 pin cable came from a Baofeng mic I cut the actual mic off, but hopefully I can find a place to order the cables with bare ends? I have no kit to make my own up, sadly.

It ended up working first time to the exact same specifications as the prototype and I'm really impressed with how it came out. As always I used JLCPCB for my fabbing and they always make great boards for what I need. Next time I make one of these I'll try and put a better connector on the radio cable side though. Right now I just have bare solder pads and it's a big weak point. A box would help, obviously. Turns out Tic Tacs boxes are about the right size...

Shitty Amateur Electronics - Part 14: Let There Be Light!

I’ve made a few PCBs for myself, but I needed a new challenge. Could I make something for other people, I wonder? Well, it would have to actually work properly, for a start. And it would have to be safe (depending on what it’s doing). A quick call out on my regular IRC channel provided a possible project: a little controller board for someone’s around-the-monitor Ambilight setup.

He’d had some jerry-rigged setup with twisted wires and dodgy solder joints, so I offered to make a proper PCB for it. He was going to make a box for it with a 3D printer as well to make it nice and tidy. The LED strips were standard WS2812b strips of the kind you can buy by the metre.

There were a number of things to consider with this that made it a bit more complex than my earlier projects. Firstly the mechanical integration, requiring some placement of screw holes and orientating components for appropriate hole placement and cable access.

Secondly, and more importantly, there was the current and heating requirements to think about. At full brightness my friend estimated that the entire strip around the monitor would pull around 6 Amps. This meant that the PCB would possibly run quite hot, and it also meant that the cables and connectors coming off it needed to also be able to support this too. Pin headers, apparently, may not be right choice here.

The schematic was fairly simple, as you can see:

And it was a fairly simple job to lay out the components on the board, allowing for a cable to come out of either side for the strips, plus power and a space for the Arduino Nano that would run the whole thing to sit.

But there was still the issue of the current draw. How wide should I make my tracks? I tried to join some weird polygon shapes together around the pads and had all sorts of worried about clearance and angles and pinch points that could get hotter then the surrounding areas, all of that stuff. And then I thought I better ask for help in case I kill my friend, so I went away to the Something Awful electronics thread for some guidance. Turns out that after using entire ground plane fills on the back side of my boards for so long this was just a similar issue. I ended up making the entire top plane a +5V fill: Problem solved.

Here’s the finished board, without any components in this time (points for spotting the reference):


The enclosure my friend designed is here for completeness as well, and I’m happy to report it all worked fine with the heat dissipated nicely. In the end he stayed with the pin headers and used some appropriately thick cables and everything ran fine - not too toasty.

I’m now always bugging friends for new ideas. Still addicted to this a bit!

Shitty Amateur Electronics - Part 13: Feeding the KiCad Monster

I haven’t really written about things for a while, so here’s a little update on what I’m up to. Essentially I spent some quality time with KiCad and made some more PCBs. I was going to go through the code for the conference mood badge and talk about what I’ve learnt about optimisation of code on AVR platforms, but on reflection other people have done that on much better ways. It’s all fairly standard C optimisation stuff mixed in with some tips on getting the most out of the architecture. My favourite trick was using an unused register as a counter, but there were lots of other tips on code syntax and refactoring which saved lots of bytes. Google around for that stuff.

Anyway, first thing to talk about: I took my little LED matrix board that I made and turned it into a standalone PCB. I’m still really addicted to designing PCBs to help me learn to solder better and also to just acquire new skills. I’ve learnt so much and I’ve now had 4 different designs fabricated. One of those was a commission from a friend, and I’ll get onto that perhaps in another post. But this was just a way of making a standalone Arduino-derived project with power regulation etc. The concept is simple but after doing this I can use the same layout for other projects. I actually used an ATMega328p microcontroller, the same chip as used in the Arduino Uno, a crystal for a clock, added some voltage input and regulation, and connected the LEDs and resistors too. I am a little annoyed I didn’t put any buttons on this, as it would enable it to be hacked to perhaps play a game or input new data. One idea for a V2, perhaps...

The second board was this rather intricate snowflake design which I honestly thought I’d get emailed about by JLCPCB to ask what the fuck I thought I was doing. The idea is that some LEDs are on permanently and some flicker in a random pattern, like a twinkling effect. The idea is absolutely a rip off of this version on the Arduino website, only this is through-hole and not surface-mount. The code is roughly the same as that one, but I may add some more patterns and cycle through them. The microcontroller can be as small as an ATTiny13, the code is that tiny. Since starting my electronics journey I’ve hated using ATTiny85s for projects that don’t require them, and the 13s are a tad cheaper.

I put together the LED Matrix and instantly was met with one duff light. I accidentally trashed the pads while changing it out, so I guess it’s just going to have to stay missing. Now, I thought I’d flashed a correct bit of code to the chip in the board, but it didn’t seem to work as expected. I honestly spent an entire day wondering if it was a hardware error and then also ended up sticking a second-long delay between lighting up each light and it worked. All of that time I thought the board was stuck in reset and I wasted so many hours. I’d changed the code between testing the layout with the prototype and having the PCB fabbed and got all the pin assignments wrong. Ugh.

So yeah, let that be a lesson for everyone. But look! It works!

The third board, which I’ll write up in another post was a controller board for an ambient light setup around a monitor, using the WS2812b light strips everyone loves. I asked my friends if anyone needed a board making and one of them said that he had a lashed together setup with wires twisted together and hanging off the back of the monitor. So I made a distribution board for the power and data connections. The process was challenging and I had to consider things I hadn’t thought about before, such as the heat dissipation and the widths of the traces.

I'll go through all of that soon!

Some thoughts on gatekeeping

Christ, what the hell am I doing here with this? Ok...

I passed my foundation amateur radio licence (the lowest class available in the UK, introduced in the early 00s) in 2004 and then promptly had "mic fright" and never ever transmitted, save for opening the local repeater (a doodah that rebroadcasts a transmission to a wider area on another frequency) to see if my little handheld radio could do it and feeling all giddy when it responded. But what if I spoke and said the wrong thing? What if I got some detail wrong? Would I get somebody shouting at me? After that I just listened to stuff, radio scanning, shortwave broadcasts, that kinda thing.

And then after three years of living in Edinburgh I realised "hey, there are hills nearby, hills are good for radio" and had a bit of an epiphany. I had more of an epiphany when I discovered the Summits on the Air scheme and found that I could mix my love of the outdoors and walking up mountains with operating radios and building my own kit and seeing how far I can get. And points! Lovely, meaningless points! But it's a good little scheme and it gets me out of the house, definitely no bad thing.

I then went and joined the local amateur radio club - not something you HAVE to do, but something that is nice to do, especially if that club is installing equipment for community use and you're all chipping in etc. And also just to talk to a nice group of people and try and learn more from them and develop your skills. And that's going great. Sort of.

Unfortunately one thing I have come up against is the death knell of many a person's interest in a hobby - gatekeeping. Essentially putting up barriers to people taking part in and enjoying a hobby. It goes without saying that I don't need to explain this literally any further to the women reading this post, many of whom will already be quite familiar with it, especially in technology and science, two areas I enjoy very much.

There were previous, more general comments in the past. But something this morning really got to me. Essentially the criticism manifested itself in a way that I didn't expect - listening to two local amateurs (one of whom I like very much and is very helpful and patient with me) on my little radio in my ground-floor, thick-walled flat in the middle of the city (not great for optimal radio coverage at the best of times). It was not direct, nor was I named by the other operator in the exchange, but the context and content of the comment that annoyed me so much was very obviously me (specific equipment and operating style was mentioned that could only be me). And I think the person who did it forgets that I can receive on the particular mode of transmission they were using with my radio.

Now, foundation licence holders are never immune from criticism and there is much to be discussed about how people progress through a hobby, whether things are meant to be stepping-stones, and how big those gaps are, whether the knowledge gained is sufficient, etc. Radio is odd in that it is a hobby that requires government permission to participate in. I do not claim to know everything there is to know even at foundation level - how many of us have taken an exam or done some maths questions for fun on a Facebook quiz later in life and absolutely bombed them? I will frequently redo test questions at foundation level and sometimes I forget things. So I read up on them again and make sure I understand why I got them wrong. But I did attain a level that the executive branch of our government has decided is enough.

Sometimes the criticism is that people pass their foundation licence to just "get on the air" and then stop. So? What business is it of yours? There is an implication that you aren't really worth bothering with until you get your full licence. There are also some people that just won't respond to foundation licence holders putting out a call. What chance does somebody have to progress their skills and on-air technique if they can't even find anybody patient enough to chat to them? Honestly, if you've ever not returned a call because it's a foundation calling CQ then you're a piece of shit.

I had a nice little exchange at the weekend with a lovely chap who had passed his foundation licence earlier this year. He was very "green" on-air and got all his terms right, but did stumble sometimes. I can understand how a more seasoned operator would perhaps feel a bit put-out with the exchange. But he was very eager to learn and wanted to go further, just wasn't sure about a lot of things that he needed to read up on and was scared anout what was involved in learning the next "intermediate" licence step. I told him to take it at his own pace and listen to nobody - you don't have to do anything you don't want to, and there's no timelimit with hobbies. And that's what this is: a hobby. And it is of no business of anybody elses what you do for a hobby or how far you go for a hobby.

I'd rather have ten of this guy in the hobby than 1 Dick.

A second rebuttal to the criticism is somebody's individual circumstances. The implication that I had shitty equipment and can only hear half of the stations on our weekly chat, and that I have to "progress". Well yeah, OK: if I want to progress I can progress. However, there's more to a hobby than just somebody's willingness to learn something. There's also the more tangible areas of life, such as finances, and space, and time. I'd love to have a workbench or a shed so I can knock together my own little designs and try and make something better.

Problem is that I live in a pokey little 1-bedroom ground-floor flat in a shared tenement block. A lot of people who do amateur radio are boomers or above who bought their first house in the 1970s and 80s. Outer city suburbs. Large gardens. Space to erect things. The kind of disposable income that being alive during a particular time can bring. Lovely pension money, mmm, yum yum.

I have none of those things.

I am, at this moment, scraping together the money to buy a shortwave radio set. My first ever one. I'll be finally able to talk to the world and develop my skills a bit more. I cannot wait, frankly. I hope to have the same kind of revelatory response as some of the old timers in the hobby had when they first cranked up the volume on something they made themselves and heard some distant signal from another continent roll in.

I'm sure people in many hobbies will know this, but there is something so, so great about something you made working so well and being proud of it. One of the specific things criticised in the exchange I heard was the specific antenna I was using, one I made entirely by myself. It is nothing special. It is quite "beginner level". But after I made it I learnt a hell of a lot of things. More than I ever learnt by reading, that's for sure. And I was able to make some really nice longer-distance contacts with less power than before - effectively the efficiency is better and this is a good measure of how well you've made something.

But hearing somebody trash it so much, even if their intention is to encourage people to do something better, is certainly not the best way. I could hear the sneering in his voice, almost visualising his face screwing up on the other end of the ether. You know what would have been a nice thing to hear? "That's good work, I'm happy it went well and I hope you learnt a lot. If you need any help or advice with anything else or more complex, let me know?".

That's the kind of thing that actually helps a hobby grow and helps somebody to not think they're being pushed out of it. That they don't belong there or aren't good enough to be there. It is, however, nobody else's business if I choose not to go any further. Only my own. And that still doesn't get around the very real operating limitations that many radio amateurs are operating under. Consider other people's circumstances and please don't be a prick.

I'm not going to sit here and tell *everyone* that the best thing to do is ignore other people. There are people more qualified than me to give better advice on how to deal with things like this. Clearly I dont do well with it, so don't listen to me. But seriously, I am feeling pretty down-hearted about this hobby right now. Which is a shame, as I am just starting to get the hang of it.

Shitty Amateur Electronics - Part 12: The Conference Mood Badge

After making my standalone Arduino board and realising that the Arduino is overkill for most applications I started to look into more specialised, smaller chips. It's not surprising that the ATMega328 chosen for the Arduino is so overpowered though, as it's meant to be a teaching platform, to do many things at once, to introduce people into concepts. There's a lot of memory and flash RAM and the Arduino infrastructure makes things nice and easy for you.

I'd had a few ideas for some stupid little gadgets that would run on the smaller ATTiny chips after looking around the internet for some ideas and inspiration. Something arty, maybe a little silly? But also... maybe useful? I ended up going down the rabbit hole of reading about conference badges. Not the OTT types that DEFCON make though - those were out of my league. But a simple thing with some lights and buttons on it? That's doable. I quickly settled on the idea of making a kind of "Mood Badge" to let people know what you were at the conference for or how you were feeling. The form factor was small and the design could be really simple.

I ended up sketching out some ideas in, of all things, MSPaint. You use what you have to hand. The idea would be to have 3 LEDs (red, yellow, green) and indicate whether you wanted to talk to people, to be left alone, or whether you were with friends. There'd be a single button to toggle between the three. The battery had to be small enough to keep the battery light and relatively flat. There had to be a hole for a lanyard. And finally, a switch to turn it on and off to save the battery. It looks quite nice - not very complex but it doesn't need to be.

Interestingly, I approached this project a little differently than I think you're supposed to. I designed the schematic and PCB before I had even written a single line of code, rather than breadboarding it and writing some code and *then* testing it. I could only really do this because the circuit was so simple. ATMegas require a power and a ground - that's it, assuming you're using the internal oscillator. And I can for this project - accuracy of timing is not required in any way. You can see the lines out to the button and the LEDs (through resistors - the button uses an internal pullup in the IC). There's a small decoupling capacitor for the IC, and a larger smoothing capacitor next to the battery.

Battery life was a consideration, of course. I wanted this thing to last a fair while, and that is another reason for using a small IC as opposed to a larger one. There'll be more on battery life as we look at the code on the badge, but for now I can say that I tend to run LEDs a little less brighter than most, and with a 3.3V supply I settled on 330 Ohm resistors, which kept them bright enough to be seen in a dark hotel bar at a conference.

I had a fair idea of how I was going to lay this out by now so I just went straight into making the PCB and getting it sent off to JLCPCB for fabrication. I decided on the standard CR80 card size, just on the off chance it'd fit into some kind of holder. I tried to place the components on the back of the badge in such a way as to not be in the way much on the front. You'd need to put a label or sticker on the front, or wipe with chalk or those weird wipe-off pens. For the battery we're going with the standard button-type CR20xx batteries, so if you want a thinner badge you can go for a CR2020 or CR2016 (same diameter, just shorter when laid flat). The battery placement is suboptimal. Those things are heavy and having the clip on one side makes it hang at an angle. Something to fix for v2.0? I also dropped a capacitor that was a bit overkill.

With the boards arriving on my doorstep two weeks later (cost me about a tenner for 5 boards shipped) it was time to turn my attention to the code. I just wrote this blind before I even made up the circuit on a breadboard, but I got it all working just fine with an Arduino Uno. Like, the only issue was a change to the button code to stop reading it when it clicks back up as well as when you push it down. I was feeling pretty confident about it all, so I placed an order for some battery clips and some ATTiny85s and breadboarded it up with one of those as well. Still worked.

With that I was feeling confident enough to solder one together - and it didn't work. I thought the chip was dead. I tried to desolder it. I broke it off. Into the graveyard with that board, saved for memories and stories later. So I flashed a second chip and soldered that together instead - that worked fine. I think I wasted £1 on an IC and broke a PCB that was working fine and just had a bad solder joint. Woops. Still - progress.

One other issue I fixed was a track I stupidly left connected in the wrong place. Nothing a quick breaking of the track wouldn't fix, though. I was stoked when it all lit up.

I'll go through at the code in the next blog and also talk about picking the right chip for the job, plus talk a little about the addiction to code optimisation that I developed while thinking about just how small and cheap I could make everything.

Shitty Amateur Electronics - Part 11: Designing PCBs is fun as hell

As I mentioned in the previous post when I got into doing electronics and hardware gubbins I decided that some nice milestones would be a good way to mark my progress. Get my RPi up and running. Connect some circuits to it, via a breadboard. Design a cool application and make it a reality. Something you can use to say that you've skilled up and understand the processes involved.

I consider the posts over the past few years to be proof somewhat of the level of competence I've achieved, and I'm starting to learn more about the theory of electronics too (but not very well) while I go. One thing that has hampered my progress with the kind of projects described in the last blog entry is making enclosures. We'll get on to that at a later date I expect. For now though I'd like to concentrate on another thing that I did that represents a personal level up.

I got some PCBs made! I designed some standalone Arduino boards to hold a chip and crystal and all associated things needed to program them and get them running on their own, although there's no regulator on them - just power terminals. They work pretty well, I've used them to program chips straight from the Arduino UNO board (after taking the chip out of that first). I've also run them on their own controlling things off a battery. I DID have the idea of sending them to friends as gifts to make up themselves, but without it's own USB programmer on board it's a bit useless - you'd have to buy one.

After that I had a delay of months where I played with various other things. As usual with someone like me I get hot and cold on things and basically moved back to ham radio. However, a couple of bad builds put paid to that. I'll be looking into that again later on but I wouldn't expect any blogs about it. Digital electronics is much easier.

Oh, I DID build an FM Radio kit though after my wife bought me it for Christmas and tried to move it from the breadboard it came with to a perfboard. Worked well! But then I needed to make an enclosure and I realised I have no tools or resources for this. So into the drawer it goes for later use. If you're looking to move from working on breadboards and beginner kits to something more useful then I can recommend turning your favourite kit for kids into a permanent project like this. Taught me about component layout, improved my soldering skills a bit more, that kinda thing.
Finally, I did make a PCB that actually is an original(ish) idea. A conference badge for people who are a little shy or don't like to be bothered or who want to beckon everyone over to chat. Or for speed dating, as somebody suggested the other day. I'm quite proud of this for numerous reasons, and I'm going to talk about that in the next blog. Essentially I decided to switch to a different microcontroller - the ATTiny85 - because it really didn't need as much as power as a full Arduino, let's be honest. Cheaper as well. I'm absolutely over the moon with how this turned out and then had about 3 different ideas for improvements, so I'll probably make a version 2 of this at some point.

One other, rather more major PCB I designed and shown above is this rather insane ham radio board called The Megapixie. It's a Morse code transmitter, made for low power - or "QRP" - operation. It's adapted from a commercial board (The Pixie) with all of the best modifications I found from around the Internet. I hope to get this made soon and give it a go but I should breadboard parts of it first really.

I'm using KiCAD, an excellent open source tool, to design the schematics and boards for my projects and I'm getting quite into it. One thing I've noticed is that you're never satisfied. You'll spend days just moving parts ever so slightly to the left so you can squeeze something else in and then move an entire row down. It's a bit fiddly. Proper planning helps. There's also an excellent 3D preview for your boards, which makes you feel all fuzzy inside as you start dreaming about what it will be like in your hands.

So yeah, things are progressing and I'm enjoying myself. I hope to get back into blogging semi-regularly about what I'm up to in the vague hope that someone comes across it and it inspires or helps them one day.

Shitty Amateur Electronics - Part 10: Adventures in Arduinoland

I’ve been thinking for a long while about making a standalone... thing. Something to mark a milestone in my amateur electronics career. I had the idea of making a standalone version of my LED game from previous blogs, complete with a display and a power source. Problem is that it requires the Raspberry Pi to operate, so I was left with the choice of where to go next.

I’d been looking into Arduinos for a while as a way to make a step up to something with a little less help (like, say, an operating system) to get tasks done. The cheapest option with everything I needed seemed to be a cheap Uno clone, and Elegoo make one for about 7 quid. I’d bought their electronics kit before some months ago and apart from a slightly loose connection on some areas of the breadboard I’d been pleased with the product.

Everything arrived and the first thing I did was a breadboard blinky LED, obviously. The issue for me was converting to C after doing so much in Python. I love Python. It's amazing. It's great for idiots like me who treat coding as more like scripting than about devising algorithms yourself. I just glue stuff I find together and pick stuff up along the way - the stereotypical Stack Overflow coder. Probably learn bad habits as well. But the Arduino libraries make things much easier. digitalWrite() may as well be gpio.output() given how similar the syntax is.

Next I converted the LED game code, using the original board I made some months back. Seemed fine, worked first time, converting Python to C isn't as hard as it looks at first. It's also cool having something that self-boots and runs by itself. Obviously you can do that with an RPi, but when you're just doing something as a test or as a one-off you tend not to do that. With an Arduino it just happens, nothing to set up. This makes it much nicer for this kind of application, although obviously having no OS means you have to work a bit harder to do some things.

OK - we're on a roll. What can we do next? Well, what about converting the LED matrix display I made to work with the Uno? Easy peasy. Took me thirty minutes to convert it. That's very cool. Clearly some things will be harder to convert with others, but if you've done something simple on an RPi and thought "bit overkill" then it's relatively simple to convert these tiny apps to Arduino sketches. You'll see that there's a different board connected here to the right of the matrix, which leads to the next topic.

Clearly we have a decent platform here, and something that I can probably use in a standalone format to run lots of simple circuits. The problem is that I don't want to pay 7 quid for a new Uno everytime for the privilege. Thankfully there's a way we can do this kind of thing without having to do that, and that's to make your own cut-down version of an Arduino, using the main ATMEGA328P chip as a base. I'll do a post looking at my adventures into this area soon, but suffice to say I've had mixed results. I can get a chip going and powered in its default state, but I can't change any settings. I also wasted a chip after I soldered it into a circuit that wasn't working properly and that I can't fix. All the legs are bent now so it'll be hard to pull it out.

As ever with this kind of thing my usual stumbling block is having enough ideas for things to do with the kit. It's for that reason that I bought a bunch of sensors and comms boards from AliExpress, and those should arrive soon. I got so much kit...

Honestly, if there’s a sensor or thing you can think of I bought it. And the best thing is that even with ordering from shonky stores on the website I only had one item be incorrect. I ordered some programmable LED strips and I got sent instead... a ladies leather purse!

But I got ultrasound sensors, radio transmitters, an SD card reader, a pressure/altitude/temperature sensor, some odd parts such as inductors and resistors, some nice chips like audio amplifiers, some level shifters for combined 5V and 3.3V work, and so much more. Now all I need is an imagination, which is harder than it sounds.

Shitty Amateur Electronics - Part 9: Completing the Matrix

It’s time for me to do something I never usually do: finish a project.

I dug the LED matrix out of the drawer and hooked it up to my Pi Zero. Luckily there are enough GPIO pins on each side to let me plug the rows on one side and the columns on another. Keeps it easier to manage. I’m tempted to wire it up to a 40 pin connector to make it even easier, but then I couldn’t use it on any other device than an RPi or compatible device.

The first thing to do is dig out some code fragments from other projects to build a framework to start from. Because I’m a shit coder. I piece things together like Marconi inventing the radio. I cut and paste things and edit to make it work. I code by Google a lot. That’s extremely bad, but I just suck at learning how to code naturally. I used to be good at it, but those days are behind me. However, Python is quite an easy language to understand.

I managed to get something workable. Firstly the code uses a loop to set some pins for use as outputs. Then I wrote another loop to cycle through each row in term. After an individual row has been turned on we need to do the columns. If we do them in order with a short delay between them we should then cycle through each of the 6 LEDs in the row. Then the next iteration of the row loop turns off that row and turns on the next one.

Firstly I made the delay between lights really long as a test mode to check each LED. And they all worked! A few flickery connections which I later figured out were loose connections to the GPIO pins on the RPi side. Annoying but confirms my prototype board actually works and was well constructed. Ish.

And so it was time to light all of the LEDs at once - or at least appear to my brain to all be lit at once. Lower the delay! I had to experiment to find the right delay so that there wasn’t any flickering, but I settled on 0.00001 seconds. And as expected I had a square full of light. It was then that I realised I was being silly and could change the code to do a full row at a time, as I have previously described. This meant I could lower the delay to 0.001 seconds. At 0.006 seconds for a full frame this gave a refresh rate of 167 Hz. Tidy. (apologies for portrait video).

So obviously I showed off to the wife next.

But now it was time to get clever. Let’s look into animations. By only slightly adjusting the code and making a larger array we can store multiple strings of data for the drawing loop - which will also need adjusting to point to the current frame. Changing the loop to add a counter system makes it possible to do rudimentary timings between frames as well.

And here’s the result. A simple 3 frame animation to test the concept.

And here’s where this blog ends. I’ll work towards putting this in a protective box with a see through top, or make one of those frosted pixel-type displays instead. But right now I’ve proven that the stupid board I made from scratch actually works. I think it’s time to take stock at this point and acknowledge that for someone who only had a tiny knowledge about electronics I’ve done fairly well getting to this point.

Time to start thinking about the next project and look for some new toys to play with...

Shitty Amateur Electronics - Part 8: Beep Boop Boop Beep!

I think we all had this growing up, right? Those of us of a certain age, anyway.

I decided to remake this for the RPi using some buttons and LEDs and one of my prototype boards, but this time I didn’t want an ugly mess sticking to one side of the RPi. I also needed some soldering practise.

So instead of using a mass of cables to connect the board I decided to solder a 40-pin header connector directly onto the prototype board. This meant I also needed to find some standoffs to hold the board steady and clear of the RPi. This would be a lot sturdier as well when pushing the buttons on top. Essentially I’m making a custom HAT.

The only issue is the size of the prototype board I’m using, which is nowhere near the right dimensions to ensure stand-offs would fit through the holes on the RPi. Because of this lack of adherence to physical specifications it technically can’t be called a HAT. But fuck that. It’s a problem that will need solving though, but we’ll cross that bridge when we come to it. I could have bought the right size board from somewhere, but I just got carried away and got stuck in, as usual.

Here’s the basic layout (taken much later in the process, you'll notice). With 4 LEDs and resistors plus 4 buttons on each side this was a challenging layout, with space needed to accommodate the 40 pin connector as well. Using all four of the buttons is possible, but I had to really space things out so that you didn't inadvertently touch something else.

Commence soldering! One of the things that helped to save space and cabling was to use a common ground pin for all of the LEDs, so I made this nifty loop of daisy-chained cathode pins. It worked well and I was able to keep it at quite a low profile by smushing it down. I could also have brought them to a single point on the board and connected that to GND.

And here’s the header connector soldering, which I genuinely think was okay on the whole, and I can’t see any major spillages. Concentration++. I think I can definitely see an improvement in some soldering work, but then when things get too complex (multiple things joining at once) or there's no room to work it gets messy fast. I need to be a bit better at feeding the right amount of solder in with my other hand. Sometimes I do too little because I worry about ending up with a huge ball of it, so I end up making a joint with barely any solder in it, or in some cases it just evaporates into the air and I "lose" it...

And it fits! It felt really snug and was quite satisfying. A little TOO snug if my early attempts to take it off again were anything to go by. I tried to lift it up on each side, a bit at a time, but doing that with any great force made some of the header pins on the RPi get a bit bent. So now the trick is to only *gently* nudge it up on each side, taking much longer overall. That way it comes off evenly and you don't mangle something. What are real HATs like? Are they as tough to get back off again?

With everything attached it was time to do the wiring. This time we’re stripping off much less insulation for an electrically “safer” connection with less chance of short circuits. I aimed to poke wires through the holes from the back to attach them to the header pins and solder them on the top. It’s the only way to do it really, with the connector being effectively “upside down” on the board if you think about it.

Doing the other side of the wires was done underneath, obviously. This is where it got tricky. I once again - as with the LED matrix - tried to route cables neatly, with some early success. It was when I had no choice but to cross things over that I had an issue. It quickly became a bit of a mess, but the mouldable cables meant I could squish them down and bend them around things and it seemed to help. When plugged in to the RPi there was nothing touching where there shouldn’t be.

I also needed to make a little power rail to feed out +3.3V to the buttons so that I could detect the relevant GPIO pins going high when they were pushed. I broke this out to a corner of the board rather than attempting to solder 4 wires to one pin through a single hole...

Now: there was a major snag at this point. Somehow, with an errant flick of the arm, I had managed to absentmindedly burnt the edge of the header connector with my soldering iron, melting it completely and ensuring that it would no longer work as a plug for the RPi header pins. You can see from the picture just how messed up it was.

Luckily I had my stripboard track break tool, which is essentially a hand drill. I was able to make the holes more... hole again, and then plugging the board in did the rest. I quickly finished the rest of the cabling and tested all the joints for continuity.

And here’s the finished article, attached to my RPi3. This should be quite easy to code for, just interacting with single I/O pins and writing some simple game logic. I’ll have a go soon. But for next time... it’s time to code the matrix...

Shitty Amateur Electronics - Part 7: Finishing The Matrix Board

12 September 2019 at 12:21

The last time we saw the matrix board it had a row of LEDs, some resistors, and a single row of header pins. After realising that doing the matrix soldering wasn’t as hard as I thought it’d be I basically threw away any thoughts of putting the board to one side during the Edinburgh Fringe in August and ended up just cracking on with it.

I have a couple of photos here of the board in various stages of completion, 3 rows and 5 and a bit rows. There’s also a couple of shots of the back of the board, showing soldering with varying degrees of success - but every connection worked fine when tested with a multimeter.

Adding the final row of header pins on the other side of the board finished the component part of the build.

Which meant it was on to the wires. I was worried about this bit. I didn’t have any good wire stripping tools and I figured the process of measuring and cutting would be difficult. I was right, but only partially. The third arm gadget really helps with this, but ultimately having bits of wire just resting on the board in the right position isn’t really working. The best way to do it may be some Blu Tack on the wire to stick it down first. The other helpful bit with this process was the fact that I got wire that maintained its shape when bent, so I could make some runs that were neat. I maintained that tidiness for precisely three wires.

Looking more closely, you can see the burn marks, the crappy solder joints, and the close proximity of some of the joints. I really worried about short circuits here, but continuity tests came out fine on the meter, so... There's also the definite problem with the extra stripped insulation. I've taken off way too much, but I got better at it as the job went on. Clearly for more intricate designs I won't have this much leeway, and with stripboard it becomes even more important as you may inadvertently bridge something together.

And so here it is. One finished board ready for interfacing with the Raspberry Pi. There is the small matter of the code to sort out, though... I'm not looking forward to that, but there's a few examples I can find out there that may help. One thing I'm wondering is if there's a library for interfacing with this kind of matrix. There are for ones with controller chips, but not for ones where you're hooking up direct to GPIO pins as I am. I may get a proof of concept working and then see if I can make a nice wrapper for people. Define your rows and columns, the pins in use, and then have a Python class to represent it.

Of course, there's another way I could go with this, and that's to use an Arduino or similar microcontroller kit. This has certain plus points, but some negatives as well. Harder to set up, but less resources and similar afterwards. The board is technically compatible with anything that can send signals to the individual wires, basically. I could even make a second tiny board as a controller, use a shift register, etc. But ultimately the RPi setup is the way to make this easy while I'm learning.

Unfortunately before I even started the code for this I started making a new board. More in the next post...

Shitty Amateur Electronics - Part 6: Entering the (LED) Matrix

While I was thinking I wouldn't get anything done during August because of my commitments at the Edinburgh Festival Fringe, I ended up not being able to put everything down and just did soldering any chance I got. And I'm definitely improving, but I make mistakes through laziness. Not heating the iron up properly. Not cleaning it. Not using my board holder gadget...

...which is BRILLIANT, by the way! I no longer need three arms to do anything. Although sometimes the screws take a bit of work to get them to hold something tight. Also you have to do this while not pushing TOO hard or it may bend/break something.

Here’s the first row of LEDs attached to the board with their anodes all joined together and the cathodes bent downwards ready for joining to the ones to come below.

Then the resistors and header pins at (hopefully) the correct number of rows down... Incidentally I think this shows my soldering is improving, but some of those joints look a little empty. Obviously compensated too far the other way.

I’ve had more issues with melting plastic on jumper pins again, and I guess my iron is probably too hot. I’ll try doing the other one at a much lower temperature setting and see how it goes. Sometimes the pins can be moved back to the right height, but once you start doing that and they aren't being gripped as tightly by the plastic housing they can fall out if you aren't careful.

Despite the melting, one improvised header plug with added electrical tape later and everything seems to line up ok and plug in right. And it looks so much cooler than just a random collection of single DuPont jumper wires, haphazardly weaving in and out of each other. I'll use the same colours for each cable.

And that will do for now. First set of header pins and the resistors sorted, plus a first row of LEDs. Time to do the other rows and then the wires and then the last header plug at the end. The board is basically finished as I write this, so I'll get another post done with the story of completing all of this. Then we have to think about code...

Shitty Amateur Electronics - Part 5: The DIY LED Matrix

First: some welcome news. My RPi 3B+ is fine and LibreELEC is back up and running. It was the SD card all along and the earlier Pis were fine. Oh well. I have a spare RPi 3B now...

Now, you’ll remember from the last blog that I complained about having to do 160 solder joints for the next thing I want to make. It’s time to talk about that and see if I can figure out the best way of achieving the right result. I want to try and make my own LED matrix rather than cheat and buy a ready made one. I have to learn this stuff for myself.

By arranging my LEDs in a grid formation with the positive and negative legs arranged into rows and columns it’s possible to make individually controllable LEDs. You can light full rows and columns at the same time, but the opposing states of the lights in a diagonal shape doesn’t work with this process. A column can’t both be set to ground to turn one LED on and not set to ground so the light below doesn’t illuminate. Instead we’ll use a neat trick of the brain to achieve what we need to make complex shapes on the display.

Enter: multiplexing.

We’ll be able to turn our lights on and off very quickly, one row at a time, hopefully quick enough so that the human brain won’t notice. The RPi3 and some interpreted Python should be fast enough to do that, but you’d get better refresh rates from something like an Arduino I’d wager. To do this I’ll need to write some code to actually parse through some list of lights to illuminate. You’ll see from this gif that I stole from Wikipedia how it works in practise. Of course I’ll need to get a decent amount (50-100) of LEDs, and I’m gonna go with the classic red colour. They’ll have a forward voltage of around 3.0-3.3V so I’ll need a resistor for driving each row of LEDs. 220-330 Ohm should be fine. I also want to get a female header connector and try and make a much better designed cable for connecting the board to the Pi. Individual jumper wires are an absolute mess.

Finally I’ll need to get some perfboard for this as the stripboard is hard to work with for this kind of project. There’d be a lot of tracks to break and it’s easier to join the LED legs directly together. So I’ll buy a stack of them at a decent size. One thing that has to change: no more soldering directly on a surface. It bends everything and is a real pain. Instead I’m ordering a little clamp gadget that will hold the board for me. Bending the legs below the board will hold them in while it’s upside down, and they need to be connected anyway.

On the software side I’ll be using Python for this and there are several good code fragments I could look at, but if I’m using simple GPIO pin output I can just do it raw for now. If I convert the circuit to work with a shift register or a purpose-built LED controller then I can use a handy library or two.

Essentially there will be a loop that turns on each row and then turns on each column as required to light the LED at that position. By doing in this in order for each light at a fast enough rate we’ll get the effect we’ll need and the brain will be tricked.

I should think about maybe sticking this in a box, so I’ll see about finding some sort of enclosure, but the perfboards come with screw holes in the corners so some stand-offs should do it and can screw into basically anything. Or I could put this board into another project later on and combine it with other things.

So, a lot to consider. I’ll get started in Part 6.

A Lesson in Fault Finding & Frustration, Plus Some Electronics

Well, this is embarrassing.

You’ll remember I added a reset switch to my Raspberry Pi 3. And then killed it. It was frustrating but it enabled me to get an upgrade to a 3B+ for my Kodi media centre. And then I cast the apparently dead board aside.

I then had that new 3B+ with one of my old SD cards in and it didn’t boot. And neither did the replacement - bit weird. But okay. I’d tested the cards in my laptop and they seemed to work, so I threw NOOBS on them and... still nothing.

I ended up desoldering the reset switch from the old Pi3 board and it still didn’t boot so I assumed there was an issue with that. Maybe shorted those pins out or something? I wicked off all the solder I could but nothing worked.

Okay, it’s two weeks later. New cards. And it works! What the hell? So the cards were on the way out all along? I eagerly grabbed my old Pi3 board and a new card and... it fucking boots!?

This is annoying - maybe the soldering WAS the thing that killed the cards. But that it took me so long to figure out that the board was still okay is irritating. It DOES mean that I have a spare board for a project now, though. More to follow, probably... when I think of something to do with it.

For now, though, I’m starting to get into this a little more seriously now. The LED matrix parts have arrived and I’ve organised everything into a nice carry case with dividers to make things easier to keep separated. Sometimes things slide a bit underneath the dividers but it’s much easier to do things when you have a box like this or drawers or whatever.

I’ve also made a start on the matrix by laying out some components on the perfboard, namely the first row of LEDs and some resistors, plus one of the male connectors for female DuPont plugs to go into. I’ve measured the space available and there’s room for 6x6 LEDs - smaller than planned but the perfboards are a lot smaller than I imagined. Nice for tiny projects though or switch assemblies. The board also is the first to be gripped securely by my new third hand gadget. Needs a bit of work to tighten up the screws during use but it really helps.

I’m not sure if I’ll have enough time for this as August arrives here in Edinburgh (note: I am posting this in early September - stay tuned to find out how leaving a project to one side for a month went...) as I have Fringe Festival commitments, but ideally I should at least finish one project anyway before starting another. I expect I’ll finish the game board from previous posts and only do one row of the matrix to test the process.

On another topic entirely I’d love to hear from anyone else doing the same kind of journey as me. Where are you at? Are you going faster than me? Am I just pissing about and not learning anything? Logic theory is hard and I just can’t visualise the gate layouts.

Shitty Amateur Electronics - Part 4: The Random Light Game

In the last blog I posted a picture of the first real “thing” I made by myself, a simple row of LEDs and a button, all controlled by a Raspberry Pi. It was all put together on a breadboard and I was quite sad when the time came to taking it all apart to make something else.

So, in what was an uncharacteristically emotional thing to do for me, I decided to build the circuit in a more permanent fashion. I ended up buying some stripboard from Amazon, allowing me to transfer the whole thing in an easy way with no need for me to use little bits of wire. All of those strips are one continuous line, allowing me to practice making some logically clean and efficient layouts.

Unfortunately, the whole thing turned into a bit of a mess. I have now, finally, got a working board that I intend to cut to size and hopefully put inside a nice plastic enclosure so I can preserve it for posterity, maybe decorate it. But the journey to get there was a story of failed solder joints, accidental bridging of adjacent strips, and idiocy on my part where I joined a single line of components together that were already on the same row. It was very messy and the solder wick got a lot of work that day.

I was chided by a friend for wasting my breadboard jumper wires on this, but the simple truth is that these were the only things I had at the time with female jumpers on the other end. I am lazy and impatient. I regretted the decision immensely when the plastic on the top side of the wires melted thanks to the heat from below.

But, several hours with a multimeter and lots of repaired joints later, I had my board tested and working and now it’s time to think about what kind of box to put it in. I have to consider the size and clearance, and also how to make the LEDs come through while offering adequate protection to the delicate cargo inside. There’s also the switch to consider, and this gets a little tough. Do I put the switch on the end of two wires, so I can have a bit more freedom, while having a potentially more fiddly build? Or do I have a long switch directly attached to the board, which has a risk of snapping off if pushed or knocked in the right - or, indeed, wrong - way? I haven’t decided yet.

In terms of actual boxes there’s not much good news here. Pretty much everything I can find is either pre-cut with holes for other boards like RPis or Arduino, and if it isn’t those it’s outdoor electric junction box kits with full waterproofing and really thick plastic. Hardly appropriate.

The other option is to befriend the right people at work and see if I can get some help designing and 3D printing a case for it with holes cut where I want them. I’m sure I can do this, I’d even be happy to pay for the materials, and it gives me the freedom I need and also a bit of achievement-cred if I can pull it off.

Whatever route I take I’ll be sure to post here and see what pitfalls I come across. There will be many and I get stressed and frustrated. Probably shouldn’t build that DIY LED matrix I’ve been thinking about... that’s about 160 individual solder joints. Eep...

Shitty Amateur Electronics - Part 3 - Hello, world!

Time to get the obvious starter circuit out of the way. Yes, I made an LED. A flashing one, actually. No, there’s no need to document it.

And of course, once you can do one LED you can do five. Of many colours! And then you learn about forward voltages (essentially how much the LED uses) and how different colours pull different voltages & current and require different value resistors to be as equally bright as each other. Sooner or later I’m going to have to learn about calculating this kind of thing myself, although I’ll have to reach far back into the old, dusty areas of my brain first. I think I’m looking for the GCSE area... Adding a switch to this project was the next step, as was proving to my wife that this hobby wasn’t just a flash in the pan by leaving her a little surprise for her to find in the morning.

I actually amended the code driving the GPIO pins to turn it into a game with a randomly generated pattern of lights. You hit the switch when the green light in the middle is hit. Frankly I wish I’d have gone straight to a project like this, and if you’ve got any prior knowledge you may want to as well. Otherwise it feels a little boring. All the output goes to the console right now, but I have ideas for that.

I’m going to put this circuit aside for now as I have plans to preserve it for posterity. I’ll cover that in later posts.

One other thing I did use my kit components for was to write a more complex series of sequences to emulate a pedestrian crossing. It follows the standard sequence used in the UK and had some random timing to it after you push the button. It even has a beeper! I did start to find my breadboard a bit small at this point, and I’m sure there are ways to get better at utilising the space. Or I can buy a bigger one, obvs. If I need a bigger one for something then that’s the time when I’ll buy it.

I’ve been using the open source tool Fritzing for documenting all of my work. It’s clunky to use though and the networks of wired and components sometimes get a bit muddled up from what you really want to do with them. Connections seemingly get invented which puts a component or junction somewhere you don’t want. This got frustrating and was a pain to fix.

Oh, it also crashed. A lot.

But it was decent enough and if it’s stable for you I found it quite easy to use. It can also do PCBs, and I’ll probably post about that later if I get that far along.

For now though I’ll pause here. Next time I want to talk about what I’m going to do with that game circuit.

❌
❌