Pi Xmas Tree Forest Complete

Looking around I realized I have collected quite a lot of Pi Xmas trees over the years. Clearly setting them up individually would take quite a lot of Pi’s, but could I get them all working from a single Pi ?

It was immediately apparent some sort of fiddling would be needed as the Pi 3d tree on it’s own uses all the available IO !

Accepting this would be viewed from the front I was able to save a number of IO lines by ignoring the leds on the back of the 3d tree. This still left me short by about 8 lines so I added an MCP23017 I2C port expander to give to make up the difference.

As you can see the result is not pretty but it works, albeit with a little blue-tack and packing tape holding things together.

This was also an opportunity to use the RasPiO Breaboard Pi Bridge, with all the IO broken out in numerical order this really helped me keep my sanity.

Anyway happy Christmas from MeanderingPi

Posted in Uncategorized

GPIO Xmas Tree 2019 – Pimped

Having seen Andrew was launching a new tree this Christmas with the added twist of a bit of surface mount soldering I thought, yes this is a must for the 2019 decorations.

Then I thought this is calling out for a bit of Raspberry Pi pimping.

As supplied all the led’s as connected in parallel with a simple on off switch / battery. First I isolated the track connections then connected them to individual GPIO lines on a PiZero, which I mounted with couple of stand-offs on the back of the PCB frame.

Next is was just down to a bit of Python. After some experimenting I arrived at a pleasing random flicking effect. The trick here is that slow fades do not work because the PWM routines in Gpiozero are all software controlled so you get annoying flashes when Linux decides to go off and do something else.

The initial consumer review was nice but, there was a compliant that the flicking could get annoying so I re-purposed the on-off switch to select between flicking and static in s/w. Finally I added a further push to allow the Pi to be shutdown cleanly.

The s/w can be downloaded from my github – it is not thing of beauty but it works !

How the kit arrives

Posted in Uncategorized

Pi Test-bed Upgraded to fan Cooled Pi4

image-6.jpgMy Pi test-bed dates back to the first Pi I got 2012, upgraded with each new release of h/w. Other than the Pi the only other change in that time has to modify the mounting when Pi’s with mounting holes first arrived on the scene !

The room I work in gets very hot in summer so with all the discussions around how hot the new Pi4 gets I decided to add a DIY fan ‘hat’. I probably should have made this on the 3d printer but as I had some plain prototyping board to hand it seemed a good idea to show how a very cheap ‘no complicated tools needed solution’ could be made.

I started by cutting out a 65mm x 55mm rectangle of prototype board, using the Pi as a image-4.jpgtemplate I then marked out and drilled (with a 3mm bit) the 4 corner holes.

The fan I used came from ebay, it is a 12v 40mm PC fan costing about £2.50. Here I am running it from 5 volts, while this means it will run slowly it does have the advantage is that is effectively noiseless.

Next I marked out the positions of the fan mounts a main cut out. Lastly using the Pi as a template again marked out the cutout for the PI header.

Prototype board can easily crack, to reduce this risk I made sure the cutouts followed the  matrix hole positions and then used a 2mm drill to ‘extend’ extend them. I could have been a bit neater doing this but it worked out ok. Any ridges I carefully filed down with a needle file. The tip here is to make sure you support the board on a flat surface.

Lastly I mounted the fan on the board with four 2mm nuts & bolts. To attach the ‘fan hat’ to the Pi I used 10mm spacers from ‘stock’.Image-5

The fan came with a 2 pin connector that I connected directly to 5V and Gnd on the Pi header.

The fan does not seem to move much air but importantly it ensures a continuous ‘disturbed’ airflow over the main chips on the Pi. With a room ambient of around 25C the Pi processor temp sits at 44-45C (Pi lightly loaded), disconnecting the fan this went up to 65C within a few minutes.

With a bit of extra filing I could improve access to the header pins but as I mainly use this Pi for s/w development my need to access the header is limited.



Posted in Uncategorized | Tagged ,

TEC-1 Computer Build Complete


Image-10Following a number soldering sessions during the week I finished the TEC-1D build over the weekend. The next stages was to check out the oscillator circuit and the keyboard circuit. The former as there was a warning that not all variants of the chip would work. the latter because I was re-using a chip I initially got about 40 years ago for simple computer I built out of discrete TTL. All was well with both so I inserted the remaining chips and powered up.

