Category Archives: project

Finding Neighbors With Niche Interests

On the Internet, it’s quite easy to find people with similar interests.   When I first started thinking about building out a mesh network in my neighborhood, a quick search led me to the Toronto Mesh, a very active group which actively contributes to the global mesh building community.  But no active members live near me.

In a smaller area, you might know all of your neighbors, but it would be unlikely that you would find someone with the same interest.

My neighborhood is densely populated – how do I find people who might be interested in dabbling around with a WiFi mesh?  First, I reached out to someone that I knew might be interested.  This is the best way – we immediately connected our networks, and our mesh grew to two nodes.

Next, I posted to Facebook.  Unfortunately, the subset of my Facebook connections in my neighborhood don’t overlap with my technology connections.

I printed a few signs and posted them on some community bulletin boards, which did not generate any response.  I decided I would try a small mailing, targeting the apartment and condo units within WiFi range of my unit.

Invitation to Build Mesh Network

I’ve sent out 47 postcards over the past week – I mailed some to a neighboring building, and hand delivered others, hoping I might get a response from one or two.  So far, no such luck.  Given the lack of a compelling application, and the attention I pay to all the material we receive in our mailbox, the limited response is not a complete surprise.

I’m not sure what I’ll try next.

Willowdale Mesh

I’ve always wanted to experiment with building out a mesh network.  Over the last few months, I have been reading about various technologies, and after stumbling on the Toronto Mesh, decided to experiment with their prototype CJDNS Raspberry Pi image.  After successfully testing this with several Pies and VMs, I’m going to start looking for others in the neighbourhood to see if we can build out a mesh network in Willowdale.

The current state of our network is documented here: here:

Dempsey Park, Willowdale, Ontario

Willowdale Mesh

August 2017 UPDATE: I have taken down my node as I was not able to generate enough interest.  Please reach out if you’re interested in building out the mesh.

A mesh network is a network where all participants can communicate with each other, with each participant cooperating with the transmission of information.

Although I can’t think of a practical application for myself, I think it would be fun to build, and I would like to start a wireless mesh network in Willowdale/North York.

Wouldn’t it be neat:

  • To have a wifi connection in Dempsey Park?
  • To build a network of wifi connections, allowing me to reach  friends beyond the range of wifi, at the other end of my street?
  • To connect to my car, 18 floors below me?
  • To connect to my home network in my laundry room?
  • To meet other people nearby who think this is neat?

Getting Started

To connect to the current mesh:

  • You need to add support for the CJDNS network protocol to your system
  • If you can see the tomesh wifi hotspot, you can connect over wifi with a wifi card which supports 802.11s.  Alternately, we can bridge the networks over the Internet – just send us an email.

The easiest way to connect to the mesh is to setup a Raspberry Pi 2 or 3, with a TP-Link TL-WN722N USB wifi adapter, and install’s CJDNS prototype software, using ‘tomesh’ as the SSID for the wireless network.

Once you have successfully connected to the Willowdale Mesh, you should be able to view a status page at the following URL: http://[fceb:c499:c028:df7e:3748:a690:6e34:e27e] (note: this site is not accessible on the public Internet).


Join our group:

Current State

There are currently 2 to 4 nodes on the Willowdale Mesh Network.

Willowdale Mesh Node Map
Willowdale Mesh Node Map

Avenues for Exploration and Experimentation

Given the low cost of data plans and inexpensive home Internet, outside of experimenting with mesh networks, there is little need, and likely little interest, in building out an isolated mesh network in the Willowdale.

It might be more interesting to build out a mesh network capable of easily delivering WiFi Internet access to all devices.  Such a network would almost certainly attract users, particularly in public areas such as Dempsey Park or Mel Lastman square.  Such a network would present interesting performance, logistical, legal, and financial challenges.

For this type of network, I have been looking into used routers from TP-Link, like the TL-WDR3600 or TL-WDR4300, running OpenWRT, using their 2.4 GHz radio as an access point, and the 5 GHz radio to mesh with the B.A.T.M.A.N. + BMX mesh software.


Easy Music Everywhere. Audio Amplifier – Part 1

