Oscilloscope Clock II - An Essay*


The origin of this clock lies with the superb designs by David Forbes that can be found here, here and here. I cannot place sufficient emphasis on the fact that without this inspiration and the schematics placed in the public domain by David (as licenced), that my own clock would never, ever have got off the ground.

What makes this type of clock special is how the image is created. Many other scope clocks (including my own scope clock 1) use a pair of DACs to drive the CRT deflection amplifiers directly. Objects (lines, circles, arcs) are created by varying the DAC output in steps to move the beam about. Such displays can be "pixelated" in appearance - straight lines can appear with "jaggies". The design by David Forbes uses sine and cosine signals applied to the deflection amplifiers to generate a completely smooth and round circle (lines, arcs, ovals are generated in a similar manner). Such a display technique creates objects with no digital effects, pixelation, jaggies etc.

At least one other person has modified and produce this type of circle scope clock and details can be found here. Well done!

This page does not describe a scope clock fully built, cased and finished. But it does describe a fully working design that could easily be progressed to completion. This is a snapshot of my fully working test bed for ideas, alternatives and experiments; as I said it is an essay* in the craft.

N.B. I do not assemble kits for this clock!

Quick Links


It's a mess, but it's a working mess….


Hover the mouse for more information.



Some analogue faces

analogue analogue analogue analogue

Binary and BCD

binary bcd


digital digital digital

Other clocks

tengwar klingon circle pingpong


sun julian

Four letter words


Play time


Behind the scenes


standard 1 standard 2 symbols roman klingon tengwar 1 tengwar 2 kerning

System data


Menu illustrations

menu menu
Quick Links


You should look in the "/CRT Projects/Scope Clock 2 - Volume I" folder.

Quick Links

Schematics and Layouts

The schematics and PCB layouts were created using Eagle and are available for download here. As always I am willing to make the PCBs (at cost) for anyone wanting to attempt this clock. (This clock has been built and tested using only a DG7/32 CRT but it intended that it can be adapted to other CRTs.)

Unfortunately I have lost my ability to make PCBs at home and so I cannot offer PCBs for this clock anymore.

The component parts lists are available in the Annexes.

A detailed explaination of how the clock works (with simplified schematics) is available in the Annexes.

Power supply

I used a couple of mains transformers to make a huge brick of a power supply - but it is simple, robust and should be easy to adapt to the requirements of other CRTs.

Transformer board

For ridgity and tidiness I mounted the two transformers on an otherwise almost bare PCB with rows of header pins to take the transformer wiring and the wiring to the PSU PCB proper. A mains fuse and mains screw connector completes the board.

Main Power Supply

This board carries a number of rectifiers and electrolytic capacitors to get the range of voltages required by the CRT. So that the high negative voltages used on the cathode, control grid and focus anode (or grid) did not have to connect to other boards I put the focus and brightness controls, and the blanking amplifier on this board as well.

The board was designed so that it could be stacked on the transformer board and the incoming wiring positions match the wiring on the transformer board so only simple straight links are required. (N.B. One of the three trim pots visible has been replaced by a fixed resistor in the final design.)

Analogue card

This board carries two identical amplifiers to drive the deflection plates of the CRT. The positive high voltage from the PSU card is stabilised at 240V (with respect to ground, about 650V with respect to the cathode) using two zener diodes. A centre tap on these zener diodes is used to supply the final anode.

The board also carries the analogue parts of the sine and cosine generators, the shape selector and DACs.

The analogue components have their own regulators providing ±5V and ±12V.

Connections to the main PSU and the CRT are made using wires on header pins, and connection to the digital card using a 10way ribbon cable.

Digital card

The digital carries two Atmel AVR microcontrollers. An atmega1284p modestly overclocked at 22.1184MHz is the main controller. The second AVR is a attiny26 (clocked at 16 MHz) and is dedicated to sine and cosine generation (as squarewaves), CRT blanking logic and image synchronisation. The card also has the RTC (with its battery), chimes generator and its own 5V stabilised PSU. Connections are mostly made using wires on pin headers but the connection to the analogue card is made using IDC connectors and a 10 way ribbon cable.