This went without a hitch with the monitor program running as expected. Next I mounted the TEC-1 on a slopping enclosure.

From here I spent a happy couple of hours running through  simple code examples from


Working boxed TEC-1D

the Talking Electronics Magazine.

Next I started to try a few things out on my own, the main difficultly here is that the information is all spread across 6 issues of the magazine including references to future material that I suspect was never published – the magazine only ran for 15 issues. to complicate things a little more there were at least 3 different monitor programs produced.

So my plan is to try and tees out the strands of information into a single list of functions and calls you can make from the monitor programs. I also need get an EPROM programmer so I can try out the last JMon monitor variant. but that is for the future. For now I am just enjoying playing with my new computer !


Boo the cat is very interested in Z80 machine code programming


Posted in Uncategorized

The TEC-1D Micro Computer


Tec-1-computerOver Christmas while randomly scrolling through my Twitter feed I saw some discussion about the TEC-1 computer. This is a single-board kit dating from the early80s based around the Z80. Instructions on how to build it were published in the computer Australian hobbyist electronics magazine Talking Electronics. The Magazine only ran for 15 issues which is a pity as it had the idea of giving away a blank PCBs for one of the projects featured with every issue and did not have any advertising!TalkingE iss 10 cover

Anyway digging around to find out a bit more about the TEC-1 I discovered that a retro computer club in Australia had got permission to reproduce the TEC-1 PCBs and that there were a few left on eBay. Also amazingly although the magazine only ran for a limited time Talking Electronics as a webshop for kits is still up and running and while the kit for the Tec 1 is no longer available you can download pdf’s of all the magazines. 

Given that the Z80 was my introduction to assembly language coding I decided this would be a great early 2019 project to tackle along side my other Raspberry Pi and Arduino activities. So a month or so later I have the bare board and have started to source the parts for it.

Scarily I have managed to find quite a number of the parts in my stocks of bits from long forgotten projects. The rest I have been able to find through eBay and people like Bitsbox.

Trying different switches

I am looking forward to start the build in earnest this week and hopefully post a blog update with some parts soldered on next weekend !

Posted in Uncategorized

Re-purposed PiMuxClock

IMG_1711It’s been a good while since I have posted any blog updates, no excuse just distracted by life in general. This is quick weekend project at my daughters request. Concerned that some of the plants in her student flat would struggle in the cooler weather she requested a temperature display. Looking around the options I remembered my first Kickstarter was also set up to display temperature along with time. So a quick hack to remove the time element, change the board mounted DS18B20 sensor to cabled version and add max / min logging and it’s ready to take down to her.

Using it with a Pi2B is a bit of overkill but I am gradually changing out existing projects to Pi3s so have a few ‘spare’ hanging around.


The hardest bit was stopping one of the cats helping – I just managed to apprehend Pinky as she ran off with an ESP8266 board which clearly looked like a mouse to her !

I’m guessing the next request will be to add some form of push notification, if the temperature drops to a certain point but that is for another day.

The code is available on my GitHub site if you are interested.


Posted in Uncategorized | Tagged , ,

6 Years of Pi – Then and Now

Ok so in addition to losing about 5st (31kg) over the last 6 years RaspberyPi’s have really reignited electronics as a hobby. So for a 6th birthday post I thought I would have a dig around and see what my oldest still ‘working’ project was. I remember I got 2 Pi B early on – one was used for a chicken water heating project and eventually suffering Chiltern-20131201-00348terminal water damage when the enclosure leaked  (to date this is the only Pi of in excess of 30 I have killed). So continuing the hunt I found the news reader Pi I built for my wife based around an article in one of the early Pi magazines. Amazingly it is still working. I plugged it into a monitor just to remember

new box screenwhat the old LX  GUI looked like!

news box

As you can see it’s warning us about Storm Emma.




Going on from the Pi’s  it’s worth recognizing that somewhere down the line I have gained a workable knowledge of :-

  • Python
  • Arduino’s that oddly I had never used before – thanks to the RasPiO® Duino for getting me into this.
  • BBC microbits

Oh yes and run 3 successful kick-starters.

This year things are a little quiet on maker front mainly because out of a shear madness I have signed up to run the London Marathon, training for which is taking up a lot of time a weekends. The charity I am raising money for is the MS Trust. I picked the MS Trust having heard about the support they gave the mother of a colleague. They are not a big charity, so sponsorship money raised through events like this is really important to them. The Trust focuses on helping people live well with MS, helping them to receive the best possible care and the highest quality information. Over 100,000 people in the UK as diagnosed with MS, which remains the most common cause of neurological disability in young adults. Because diagnosis is usually in their 20s and 30s, the impact on the individual and their family if life changing and life-long.

The link to my Virgin just giving page is https://uk.virginmoneygiving.com/DavidMSaul





Posted in Uncategorized | Tagged , ,

TF WordClock S/W Updated

IMG_2102Just a quick post to say I have updated the TF Wordclock s/w to rev 5, the existing rev 3 s/w was not working reliably with the Nov29 2017 Raspbian update, in truth it had been on borrowed time since early 2017 when there was a major change to the Max7219 library. This did not offer an upgrade path so the TF was stuck with using a depreciated version  of the library.

Luckily the library author, Richard Hull suggested a way I could implement required functionality with the updated library –  now called luma.led_matrix.

This has required quite an extensive change to the TF with English, French and Dutch Wordclock versions  now available – unfortunately Latin is not currently supported.

If you want / or need to move to the rev 5 code you should do this from a clean installation of Raspbain.

Staying with the rev 3 code this is fine but be careful not to do an apt-upgrade as you will almost certainly find your TF will stop working.

The Nano version is not affected by this change.

Posted in Uncategorized

Standalone Video display with a Raspberry Pi

IMG_0785A couple of weeks ago my wife arrived back from Lindengate a local mental health gardening charity she volunteers at with an old PC monitor and asked if I could set it up to continuously display a series of videos, she had created to highlight the charities work. Typically the when was the following week and the where was a local doctors surgery. The when meant I was limited to ‘in stock’ parts and the where meant untended operation in a public place. I knew there were various existing instructions for doing this sort of thing with a Raspberry Pi and after a bit of internet searching found an article for a video looper on the Adafruit website which simply automatically plays video files from memory stick  inserted into one of the Pi’s USB sockets. I tried this out on a Pi3 and it ticked all the boxes in terms of play back and ease of use, so that was the s/w sorted.IMG_0782

Looking at where display was going  it needed not only to start-up without the user having to do anything but also not look too much like a DIY project built out of parts from my garage one night !  To get the size down I moved to a Pi Zero, with a VGA converter dongle [VGA being the only input available on the monitor] and a short micro USB to ‘type A’ converter lead. This all worked fine but did leave the perennial problem of how to safely turn the Pi off. Given a keyboard or VNC connection was out of the question I opted to fit a on/off switch to the Reset / run connector on the Pi. This way we could include a clear instruction to set this switch before removing the power. Now on paper I know this is not the best way to power down a Pi but in practice I have found it does seem to avoid corrupting the SD card.

IMG_0700Once tested this was all packaged in a small box  left over from another project. This I was able to mount on to the back of the monitor using one of the VESA mounting points on the back of the screen. The end result looked really quite professional with no unnecessary bits of wire hanging out !




So far the display has been put to good use in the doctors surgery and at the charities Autumn fair. The total parts cost excluding the monitor was around £32 using a Zero 1.3

Link to the Lindengate Facebook page

Posted in Uncategorized | Tagged , , | 1 Comment

BBC micro:bit Scrolling display

IMG_0682(1)Looking at my distributed BBC micro:bit clock I got to thinking, could I make a display screen using a number of micro:bits, using the radio functionality to update the screens ?To see if the basic timing would work I created some very rudimentary code on 4 micro:bits. Initially I tried to use the ‘display.scroll’ function. After much fiddling I did get this to work after a fashion, but in truth it looked rubbish. On the point of giving up I thought I would see what it would look like using the ‘display.show’ function. This produced a much more readable result so I decided IMG_0694to go on and develop some ‘proper code’. I had previously looked at with David Whale’s python ‘microbit’ module and this seemed a great way to get the text strings ‘into’ the micro:bit. which solved the problem of how to front end the display. The remaining s/w built used in my distributed micro:bit clock.


The software for the scrolling display has 3 elements;
[the pink x in the names indicates the rev number where I plan to develop the s/w further]

