Thursday, November 28, 2013

Black Friday (and beyond) sale

I was going to have a Black Friday sale anyway, but now I have one more reason for it, and it's an embarrassing one: the latest batch of PCBs have a little flaw, but they can be easily fixed. So, until I run out of them, both the Wise Clock 4 kit and the Complete Wise Clock 4 kit will be $10 less, for $57 and $115 respectively. (As always, I also offer discounts for multiple units, just ask.)

The photos below show a few ways to fix it. Basically, the GND terminal of the USB connector is disconnected from the board's ground. The short wire re-connects them again.


The sleekest way would be on the bottom, using a resistor terminal inserted together with the 2x8-pin female header, as shown in the photo below.


Solder the other end together with the 6-pin FTDI connector.

Here is the story of how this happened. The PCB used to be 101.2 mm in length. That was 1.2 mm longer than the 10 cm limit imposed when using Seeedstudio's PCB prototyping service. I never had a problem before, I always got them manufactured like they were 10 cm in length. Now, Seeedstudio decided to enforce the 10 cm limit (or pay up like they were in the next size bracket). I reacted by shrinking the board, cutting 1.2 mm from the right side. It seems that the 1.2 mm side was very important.

There is more, unfortunately: in the process of generating the Gerber files, I even forgot to select the "Top names" for the silkscreen, so now the resistors are not named at all.


When you install the resistors, keep in mind that 3 of them, with values of 4k7, must be positioned in the correct places, as shown in the assembling instructions. (The other resistors are all 10k, soldered stress-free in the remaining resistor places.)

And that's why the board is now essentially free with the kit. If you don't feel confident that you can do it, please ask me to fix it for you. I will solder the little bridge wire and also solder the three 4k7 resistors correctly. You do the rest.

Note: The photo shows the board bare, but the PCB in the kit comes with the SMD components (SD card socket, the DS3231 and the 3V3 regulator) soldered already.

And here is the (latest) schematic, for those interested in details.


Wednesday, November 27, 2013

The ugliest project I've built so far

Based on this photo from BroHogan's gallery of Geiger counters, it was supposed to be a simple encasing using Adafruit's Arduino enclosure. Everything looked neat and clean inside, even with room to spare.
I wanted to use LiPo instead of AAA batteries, to avoid opening and closing the device every so often. This required the use of a LiPo charger, for which I picked the one I already had, the seeedstudio's LiPo Rider.

I spent countless hours trying to put this puzzle together:
  • only 4 places for screws;
  • small(ish) charger board must to be solidly anchored to the case (since an USB cable will be plugged in frequently), yet it does not have any hole for screws;
  • 6 wires (battery, V out, switch) must be soldered to the charger SMD board;
  • 12 wires need to connect the Geiger board to the LCD, on the other half of the case;
  • trim pot suspended somewhere (since there is no room for it on the PCB);
  • power switch to fit in the rectangular opening of the bottom ;

When I thought I figured it out, the two halves of the case wouldn't close because things inside were too tall/thick. Back to the "drawing board". Took out the ATmega328 from the Geiger board (it was touching the LCD connectors, which were already minimized for space), and replaced it with a cheap ($4) "Arduino Nano" (or is it "Mini") from ebay. This also helped immensely with the wiring: instead of connecting 12 wires between the case halves (Atmega328 to LCD), I had to solder only 3 (Vcc, Gnd, Int).



After a few more kludges (e.g. re-positioned the inductor on its side, removed the (over)power(ing) LED on Arduino Nano), I ended up with something , as the saying goes, "only a mother can love".

The lesson I learned from this experience is that, if one wants a seamless, solid, beautiful, project, one needs to either design the board for an enclosure, or the enclosure for a board. Trying to mix and match the board with the enclosure leads, at best, to something ugly.