Quick Links


I have written most of this software and it is released under the terms of the GNU General Public License Version 2 (each file should contain a full statement). However, I wish to acknowledge that the file font.c contains (a tweaked version of) the font created by David Forbes and the file has his copyright notice as well.

The software was written in ASM and C for the AVR-GCC compiler. The full source code and makefiles are available for download here.. This zip files contains the current version and was used. I include it here for anyone to download and to read through to see how aspects of the code work. But I do not intend this to be the final version and suggest anyone attempting to build this clock should contact me for the current version.

The mine directory contains my common libraries that the scope clock uses. These should be placed in a directory and the makefile edited so the compiler can find them. The cfg directory contains hardware configuration .h files and should exist as a subdirectory of the main project directory (or edit the makefile).

The code for the atmega is written in several layers:

CRT Driver & Timing
crt.* crtasm.S
Hardware Servicing
Chime Generation
Clock Configuration
Object Creation and Drawing
draw.* font.*
menu.* menu_rtc.* menu_latlong.*
analogue.* bcdclk.* binary.* digital.* droplet.* elvish.* flip.* klingon.* pinpong.* sidereal.*
bounce.* flw.* sunarc.* title.*
  1. The lowest layer (top in the table) is the fast CRT driver in crt.h, crt.c and crtasm.S; written in C and ASM and it takes object data from a data buffer and draws it to the CRT. The .S file also contains the mains frequency interrupt that is used to initiate a screen refresh (also written in ASM) and carries out various other timing functions.
    • Files services (.c .h) contains a number of miscellaneous functions that main of the clocks require to operate and that cannot be placed more logically in another file.
    • Files chimes (.c .h) contain the low level driver for the chimes hardware. The timing of the chiming uses the mains interrupt code.
    • Files config (.c .h) hold the user changeable settings (which are protected by a checksum). As a rule, user settings that might change frequently are saved to the RTC NVR. User settings that might change infrequently, or that the user may never feel the need to change are saved to the atmega's EEPROM.
    • Files draw (.c .h) contain contain drivers to create primative objects and so has functions like drawLine(…) and drawCircle(…). Attributes such as object brightness, text scaling and justification, text underlining, text kerning and object blinking are controlled. Also defined is a function that will take a list of primative ojects to form a compound object called a "shape".
    • Also at this level are files font (.c .h) that contains the definitions of all the character and symbols that can be drawn.
    • Files menu (.c .h) operate the menu system. Any displayed clock or other display can be "clicked" by pressing the button on the encoder. A menu system is entered where display parameters, the date and time and so on can be changed. The menu system allows numerical values to be changed and values selected from radiobuttons and logical states toggled using checkboxes.
    • Files menu_rtc (.c .h) allow the registers of the RTC to be changed or inspected and files menu_latlong (.c .h) allow the user's latitude and longitude to be entered which are needed by the astronomical calculations.
  2. At the highest level, files (.c .h) analogue, bcdclk, binary, bounce, digital, droplet, elvish, flw, klingon, pingpong, sunarc and title all contain the code for a particular clock face or other such final display.

The code for the attiny is in the sine directory and written entirely in ASM. It has its own makefile which you will find in the directory as well.

Quick Links

Next steps

So where am I going next with this clock? I need to polish some aspects of the software and carry out some further testing; I also have several other clock faces to add as well as further astronomical displays (sidereal time and moon rise/set/phases).

I want to test other CRTs, including the DH3/91 I used in scope clock 1 and try beam modulation by PWM for brightness control.

Build and case a complete clock, probably using a DG7/32 unless something else comes along. Seek permission from SHMBO to bring it into the house (tough one).

I also need to work on a flyback convertor based PSU to reduce the size of the power supply brick to that of a small pebble. And build and test EHT multipliers so tubes with a PDA can be used (I have a DG10/18 CRT waiting for this.)

Quick Links


Parts Lists

