loading
2/12/12 update
A non-military display codebase is here: http://www.picaxeforum.co.uk/entry.php?63-AXE133Y-Evolution-with-20X2-for-Display-12-hour-Clock-amp-Temperature

Digital Clocks have been a fascination for many electronic enthusiasts for over 50 years.  My first homemade digital clock used a clock chip from Radio Shack (Archer brand) and some old fluorescent digital displays (tubes!) intended as replacement parts for calculators.  I built many of these in my college days because they made really nice gifts and were relatively inexpensive; my wife purchased arts-and-craft wooden boxes and painted and decorated them for the display case.  One still survives at her mother's house after 40 years and still works.  Of course, I'm still the only one that can set it after a power failure.

Technology has made digital clocks with "atomic" auto-setting widely available in both digital and analog forms, often for prices under $10.  With prices so cheap, it is difficult to justify building a home-brew clock these days.  But something interesting has become available in the past 12 months at an affordable price and it is again fun to build your own digital clock and you can program and customize the software in many ways: for example, perhaps a Valentine present that says "I Love You" instead of "Current Time:" on every hour!  Endless possibilities.  The newly affordable technology is OLED and it glows!  No backlight required... the pixels produce their own light when energized.  These new displays are fantastic and affordable at under $23 U.S. dollars which includes a very powerful PICAXE microcontroller, uC.

The project being presented here requires more than novice skill to assemble, at least average soldering skills will be required and you will need a fine-point soldering iron - so put away that brazing torch and get out the pencil soldering iron and small diameter rosin core solder.  You will also need a PC (Windows/Linux) and a homemade serial download cable: DB9 to stereo 3mm jack.  The programming software is free and is downloadable from a reputable site in the UK.  All will be detailed in the following sections.

Step 1: Step 1 - Parts Are Parts

Gathering the parts ...

1) This step will require some creativity since one part (the quartz timing circuit) must be cannibalized from an inexpensive wall clock.  I got my quartz timer from a wall clock hanging in my doctor's office that had been given to the office by a drug company.  The clock had not run in years and the original carbon-zinc battery had made a nasty mess: the office manager was happy to give it to me along with another one!  I also have ordered a few spare clocks from this eBay dealer and have found them to be similar enough that they circuit can be made to also work: http://myworld.ebay.com/jy-home  If you are comfortable with building electronics from schematics, then a few minutes spent with a Google search will find many alternate circuits that will produce a 1-second pulse that is acceptable for this project.  However, except for "free", it will be difficult to beat jy-home pricing of $2.18 (inc. Shipping) from this link:
To disassemble and extract the quartz timing module and for modifications required, consult this article:

2) The next item that must be ordered unless you are just fortunate to have a few in your parts box, is the InfraRed, IR, detector.  There are many of these available to the electronic hobbyist and I purchased mine from here:
3) The last critical item for ordering is the AXE133Y OLED display with the PICAXE 18M2 uC chip.  These are available from:
and are reasonably priced.  You will receive the 2 line X 16 character OLED display and the 18M2 piggyback PICAXE module for a price that typically only provides for an LCD serial display.

Full BOM with approximate price as of 12/26/2011:
Quartz Clock Module . . . . . . . . . . . . . . . . . . . . . . . . . $2.18 inc. S/H
IR 38KHz detector. . . . . . . . . . . . . . . . . . . . . . . . . . . . $1.29 + S/H
AXE133Y OLED display module. . . . . . . . . . . . . . . . .$21.95 + S/H
and
From spare-parts/junk box or online or Radio Shack, etc.
2 (two) small signal diodes, 1N4148
1 (one) 1K 1/4W resistor
1 (one) 10K 1/4W resistor + 1 (one) 100 ohm 1.4W for IR module*
1 (one) TV remote control, old "Sony" or old/new "universal"**

Note:
* IR modules values may require changing based upon specific IR module, so these two resistors are approximate values. Consult the manufacturers spec. sheet for values specified in their sample circuit.

** The PICAXE firmware recognizes "Sony" compatible signaling.  I am using a "dollar store" universal remote that has the "Sony" mode selected per the in-box instructions.
 

Step 2: Assemble, Test, Program, Enjoy...

Assemble the OLED display:
Once you have your inventory of parts in-hand, then assembly can begin.  When I created my clock, I started with the OLED display only because I had purchased this item before thinking about a clock!  So, the order of assembly is not really important, but you should test the OLED display after assemble and before reprogramming.
 
Test the display:
The PICAXE 18M2 chip is pre-programmed by Revolution Education, Rev Ed, to include a power-on test message.  Simply connect GND (0V) and +5 (V+) to pins marked on header 2 (H2).  "In" on H2 is not used in this project.  When connected to a well-stabilized +5 volt power supply, the OLED display will display the message:
Line 1:  Serial OLED
Line2: www.picaxe.com
 
