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 http://www.hotelexistence.ca/weather/.  It is currently reporting the weather readings from my North York balcony.

Complete source code and build details: weatherstation.zip

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

2015 Balcony Crop

Which cob is suitable for my 100 meter diet?
Which cob is suitable for my 10 meter diet? Which one is from the store?

Our 2015 balcony crop is coming in.

  • Our strawberry plants have yielded a couple of mediocre berries every day
  • The verdict is out on our first broccoli plants. They do not resemble what we get from the grocery store
  • Cherry tomato yields are good (production is exceeding consumption)
  • Carrots are tasty, but small
  • All flowers are beautiful
  • Pole beans are excellent
  • Chives are excellent
  • We added a third pot of sweet corn. In spite of our late start, it looks like yields have increased and quality is good.

James Bond enters Public Domain in Canada – for now

I stumbled on an interesting article, Copyright quirk leaves James Bond up for grabs in Canada, in the Globe and Mail the other day.  In Canada, copyright expires 50 years after an author’s death.  Ian Fleming died in 1964, which means his James Bond series of novels have become a part of the public domain in Canada.

However, this might be short lived. Michael Geist, a Canadian academic specializing in intellectual property and technology law issues, writes that Canada will likely accept extending copyright to life plus 70 years in the Trans-Pacific Partnership (TPP) Free Trade negotiations.  It has been life plus 70 years in the United States since 1998.

Copyright is granted to allow content creators to receive compensation for their work, providing an incentive to create original work.  Many (myself included) would argue that 50 years of protection is ample – if I died tomorrow, my children, and their children, would directly benefit from any royalties collected from my work though my estate.

At some point, society receives a greater benefit from having the work enter the public domain, where anyone can read and re-print the text, and re-use the characters and story lines.  I, for one, have enjoyed the BBC’s contemporary take on Sherlock Holmes, made possible by the characters in the public domain.

In Canada, one can now create their own modern take on the James Bond character and novels, without getting permission or paying royalties to the rights holders (note that this does not include the movies).

The Bond books themselves can now be redistributed freely in Canada. Project Gutenberg is an organization that digitizes and distributes public domain texts – the works of Mark Twain, Jane Austen, and Sir Arther Conan Doyle are all available.  The Canadian branch of the site, Gutenberg.ca, has already taken advantage of our life+50 copyright and posted a copy of Ian Fleming’s Goldfinger.

A part of me wants to buy Fleming’s books, scan them, and post them on a Canadian web site while I still can – unfortunately, this site is hosted in the US, so you won’t see them here.

Response to Toy Subway Car

My toy subway car has generated some local interest!

Check out:

Designing a toy subway car

After learning OpenSCAD basics in a previous project,  I set out to build a toy Toronto TTC subway car for Brio-compatible wooden train tracks.

I stumbled on a simple drawing of the TTC H6, and started tracing the simple features in Inkscape, exporting the shapes to OpenSCAD, and adding depth to the design.  For more information about the TTC H6, visit the Canadian Public Transportation Board’s page.

I found a design for a Diesel engine on Thingiverse by Nick Randall – I decided that his trucks and wheels would make an excellent base for my train, as he had a tested design with the right dimensions.

TTC H6 Subway Car for Wood Tracks
My TTC H6 Subway Car for Wood Tracks

The Toronto Public Library has a 2 hour limit on 3D print jobs.  To work within this limitation, I printed the design at low resolution over three sessions.  The body was printed in two sessions, and glued together with Krazy Glue (cyanoacrylate).  In one of the sessions, a different filament was used.  The final toy was painted and assembled with screws.

I learned a few more things about 3D printing, design in general, and  sharing online.

  • Parts printed with PLA material can be glued together with Krazy Glue
  • In this instance, there is a visible gap.  The parts were printed with different filament, and as a result, the parts didn’t align exactly.  The output from one of the print jobs warped.  When laid flat, the middle was probably 2 to 3 mm above the surface
  • As would be expected, detail is lost when printing at low resolution
  • When designing a model for printing on 3D printers, the limitation of not being able to print in mid-air must be considered.  Although printing with supports is a solution, it leaves a less-than-perfect surface.  It would be interesting to learn how more experienced designers work around this issue.  It would also be interesting to try a 3D printer capable of using a dissolvable support filament.
  • A model printed with PLA can be painted with Testor’s Enamel