While in high school, I bought a really cool rack mount amplifier at a garage sale.  It was branded Queon, and had lots of inputs – it was great.  It was supplemented during my university years with an 8-track player/amp combo, acquired from Value Village.  The Queon met its end when a roommates’ cat knocked over a vessel of water that had been rested on top of the amp.  The 8-track player/amp combo met its end in a post-university move.

I’m not an audiophile, and have been using PC speakers ever since.  They sound OK, but:

  • The volume control always seems to fail
  • The permanently wired connections seem to fail
  • Sometimes, it is nice to listen to the radio
  • The bluetooth connectivity of little portable speakers is pretty handy
  • DLNA / Airplay / Google Casting functionality is also pretty neat

So what I want is an amp for some bookshelf speakers that have been sitting unused.  My ideal amp:

  • has a volume control
  • has a minimum of 4 inputs (PC, radio, Bluetooth, DLNA or alternative)
  • has a remote
  • is smaller rather than bigger

As most people are looking for home theater systems, there’s not much around that meets this criteria.  I have looked at inexpensive amplifiers from Amazon, such as the Lepai LP-2020, but it only has a single input.  I came across a place called Shenzen Audio, which had all sorts of neat audio products, but it’s hard for me to order something >$100 from completely unknown brands.  The Teac AI-301DA is what I want, but more than I’m willing to pay – I can sacrifice on audio quality and power.

So, I’m going to put together my own.  I’m going to pick an off-the-shelf amplifier module, and connect it to an audio switch, add a micro-controller to control the inputs and volume.  I’m even thinking of adding an “auto-input” switch, which tries to auto-switch to the intended input (there must be a reason amps don’t do this – I’ll find out when I try).

I’m sure I just don’t know how to search, but I’m surprised how little I could find about such circuits.  The best article I read was “How-To: Make a solid-state A/V switcher” on Engadget, but I wanted to avoid soldering surface mount components.  There are many switching chips out there, I found it challenging to pick out a basic one.  I also considered just using a mechanical switch, but decided I wanted the option of using a remote.

Finally, I decided to use an older design using a chip called a 4066.  A number of forums indicate that the audio quality of designs using this chip is poor, but I tried it out – it sounded fine to my ears.  It will be hard to tell for sure until it’s done, but there’s always an opportunity to replace it in future revisions.

Update – Weather Station

I finally moved my weather station from a solder-less breadboard to a prototype board.  I’m actually surprised the breadboard survived last winter.

Until I get around to adding an anemometer and rain gauge, this is probably as far as this project is going to go.

Weather Station Circuit Board
Weather Station Circuit Board

Designing A Mobile Phone Mount

In the car, I like to use my phone for playing podcasts and directions.  My work phone was recently upgraded, and I was looking for a practical way to mount it.

As cars are kept for years, and phones change regularly, I didn’t want:

  • anything permanent
  • anything that used adhesives (they never come off!)
  • suction cups
  • anything that blocks vents

The neatest design I’ve seen so far is a steering column mount on Thingiverse, which I had been thinking of modifying for my phone.  As my car has a two-tiered dashboard, I thought I would just create a dock that fit my phone in the lower tier.

I prototyped the dock with pink insulation foam, intending to model  and then 3D print the finalized design.

Foam Prototype of Mobile Phone Mount
Foam Prototype of Mobile Phone Mount

After using the prototype for a week, I realized a 3D printed dock was overkill.  The phone pretty much stood up by itself on the dashboard, without the dock, so long as I wasn’t driving on ramps well over the speed limit.

I just needed something to provide a little friction, to stop the phone from slipping around.  I ended up sacrificing a beloved mouse pad.

Slot cut in Mouse Pad for Mobile Phone
Slot cut in Mouse Pad for Mobile Phone

It works great!

Final Mobile Phone Car Mount
Final Mobile Phone Car Mount

Building SIO2Arduino to enable an Atari 800XL to use SD Cards

Last winter, I built an SIO2Arduino circuit – it is an adapter, that enables the Atari to use disk images loaded on to a regular SD card.

My build of the SIO2Arduino SD Card Adapter
My build of the SIO2Arduino SD Card Adapter

