Sunday 22 July 2018

Hither and thither

I have two homes, like someone who leaves their hometown and/or parents and then establishes a life elsewhere. They might say that they're going home when they return to see old friends or parents, but then they go home as well when they go to where they live now.
Aleksandar Hemon

Please don't go and leave me with that puppy!

Three generations in the new home in Perth

Down by the Swan River

Peeps on tour

Catching up with mates

Womens interest? What century are we in?

Back in Tassie and pruning the fruit trees

Running around with the puppies



Thursday 19 July 2018

Child's play

“We don’t stop playing because we grow old; we grow old because we stop playing.”
George Bernard Shaw

A small child by the name of Joseph is fascinated by switches and spends a fair proportion of time at church going around and flicking on and off the power outlets. Looking for a diversion ourselves, we hatch the following scheme: a box with five switches (one is on/off) and four lights, each time one of four switches is pressed, the lights change in some random fashion.

Meanwhile the debate about micro-controllers vs logic gate chips rages, with the old guard making amazing projects with combinations of logic chips and 555 timers, whilst the modern bunch write a few lines of code on an Arduino Nano and slam out a project in quick smart time.

So starting with a micro-controller (the amazingly cheap and competent Attiny13a) we have the following circuit up and running.

Four bright LEDs and a button (red wire)
The code was written and tested, including an interesting approach to the random number seed; taking a wound coil and attaching it to the A0 input pin, then polling three input pins and adding them together for a seed (myrand = analogRead(A0)+analogRead(A1)+analogRead(A2)) - not perfect but enough to create the appearance of randomness.

The problem remains, and it's a doozy - how do you then add three more switches when we have effectively run out of pins? Well as it happens a bunch of logic gate chips arrived last week, and among the offerings was a CD4077B - Quad Exclusive-NOR Gate, with the following truth table:


Regardless of how useful this gate might be in other situations, what was evident is that every time a switch is changed (X,Y), the output changes (Z). So theoretically two buttons could link up via a 2-input gate and have a single output of either High or Low (1 or 0). With two such couples of buttons linking to a third gate, four buttons should trigger the interrupt in the micro-controller from a single input - nice!

Which is what this looks like firstly as a diagram.


And what it looks like wired into the (almost) finished toy.


The buttons themselves are either "High" or "Low" and the diagram for their connection is shows how to achieve this.


Before sealing it and subjecting it to the ravishes of a toddler, here is the final(ish) product - some cleanup required on the copious amounts of hot glue!


Happy button pressing ya' little tyke.




Wednesday 4 July 2018

Images from the deep south

As to the fable that there are Antipodes, that is to say, men on the opposite side of the earth where the sun rises when it sets to us, men who walk with their feet opposite ours, that is on no ground credible. Even if some unknown landmass is there, and not just ocean, there was only one pair of original ancestors, and it is inconceivable that such distant regions should have been peopled by Adam's descendants.
Saint Augustine

Early morning mist on the hills

Sandy Bay just after dawn

Weird colours in the morning sky

The most dishevelled dog in all of Christendom