1) The micro:bit display node application [node_scroll_showx.py]

This is a simple python app you need to download on to each of the micro:bits that form the message display. The s/w for each micro:bit is identical. The software listens using using the radio function for any messages addressed to it coming from the gateway micro:bit displaying any valid character using the display.show function. It will keep displaying this until it receives a new valid message. The address of each display node is set the first time the s/w is run (normally this would be directly after download). The micro:bit will display a ‘?’, to show the address needs to be configured. The address is set using button ‘a’ and once correct store it using button ‘b’ – the address is stored in non volatile memory. On subsequent restarts it will be automatically selected, but you can change it by holding down button ‘a’ and resetting the micro:bit.

2) the micro:bit scroll display gateway application [gate_scroll_rx.py]

This is a somewhat more complex python app, performing 4 functions receiving messages from the Pi, creating the scroll effect, segmenting the message and finally transmitting the individual character information to the display node micro:bits.

Information is received from the Pi via a USB connection, this is described further in the RPi gateway application section.

Message format

The basic message format is <type><message>. ‘type’ is either ‘1’ to display a static message or ‘2’ for a scrolling message. So for examples if the gateway micro:bit receives the following message ‘2HELLO WORLD’ you would see ‘HELLO WORLD’ scrolled across the display node micro:bits. This would be repeated until the next message is received.
Static messages are automatically truncated to the number of characters in the display. If you want to see how the scroll process works the best way is to look at the python code but in simple terms I create a shift register in s/w and simply cycle it.

Setting the number of nodes

The gateway micro:bit needs to know how many display nodes it is talking to, this is set the first time the s/w is run (normally this would be directly after download). The gateway micro:bit will display a ‘D’, to show the number of nodes needs to be configured. This is set using button ‘a’ and once correct stored using button ‘b’ – the number is stored in non volatile memory. On subsequent restarts it will be automatically selected, but you and change it by holding down button ‘a’ and resetting the micro:bit.

3) The RPi gateway applications

The gateway application running on the RaspberryPi communicates with the micro:bit gateway via a USB connection, using a python module called ‘microbit’ (thanks to David Whale) for telling me about this – here is a link to his github. To date I have just written a few demo applications using the microbit module. When you first run an application using the microbit module it will take you through a setup process to allow the s/w to identify USB connection name. It will attempt to use this name for future connections. If this fails you will need to go through the identification process again, you may also need to restart the Raspberry Pi. The 4 apps I have currently uploaded on to GitHub are;

  • A simple program to display a user inputted string,  [gateway1.py]
  • A clock demo [gatewaytime_date.py]
  • A Tweepy application which will scroll any messages with a specific prefix. [tweepy8a_microbitxx.py]
  • A basic GUI that allows you to scroll / show strings or display time in a range of formats [scroll_GUIx.pyw]

The GUI app is my first real attempt to use Tkinter and I am sure I have broken a number of, but it seems to work and was interesting to code


One of my goals in developing the scrolling display was to avoid any extra hardware or the need for expensive sockets etc. To get the best effect the node micro:bits need to be mounted in a straight line as close together as possible. The mounting board I used is just a bit of fibre board I had spare. Having worked out the required spacing I drilled a series of 3mm hole, then used 2.5mm stand-offs and screws to mount using just the 0v and 3v ‘holes’. Using 3mm img_0697-e1505571864514.jpgholes with 2.5mm screws gave a bit of ‘slop’ to get everything aligned neatly. You can find a copy of the dimensions I drilled to at the end of this post.

Initially I just used individual batteries to power each micro:bit. Once I was happy the with the mechanical arrangement I found a suitably rated 3.3v supply and changed to power the node micro:bits via the GND and 3v pins – if you go down this route you need to be very careful as an error here could end up destroying all the node micro:bits. Also most importantly you have to include a diode on the 3V line.IMG_0671(1)

This stops a micro:bit ‘back powering’ all the others when you are downloading code to it via the USB line – I am guessing the USB supply on the micro:bit is not rated to drive 10 micro:bits ! You can see how it is wired up in the picture below



Rear wiring detail


Front face of 10 digit display


The dimensions I used for drilling the mounting board


You can have a look at some short videos of the scroll display working on my YouTube channel

Initial demo

10 digit display demo

Tweet display demo


Posted in Uncategorized | 1 Comment