Archive for November, 2009

This blog has a good writeup of a 4 line LCD display connected to a Arduino – which in turn is connected to a master device using Xbee radios – a good way of building remote displays”

Arduino+XBee+LCD Info Device
This is an Arduino based wireless device that can display arbitrary content (weather, news etc) at the touch of a button, via an XBee radio. Currently it supports weather by zip code and displays on a 4×20 LCD, but it’s designed to easily expand to additional services. Some ideas for other services include: calendar events, traffic, next bus/train, tweets, news, mail, adjust thermostat, next track (itunes), turn on/off/dim light etc. This is mostly useful for quick information when you are not close enough to a computer (nightstand, living room, kitchen etc.) I chose weather as the initial service since it’s relatively useful and part laziness since my wife asks me for the forecast every morning so she can plan her outfit.

[From rapplogic: Arduino+XBee+LCD Info Device]

At around 3:30 this morning I started getting ‘503’ error messages from Pachube – these were not resolved until this afternoon, looks like they had a serious outage with their database server.

On the plus side my data collection software continued to work and Twitter it’s messages, so at the very least some of my exception handling worked!

So my graphs now look a bit patchy.

I’ve now got the first cut of my software to pull data from our Wattson electricity monitor, and display it on Twitter, Pachube and a Ardunio with a LCD display.

This first screendump is from a Pachube graphic on our house website.

200911231849.jpg

(Click for larger)

And here is the house Twitter page :

200911231851.jpg

(CLick for larger)

I have now added a new site to display all our house sensors online. All data is collected and stored on the excellent Pachube site, and all the graphs on the site are automatically generated from the collected data.

  200911231835.jpg

(Click for larger)

Almost real time update of the electricity usage in our house :

It is not exactly obvious how to take a Apple HiFi apart – but after hunting around I found this source :

How to dismantle / open an iPod HiFi

UPDATED 28 August 2008

As I was relaxing on the sofa last night, I became aware of the general silence in the room. For the ordinary guy this might not mean anything, but when you are sharing the room with a 10 month old who’s just started walking, silence is usually a fair indication of a misdemeanor being committed. In this case, the little darling had pulled the cover of the front of my iPod HiFi and was busy prodding the middle of the speaker cone. Result: one deformed speaker cone, and one angry daddy.

So, I figured I would just dismantle the iPod HiFi and push the middle of the cone back out from behind. In fact, if I had thought about it for any amount of time I would have realised this is not possible as the center of the cone connects directly to the magnet, preventing any rear access. This is pretty much the case with all speakers, but I wasn’t focusing properly, and having decided to open the damn thing and got my toolbox out, then it was coming apart and that’s that.

As it turns out, opening up an iPod HiFi is not a simple task. I spent ages looking at it from every angle trying to figure out where the screws are. I eventually decided they must be under the rubber foot on the base of the unit, but after prising part of it off (it’s glued on), and seeing no screws I gave up on that notion. It took some extensive Googling, but I eventually found a Swedish website with a couple of photos that pointed me in the right direction.

So, here are my instructions. If you are suffering the depressed centre speaker malady like myself, please don’t go to the trouble of dismantling your iPod HiFi – it won’t get you anywhere.

[From How to dismantle / open an iPod HiFi | David Hurst]

I have now had a Wattson power meter for more than a year – and although it now comes with software for the Mac this is IMHO not terribly useful for my purposes, so I wanted to read the Wattson in real time, and use a server to send the information to other programs around the house and outside it.

This fits into the house monitoring system I am building using Arduino microcontrollers both to collect data, and to display data. More about this in other posts.

But the necessary information is hard to come by, and the public API has been a long time coming.

Bu using a terminal emulator running on my laptop and the FDDI drivers i normally use for the Arduino I managed to communicate with the Wattson (19200 – N81 for anyone interested), and through various tests I found that if I send the command “nowp” to the Wattson, it returns a hex string containing the current power usage.

After discovering the “ruby-serialport” library I wrote a short (and very ugly) ruby program to retrieve the data at regular intervals and also to twitter these (at http://twitter.com/gisvoldhouse)

#!/usr/bin/ruby

#

# My first try at Ruby programming for the Wattson power meter

#

require ‘uri’

require ‘net/http’

require(‘rubygems’)

require(‘time’)

require ‘serialport’

gem(‘twitter4r’, ‘0.3.1’)

require(‘twitter’)

require(‘twitter/console’)

require ‘timeout’

  

   $version = “0.1”;

   $debug = false;

     

#params for serial port

   port_str = “/dev/tty.usbserial-A4004sx2” #differs depending on your setup

   baud_rate = 19200

   data_bits = 8

   stop_bits = 1

   parity = SerialPort::NONE

     

   sp = SerialPort.new(port_str, baud_rate, data_bits, stop_bits, parity)

   sleep(2)

   sp.write “nowp\r”

   puts “Start”

begin

   while true do

   inn = ‘ ‘

   sp.write “nowp\r”

   inn[0] = sp.getc

   inn[1] = sp.getc

   inn[2] = sp.getc

   inn[3] = sp.getc

   inn[4] = sp.getc

   if $debug then

   puts inn

   end

   if inn.length < 6 then

   inn2 = inn.slice!(1..4)

   print Time.now.hour.to_s + ‘:’ + Time.now.min.to_s + “->” + inn2.hex.to_s + ‘W’

   puts ”

   sleep(2)

   twitter = Twitter::Client.from_config(“/users/tor/.twitter.yml”,’house’)

   message = “Power usage just now ->” + inn2.hex.to_s + ‘W’

   twitter.status(:post,message )

   sleep(0)

   end

   sleep(300)

   end

end

From Instructables a RFID doorlock built using a Arduino

introArduino RFID Door Lock
I wanted to make an easy and secure way to enter my garage. RFID was the best way to unlock my door, even with my hands full I can unlock the door and push it open! I built a simple circuit with a basic ATMega 168 arduino chip and a ID-20 RFID reader to control an electronic door lock.

The circuit consists of 3 separate parts, a Reader to read RFID tags, a Controller to accept data from the reader and control the output of the RGB LED and the Electric door lock. The door lock is first installed in a door and tested with a 9v battery to ensure correct installation. In most cases you want a Normally Open circuit on the door lock, or Fail Secure. This means the door stays locked when no current passes through it. When 12vDC is passed through the electromagnet in the door lock, a plate in the lock gives way and allows the door to be pushed open freely.

[From Arduino RFID Door Lock]

As with all modern houses ours has at long last started twittering

200911172033.jpg

(Click for larger)

it’s of course called “gisvoldhouse” and so far tells you the temperature and humidity level in our garage, and the outside temperature.

More to come – courtesy of a Arduino connected through a Ethernet shield, and a piece of Ruby software running on our webserver.

Wow – had no idea they were this profitable without the appstore.

Apple is now the single most profitable phone maker in the US, Strategy Analytics said today. Although it has just 2.5 percent share and makes just two similar iPhone models, Apple is estimated to have generated about $1.6 billion in operating profit from its cellphones in the summer where market leader Nokia said it had only generated $1.1 billion. Nokia’s second-place finish comes despite it being one of the most experienced phone builders and Apple having only entered the category in 2007. [C o n t i n u ed… | print | email | comment]

[From MacNN | Apple, iPod, Mac news @ The Macintosh News Network]

12Next