To the Atari, the SD card works just like a floppy drive.  It’s was built following the instructions found here:

With a program called SDRIVE, I can select a disk image on the SD card, and then load it:

Selecting an Atari image on the SD card using the SDRIVE program
Selecting an Atari image on the SD card using the SDRIVE program

I never did get the adapter working perfectly – I can load certain disk images, such as ballblazer, but not others, like Karateka.  I think it would take a lot more investigation, and perhaps digging into code, to figure out how to fix this issue.

ballblazer running on Atari from SD Card
ballblazer running on Atari from SD Card

Until I get a suitable TV, this is likely as far as I’m taking this particular project.

Playing around with an Atari 800XL

My “RetroPie” days of emulating old games on the Raspberry Pi are over – from now on, I can play the real thing.

I was given a friend’s old family computer, an Atari 800XL in 2011.  They still had all the parts, except the custom molded cable that connects the floppy drive to the unit.

Receiving an Atari 800XL in 2011Receiving an Atari 800XL in 2011

5 years to the month, I finally got around to ordering a cable from a company in California that still has pretty much everything Atari ever made in stock:

I picked up a Donkey Kong cartridge (pictured) along with my cable order (the available, never released Bruce Lee prototype cartridges exceeded my budget).

As I don’t have a TV, I connected it to a PC with a Hauppage TV card.  As I don’t have the correct cables, I only get a black and white picture (I don’t have a composite cable, and the brightness and colour signals are split).  Also, Donkey Kong is unplayable with this setup, as the TV card adds a significant lag (eg: Mario jumps half a second after you jump).

Donkey Kong on an Atari 800XL
Donkey Kong on an Atari 800XL
In another post, I’ll write up how I hacked up one of the floppy cables and built an Atari floppy emulator with an Arduino, so that I can download Atari software from the Internet and load it off an SD card:

Open Apartment and Condo Doors Over the Web with your Smart Phone

Like many buildings, the building we live in has a panel at the main entrance which allows guests to call their hosts.  The guest initiates the call by looking up and dialing a apartment specific buzzer code, and the host can remotely unlock the front door by dialing 9 on their phone.

Occasionally, we’ve had the need for an extra set of keys when guests are visiting.  Given the ubiquity of smart phones, I’ve thought: Wouldn’t it be great to build a web interface which would essentially pick up the phone and dial 9, permitting entrance to the building without a set of keys?

The easiest way to do this was to write an application that uses an analog modem, which can detect a ring, pick up the phone, and generate tones.  Finding a suitable modem was the hardest part, given that there are so few applications for analog modems since the widespread use of broadband Internet in the late 1990s.  Further complicating things was I was looking to use a Raspberry Pi – this meant I needed a modem with a USB interface that works with Linux.  From my research, the  TRENDnet TFM-561U modem seemed to be the best fit for this purpose – testing has since confirmed it works great.

Lock and Key - Admin Screen
Lock and Key – Admin Screen

I wrote the application itself in NodeJS.  Using the administrative page (behind a firewall) the Host sets up a password, has the option of adding a note, and must set dates for when the password starts and stops working.  Note that there’s no login – it’s hard enough to remember a password, let alone the corresponding login.  The passwords are stored hashed (using bcrypt) – it’s assumed that there are very few logins setup, so when the guest logs in, the password they enter is compared against the hash of every password in the system.

Lock and Key - Public Screen
Lock and Key – Public Screen

The Internet facing, or guest page, is simply a passphrase box.  When a guest enters a correct password, the system will wait for a “ring”  (for up to 5 minutes by default).  The guest can then dial the buzzer code.  When the modem detects the ring from the main entrance, the application will instruct it to answer the phone, dial 9, and hang up.  The building’s entry system will then unlock the door, permitting the guest to enter.


  • I’ve only tested with my primary PC (Ubuntu Linux / Intel x86)
  • Node runtime
  • I’ve only tested with a TRENDnet TFM-561U modem
  • I’ve only tested in my building

