Simple handheld POV clock

Handheld POV clock showing time.

It is also called a wand clock. This project was inspired by a Circuit Cellar contest project. As soon as I saw it I wanted my own version. This is probably the simplest POV clock that can be easily made. As far as I remember, the Circuit Cellar contest project used a mercury switch as position indicator but I didn't have one so I made a simple inertial switch with the leg of a diode and a ball of solder.

I've posted schematics and firmware.

This clock was actually made during year 2000. The circuit is based around an ancient Atmel AT89C2051 microcontroller. The version of the microcontroller that I used is the 24PC, and its minimum operation voltage is 4V, so the three AA batteries don't last that long. This microcontroller should be replaced by the new low power 8051 derivatives such as Atmel's AT89LP2052.

The photo shows the front of the clock. I remember that after testing a few LED colors I've chosen yellow ones because those where the ones that looked the best for a certain level of on time and current that was determined experimentally.

Handheld POV clock front.

This photo shows the back of the clock and its battery holders.

Handheld POV clock back. Battery holders.

The inertial switch is the key to the good operation and display quality of this toy. As you can see it is located near the top of the clock, in the opposite side where it is supposed to be held.

Handheld POV clock back. Battery holders.

A closer look reveals that it actually is a SPDT switch and connects to the two external interrupts to trigger the beginning of the display action and to software debounce its contacts.

Handheld POV clock position switch.

A side view of the inertial switch:

Handheld POV clock position switch.

Firmware

Simple indeed but as many of my old projects, I left it uncommented. A lot of features can be added as it takes very little memory space.

$MOD51
$TITLE(RTCP COPYRIGHT ROLANDO CALLA Z 12/2000)

HR EQU 8H
MN EQU 9H
SC EQU 0AH
AD EQU 0BH
A2 EQU 0CH
ACOL EQU 0DH
ADJC EQU 0EH
ADJCR EQU 100
BCNT EQU 0FH
BCNTR EQU 128
SCMS EQU 55 ;2BH (PRV = 43)
SCME EQU SCMS+25
SBTM EQU SCMS-10 ;21H
STOP EQU SCME+10
CHGF EQU 20H.2 ;CAMBIO DE CARACTER=1
ADJF EQU 20H.1
MB EQU P3.7
HB EQU P3.5
AJMP INIT

ORG 3 ;EX0
AJMP EX0ISR

ORG 0BH ;TMR0
AJMP TMR0ISR

ORG 13H ;EX1
CLR EX1
SETB P3.4
CLR P3.5
CLR IE0
SETB EX0
RETI

EX0ISR:
CLR EX0
SETB P3.5
CLR P3.4
MOV ACOL,#STOP
SETB EX1
RETI

TMR0ISR:
SETB RS0
INC A2
CJNE R4,#60,LIV
MOV A2,#0
INC AD
CJNE R3,#60,LIV
MOV AD,#0
INC SC
CJNE R2,#60,LIV
MOV SC,#0
INC MN
CJNE R1,#60,LIV
MOV MN,#0
INC HR
CJNE R0,#24,LIV
MOV HR,#0
LIV:
CLR RS0
SETB CHGF
RETI

INIT:
MOV SP,#5FH
ACALL FILLFF
MOV HR,#0
MOV MN,#0
MOV SC,#0
MOV AD,#0
MOV A2,#0
MOV ACOL,#STOP
MOV TCON,#00010101B
MOV TMOD,#00000010B
MOV TH0,#0
MOV ADJC,#ADJCR
MOV BCNT,#BCNTR
SETB ADJF
SETB CHGF
SETB EA
SETB ET0
SETB EX0
SETB HB
SETB MB

