

Timestamper
CPLD VHDL project for precise time stamping of events
- Size
- 75 × 100 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 115
- Nets
- 116
- Pads
- 417
- Tracks, vias
- 757, 255
- Pours
- 21
- Routed
- Yes
- KiCad
- KiCad 5 (file 20171130)
- Created
- 27 Feb 2019
- Updated
- 6 Apr 2019
Overview
Timestamper is an open-source printed circuit board by tomwimmenhove, from the tomwimmenhove/timestamper repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 75 × 100 mm with 115 parts on 116 nets, routed with 757 tracks and 255 vias.
It is built around the ATMEGA328-AU, CH340G and 74LVC1G14Z, with the 74HC04D, CDCE925PW and LMV7219M5 among its other parts. Its parts include 40 capacitors, 36 resistors, 12 ICs, 11 diodes and 7 connectors. It belongs with the AVR (ATmega, ATtiny) and FPGA and CPLD boards of this library.
Main components
10ATMEGA328-AU
TQFP-32(7x7)-40℃~+85℃ 1.8V~5.5V 10bit 1KB 20MHz 23 2KB 32KB 8 Bit AVR Built-in FLASH TQFP-32(7x7) Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)CH340G
SOP-16-40℃~+85℃ 2Mbps 3.3V、5V USB 2.0 USB to UART SOP-16 USB Converters ROHSWCH (Nanjing Qinheng Microelectronics)USB Converters74LVC1G14Z
SOT-553-40℃~+125℃ 1 1.2V~3.33V 1.65V~5.5V 200uA 32mA 32mA 6.5ns@5V,50pF 74LVC 750mV~2.35V Power shutdown protection、Noise suppression function Push-pull Schmitt trigger SOT-553 Inverters ROHSDiodes IncorporatedInverters74HC04D
SOP-14-40℃~+125℃ 1 1.5V~4.2V 1.9V、3.7V、5.2V 100mV、400mV、400mV 14ns@6V,50pF 2V~6V 2uA 5.2mA 5.2mA 500mV~1.8V 6 74HC SOIC-14 Inverters ROHSNexperiaInvertersCDCE925PW
TSSOP-16-40℃~+85℃ 1.7V~1.9V 230MHz 5 50ps、130ps 70ps、160ps External I2C TSSOP-16 Clock Generators, PLLs, Frequency Synthesizers ROHSTexas InstrumentsClock Generators, PLLs, Frequency SynthesizersLMV7219M5
SOT-23-5-40℃~+85℃ 1 1.3ns 1.8mA 2.7V~5V 20ns 50nA 6mV 7.5mV 85dB 950nA Push-pull Rail-to-Rail Output SOT-23-5 Comparators ROHSTexas InstrumentsComparatorsTLV71318PDBV
SOT-23-5-40℃~+125℃@(Tj) 1 1.8V 150mA 230mV@(150mA) 5.5V 50uA 55uVrms 65dB@(1kHz) Fixed Over Current Protection、Over Temperature Protection、Enable Positive SOT-23-5 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSTexas InstrumentsVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsUSBLC6-2SC6
SOT-23-60.35pF、0.8pF 100nA 150W@8/20us 15V 2 5V 6A@8/20us 6V ESD SOT-23-6 ESD and Surge Protection (TVS/ESD) ROHSUMWESD And Surge Protection (TVS/ESD)PESD5V2S2UT
SOT-23120pF 16V 1uA 20A@8/20us 300W@8/20us 5V 8.5V ESD IEC 61000-4-2、IEC 61000-4-5、IEC 61000-4-4 SOT-23 ESD and Surge Protection (TVS/ESD) ROHSUMWESD And Surge Protection (TVS/ESD)PESD3V3S2UT
SOT-2318A 2 207pF 20V 2uA 3.3V 330W@8/20us 5.2V ESD IEC 61000-4-2、IEC 61000-4-5 Unidirectional SOT-23 ESD and Surge Protection (TVS/ESD) ROHSNexperiaESD And Surge Protection (TVS/ESD)
README
README.mdThe Timestamper
This project lets you get get exact timestamps of 'events' (electric pulses on an input).