Setup and Run:

  1. Get the code! You can download from GitHub, or clone the repository
  2. Install Node and the required modules.  In an Ubuntu Linux environment, this can be done as follows:
    sudo apt-get install nodejs
    sudo npm install express sqlite3 bcrypt-nodejs node-validator fs body-parser serialport
  3. You may also want to look at the PM2 process manager for Node – it makes it really easy to automatically start Node applications on boot up, and a dynamic DNS service such as the one provided by to access your
  4. Review the lockandkeyconfig.json configuration file.
    1. port: The port used by the public web interface (configure your router to expose this port to the Internet)
    2. adminport: The port used by the administrative interface.  This is used to configure accounts
    3. unlocktimeout: Length of time, following a successful login, for which the system will pick up the phone and dial 9.
    4. modemmanufacturerstring: The string used to identify the modem which should be used by the application.  Use the Linux dmesg command after plugging in a USB modem to see the manufacture string associated with your device. Use Conexant for the TRENDnet TFM-561U.
  5. You can start the program by running
    node lockandkey.js
  6. With the default values, to setup accounts, you can access the administrative interface at:
    and the door opening interface at:

Complete source code and build details:

Future Improvements:

I can see this particular project being useful to others – let me know if you have any suggestions.  For example, let me know if there is interest in a Raspberry Pi SD card image, a simple phone Android/iPhone app to avoid book marking the website, improvements to security, mandatory HTTPS, or eliminating the need for a dynamic DNS service in a home environment.

Update – March 27, 2017

One of my friends needed a solution to provide his clients with access to a condo unit he is renting over Airbnb.  He’s now using this solution, which is running on a Raspberry Pi.

My Weather Station

About 15 years ago, a friend of mine informed me that Sensirion would send a sample of one of their temperature sensors to anyone who filled a form on their web page (I’m not sure if this is still the case). After the Sensirion sensor arrived in the mail, I wired it to my PC’s parallel printer port, wrote a little code, and built a simple web page that could display the room temperature.

Ever since then, building my own weather station has been on my hobby-project back log. I realize one can purchase all sorts of thermometers and weather stations off the shelf, but I thought it would be fun to build my own.

I decided I wanted a wireless station with a web front end, which would measure and log temperature, humidity, barometric pressure, and the soil moisture of my plants.

Weather Station - System Overview
Weather Station – System Overview

I decided this would be a good project to learn about development with the NodeJS runtime.  I was pleased – not only was it easy to learn, but it was easy to do what I wanted.

The weather station itself is built around the Arduino platform, which collects data from various sensors, and sends an update every 15 minutes using a wireless module, to my PC, equipped with a matching wireless module, connected by USB (it is not using Wi-Fi).

Weather Station
Weather Station

Parts List
A) Soil Moisture Sensor
B) Battery Pack (I use 3xAA batteries)
C) DHT22 Temperature and Humidity Sensor
D) BMP180 Barometric Pressure Sensor
E) APC220 Wireless Module
F) Bare Bones Arduino (Atmel 328P Microcontroller)

On my home PC, I have a client application that listens for the broadcasts from the weather station.  When a reading is received, it makes a web service call to upload the weather readings to a server I have hosted on Amazon EC2.

The biggest challenge I encountered was power consumption. My first revision consumed 60 mA, and drained 8 AA Alkaline batteries in a little over a day.  I have since been able to reduce the average power consumption to about 1 mA, and have been running on 3 AA batteries for quite some time.

To achieve this, first, I incorporated the Narcoleptic sleep library for the Arduino, and sampled the temperature once every 15 minute, which saved about 12 mA.  Turning off the the wireless module when not in use saved about 8 mA.  The voltage regulator I was using to reduce my 12 V battery pack to 5V consumed 14 mA – simply moving to 3 AA batteries allowed me to eliminate it.  The final savings came from moving the circuit from an Arduino Nano clone to a bare-bones Arduino, which eliminated the draw from the Nano’s LEDs, voltage regulator, and USB-to-serial converter.

From my website, I can then view the readings and compare my readings with those from Yahoo Weather.

Weather Station Site
Weather Station Site

Check it out at  It is currently reporting the weather readings from my North York balcony.

Complete source code and build details:

Update – November 6, 2016: Moved parts from breadboard to prototype board