Author Archives: Geoff

Real-time Clock

One of the requirements for my irrigation controller project is to have an accurate system clock – irrigation programs need to run at the correct time.  This is where the absence of a Chardware RTC on the Raspberry Pi becomes apparent. – It isn’t a good idea to always assume that I will have network connectivity and access to NTP servers on bootup.  As a result, part of my project build includes a DS3231 RTC on the I2C bus of the Raspberry Pi Zero which is the brains of the controller. The RTC module that I bought is available in packs of 3 for under $5 on dx.com.

Continue reading »

Go with the Flow

While I was looking online for solenoid valves for my irrigation system, I discovered flow sensors… so I got myself one, like this one:

1" Nymet Flow sensor

1″ Nymet Flow sensor

The idea is that the flow sensor allows me to measure how much water is being used out of my rainwater tanks (and going onto the garden).

Continue reading »

Over-voltage protection

I still remember the introduction of a friend’s electronics textbook at university.  At least,  remember one sentence: “Experience gained is directly proportional to the cost of equipment destroyed”.  Going by that theory, I must have gained a lot of experience in Chemistry I, as I broke every piece of my glassware except my Liebig condenser!

This theory led me to deciding I needed to build an over-voltage protection circuit:

20160724-IMG_9394

Continue reading »

On-off switch another design progression

A couple of days ago the switches I plan to use to activate my on-off switch arrived.  I had expected them to be DPST switches, but they turned out to be SPST switches.  This required some redesign of my on-off switch to accommodate the fact that I only have one switch.  To do this, I am feeding the output of the switch into a pair of Schmitt trigger inverters (in series to act as a buffer) as well as into a NPN transistor.  The output of the buffer is then fed to my GPIO input, after first being adjusted to a 3.3V level using a zener diode.  The reason for using two Schmitt trigger inverters is so that my output is active-high, meaning that the output only exceeds the zener voltage of the diode for a short period – meaning that my power loss on the voltage adjustment is realistically negligible because the output is so seldom high.

On-off switch

On-off switch – improvements

My first version of an on-off switch for the Raspberry Pi showed some issues, and needed some improvement.

Here is a quick schematic of the improved version:

On-off switch v0.2

Continue reading »

Raspberry Pi on-off switch prototype

One of the challenges with using a Raspberry Pi as part of a gadget or appliance is having an on/off switch. What I have tried to achieve here is to have a switch mechanism that allows me to use a dual momentary switch to turn the Pi on or off.  When turning it off, the Pi needs to first shut down before power is disconnected.  The latest arrival from The Pi Hut is now part of a prototyping exercise:

20160611-IMG_9087

Continue reading »

An Airport Express replacement

So somewhere along the line I started using iTunes to plat music, and also started using Apple’s Airplay to stream music to Airport Express base stations.

Airplay receiver project

My oldest Airport Express has had a long hard life.  It’s power supply failed about 5 years ago.  I gave it a new lease of life by rigging a new power supply.  Now at nearly 11 years of age, it is starting to give up the ghost.  So, I decided to replace it with an open solution, using a Raspberry Pi Zero, PHAT-DAC audio board, and shairport airplay receiving software.

Continue reading »

Raspberry Pi and RTC alarm – initial prototype

One of the challenges I have been trying to work out is how to use the alarm of a real-time clock to boot a Raspberry Pi once it has been shut down.  I have been using DS3231 RTCs, which integrate easily with Raspberry Pi via I2C.  The DS3231 also has a pin (INT/SQW), one of whose functions is to indicate that an alarm has activated.

Recent Raspberry Pis (A+ and B+ models and the Zero) have a reset jumper.  If you short the two pins of the jumper (one of the pins is ground) it will reset the Pi if it is running, or if it was previously shit down, it will restart when the jumper is shorted.  Now, if you can link the output of the alarm on a RTC to the reset jumper on a Pi, it becomes possible to set an alarm on the RTC and then shut the Pi down so that it can boot up again when the alarm on the RTC is activated….. Continue reading »

Melbourne dusk

5775220009_2e2897938d
Melbourne dusk, a photo by GRehmet on Flickr.

The days might be getting shorter, but the opportunities for photos during my commute are improving again!

Autumn again

It’s Autumn.  That means Winter is on its way.  That also means calm mornings and sunrise on my ride to work.

Autumn also means that it is much more worthwhile carrying a camera while on my bike on the way to work!  That means the anticipation of spectacular sunrises and sunsets.