The library is a great place to learn about 3D printing, and print small parts.  It is less expensive than other places – a two hour print job costs about $6.  For my next project, however, I would probably look at other alternatives without these limitations.  I think the library has probably achieved a good compromise, making a technology available to anyone with interest to learn and a library card, but definitely not offering a service which would compete with commercial offerings.

When I thought about 3D printing, I though about the physical realization of an object.  In reality, there are many things that must be considered when designing anything physical, and 3D printing is not the solution to all of them.  This is evident even in the simplest of designs, such as this one, where metal screws are used to fasten parts and enable movement.

This model was designed to scale – this might be appropriate for a scale model, but the train looks very long relative to the other wooden trains on the track.  Many of the features, such as the lights, windows, and doors, are very small.  If I were to design another toy train, I would exaggerate features, and would not design to scale.  George’s Trains, a local model rail hobby store, apparently stocks a wooden subway train that follows these principles and appears to be a much better toy.

Finally, it has been fun posting and sharing my designs on Thingiverse.  Although I have accounts on other sites with social-network type features, this is the first time I’ve posted anything.  It is fun to have an forum to share my work, and it’s great feeling to see that people have looked at my design and clicked “like” – recognition for someone having fun with basic skills, practising a hobby.

This subway car can be downloaded from hotelexistence.ca or Thingiverse.

Realizing a 3D design

I haven’t worked in 3D at all before, and I was looking for a simple project.

As with the Brio/Duplo wagon, I was thinking about what was within my ability, and not commercially available.  I decided I would try to build a custom tire valve stem cap with my daughters’ school logo (a polar bear).

Polar BearLooking at freely available 3D modelling tools, I checked out Blender and OpenSCAD.  OpenSCAD seemed to be simple for someone starting out with designs built out of basic shapes.

I converted the bitmap logo I had to a vector drawing using Inkscape‘s “Trace Bitmap” feature.  Following an Instructables tutorial, I exported the bear’s outline and features to a DXF file, which can be imported into OpenSCAD.  I encountered number of difficulties (it has been a while since I completed the design – I can’t remember which issues, specifically, I encountered).  I tried again, with great results, using the Inkscape OpenSCAD export plug-in.

I merged the bear with a cap designed by Dan Ujvari, and printed it at the Toronto Public Library’s innovation lab.  I used a black permanent marker to highlight the bear’s details after printing.

Polar Bear Tire Valve Stem Cap
Polar Bear Tire Valve Stem Cap

It was interesting to learn that even with a simple project as this one, there are limitations to 3D printing.  It was almost impossible to remove the support material on the reverse side, as the bear is narrower than the cap. If I were to refine the design, I would make the bear the same width as the cap.  I definitely have more to learn about successfully designing an object around the limitations of current 3D printers.

This Polar Bear Tire Valve stem cap can be downloaded from hotelexistence.ca or Thingiverse.

My First 3D Printed Object

I have been excited about the potential for 3D printing for quite some time.

Shortly after our local library acquired a couple 3D printers, I took the mandatory course, where we were taught the two primary rules of printing at the library:

Rule #1) Don’t touch the heating element
Rule #2) Don’t print guns

Course completed, I started to think about applications.  What can’t you just buy, what makes sense to print?

The idea of combining Duplo and Brio seemed like a great idea – I was thinking of an elaborate track with bridges over bridges, and Duplo seemed almost perfect for the job.  What I really wanted was a piece with a wooden train (Brio) top, and Duplo bottom.

A quick search revealed that I wasn’t the first person to think about this, someone had already designed a Duplo/Brio bridge support system.  Looking into this further, and loading these parts into 3D printing software revealed that each segment would take about 2 hours to print – the maximum time allowed on the library’s printer.  Given that a simple bridge would require at least four segments, I looked for alternate ideas and stumbled across the Duplo/Brio wagon.