None of these components should be difficult to source. At the time of writing this webpage the tube and its socket are readily available from tube suppliers and Ebay. A number of the components (especially the electrolytic capacitors) are size critical, so be sure to buy the correct diameter components if the parts are not sourced from Farnell or Rapid; or modify the board of course.

These parts lists are "work in progress" and, as such, are incomplete. It's a dull job to update them and I'm having too much fun with the clock software… and now future projects.

Transformer Board Parts List

Scope Clock Parts
Part Description Farnell Code Rapid Code Dimensions
Transformer A 230V 10mA, 13.5V 200mA, 6.3V 1A Transformer TRA800 from
Ask Jan First
Transformer B 2 x 22V 1.6VA 9531360
F1 0.5A 26-0167 20 x 5mm holder
X1 Transformer B wires see note 1
X2 Mains supply screw connector, 5.08mm spacing, 3 way
X3 Outputs to PSU PCB see note 1
X4 Transformer A wires see note 1


  1. 0.1" pin header strip with everyother pin removed; wires soldered and covered with heatshrink tube

Power Supply Board Parts List

Scope Clock Parts
Part Description Farnell Code Rapid Code Dimensions
C1 100u 16V 1236662
C2 2200u 16V 9692215 This part is 25V
C3 10u 16V 9451480
C4, C5 & C6 100n 9750983
C7, C8 & C11 220u 400V 8813582
C9, C12, C14 & C15 100u 250V 1673472
C10 1u 630V 1200810
C13 1u 250V 9693980
R1 390 5% 0.25W 62-0360
R2 1k trim pot 9354298 Bourns 3362P series; see note 2
R3 330 5% 0.25W 62-0358
R4 10k 5% 0.25W 62-0394
R5, R7, R8, R12, R13 & R16 470k 5% 0.25W 62-0434
R6 1M8 5% 0.25W 62-0448
R9, R11, R14 & R15 180k 5% 0.25W 62-0424 may need adjustment on test
R10 500k pot 9354395 focus control; see note 3
D1 & D2 1N4001 9564993
D3 UF1G 1625267
D4 1N4148 9565124
D5, D7 & D9 1N4007 9565051
D6, D8 & D10 150V 1W zener 9558373 These ar 5W parts but they fit the board
D11 & D12 1N4004 1843708
Q1 BC327 9558489
Q2 ZTX558 9526676
IC1 78L05 1014073 The pcb layout shows TO220 package; the L device is adequate
IC2 6N137 9994866
X1 Connection to CRT heater see note 1
X2 Blanking input from digital card see note 1
X3 External brightness control (if used) see notes 1 & 2
X4 Connection to CRT cathode, control grid and focus anode see note 1
X5 Connection to analogue card see note 1
X6 External focus control (if used) see notes 1 & 3
X7 Connection to transformers wire links or else see note 1
X8 Connection to digital card see note 1
socket for IC2 8 pin DIL socket 22-0107


  1. 0.1" pin header strip with everyother pin removed; wires soldered and covered with heatshrink tube
  2. The brightness control (R2) can be either a 1k trimpot on the PCB or an external mounted 1k pot connected using X3
  3. The focus control (R10) can be either a 500k trimpot on the PCB or an external mounted 500k (or 470k) pot connected using X6

Digital Card

