Raspberry Pi A+ Nixie NTP Clock

Who doesn’t like a Nixie tube based clock. Even my wife loved it. Bonus points if it’s very accurate.

I had in my parts box, for a very long time now, the display PCB from an old PH-meter. Old enough that it was done using Rusian 74141 clones – K155ID1 nixie drivers – a lot of logic chips (decade counters, serial latches, etc) and nixie tubes. It was also wired in a way that defied logic. Nobody could explain to me how it was supposed to work.

I used a hacksaw to discard everything from the old board except the nixie tubes and K155ID1 drivers.

A raspberry pi A+, a Nixie PSU from here [kosbo.com] and the PSU from an old IDE external HDD completes the build.

The A+ pi is nice because it’s cheap, small, draws less power than a B and has enough GPIOs to do away with any supplemental chips.

The first question I needed answered was if 3.3V is enough to drive the inputs of TTL chips (like the K155ID1). A breadboard circuit and a quick prayer not to burn the PI I had my answer: YES. Since I don’t read TTL outputs (feeding 5V to the unprotected PI GPIOs) I should be fine.

Second question, could I turn off a Nixie tube using the PI. Yes, setting the GPIOs driving the particular K155ID1 chip as inputs effectively turns off the tube attached to that driver.

The HV PSU takes 12V and outputs 150V for the tubes and 5V for the logic. Unfortunately the 5V part is done using a 7805 and so I was afraid a PI with a WI-FI adapter would be too much. I needed something outputting 12V and 5V with enough power for everything. I used the PSU (ok, the usb part is there too but unused) of a USB external 3.5 HDD enclosure.

Left PI with TP-Link Wi-Fi dongle. Right HDD PSU and USB adapter, bottom center HV PSU

The software part is quite easy. The PI has NTP configured to keep the clock accurate (and sets the time automatically on boot since the PI lacks an RTC). To drive the display part I run a simple python script.

The schematic is pretty simple: 4 x 4GPIOs connect to A, B, C, D inputs of the four K115ID1 drivers, 0..9 outputs go to tube cathodes. 12V power the HV PSU that raises this voltage to 150V connected via 22K resistors to tube Anodes. The PI and the four drivers are powered by the 5V line.

CentOS 6.x misses nobootwait fstab option.

Recently I added a new storage disk to a cloud server. The issue is that this disk might not always be available at boot time. There is an easy fix for this kind of problems. The nobootwait mount option (like it would show in a fstab entry):

/dev/xvdd1 /storage ext4 defaults,nobootwait 0 0


Note that the fsck order of 0 already ensures that fsck will not hold the boot process by complaining the disk is missing.

This is what I did, then I tried to mount my new attached disk:

mount /storage
mount: wrong fs type, bad option, bad superblock on /dev/xvdd1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail  or so

I checked dmesg and this is what it spitted out:

dmesg | grep xvdd1 | tail -n1
EXT4-fs (xvdd1): Unrecognized mount option "nobootwait" or missing value

I’ll be, CentOS never heard of it (surprise, surprise). I thought about nofailm but I was not sure it would do the trick.

This is what fstab(5) says about nobootwait

The mountall(8) program that mounts filesystem during boot also recognises additional options that the ordinary mount(8) tool does not. These are: bootwait which can be applied to remote filesystems mounted outside of /usr or /var, without which mountall(8) would not hold up the boot for these; nobootwait which can be applied to non-remote filesystems to explicitly instruct mountall(8) not to hold up the boot for them; optional which causes the entry to be ignored if the filesystem type is not known at boot time; and showthrough which permits a mountpoint to be mounted before its parent mountpoint (this latter should be used carefully, as it can cause boot hangs).

and this about nofail

nofail do not report errors for this device if it does not exist.

So I took the hackish route of adding noauto instead of nobootwait. This way the disk is not even mounted at boot time, and so it can be missing and added a mount line in rc.local.

cat /etc/rc.local

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

/bin/mount /storage &

Let me know if you know or find a better way of doing this.

No album cover art in Symbian ^3 Belle on an E7

Sooo, my beloved n900 kicked the bucket and the fine folks at Nokia Romania decided it’s not fixable and they replaced it. With an E7. After 6 weeks. Hey Nokia still wondering why you’re going down the drain?

I have my music neatly organized and with cover art embeded inside the id3tag. But it won’t show up. Actually it showed up for one album out of 15. So I started the hunt to see why. For tagging I use the excellent EasyTAG. First suspect was Type. When you select Pictures to embed you can set the type. I set it to Cover (front) A transfer and library refresh later I was happy to see that it still didn’t work. I checked it for the album that had cover art displayed and it was set too to Cover (front) but the Description: field was empty. On the albums that showed no covers it was set to the original filename.

So step 2 is to set Description: to empty.

So the excellent Symbian coders who released a half baked music app ( you can’t play an album if it has different artists for example) took the time to check for this damn filed and show nothing if it’s filled. Really, really smart.

Update:

Step 3, if you already copied an album and just updated the tags and copied over the cover will not appear. You need to rename the album folder and rescan. You can rename it back and rescan again if you want.

The n900 will be probably the last in a long line of Nokia phones I bought.

Star Trek S.C.E.

Have Tech, Will Travel is an anthology collecting the first four books from Pocket Books’ original eBook series about the Starfleet Corps of Engineers, depicting the missions of a rapid response team of SCE taking place during the 2370s. Several canon characters and concepts were included in the stories, but with new details not mentioned in televised Star Trek of the era.

I have recently finished reading every novel in the Star Trek S.C.E. series (Star Fleet Corps of Engineers). Being a Star Trek fan I read and like pretty much every Star Trek novel that’s out there. But from the ones I read I found SCE very, very good. Nice characters developing in the course of over 60 novels, unexpected plot turns and more.