Hardware
The hardware (schematic and PCB) are designed in KiCad 5, and can be found in the ./hardware/cpld/ directory. The 'heart' of the design is a Xilinx XC9572XL CPLD. This CPLD implements a capture-counter which timestamps the arrival of events with a resolution of 10ns. This CPLD is programmed in VHDL using Xilinx's ISE 14.7 (https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/design-tools/v2012_4---14_7.html).
The VHDL project resides in the ./hardware/cpld/ directory. The XC9572XL can be programmed using the xc3sprog (http://xc3sprog.sourceforge.net/) utility. Both the 'ft232h' (with a serial FT232H UART chip) and the 'sysfsgpio' (sysfsgpio on the Raspberry Pi) have been successfully used to program the chip.
Firmware
The firmware runs on an Atmel Atmega328p, which makes it compatible with the arduino. This way, using the default bootloader for, for example, the Arduino pro mini 3.3v @8Mhz, we can easily program the firmware using avrdude. The firmware simply reads the captured values from the CPLD and passes them on to a CH340G serial to USB UART. The firmware can be found in ./firmware/atmega328/
Software
The software just outputs the values from the device onto stdout. See ./software/
Theory of operation
The board is fed 3 signals:
- A (very stable) 10MHz reference clock (I.E. from an OCXO or atomic rubidium reference)
- A precise PPS signal, indicating the start of a UTC second. (I.E. from a GPS timing receiver)
- An event signal that needs to be precisely timestamped.
The 10Mhz is fed into a PLL (A Texas Instruments CDCE925), and multiplied to 100MHz, which is then fed to the CPLD. Inside the CPLD, this clocks a 27-bit counter. This counter is (synchronously) reset on the rising edge of the PPS signal. The event signal is sampled at every clock pulse, and when a rising-edge is detected, the current count is stored inside into a register and the capture counter is 'disarmed'. The CPLD then notifies the Atmega328P through an interrupt which, in turn, reads the value from the CPLD, places it in a buffer, and instructs the CPLD te re-arm the capture logic. The capture value is then simply sent out of the USB UART to the PC. We now have the fractional part of the timestamp on the PC. This can be combined with the current time on the PC to form a complete timestamp. NOTE: This assumes that the time on the PC that is reading the timestamps is well within a 500ms tolerance.
Links and other stuff
See https://www.febo.com/pages/soekris/ for details on making an accurate NTP server. In addition, a Motorola m12+ GPS timing receiver together with a saw-tooth correction circuit is used to provide both a UTC time-source for the NTP server, as well as a PPS pulse for the Timestamper board. The Timestamper board also contains an 'auxiliary' output, which could be programmed to output a 33MHz clock that could be fed into the Soekris' motherboard to provide an even more accurate NTP time source (untested).
Parts
115| Qty | Value | Footprint | References |
|---|---|---|---|
| 26 | 100n | Capacitor_SMD:C_0603_1608Metric | C1, C10, C11, C12, C13, C14, C16, C17, C18, C21, C22, C23, C24, C26, C27, C29 +10 |
| 7 | 100 | Resistor_SMD:R_0603_1608Metric | R5, R6, R7, R8, R9, R14, R17 |
| 6 | 270 | Resistor_SMD:R_0603_1608Metric | R22, R23, R24, R25, R26, R27 |
| 6 | 330 | Resistor_SMD:R_0603_1608Metric | R28, R29, R30, R31, R32, R33 |
| 6 | LED | LED_SMD:LED_0603_1608Metric | D5, D6, D8, D9, D10, D11 |
| 5 | 10k | Resistor_SMD:R_0603_1608Metric | R1, R10, R11, R18, R19 |
| 5 | 10n | Capacitor_SMD:C_0603_1608Metric | C9, C20, C25, C28, C32 |
| 4 | 22p | Capacitor_SMD:C_0603_1608Metric | C15, C19, C36, C37 |
| 4 | Conn_01x01 | MountingHole:MountingHole_3.2mm_M3_Pad | MH1, MH2, MH3, MH4 |
| 4 | Conn_Coaxial | Connectors_Molex:Molex_SMA_Jack_Edge_Mount | J1, J2, J3, J6 |
| 3 | 33 | Resistor_SMD:R_0603_1608Metric | R12, R13, R15 |
| 3 | 51 | Resistor_SMD:R_0805_2012Metric | R3, R4, R36 |
| 3 | 74LVC1G14 | Package_TO_SOT_SMD:SOT-353_SC-70-5 | U5, U6, U12 |
| 2 | 220 | Resistor_SMD:R_0603_1608Metric | R2, R16 |
| 2 | 2k2 | Resistor_SMD:R_0603_1608Metric | R34, R35 |
| 2 | PESD5V2S2UT | Diode_SMD:D_SOT-23_NKA | D1, D4 |
| 1 | 0 | Resistor_SMD:R_0603_1608Metric | R21 |
| 1 | 0 | Capacitor_SMD:C_0603_1608Metric | C40 |
| 1 | 100k | Resistor_SMD:R_0603_1608Metric | R20 |
| 1 | 10u | Capacitor_SMD:C_0603_1608Metric | C2 |
| 1 | 12MHz | Crystal:Crystal_HC49-4H_Vertical | Y1 |
| 1 | 1u | Capacitor_SMD:C_0603_1608Metric | C35 |
| 1 | 22u | Capacitor_SMD:C_0805_2012Metric | C7 |
| 1 | 5v6 | Diode_SMD:D_SMB | D3 |
| 1 | 74HC04 | Package_SO:TSSOP-14_4.4x5mm_P0.65mm | U11 |
| 1 | 8MHz | Crystal:Crystal_HC49-4H_Vertical | Y2 |
| 1 | AP1117-33 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U1 |
| 1 | ATMEGA328-AU | Package_QFP:TQFP-32_7x7mm_P0.8mm | U10 |
| 1 | C | Capacitor_SMD:C_0603_1608Metric | C6 |
| 1 | CDCE925 | Package_SO:TSSOP-16_4.4x5mm_P0.65mm | U3 |
| 1 | CH340G | Package_SO:SOIC-16_3.9x9.9mm_P1.27mm | U8 |
| 1 | ISP | Connector_IDC:IDC-Header_2x03_P2.54mm_Vertical | J5 |
| 1 | JTAG | Connector_IDC:IDC-Header_2x05_P2.54mm_Vertical | J4 |
| 1 | L | Inductor_SMD:L_0603_1608Metric | L1 |
| 1 | LMV7219? | Package_TO_SOT_SMD:SOT-23-5 | U7 |
| 1 | PESD3V3S2UT | Diode_SMD:D_SOT-23_NKA | D7 |
| 1 | PESD5V0U2BTTVS | Diode_SMD:D_0603_1608Metric | D2 |
| 1 | Polyfuse_Small | Resistor_SMD:R_1206_3216Metric | F1 |
| 1 | TLV71318PDBV | Package_TO_SOT_SMD:SOT-23-5 | U2 |
| 1 | USBLC6-2SC6 | Package_TO_SOT_SMD:SOT-23-6 | U4 |
| 1 | USB_B_Micro | Connector_USB:USB_Micro-B_Molex_47346-0001 | J7 |
| 1 | XC9572XL-VQ44 | Package_QFP:PQFP-44_10x10mm_P0.8mm | U9 |
The 114 most common of 115 parts.
Similar boards
- 4 layers149 × 95 mm

- 2 layers180 × 160 mm

- 2 layers14.5 × 11.8 mm

- 4 layers112 × 57 mm

- 4 layers150 × 120 mm

- 2 layers83.6 × 83.2 mm

- 4 layers50.3 × 56.1 mm

- 2 layers233.4 × 280 mm

Questions
How big is the Timestamper PCB?
It measures 75 × 100 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Timestamper use?
115 parts, built around the ATMEGA328-AU, CH340G, 74LVC1G14Z and 74HC04D. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Timestamper KiCad files?
From the tomwimmenhove/timestamper repository on GitHub, at the commit this page was made from: the board is hardware/pcb/timestamper.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Timestamper design in my own project?
Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).