MAIN:
JNB CHGF,NOGET
ACALL GETCHRS
NOGET:
ACALL SHOWSCR
JB ADJF,NOADJ
JB MB,NOMN
DJNZ BCNT,NOADJ
ACALL INCMN
MOV BCNT,#BCNTR
NOMN:
JB HB,NOHR
DJNZ BCNT,NOADJ
ACALL INCHR
NOHR:
MOV BCNT,#BCNTR
NOADJ:
JB MB,NOSET
JB HB,NOSET
;MOV BCNT,#BCNTR
DJNZ ADJC,MAIN
CPL ADJF
CPL ET0
AJMP MAIN

NOSET:
MOV ADJC,#ADJCR
AJMP MAIN

INCMN:
SETB RS0
INC MN
CJNE R1,#60,LVM
MOV MN,#0
LVM:
CLR RS0
SETB CHGF
RET

INCHR:
SETB RS0
INC HR
CJNE R0,#24,LVH
MOV HR,#0
LVH:
CLR RS0
SETB CHGF
RET

GETCHRS:
MOV R0,#8
MOV R1,#2
GTL:
MOV A,@R0
MOV B,#10
DIV AB
MOV @R1,A
INC R1
MOV @R1,B
INC R1
CJNE R1,#4,GCNC
MOV @R1,#10
INC R1
GCNC:
INC R0
CJNE R0,#0AH,GTL
MOV DPTR,#CHRS
MOV R1,#2
MOV R0,#SCMS
GTL3:
MOV A,@R1
MOV B,#4
MUL AB
MOV 0FH,#4
GTL2:
MOV B,A
MOVC A,@A+DPTR
MOV C,ADJF
MOV ACC.2,C
MOV @R0,A
MOV A,B
INC A
INC R0
DJNZ 0FH,GTL2
MOV @R0,#0FFH
INC R0
INC R1
CJNE R0,#(SCME),GTL3
CLR CHGF
RET

SHOWSCR:
MOV R0,ACOL
MOV P1,@R0
ACALL COLDLY
MOV P1,#0FFH
ACALL NCOLDY
MOV R0,ACOL
DEC R0
CJNE R0,#SBTM,SWDI
MOV R0,ACOL
INC R0
SWDI:
MOV ACOL,R0
RET

FILLFF:
MOV R0,#SBTM
FF:
MOV @R0,#0FFH
INC R0
CJNE R0,#(STOP+1),FF
RET

COLDLY:
MOV R7,#0FFH
MOV R6,#5H
CDLY:
DJNZ R7,CDLY
DJNZ R6,CDLY
RET

NCOLDY:
MOV R7,#0AAH
NCDLY:
DJNZ R7,NCDLY
RET

CHRS:
; 0
DB 088H,070H,070H,089H
; 1
DB 0F8H,0D8H,0B8H,001H
; 2
DB 0B0H,060H,050H,0B1H
; 3
DB 070H,050H,050H,0A9H
; 4
DB 018H,0D8H,0D8H,001H
; 5
DB 010H,050H,050H,069H
; 6
DB 088H,050H,050H,069H
; 7
DB 070H,068H,058H,039H
; 8
DB 0A8H,050H,050H,0A9H
; 9
DB 0B0H,050H,050H,089H
; :
DB 0F8H,0F8H,0A8H,0F9H
END

When reset, time is initialized to 00:00:

Handheld POV clock, time adjust mode.

The only complication is that to set the time, both push buttons must be held down for a second. When the clock is in time adjust mode, the time appears underlined and the buttons set hours and minutes each. To go back to normal time mode, again push both buttons for a second.

Handheld POV clock, time adjust mode.



Schematics:

I don't have the original schematic for this. So I've redrawn it in KiCAD's EESCHEMA.

Click for a larger version:

Handheld POV clock, schematics.

As can be seen, the LEDs are connected to a common +4.5V only with a very small resistor. The total energy for the LEDs is limited by the time they are allowed to remain powered.

PCB:
The PCB was designed in Tango PCB and it is probably lost forever. Next photo shows that it is a double side PCB.

Anyway, if you want to reproduce this clock you can do your own layout, or more easily, solder parts to a perforated board or simply use a protoboard.

The original plans called for a more compact version that fits in a pen. Maybe some day...


Bookmark and Share