Memory Alpha says:

Star Trek: Starfleet Corps of Engineers (or Star Trek: SCE) is a novel series which follows a rapid-response team of the Starfleet Corps of Engineers. First released as eBooks by Pocket Books, the books are also collected in paperback. It was conceived and created by Keith R.A. DeCandido and John J. Ordover.
In September 2006, DeCandido announced that, as of #67, the series would be renamed Star Trek: Corps of Engineers and the numbering reset, in an attempt to bring new readers to the line. In addition, the reprints in hardcopy – starting with Aftermath – would be in trade paperback format, allowing six to eight eBooks to be included per volume. The number of eBooks published per year would be reduced from twelve to six, to allow other ranges to be developed.
It was announced in March 2008 that original eBook publications from Pocket Books would go on hiatus following the end of Slings and Arrows – trade paperback reprints of the existing eBooks would continue.

If you havent, I reccomend you start with the Have Tech, Will Travel series (the first four novels), and I bet you’ll be hooked !

Star Trek 2009

I’m a geek, that means I like Star Trek. That also means that I watched the latest Star Trek movie as soon as it was possible. I didn’t have many expectations. Nemesis was a bit of a disapointment, and with everything new and changed I just went to see it. I was pleasently surprised. I found it to be a good movie. A bit different from what I call Star Trek.

Like the line said – Whatever our lives might have been, if the time continuum was disrupted, our destinies have changed. Abrams took a break from everything we knew. Every little detail we knew about the Star Trek world is broken. That, on one side, gives the producers the freedom to create a new Star Trek world for the current generations. On the other hand it’s a bit hard to digest for an old trekie like myself. I invested a lot of time to know, learn and imagine all the events in the Star Trek universe, it’s not nice for somebody to come and tell me to forget everything !

Another good thing is the music. I found it great. I listened to the sound track, and I can say that it’s very, very good.  Especially Labor of Love. If you haven’t yet, I suggest you go out and buy the soundtrack and listen to it – loud !

All in all, I’m happy that the franchise is back, and with a good movie. Even if it lacks the atmosphere I expect from trek movies, at least is good and worth watching.

Adam Savage on his obsessions

Ok so this might be old news for you, after all the video is from Dec. 2008 but I still find it extremely interesting, especially for the ones that only know Adam Savage as the guy goofing around on mythbusters.

Ok so this might be old news for you, after all the video is from Dec. 2008 but I still find it extremely interesting, especially for the ones that only know Adam Savage as the guy goofing around on Myth Busters.  If you like making stuff you WANT to see this.

Be Creative, experiment. It inspired me to brush up my creative projects folder. I really find that Adam once started is hard to stop. His insight into problem solving is also very interesting. Anyways, just watch it and comment. I bet that, if you are into building or tinkering with stuff you will like it too!

N800/N810 tablet as a Canon camera remote

I found a way to use a Nokia N800/N810 tablet as a Canon camera remote control. You can shoot, download and view your pictures on the big screen.

This post is also on the talk.maemo.org forum, but I decided to host it here too.

N800 camera remote control

I followed a thread regarding the port of gphoto for the Nokia Internet Tablets. Unfortunately gphoto

never got me further than list the photos in the camera and then hang and reboot.

Well then I noticed Eostimesync.

Eostimesync is a nice utility that syncs the time of your camera to the time of the n800. I liked it because I could sync my tablet to ntp and switch between host and client usb mode all from one applet. The camera sync was pretty much useless to me. But I wanted to know how it works. To make a long story short eostimesync uses a command line program named s10sh which is an userspace usb driver for canon cameras (many of them if I’m corect).

First thing linux taught me in 1998 was to type at the prompt:

command --help

So as root s10sh has the ability to:

  • Get ALL/ALL NEW images
  • List ALL/ALL NEW images
  • Set camera to computer time

and many more. The above are non interactive and are the ones useful for me. If you run simply s10sh it will give you an interactive shell similar to a DOS prompt. Of course your camera has to be connected by usb and your tablet must be in HOST mode. Oh and my camera has two usb modes “normal” – which is the canon proprietary format and the one that works with all the above and PTP which is only for image download. On your camera the modes could be labeled differently.

So, running s10sh -c does, according to the –help:

capture an image with the current camera settings (that’s your remote)

s10sh -c (capture)
s10sh -n (get all new images, non-interactive)

quiver imagename.jpg (see what you shot on the big screen)

See why I’m so excited about?

Oh and the camera is completely functional even when connected. I can shoot, change settings anything. I do landscapes a lot so I could imagine myself leaving the camera on the tripod and the n800 connected to use as trigger or big screen for more detail. also it would be helpful when doing macro. And of course it’s a LOT of FUN !

I also think you can change camera settings but I didn’t explore that.

A nice gui for s10h would be great, with buttons for settings, shoot, view last shot. Maybe someday…

Let me know what you think.You can also follow the discussion here (talk.maemo.org).

Getting sound to work on an old Deskpro EN and Slackware 12.2

I was trying to get rid of the separate sound card in an old Compaq Deskpro En (Pentium III) I use on a jukebox project. Easy job when you have the needed settings.

I was trying to get rid of the separate sound card in an old Compaq Deskpro En (Pentium III) I use on a jukebox project. Alsa-conf would only detect some weird isa-pnp card that did not work. After searching a bit I found out that the card is an ESS 1869 and is not autodetected. Reading on the alsa website I found that these are the settings that work:

(set in /etc/modprobe.d/sound)

# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-es18xx
options snd-es18xx enable=1 isapnp=0 port=0x220 mpu_port=0x388 fm_port=0x330 irq=5 dma1=1 dma2=0

# OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0

# card #1

alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss