Some history

For some funny reason I always end up building clocks whenever I start fiddling around with gadgets.

Last year I got into Arduino stuff so I plugged in a 2x16 character LC display, added a DS1302 time keeping chip and was happy. Next thing I know is that I received a 16x24 LED matrix display from Sure Electronics Ltd. I hooked up all the peripherals that I could find, 2 one-wire temperature sensors (DS18S20?), additional 32k eeprom, ...

Everything worked really nice, except it was not connected to the internet. And I always wanted to be able to open a shell on my clock... big grin

So I considered rewriting the Arduino code an porting it to linux, using my Beagle Bone board.

The hardware

Right now it comes down to this:
  • Beagle Bone board (720MHz super-scalar ARM Cortex-A8 (armv7a), 256MB RAM, USB host, Ethernet, ...)
  • Sure Electronics 16x24 LED dot matrix display (DE-DP11111, green, HT1632C?-based 24*16 LED dot-matrix info board)
  • A cheapo USB wifi dongle
  • The box of the dot matrix display makes a nice case, btw
  • DS18S20? one-wire temp sensor
Here you can see the hardware in a first test:

(in the middle of the picutre you can see the Beagle Bone board with a usb wifi dongle plugged in, a temp sensor at the bottom and the display at the top)

http://youtu.be/qTEzMTQ0-Ds

The hardware goes into the little cardbox together with a little sticky tape and a 5V power plug. That's it.

IMG_1921.jpg

Displaying time with scrolling headlines (a bit blurry but you get the idea)

IMG_1924.jpg

Inside temperature:

IMG_1926.jpg

The software

The software consists of a main application written in plain c and some shell scripts. The application is natively compiled on Ubuntu, running linux kernel 3.2.33-psp26. I used Netbeans on my Mac for that and set up the Beagle Bone as a remote compile host. Source code needs to be visible via NFS or samba on both systems.

The application basically just handles display operations. Data to be displayed is read from the file system.

Every minute a cron job starts and reads an atom newsfeed with the latest headlines and an xml file from yahoo weather. The file also extracts all the valuable information (current outside temp, current weather conditions, weather forecast, 2 recent headlines) and writes them to files.

Every five seconds a shell script reads the one wire temp sensor from /sys/bus/w1/devices/28-*/w1_slave and writes the data to a file.

Of course there is also a webserver running showing all the information that is available of the clock including reboot/shutdown links...

Here is the result. The scrolling text is much better readable in reality. Blame it on the cell phone video.

http://youtu.be/GN7uGYCtviA

Helpful links

-- MatthiasWientapper - 05 Dec 2012


Update:

In the mean time the clock is powered by a Raspberry Pi because the Beagle Bone died with a shorted 3.3V rail.
Topic revision: r2 - 28 Jun 2013, MatthiasWientapper
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback