Monthly Archives: April 2015

radio options

When we demonstrated at the Informatics Jamboree, I found out something I didn’t know about one of my colleagues – he may be working with speech, but he knows all about radios from his past employment.     We had a chat about the difficulties of working in buildings with massive stone walls.  He’s been kind enough to suggest I send him our radio specifications for him to have a look.  I’ve been asked about the radios before, so rather than just email him, I thought I’d explain what we have here.  At the moment, we don’t have a very formal idea of a problem to be solved, but I do have a test in mind that will raise one – trying to monitor the principal areas in our pilot sites (Christ Church Morningside and the Methodists) on as few Pis as possible.  That way we’ll have some idea about range and placing equipment when we start with our alpha test sites.  I know a good few people who’d be interested in the results.

Continue reading radio options

Mini Maker Faire

Heat Hack took a table to the mini maker faire at Summerhall on 19th April as part of the Edinburgh Science Festival. It was an all-day event with thousands of visitors. The maker faire itself is fascinating, there were folk doing traditional crafts like screen printing and upholstery but there were also robots, laser cutters, 3d printers, homemade arcade machines, a piano made from bananas (yes really!) and someone making ice cream with liquid nitrogen.

We took along a candle votive stand we’d made and invited anyone passing to make an LED candle to add to the stand. We also had temperature sensors attached to helium balloons broadcasting the temperature of the ceiling. Oh, and Jean and I did a talk about how the project started and where we hope to be going with it.

There was so much good energy in the faire that it was a great day all round, not only demonstrating our makes and talking about what we’re hoping to do with Heat Hack, but also seeing what other groups are up to.

What’s my IP?

A recurring problem we face is connecting to a Raspberry Pi via the network. You put the wi-fi credentials on the SD card, plug in a wi-fi dongle, power up the Pi … and then you need to know what IP address has been assigned to enable you to connect to it from another computer. This isn’t an issue if using the Pi as a normal computer with monitor and keyboard attached, but we usually run them ‘headless’ with just the JeeNode receiver or a camera attached.

As part of building a standard SD card image I’ve been putting together several alternative ways for connecting to a headless Pi:

  • Serial cable. This is a very reliable fallback for when other methods have failed. The default Raspbian distribution configures a login terminal on the serial port and this will be available so long as it hasn’t been disabled to make way for another device on the GPIO pins.
    You will need a serial to USB converter such as one of the JeeNode USB BUBs or an FTDI cable.
    Using male-to-female jumper wires, connect GND, TX and RX on the Pi to the serial converter. Note that TX on the Pi goes to RX on the converter and vice-versa.
    IMG_20150424_170159
    On the connected computer open a serial console (e.g. using PuTTY on Windows). You will need to find the relevant serial port e.g. COM3 on Windows or /dev/ttyUSB0 on Linux. The Arduino serial terminal can be used but isn’t very good for entering text. The correct baud rate is 115200.
    Once connected the ifconfig command can be used to find out the Pi’s address.
  • Avahi. This is the Linux implementation of multicast DNS (mDNS). Bonjour and Zeroconf are other names you may come across. If the computer you are connecting from also supports mDNS you should be able to access the Pi just using its name and not need to know the IP address.
    If that doesn’t work, a browser tool can be used to list all mDNS services on the network to locate the Pi and reveal its address.
    – Linux – the avahi-browse command is part of the avahi package.
    – Windows – http://hobbyistsoftware.com/bonjourbrowser
    – Android phone – ZeroConf Browser.
    – Bonjour Browser for Mac / iOS.
    For the default SD card I’ve added a custom service to make it easier to locate the Pi. This will appear as _heathack._tcp in the browser.
  • Ethernet cable. Normally you would need to enable network sharing on the connected computer so that it can allocate an IP address to the Pi. To simplify things I’ve reversed this so that the Pi runs a DHCP server. When you connect to the Pi it will assign an address to your computer and the Pi will always have the fixed address of 192.168.212.1. The only problem with this approach is that the Pi won’t have any internet access via the ethernet cable, but it will make fixing wi-fi problems easier.
  • Speak the IP. Based on Andy Brown’s suggestion I’ve created a little script to speak out the address via the headphone socket. His original script was in Python, but I wanted to make some modifications so ended up writing it in shell script which I’m more familiar with. It’s available on Github to view here but to download it you’ll need to get the whole heathack package.
    Instead of running it from rc.local, there is an install script that will create an entry in /etc/network/if-up.d/ so that it only runs once the network is up and an address has been assigned. This also means it will re-run whenever the network changes. It repeats the address ten times to give you a chance to catch it.
    I found some free audio files online that are designed for telephony systems and a set of these is included, but the audio quality is quite low so I also created files using Windows’ built-in text-to-speech. The TTS files are the default.
  • Other ideas. We have a couple of LCD displays which are designed for use with the JeeNodes, but the interface is standard I2C so it should be fairly simple to connect them to a Pi instead.

Heat Lamp ready for the Maker Faire

Here’s some images of the recreated heat lamp from the HeatHack launch. It’s now a compact tabletop size rather than the 1.5 metres of the original floor lamp.

IMG_20150413_165229

The electronics are all neatly hidden away inside the base of the lamp with just the remote temperature probe and power lead visible outside.

IMG_20150413_164908     IMG_20150413_165008

 

The firmware has also been simplified a lot. The original had temperature and humidity sensors, could display an animation or simple linear gauge, transmitted the readings wirelessly and could show readings from the local sensors or a remote JeeNode. This turned out to be far too much to demonstrate easily so the new lamp only does temperature with a flame or snow animation for higher and lower temperatures.