I downloaded the file, went to the library, and printed it out.  83 minutes later, my train was completed.  I attached the wheels to the body with paper clips, and glued fridge magnets to the ends for the couplings.  I was quite pleased with the end product (see photo).  The library charged just under $5 for the printing time, which is about what a train car costs from a local toy store.

 

Lego and Brio - Endless Possibilities
Lego and Brio – Endless Possibilities

Taking this idea further, I thought I may try to design my own toy 3D printed TTC subway or street car for wooden train tracks.  I have  occasionally seen them available commercially, but they are generally hard to come by.

 

 

Two Rocket Canada Day – Part 2

After lunch, the girls and I hopped on the subway and headed to the Canada Day events hosted at Queen’s Park.  We ended up having a  great time – there were free bouncy castles, live music, hula hoops, and more.

But I thought the coolest activity was the build and test your own air rocket, hosted by Makerkids.

The children were given pipe insulation for the rocket’s body, and duck tape, scissors, cardboard, streamers, and everything else you would need to complete an air rocket.

With occasional help from Rachel, Tegan built her rocket.

Fueling the Air Rocket
Fueling the Air Rocket

The Makerkids team had several launching stations setup on University Avenue, which appeared to be similar to the Make design.

As scotch tape was used for some of the cosmetic touches, I warned Tegan that the rocket may not survive its first test flight intact.  She decided to launch it anyway.

See the video for the test flight results.

Two Rocket Canada Day – Part 1

Shortly after breakfast on July 1st, Tegan picked up a recently discarded brown cardboard box sitting beside our recycle bin.  She had a vision in mind: she wanted to build a rocket ship.  She needed some assistance – the cardboard box was too thick to cut with her scissors.  So she created a design.

Technical Design Documented Prior to Implementation
Technical Design Documented Prior to Implementation

First, I was assigned the window.  With a utility knife, I cut a circle out of the box. A clear plastic lid, also sourced from the recycle bin, was installed.  Tegan then made the fins from the box’s former flaps, and installed them using packing tape.

Next came the nose cone.  Rachel was a proponent of using the two remaining box flaps, and building an A-frame, triangular nose cone.  Tegan had her heart set on a true conical design, but couldn’t quite figure out how to achieve it with the materials at hand.  In the end, we taped 9 sheets of construction paper together, and rolled the now super-sized sheet into a cone, and installed it on the top of the rocket.

Together, the girls painted the rocket red.  To this day, it sits in a corner of their room.

Testing, Quality Assurance
Testing, Quality Assurance

Who connects to random WiFi hotspots?

I do.  Even in an era of smartphones and data plans, every once in a while, I find myself searching for open WiFi hotspots.

Who else does?  I set out to find out.  I built a WiFi hotspot that served up an open-to-everyone community wall.

Community Wall Bulletin Board
Community Wall Bulletin Board

To build it, I set up my Raspberry Pi with a WiFi USB dongle, and configured it as a WiFi hotspot (with WPA security disabled).  I needed a name that would encourage people to choose my hotspot over the others in the area – “CommunityWiFi” seemed like a suitable name.

I chose to use my Raspberry Pi because:

  • its cheap enough I could leave it anywhere without worrying about it getting stolen
  • its small
  • it can run off a USB battery pack, so it can be taken anywhere

But there’s nothing special about this hardware setup – you could set this up with any laptop, a hacked Android phone, or home router.

The system is setup with a DHCP server, a DNS server (dnsmasq) configured to redirect all dns requests to the Pi, and a webserver  configured to send all requests to the Community Wall page.  The Community Wall consists of a couple PHP pages backed by SQLite.

Once the user attempts to visit any web page while connected to the hotspot,  the system will direct them to the Community Wall, where they can read and post messages.

I took the system to our local library one morning.  I tested it out with my smartphone, and everything worked great, but I received no posts over the hour or so I had it running.  This is likely because most library users will have already saved the connection to the library’s own WiFi.  I will be trying this out in other busy areas, without free wifi, and report back.

Some people have taken this idea much further than myself – check out PirateBox by David Darts.  A PirateBox is a mobile WiFi hotspot that allows any user to connect, chat with other connected users, and share files.

Download Community Wall Project Files