Scope Clock Parts
Part Description Farnell Code Rapid Code Dimensions/Comments
R1, R2, R9, R12, R13 10k 5% 0.25W 62-0394
R3, R4 3k3 5% 0.25W 62-0382
R5 1k5 5% 0.25W 62-0374
R6 100R trimpot 9354280 Bourns 3362P series
R7 2k7 5% 0.25W 62-0380
R8 15k 5% 0.25W 62-0398
R10 5k trimpot 9354379 Bourns 3362P series
R11 50k trimpot 9354387 Bourns 3362P series
C1, C2, C4 - C7 & C14-C18 100n 63V 9750983 these are 100V rated
C3 & C12 10u 10v 9451056 these are 16v
C8 4n7 ceramic 9411844
C9, C10, C19, C20 22p ceramic 9411674
C11 10n ceramic 9411852
C13 2200u 35V 9452834
D1 50V 1A 1467464 (I bought mine on ebay)
Q1 22.1184 MHz crystal 90-3062
Q2 16 MHz crystal 90-1082
IC1 SAE800 DIP8, I bought mine from RS (UK link), see note 7
IC2 DS3232 1593293
IC2 carrier 0.6" DIP20 footprint (I bought mine on ebay)
IC3 ATMEGA1284P 1972067 DIP40 package
IC4 7805 1102157 small heatsink required- see part KK1
IC5 ATTINY26-16P 9171630 DIP20 package
KK1 heatsink for IC4 36-0184 21°C/W
B1 CR2032 Cell
CR2032 Holder
flat 24mm diameter
two pin - 20 mm spaced
LED1 3mm red led I bought mine on ebay
SV1 & SV3 6 way box header 9733884 I use 0.1" pin strip bought on ebay
SV2 10 way IDC box header 3816254 see note 4
SV2 10 way IDC box plug 1099236 see note 4
JP1 2 way 0.1" header pins
and jumper
X1 Connection to serial port convertor see notes 1 & 2
X2 Connection to speaker see note 1
Speaker Good quality 8 ohm see note 3
X3 Connection to rotary encoder see note 1
Rotary encoder Alps EC12E2424407 1520813 see notes 1 & 6
X4 Connection to blanking amplifier on PSU see note 1
X5 Power supply connection to PSU see note 1
socket for IC1 8 pin DIL socket 22-0107
socket for IC2 24 way (or longer) 0.6" DIL 22-0113 see note 5
socket for IC3 40 pin DIL 22-0117
socket for IC5 20 pin DIL 22-0111


  1. 0.1" pin header strip with every other pin removed; wires soldered and covered with heatshrink tube
  2. Current design and software does not use the serial port
  3. A better quality speak gives better results. I am using a Visaton FRS5,8 but do not feel you have to
  4. And some 10 way ribbon cable to link between the digital and analogue cards.
  5. The socket for IC2 is cut down to 2 x 10 ways
  6. Many types of rotary encoder that give the same cycle of outputs should work. This one has a push button switch built in but you could use an encoder and a separate push button.
  7. DigiKey (UK link) stock number SAE800IN-ND

Analogue Card

Scope Clock Parts
Part Description Farnell Code Rapid Code Dimensions
R1 - R4 & R10 - R13 249k 1% 0.25W 1563148
R5, R7 - R9, R15, R21, R23 & R33 - R35 20k 1% 0.25W 9341498
R6, R20, R22 & R32 10k trim pot 9354301 Bourns 3362P series
R14, R16, R25, R26, R29, R30, R48 & R56 10k 5% 0.25W 62-0394
R17 470 5% 0.25W 62-0362
R18 & R19 2k2 5% 0.25W 62-0378
R24 & R28 220k 5% 0.25W 62-0426
R27 & R31 330k 5% 0.25W 62-0430
R36 - R38 & R40 100k 5% 0.25W 62-0418
R39 & R49 50k 20 turn trim pot 9353810
R41, R50 & R51 6k8 5% 0.25W 62-0390
R42 & R52 22k 5% 0.25W 62-0402
R43 & R53 68k 5% 0.25W 62-0414
R44, R54 & R55 1k trim pot 9354298 Bourns 3362P series
R45 1M trim pot 9354328 Bourns 3362P series; optional on board astigmatism control
R46 & R57 56 5% 0.25W 62-0340
R47, R58 & R59 1k8 5% 0.25W 62-0430
C1, C2, C4 - C7, C9, C15 - C17, C25, C26, C29, C31, C32 & C34 100n 63V 9750983 these are 100V rated
C3 & C20 100u 25V 1848499 10V would do for C3, I just used two the same
C8, C19, C30 & C33 2n2 1457673 NP0 type
C10, C12, C21 & C27 10u 16V 9693548
C11, C14, C22 & C24 0.33u 16V 9708502 tantalum bead; these are 35v
C13 & C23 2200u 25V 9692215
C18 & C28 100n 400V 1215539
D1, D2, D5 - D8 & D11 - D16 1N4148 9565124
D3, D4, D9 & D10 UF1G 1625267
D17 & D19 120V 1W zener 9558357 These are 5W parts but they fit the board
D18 & D20 1N4001 9564993
B1 50V 1A 1467464 (I bought mine on ebay)
Q1- Q8 MPSW42 see note 3
Q9 - Q12 MPSA06 see note 4
IC1 4052N 9664548
IC2 AD7304 1438404 with a SMD carrier and pin headers
IC3 LM6132 9493980
IC4 78L12 1236595
IC5 78L05 1467367 Not 10v input type
IC6, IC7 & IC10 - IC12 TL081 1094353 I bought mine on ebay
IC8 79L12 7207050
IC9 79L05 1685572 not the -10v input part
JP1 wire jumper select fixed or adjustable astigmatism control
SV1 10 way IDC box header 3816254
SV1 10 way IDC box plug 1099236
X1 Connection to CRT final anode and deflection plates see note 1
X2 Connection to main PSU see note 1
X3 Optional off board astigmatism pot see note 1
socket for IC1 16 pin DIL socket 22-0109
socket for IC2 24 way (or longer) 0.6" DIL 22-0113 see note 5
sockets for IC3, IC6, IC7 & IC10 - IC12 8 pin DIL socket 22-0107


  1. 0.1" pin header strip with every other pin removed; wires soldered and covered with heatshrink tube
  2. Either trim pots fitted to board or remote pots using headers for wire connections
  3. Available from Mouser (UK link) part number 863-MPSW42G
  4. Mouser part number 863-MPSA06G
Quick Links

Annex - How it works

The Magic Part

One of the equations of a circle with a radius of one is y = sin(φ), x = cos(φ) (or y = sin(φ), x = sin(φ + π/2)) or put it another way, apply a sine wave to one pair of deflection plates in a CRT and a cosine to the others, then the beam will be deflected in a circular motion (fallen asleep yet?). This is a simple case of family of curves known as Lissajous curves or figures.

File:Circular Lissajous.gif

animation from the wiki page as licenced.

For a non-mathematical explaination and some cool graphics you should go to the oscillosclock website. Actually, even if you read the description below, you must go there for the graphics alone.

Drawing other shapes is just as simple:

The generalised equations are (where A & B are the y axis and x axis magnitudes) become:

This gets us the primative shapes of a circle, ellipse or line but to construct characters, and eventually clock faces, three further mechanisms are required.

Bringing it together

This block diagram shows how the requirements given in the last section can be brought together as a step towards the hardware and software design. At this point in the description, I need to flip the x and y axis equations over as the hardware uses a sine wave only on the x-axis and the selected equation wave on the y-axis. It makes no difference but the discussion and equations presented so far were compatible with the animation from the wiki but at 90° to the actual hardware.

5 drawn

The heart of the circle drawing circuit is the sine wave generator the stability and purity of this sine wave will have a marked effect on the quality of the objects drawn. Harmonics and digital noise are both unwelcome and will produce flat sides or wiggles in the curves or fuzz or wider than necessary beam width. This was an early experiment with a sine/cosine generator - no way good enough! Noise from the power supply:

noisy circle

Noise has gone - but look at the bumps and flats! Too much harmonics are present:

bumpy circle

Ok, nearly there…

nearly there

~$%@#=?%$ blanking amplifier is not fast enough!

not fast enough

Remembering that the general equation for the x-axis is (now) x = X + Bsin(φ), our sine wave is fed to the X deflection amplifier first through a multiplier (shown by * symbol) where it is multiplied by the output from DAC B, and then through and adder (symbol +) where the output from DAC X is added.

The Y axis is slightly more complex as three equations are used:

  1. y = Y + A × sin(φ + π) for straight lines with a negative slope which is obtained by shifting the phase of the sine wave by 180°
  2. y = Y + A × cos(φ) for circles and arcs which is obtained by shifting the phase of the sine wave by 90°
  3. y = Y + A × sin(φ) for straight lines with a positive slope which is obtained by using the sine wave unchanged

