lucsmall.com

GovHack 2016

Over the weekend of 29-31st July 2016 I participated in my first GovHack. I teamed up with Jack Simpson, whom I’ve known since we attended the same Software Carpentry instructor training in Melbourne and worked out, through the normal course of conversation, that we were both Canberra residents.

We camped out at the UC Heritage Hack node at the University of Canberra. Tim Sherratt organised the “themed” node to cater to those interested in devising hacks around cultural heritage datasets. He provided a large number of examples demonstrating the fascinating insights that can be gleaned from such datasets. He mentioned that cultural heritage data is often far from “clean”. Instead it contains inconsistencies, ambiguous elements, formatting issues, missing fields, and a blend of structured and unstructured data.

All of this was true of the dataset Jack and I chose to work with. Our stated goal was simple: to visualise convict ship journeys to Australia over time. For this we turned to the State Library of Queensland digitised records of the British convict transportation registers. It lists over 123,000 of the estimated 160,000 convicts transported to Australia. What they were convicted of, what ship (or fleet) they journeyed on, when they departed, and where in Australia they alighted. It is a remarkable resource.

Wifi Hack for Raspberry Pi Zero

I add wi-fi to my raspberry pi zero. This great little single board computer arrived in the mail just days ago. I sacrifice a micro usb cable and a tiny wi-fi dongle to add network connectivity.

For more details on configuring a wi-fi dongle under Raspbian, visit this post.

Interpreting Weather Data

Here’s a week’s worth of temperature data from around my home. The blue, pink and red series are indoors. The orange and yellow series are outdoors - one inside a homemade Stevenson screen and the other under a pergola on the eastern side of the house.

Doing Something Useful With Shift Registers (NodeMCU and Nixie Tubes)

I use a NodeMCU (ESP8266) device to drive B7971 nixie tubes using 8 x 74HC595 shift registers and 8 x SN75468 high voltage transistor arrays.

I talk about the code that makes this work, including using a Lua table to create a lookup table mapping characters to hex values that are sent to the shift registers to light the correct segments on the Nixie display.

The Lua code is available as a gist.

See also my B7971 character designer and some notes on using the SN75468 high voltage driver.

Testing a Cheap USB MP3 Module

I try out a cheap USB MP3/WAV module. Plug in a power supply, connect an amplifier, and load up a USB flash drive with MP3 and/or WAV files and you’re in business.

Could be quite useful to play a high quality sound effect from an embedded project, such as from an Arduino.

Gluing Laser Cut Acrylic to Make a Box

I glue some laser cut acrylic pieces (recently arrived from Ponoko) into an exclosure for my nixie tube thermometer project.

Not really gluing so much as welding, I use dichloromethane (aka methylene chloride) to bond the pieces.

Getting Extra Outputs on the NodeMCU (ESP8266) With a 74HC595 Shift Register

I use the SPI port on the NodeMCU (ESP8266) development kit to drive a 74HC595 8-bit shift register IC. This technique can be used to get 8 outputs using just three GPIO pins on the ESP8266.

I show the breadboarded configuration, the circuit diagram, and the Lua code needed to drive the shift register.

The Lua code can be found here:

https://gist.github.com/lucsmall/66d9b6539df7a0daa569

Assessing the Hacking Potential of a Motion Activated Solar Light With LiFePO4 Cell

I teardown a $10 motion activated solar garden light from Kmart in Australia.

I bought this product to solve the problem of not being able to locate my house key on the key chain at night. But I couldn’t resist tearing it down to discover the electronics that make it work.

Unlike most solar garden lights, that use Nickel Cadmium (NiCd) or Nickel Metal Hydride (NiMH) battery technology, this unit is powered by a single LiFePO4 (Lithium Iron Phosphate) cell. These cells produce a nominal 3.2V, which means that with a bit of hacking this unit could probably be used to power a microcontroller such as an Arduino at 8MHz.

The Internet of Fairy Lights

I connect some rather nice fairy lights to an ESP-12 module based on the ESP8266 chip, running Nodemcu firmware and a simple Lua script. I describe how to connect a P-channel FDN340P MOSFET and a 2N3904 NPN transistor to form a high-side driver to switch big loads from this tiny wifi module and its 3.3V logic.

The result: I can control my fairy lights over wifi, potentially from anywhere in the world using MQTT. The possibilities are endless, but for now I’ll enjoy the cool glow and shimmering reflections of my “Moroccan” fairy lights…

The Lua code for controlling the fairylights using MQTT can be found here:

https://github.com/lucsmall/Fairylights