Close

The initial prompt

A project log for typeCAD 1Hz -AI designed hardware

Making a 1 hertz timer circuit with typeCAD and AI

typecadtypecad 07/04/2025 at 15:320 Comments

For the initial prompt, Gemini 2.5 Deep Research was used. 

Research ways to create a circuit that measures 1hz as accurately as possible. it should pulse every 1 second as accurately as possible. Provide a bill of materials, detailed pin connections, and accuracy calculations for a variety of circuits. Create UML/mermaid charts for the signal path/conditioning. Prioritize accuracy, then component count. Keep the cost around $30. Only use discrete components or TCXOs, no microcontrollers/FPGA or similar. A target for accuracy is ~500ppb.

After a few minutes, it presented a very long and detailed research paper. Skimming through the notes and thinking it left, it had a hard time working within the constraints given. Initially, it wanted to use a 32k crystal, but found it to be too inaccurate. It was able to search sites like Digikey and Mouser for potential components and none were found that would work at ~500ppb. It then switched to a TCXO method. 

This way seemed to be a lot more workable. It quickly figured out that the chosen crystal frequency is a power of 2, and it can be easily divided down with binary math and discrete components. 


To achieve a precise 1 Hz output through binary division, the TCXO's frequency should ideally be a power of 2. For example:

High-speed CMOS (HC/HCT series) binary counters, such as the 74HC4060 (14-stage) or 74HC4020 (14-stage), are suitable for dividing these MHz frequencies due to their higher maximum clock frequencies compared to the older CD4000 series. Multiple counters can be cascaded to achieve the required total division ratio. For instance, to divide 2^24 Hz down to 1 Hz:  


  • A 74HC4060 (14-stage) can divide the 2^24 Hz input by 2^14, resulting in 2^10 Hz (1024 Hz).
  • A second 74HC4020 (14-stage) can then divide the 1024 Hz input by 2^10 (using its Q10 output), yielding the final 1 Hz signal.



This approach seemed quite reasonable. After considerable part-searching, a 4.193404 MHz crystal, in stock, at a reasonable price was found. It wasn't nearly as accurate as Gemini had hoped for, ±25ppm, but that was the only available part. Other power-of-2 frequencies were just as difficult to locate (either due to availability or cost), so ±25ppm it is.

During this process, there was some back-and-forth. It was brought up that this whole thing could easily be done with a microcontroller or FPGA. Also that 1 hz oscillators do exist and could be used here. 

The result

Eventually, this is what was decided on and planned.

1Hz Pulse Generator - Complete Wiring Diagram

4.194304 MHz→÷16,384→256 Hz→÷256→1 Hz

TCXO

4.194304 MHz ±25ppm

PinFunctionConnection
1Enable+3V
2GNDGND
3Output→ 74HC4060 Pin 10
4VDD+3V

74HC4060 (DIP-16)

14-Stage Binary Counter

PinFunctionConnection
1Q12N/C
2Q13N/C
3Q14→ 74HC4040 Pin 10
4Q6N/C
5Q5N/C
6Q7N/C
7Q4N/C
8VSSGND
9OSC OUTN/C
10OSC IN← TCXO Pin 3
11RESETGND (via 10kΩ)
12RESET→ Pin 11
13Q1N/C
14Q2N/C
15Q3N/C
16VDD+5V

74HC4040 (DIP-16)

12-Stage Binary Counter

PinFunctionConnection
1Q8→ 74HC244 Pin 3
2Q6N/C
3Q5N/C
4Q7N/C
5Q4N/C
6Q3N/C
7Q2N/C
8VSSGND
9Q1N/C
10CLOCK← 74HC4060 Pin 3
11RESETGND
12Q9N/C
13Q11N/C
14Q10N/C
15Q12N/C
16VDD+5V

74HC244 (DIP-20)

Octal Buffer/Driver

PinFunctionConnection
11OEGND
21A1GND
31A2← 74HC4040 Pin 1
41A3GND
51A4GND
61Y4N/C
71Y3N/C
81Y21Hz OUTPUT
91Y1N/C
10VSSGND
112Y1N/C
122Y2N/C
132Y3N/C
142Y4N/C
152A4GND
162A3GND
172A2GND
182A1GND
192OE+5V
20VDD+5V

Power Supply Connections

RailComponentsCurrent
+3VTCXO (Pins 1, 4)~2mA
+5V74HC4060 (Pin 16) 74HC4040 (Pin 16) 74HC244 (Pin 20) 74HC244 (Pin 19)~3mA
GNDAll VSS pins All unused inputs Reset pinsReturn

Recommended Test Points

Critical Wiring Notes

Component Specifications

Discussions