In exactly the same way as the x axis, the selected y waveform is first multiplied by the output from DAC A and then an offset is added from the output of DAC Y.

The blanking amplifier receives 8 bits of information, each bit specifying one octant to light. For synchronisation purposes, it also receives a timing signal from the sine wave generator so that the blanking signal to the CRT is switched at exactly the same point during each circle orbit so only full orbits are drawn.

If the sine wave generator is the heart, then the microcontroller is the brain (this is an awful analogy, sorry). To display a single object, the microcontroller must execute this procedure:

Congratulations, one object has been drawn! This process is repeated for all the objects to fully draw the image on the CRT. When all the objects have been drawn the whole process is repeated at a rate to give a flicker free display (say 50 or 60 times a second).

Simplified Schematic

This section shows a simplified view of how the hardware block diagram is implemented with two Atmel AVR's, a quad DAC, an analogue switch and five opamps. After this the other clock circuits such as the chimes generator and RTC will be shown simplifed.

Sine, Cosine and Inverted Sine Generation

simplified sine generator

IC9 is an Atmel attiny26, the firmware contains the sine wave oscillator (although at this stage the output is, of course, a squarewave) at about 32kHz and is the basis of all the circle drawing timing. (The oscillator in the firmware actually runs at 8 times this frequency, about 256kHz, and is divided in the firmware to produce the required outputs.) The "squared" sinewave is output on PB2. The attiny also contains the 90° phase shifter to produce a "squared" cosine on PB1. These signals look like this (on a Rigol DS1052E):

squared sin/cos signals

Each of these signals is passed into an opamp based band pass filter. These filters, IC3 for the cosine signal and IC6 for the sine signal, have a fairly high Q and can be finely tuned to the squared fundamental frequency. These opamp bandpass filters invert the signal so an input squarewave and output sine wave looks like this:

squared sin/sin signals

and the two extracted fundamentals are:

squared sin/sin signals

The sine wave is inverted by another opamp, IC7, so we now have our three signals: sine, cosine and inverted sine which are passed to the shape selector.

Shape Selection

simplified sine generator

The sinewave from IC6 passes to input Y0 on IC1 which is a 4052 four channel multiplex analogue switch, IC6 takes the cosine signal on input Y1 and the inverted sine on input Y2 (input Y3 is unused). Which signal is selected is set by the A & B inputs, these are taken from PC3 and PC4 on the main controller, an Atmel atmega1284p. The sinewave from IC6 and the selected shape signal from the Y output of IC1 are passed to two of the DACs.

Signal multiplication and offset addition

quad multiplying

IC4 is a AD7304 quad multiplying DAC and carries out the functions of DAC A, B, X and Y, and the signal multiplication shown in the block diagram. The sine wave from IC6 feeds VREFA (DAC A reference voltage input) on IC4. The output from the shape selector switch, IC1, goes to the VREFB input on IC4. The outputs on pins VOUTA and VOUTB will be the input sine wave and selected wave multiplied by the value loaded into the respective DAC. The outputs VOUTC and VOUTD have their corresponding reference inputs VREFC and VREFD tied to 5V so the outputs provide the X and Y offset voltages. The multiplied signal and offset are added together in IC2 for the X deflection and IC5 for the Y deflection respectively. The AD7304 DACs are buffered, so the four values are loaded using the SPI bus, and then the LDAC line from IC8 PC5 is toggled and the four DAC values are brought into to use simultaneously. This completes the description of how the x and y deflection signals are created.

Brightness control and blanking

brigntness and blanking

Brightness control is made by counting the number of orbits the beam makes; at the start of each orbit a pulse is sent from PB3 on IC9 (the attiny) to PD2 on IC8 (atmega). PD2 is also an external interrupt pin so the handling of the counting pulses can be made using an interrupt triggered function in the firmware. The pulse occurs at the same point in each orbit so the the drawing functions in IC8 can remain synchronised with the circle drawing.

Blanking is achived by two methods, first as described above, an 8 bit octant bus sends the required octants to light or blank from Port A on IC8 to Port A on IC9. Complete blanking can be achieved by setting the octant bus to zero. A second method (not described above) is an override signal from PC7 on IC8 to PB6 on IC9. This overrides the octant bus value and blanks the CRT completely. Using this single control line has the advantage that it does not disturb the current octant bus value. Synchronisation of the circle orbit and the CRT blanking is carried out in the firmware in IC9. The final blanking signal is sent from PB0 on IC9 to the blanking amplifier. A logical 1 makes the beam visible and a logical 0 blanks the beam.

Complete Simplified Schematic


All the the schematic extracts above are combined here into one simplified schematic. The software for the two AVR's is in the zip files in the software section above.

The Mundane Part

To function as a clock more than just the circle drawing parts must exist. These simplified design notes cover:


The chimes are generated by a SAE800 gong chip and is probably worth a special mention as it is a simple way to get single, dual or triple gong tones. In the triple tone mode the notes, for example can be arranged as the minor and major third: e2 - c# - a, corresponding to 660Hz, 550Hz and 440 Hz.

The gong chip allows the tone fundamental frequency and volume to be adjusted by setting two resistor values. Here is a recording with the camera microphone of the gong chip in action:

chime schematic

This simplified schematic shows how the SAE800 is connected to the atmega. In principle, only two connections are required to the enable inputs (E1 and E2 pins, here connected to PB0 and PB1) but there is a problem with the SAE800 in this application. The SAE800 cannot be retriggered to produce another tone sequence until the current tone sequence has finished. I detect the tone completion using the atmega's analogue comparitor as the output voltage (Q) rises to 5 volts when the tone sequence is finished. The output from the SAE800 goes to the AIN1 input (PB3) and an adjustable reference voltage goes to the other comparitor input AIN0 (PB2). The quality of the sound is very dependant on the quality and size of the speaker used.

Real Time Clock (RTC)

rtc schematic

It says on the tin The DS3232 is a low-cost temperature-compensated crystal oscillator (TCXO) with a very accurate, temperature-compensated, integrated real-time clock (RTC) and 236 bytes of battery-backed SRAM. Additionally, the DS3232 incorporates a battery input and maintains accurate timekeeping when main power to the device is interrupted. The integration of the crystal resonator enhances the long-term accuracy of the device as well as reduces the piece-part count in a manufacturing line.

The DS3232 uses an i²c (Atmel TWI) interface and so its SCL and SDA pins simply connect to the SCL and SDA (PC0 and PC1) on the atmega. The DS3232 interrupt output (which is programmed to 1Hz) is connected to PC6 and the reset pin is connected to PC2. A battery is provided to keep the device running when the clock is switched off.

Deflection amplifiers

deflection amplifier

There are two of these amplifiers; they are a straight copy with no changes whatsoever from the design used by David Forbes.

Blanking amplifier

blanking amplifier

A straightforward design not unlike the one used in my first scope clock. Except I noted that David Forbes used an opto isolator between the blanking amplifier and the digital electronics - I copied this. The blanking amplifer "ground" is the CRT cathode potential which is at -450V to ground and earth in the clock. The blanking amplifer also requires -570V (-120V with respect to the cathode) to full blank a DG7/32 CRT. The amplifier also requires a small positive voltage which I borrowed from the CRT heater supply.

Miscellaneous services - main sychronisation, rotary encoder, LED and UART


The last few odd 'n' sods are brought together on port D of the atmega:

Power Supplies

The power supplies are extensive as many voltages are required to drive the CRT, the analogue electronics and the digital electronics. I used (see parts list for full details) two transformers to get all of the voltages and I also provided separate rectification and stabilisation for the digital and analogue circuits so that digital crud didn't find its way into the analogue outputs. These are the voltages and purposes:

But, when all said and done, its just a bunch of diodes, capacitors and stabilisation ICs. I have left you to look at the detailed schematics to find the PSU elements; they are not centralised but implemented where they are required.

Afterword: no PDA supply is included here as the DG7/32 doesn't have one. But the high voltage AC is brought to header pins so that an additional PCB carrying a multiplier chain to get the few kV needed is provided.

Quick Links