Did I mention that I worked on it on and off for about 3 months?
The red light in the bottom left corner is the "charging" LED. (And then there is the somehow annoying LCD's backlight, visible through the translucent enclosure.)


The power switch is advertised as being the smallest rocker power switch out there. I only had to file off about 1mm on the upper side of the original rectangular opening to make it fit.

Another lesson I learned: use a transparent enclosure only when the inside looks perfect and you want to show it, and by "perfect" I mean even no visible wires.

Stay tuned for the next version of this Geiger device. (You did not think I would stop here, did you ? :)

Thursday, November 21, 2013

Nixie tube clock miscellany

Honestly, one of the reasons behind my latest infatuation with Nixie tube clocks is trying to understand why so many people got so fascinated so quickly and so suddenly with them, although they are not cheap, and although they simply show the time with 4, sometimes 6, digits.

In any case, I'm in the bandwagon now. I designed an Arduinix(TM) variant, based on my previous observations. One of the main differences is that the components sit low on the board, so that a "tube shield" can be plugged on top, similar to akafugu's VFD modular clock. The top "tube shield" can host (at least in theory) up to six IN-2 or four IN-17 (four IN-12 would not fit).




For the "IN-2 tube shield", I downloaded and used the eagle library called "russian-nixies.lbr". Guess what? For the digits to be shown vertically, the IN-2 part needs to be rotated about 45 degrees clockwise. I did not know that until I got my IN-2 tubes. Essentially, the IN-2 tube shield I have is kind-of useless now, unless one uses it for an "artist project" (to quote Pete of PV Electronics, seller of Nixie kits on ebay). That means that the tubes are connected to the PCB with wires, so that they can be placed at artist's fancy. I know Nick is an artist :)

Lesson learned: don't design the PCB until you have all parts in hand.

PS Getting the high voltage (180V) on the new board was just a matter of adjusting the trim pot. No surprises this time.

PS2 Although I did not try it yet, the "Open source Nixie tube shield" sketch should work, with minor modifications, with Arduinix, I reckon.

PS3 Please contact me if you have a need for this PCB or want to buy one.

Wednesday, November 20, 2013

Alarm clock app for iPhone

My young friend Rami left his comfortable and safe permanent job with a solid consulting company to start his own business, mainly writing apps for mobile devices. His first app is "Deep Sleep Alarm" for iPhone, available for download in the App Store.

The app is free, with nice graphics and useful functionality, basically making sure you are not "cheating" when  waking up :)  Please give it a try.



He is currently working on the Android version.
Rami, keep up the great work!

Monday, November 18, 2013

Another Nixie clock

For "unknown" reasons, these days things don't move as fast as they used to. I have a dozen or so unfinished projects on my desk, most of them waiting for parts to arrive. And usually and unfortunately, when I get the long awaited part, something else is missing... or not fitting,... or not working.
Today I was finally able to finish the "Open Source Nixie Tube Shield", for which I pledged $15 on kickstarter in return for the PCB.
Without paying attention to the schematic (was it even published before the campaign ended?), I thought it was just another variation of the same Nixie theme, which it really was. I expected to have all parts on hand already, including the Nixie K155ID1 driver Russian IC. Surprise! Instead, the circuit uses CD4028 decoder plus HV transistors. And that's where the 4 week wait is coming from.

I liked the compactness of the board even before I soldered the almost 100 components. But I was a bit disappointed when I realized the shield had a (minor) flaw: the area above Arduino's USB A connector is as highly populated as the rest, if not more. Not only the metal encasing of the USB connector will short the high voltage components on the shield above, but the shield cannot be even pushed all the way in.
A workaround (which I ended up using) is to have an intermediary shield between Arduino and the Nixie tube shield. Another solution is to use an Arduino variant with the mini B USB, like Seeeduino or Leonardo.

But all's well that ends well. To cut the story short, the sample sketch provided worked just fine without interventions. Hardware-wise, I added a DS1307 RTC (since I was going to build a clock), a buzzer (for alarm and chime) and a Bluetooth module (to set up the time without buttons). The only kludge required was a change in the core file Tone.cpp, where I replaced Timer2 with Timer1.

Below are a few photos. For enclosure, I (again) went for the the poor-man's solution, this time hand-cut (as opposed to laser-cut) transparent acrylic plates. (The long standoffs are 60mm, in case one wants to reproduce the experiment.)


I was happy to "upcycle" my Arduino Duemilanove, with the nice bottom exposed and visible :)
The prototype shield was something that I thought I will never use again, but it came in handy.


I also borrowed an idea from akafugu, with the bigger front plate creating a nice slope.



One thing I skipped (because I don't like the combination) is the blue (or any other color, for that matter) LEDs under the tubes.

A working version of the code is available here. It is based on Tyler's code (timer-based multiplexing of the digits, anti-cathode poisoning etc), with added support for RTC (DS1307) and functionality for setting up the time, alarm time, enabling/disabling alarm etc through Bluetooth (using an Android phone or tablet, for example).
The clock can execute the following commands, sent from BlueTerm (after pairing with the device):

  • TIME=hh:mm - sets the current time (second is set to 0);
  • ALARM TIME=hh:mm - sets the alarm time; the alarm hour and minute are also saved to eeprom (and retrieved from there whenever the clock is powered back on);
  • SHOW ALARM - sends back to BlueTerm the alarm hour and minute
  • ALARM ON - enables the alarm; this is also saved to eeprom; the Alarm On/Off status can be shown with a LED connected to A0;
  • ALARM OFF - disables the alarm;
  • STOP ALARM - turn off the sound after the alarm starts beeping;

Note that all commands must be upper case.

The "Stop alarm" feature is reminiscent of Rami's "Deep Sleep iPhone app" and also of Ramos alarm clock (coincidentally, another Nixie clock, close source though), where both of them are asking for user interaction to stop the sounding alarm. Well, in order to stop this Nixie clock from beeping, one needs to open BlueTerm, pair the devices, then type in "STOP ALARM", a sequence of actions that requires anyone to be pretty much awake.