Assemble the 1-second quartz timer
Carefully follow the instructions provided by Jose Pino.  This involves soldering the two diodes and one resistor to the extracted clock board.
 
Testing the timer:
Because the timer circuit will include an in-line resistor to +5 volts, you can test the circuit by connecting the resistor to +5 and connecting the GND connection to the power supply ground.  Then connect the junction of the two diodes (cathodes)  to an LED and the other LED connection to ground.  The LED should dimly flash each second - reverse the LED pins if the LED does not flash on the first attempt.  The voltage at the cathode of the two summing diodes is roughly 4.4 volts and has a duration of about 50Ms (milliseconds) so you may have to try several small LEDs before finding one that you can see when it flashes.
 
Assemble the IR decoder module:
The exact resistor values used in the IR circuit will be based on the recommendation of the specification sheet for that particular device.  My part uses a 10K resistor and a 100 ohm resistor, both 1/4 watt parts but 1/8 watt to 1/2 watt parts will work equally well if you just have them in your parts bin.
 
Testing the IR decoder:
Consult the manufacturer's specifications for how testing should be accomplished.  In my case, I have a digital oscilloscope and I could easily monitor the pulse transitions.  Without a scope, you will likely just have to assume the circuit is working and test after connecting to the AXE133Y display board.

Reprogram the AXE133Y with the clock software code:
You will need to download the PICAXE Programming Editor (free) from the Revolution Education:
http://www.picaxe.com/Software/
After download and installation, connect the serial programming cable (USB or RS232) with the pin-plug to the PC and the other end to the AXE133Y programming jack.  Power-on the AXE133Y and use the PE Options button to bring up the Options and click on the "Mode" tab and then the "Check Firmware Version..." button. If everything is connected correctly, the PE software will respond with the firmware version of the 18M2 PICAXE chip.  You must correct any errors in communications before you can continue.
Download the code from this page to your PC and then open the code in the programming editor by using the "File Open" option.  Once the code has been loaded into the programming editor, you can transfer the code to the PICAXE and update the program (sometimes called "burning the [code into the] chip...")
 
The connections between IR and clock and the AXE133Y module
On the rear of the AXE133Y module is the PICAXE piggyback board that you installed.  Labeled on this board are three normally not-used connections: C0, C1, C2.  Connection C0 will be used to connect the 1-second pulse from the quartz clock module (the two diode cathodes.)  ConnectionC1 will be used to connect the IR module.

Things to remember:
- The clock display (AXE133Y), the quartz clock module, and the IR module all share the same ground (GND) connection.

- Wires should be kept very short to minimize the effects of AC hum which may be introduced into the IR and Clock lines.  An induced electric signal can create havoc with this circuit.  You may find that placing a 22K resistor between 0V and C0 on the piggyback board will provide a small load and assist in minimizing interference on the clock line.  The best way to avoid interference is to assemble the working circuit into a metal box.

- Setting the clock involves inputting 6 digits, one at a time.  The input format is HH:MM:SS and the clock will automatically start with the sixth digit pressed on the remote.  If you are attempting to "hack" the time display to a radio or other accurate source, you may need to allow 1/2 to 1 second for the internal software to resync with the correct display after pressing the value for the last second.  That is, press the last second input a weebit before the accurate time source indicates that time.  Practice makes perfect.

Enjoy you newly built OLED clock with InfraRed, IR, remote settings.

Keep a watch on this link for additional improvements and new software announcements:
http://www.picaxeforum.co.uk/entry.php?39-IR-set-18M2-clock-implemented-into-AXE133Y-OLED-display

- Ray
 

Step 3: Add Thermometer

I have updated the code to allow for a thermometer to be displayed.  Required is a 10K quarter-watt 1% resistor and a 10K "NTC" thermistor.  One leg of the resistor goes to +5, the other leg of the resistor and one leg of the thermistor are connected together and this goes to pin "C.2" on the display piggyback board, and the other leg of the thermistor goes to ground.

The entire upgrade is here: http://www.picaxeforum.co.uk/entry.php?41-IR-set-18M2-Clock-Thermometer along with the necessary code.  Free registration is required before you may download, but this is the official PICAXE product site, so it is both secure and most informative... a great resource.

- Ray

About This Instructable

3,285views

7favorites

License:

Bio: Ray Burne is my pseudonym, I sometimes write on various Blogs and Sites. Effective 12 June 2013, Ray has decided to no longer participate as ... More »
More by RayBurne:Minty Magic Morse - Arduino Style PICAXE Pitcher Perfect Thermometer A PICAXE Infrared "logging" Thermometer 
Add instructable to: