Skip to the content
4 layers160 × 100.1 mmPMT counter 4 layers, the printed circuit board in 3D

PMT counter 4 layers

mmazzanti/PMT-counter3

A PCB board for counting pulses up to 1.5GHz from a PMT (or similar)

Size
160 × 100.1 mm
Copper layers
4
Thickness
1.61 mm
Parts
126
Nets
219
Pads
637
Tracks, vias
647, 127
Pours
54
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
19 Feb 2024
Updated
12 Nov 2024

Overview

PMT counter 4 layers is an open-source printed circuit board by mmazzanti, from the mmazzanti/PMT-counter repository on GitHub, published under the GPL-3.0 licence. It is a 4-layer board of 160 × 100.1 mm with 126 parts on 219 nets, routed with 647 tracks and 127 vias.

It is built around the OPA340UA, MC100EPT22D and DMG2305UX-13, with the MAX1735EUK30+T, MAX9371ESA and MC100EP016AFAG among its other parts. Its parts include 57 resistors, 27 capacitors, 18 ICs, 4 connectors and 3 diodes. It belongs with the RP2040 boards of this library.

Main components

12

README

README.md

PMT Counter

A PCB board for counting pulses up to ~1.5GHz.

  • Primary power [5.5 - 20]V @ 1500mA (as low as $\approx$ 500 mA when not using the board to power the PMT).
  • Compatible with $\pm$ 15V [[Toptica_rack_power.pdf | Toptica]] racks
  • Impedance matched traces
  • External trigger and reset option
  • USB-C powered for debugging and testing
  • Main power off switch
  • Additional 5V external power (up to $\sim$ 1 A) for PMT (or similar) powering (to avoid ground loops between PMT and board)

Why this project?

In our lab, we needed electronics to count pulses generated by a PMT, such as the SensTech PMT. A PMT generates a TTL signal each time a photon strikes the photocathode, with response times typically in the range of 10-50 ns. Each photon usually produces a TTL pulse lasting around 10 ns, with a rise time of about 2 ns, allowing a count rate of up to 100 MHz.

Since technology never stops advancing, I designed the board to handle more than just 100 MHz—it’s ready for PMTs with count rates up to 1.5 GHz. We haven’t pushed it to those limits yet, but when the next generation of PMTs arrives, the board will (should) be ready.

UPDATE: November 2024

The bottleneck of the project appears to be the data retrieval rate. As the RP2040 uses a virtual serial interface the data transfer of ~thousands of bins takes few milliseconds (enough to slow down a quantum computer :smile: ). For this reasons I indroduced a new function where the user has to manually retrieve the data at the end of an acquisition.

This can be done with:

  • GETALL: gets all the previous counts (binned with the selected time binning). This is usually a lot of data and will take a bit
  • GETSUM: gets the sum of all the previous time bins. This will return only a number (integrated photon over the time interval). In this way one trades the ability of time tagging photons with a faster read-out of the PMT.

Furthermore, as using hexadecimal encoding led to additional headackes (eg. \x10 means 10 photons or an "Line Feed" character ??) I reverted back to ascii encoding for data readout. This is slow but reliable. A further improvement would would involve using the TinyUSB library and write a non-serial data redout. However, this would require a solid understanding of USB communication details, which unfortunately I don’t currently have the time to explore in depth.

If you are interested in fast readout of data using hex encoding please have a look at the fast readout branch. I warn you that the code there will work only with few photons per bin (<10 to avoid the "Line Feed" character). However, using a smart encoding this problem could be circumvented. If you are instead interested in developing a USB interface for data readout please get in touch with me :)

Project files:

  • PCB: Contains KiCad design of the PCB board
  • main.c: source code for RP2040 initialization & readout (serial)
  • pio_code.pio: PIO assembly file
  • CMakeLists.txt

1. PCB Board

The board is based on a ECL 8-Bit Synchronous Binary Counter MC100EP016A with an operating frequency $\ge$ 1.3 GHz. Counts from the binary counter are translated to LVTTL and latched on sn74lvc574a octal edge-triggered flip-flop. Flip-flop counts are read by a (incredibly powerful) microcontroller Raspberry Pico. I cannot state enough how versatile and powerful is the Pico, 8 state machines, 26xGPIO, DMA, 3xADCs, etc... all that with a price of 4€ 😮.

Board_Front
Figure 1 - Front side of the PMT board

The PMT board features a dual powering system, one through USB-C on top that can be used for debugging or testing the board (this USB connection can be used only for powering) and a second one through a DIN41612_C_3x32 connector that can be used to power the board from a rack. The rack connection is compatible with Toptica racks however you can easily modify the 15V power source to match your rack system. As the main powering of the board comes from a TL1963AQKTTRQ1 LDO, any voltage between [5.5-20]V @ 1500 mA, from the back panel connection, should work. The negative power connection is at the moment not used and can be ignored/removed.

Trigger

The RP2040 will initialize the board and wait for an external trigger to start counting the pulses from that specific moment. An internal trigger is configurable by software if no specific timing is required. A always high trigger will put the board in continuous counting mode.

Power switches

Additional switches SW2 and SW3 allow, respectively, to reset the RP2040 and switch on/off the main board power

⚠️ WARNING: The RP2040 is powered from its usb connector AND through the board. To reset the microcontroller disconnect both powers or use the switch SW2.

Heating

Due to the high speed of the MC100EP016A counter the board reaches temperatures of $\approx$ 55 ℃ in a environment of $\approx$ 25 ℃ without any significant airflow. This value is inside the maximum operating temperature of the MC100EP016A, however an additional fan can be used and mounted on top of the board, especially if using it in an warm enclosed space (eg power rack).

External RST

A switch SW1 allows for switching between external and internal reset signals. Reset signals are sent to the MC100EP016A counter to restart the counting from 0. Usually the RP2040 takes care of this and resets the counter at the end of each counting cycle. For other applications, however, it is possible to use an external reset signal to force the counter to reset at a specific time.

2. Firmware

Using a state-machine on the Pico we can readout the latch at speeds of $\sim$ 125/2 MHz. Although the board is clocked at 125 MHz the factor 1/2 comes from two instructions needed for latching the values and for moving the 8 data bits to the internal memory of the Pico.

We define an integration time during which the Pico does nothing but waits for the counter to count enough pulses. This wait time is necessary for reducing the ratio between the reinitialization deadtime and the collection time. More of this is described below.

Board_Scheme
Figure 2 - Schematic representation of PCB board

The reinitialization and latching of the counter takes about 2 clock instructions. Although the MC100EP will partially keep counting during this time, we cannot read it and we will miss counts during this window.

Depending on the pulse length, and your applications there will be an optimal choice of deadtime - continuous counting ratio.

Example of deadtime/integration ratio

Our application of the PMT counting board is to detect photons generated in an ion trapping experiment. In our lab, we trap singly charged atoms in a radio-frequency ion trap to study quantum physics. When we shine laser light at the correct frequency onto the ion, we can excite specific atomic energy levels. These excited ions then emit fluorescence light, which we capture with a camera.

At high laser intensities (saturation limit), the ion emits a photon in a random direction approximately every 10 ns. We collect these photons from the vacuum chamber using a 2-inch aspheric lens positioned just outside the chamber. Due to geometrical constraints, we capture about 3% of the photons emitted by the ion, and only half of those are detected by our PMT, primarily due to its quantum efficiency and the efficiency of the collecting optics.

On average, we observe one photon count every 660 ns. Each photon detected by our PMT generates a 10 ns TTL pulse. The PMT counting board, running at its maximum speed of 125 MHz, has a dead time of approximately 16 ns.

When the board is set to continuous counting mode for about 10 clock cycles, there is roughly a 10% probability of detecting a photon during that interval. The probability of a photon arriving during the dead time is around 2%.

If a photon arrives within approximately 8 ns of the end of the dead time window, the pulse counter can still detect the edge of the pulse and count it. As a result, the probability of missing a photon during this time window decreases to about 1%, which is an acceptable risk.

If two photons (or more, though no more than two pulses can be generated during this window) arrive during the dead time, only one will be counted. The probability of this happening is around 0.03%, which is also considered an acceptable risk.

How-to change the integration time (the hard way)

In case your pulse generator (PMT or similar) has faster response times or you expect more counts/second you might want to change the ratio between the continuous count mode and the readout of the counter. You can do so modifying the code in pio_code.pio:

PIO
start:
    set pins, 16    ; Reset
    set pins, 10    ; Counter hold
    wait 1 gpio 16  ; wait for PMT trigger (from FPGA)
.wrap_target
    set pins, 8     ; Start counter
    in pins, 8      ; Reads the latch 
    nop [7]         ; Wait 9 cycles (integration time)
    set pins, 27    ; Counter hold + latching
.wrap

The source of deadtime are the first and last instructions (Start counter + Counter hold + latching) between the wrapped code. The amount of cycles during which the board will keep counting is given by the integration time (nop [7], 8 instructions in this case) + 1 readout (in pins, 8) + 1 equally spreaded between the raise time of (set pins, 8) and lowering time of (set pins, 27). Increasing the integration time can be done by adding extra nop instructions each of which can have up to 32 instructions of additional delay.

How-to change the integration time (the noob way)

21/08/24 This part is still work in progres and needs testing

During initialization, we load the number of integration steps into the X scratch register, with a maximum value of 32. This limits the integration time to 32 multiplied by the number of NOP operations (for now the default is 8). The following code demonstrates the logic:

PIO
start:
    set pins, 16    ; Reset(LE-> L, ~CE-> L, TLCD-> L, ~PE->L, MR-> H = 00001)
    set pins, 10    ; Counter hold(LE-> L, ~CE-> H, TLCD-> L, ~PE->H, MR-> L = 01010)
    wait 1 gpio 16  ; wait for PMT trigger (from FPGA)
.wrap_target
    mov Y X         ; load the integration time from the X register
    set pins, 8     ; Start counter(LE-> L, ~CE-> L, TLCD-> L, ~PE->H, MR-> L = 00010)
    in pins, 8      ; Reads the latch (we use one integration cycle to read the last latched value)
integrate:
    nop [7]             ; Keeps integrating
    jmp y-- integrate   ; as long as user requests (units of 7 clocks)
    set pins, 27    ; Counter hold + latching(LE-> H, ~CE-> H, TLCD-> L, ~PE->H, MR-> H = 11011) Wait 1 cycle here as I suspect the latch might miss the OE signal
.wrap

During each data acquisition step, we transfer the 32-bit word from the X scratch register to the Y scratch register. The board will then wait for a photon during this part of the code:

text
integrate:
    nop [7]             ; Keeps integrating
    jmp y-- integrate   ; as long as user requests (units of 7 clocks)

The user can easily set the number of integration steps [0 - 2^32] at runtime. However, adjusting to shorter or longer integration times requires fewer or more nop wait instructions. To achieve this, the PIO code needs to be modified and the project recompiled.

The X register size is 32 bits. This means that one could push the integration time to 2^32 = 4294967296. At 125MHz that would mean ~8 ns * 4294967296 = 34.35s. In this case I'm pretty sure the counter will overflow and as I did not write a piece of code for it I would advice against it.

In case you are interested in this you could use a second state machine to constantly check the status of TC and COUT and capture every overflow event. The number of total counts will then be counts + N_overflow * 255. I might implement this in the future but for now is not on my (imaginary) todo list.

3. Data readout

Data will be returned as an hexadecimal string between the || delimitators. Notice that most of data will be 0s and the hex \00 will be interpreted as a null character from most of the terminals. If you don't see any data coming out of the board that might be the case.

You can use the python script provided in the "read_sample" folder for an example of a read data function.

4. Production & Assembly

work in progress...


:heart: G.M. :milky_way:

Parts

126
QtyValueFootprintReferences
2350Resistor_SMD:R_0805_2012MetricR10, R13, R14, R15, R16, R17, R18, R20, R21, R23, R25, R26, R27, R28, R33, R34 +7
1810kResistor_SMD:R_0805_2012MetricR19, R29, R30, R31, R32, R41, R42, R43, R47, R48, R49, R50, R53, R54, R55, R56 +2
130.1uFCapacitor_SMD:C_0603_1608MetricC6, C7, C8, C9, C10, C11, C14, C17, C20, C21, C22, C23, C24
5MC100LVELT23DGPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU1, U2, U6, U8, U12
4MountingHole_PadMountingHole:MountingHole_2.5mm_Pad_ViaH1, H2, H3, H4
20Resistor_SMD:R_0805_2012MetricR3, R40
210uFCapacitor_Tantalum_SMD:CP_EIA-2012-12_Kemet-RC5, C12
2150 μFCapacitor_SMD:CP_Elec_6.3x5.8C28, C29
222uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC18, C30
25.1kResistor_SMD:R_0805_2012MetricR1, R2
251.5kResistor_SMD:R_0805_2012MetricR36, R39
2600R (100MHz)Inductor_SMD:L_0603_1608MetricFB1, FB2
2DNPCapacitor_SMD:C_0805_2012MetricC2, C13
2LOGOMM_ftprnt:Kicad_trapIQ_logo_bigG***, G***
2MC100EPT22DPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU9, U10
2TLP2270_TP4,EMM_ftprnt:SOIC127P1105X220-8NIC1, IC2
2TestPointTestPoint:TestPoint_Pad_1.5x1.5mmTP2, TP3
2~Connector_Coaxial:SMA_Amphenol_132134-11_VerticalCLK_{IN}1, TRIGGER1
110uCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC27
111.8kResistor_SMD:R_0805_2012MetricR11
1150kResistor_SMD:R_0805_2012MetricR52
115uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC16
119-217/BHC-ZL1M2RY/3TMM_ftprnt:LED_19-217&slash_BHC-ZL1M2RY&slash_3T_EVE-MLED1
11kResistor_SMD:R_0805_2012MetricR38
11uCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC26
122uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1
1270Resistor_SMD:R_0805_2012MetricR24
13.16kResistor_SMD:R_0805_2012MetricR37
13.74kResistor_SMD:R_0805_2012MetricR12
150Resistor_SMD:R_1206_3216MetricR46
150kResistor_SMD:R_0805_2012MetricR22
1800BWSP9SM6REMM_ftprnt:SW1_800BWSP9SM6RE_EWISW3
191kResistor_SMD:R_0805_2012MetricR51
1B3U-3100PMM_ftprnt:SW_B3U-3100P_OMRRP RST
1Barrel_JackConnector_BarrelJack:BarrelJack_CLIFF_FC681465S_SMT_HorizontalJ3
1Conn_01x02_PinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ1
1Conn_CoaxialConnector_Coaxial:SMA_Amphenol_132134-11_VerticalMR_{OUT}1
1DIN41612_02x32_ACConnector_DIN:DIN41612_C_3x32_Male_Horizontal_THTJ7
1DMG2305UX-13MM_ftprnt:DMG2305UX-13U4
1DMN2056U-7MM_ftprnt:NMOSGSD_SOT23_DIOQ2
1DNPDiode_SMD:D_0805_2012MetricD10
1DNPCapacitor_SMD:C_0603_1608MetricC15
1DNPResistor_SMD:R_0805_2012MetricR7
1DNPCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC25
1MAX1735EUK30+TMM_ftprnt:21-0057F_MXMU7
1MAX9371ESAMM_ftprnt:21-0041B_8_MXMU13
1MC100EP016AFAGMM_ftprnt:LQFP32_7X7_ONSU5
1OPA340UAPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU11
1PicoMM_ftprnt:RPi_Pico_SMD_THU3
1SMBJ5.0A-TRMM_ftprnt:SMBJ5.0A-TRD1
1SN74LVC573DWMM_ftprnt:DW20U15
1SSSS811101MM_ftprnt:SW4_SSSS811101_ALPSSW1
1TL1963AQKTTRQ1MM_ftprnt:KTT5U16
1TPS7A5201QRGRRQ1MM_ftprnt:RGR20_2P05X2P05_TEXU14
1TYPE-C-31-M-12MM_ftprnt:HRO_TYPE-C-31-M-12J2

Similar boards

  • 2 layers38.7 × 80 mmPi pico AD9854 adapter, the printed circuit board in 3D

    Pi pico AD9854 adapter

    mmazzanti/PicoDDS

    A raspberry pico PCB for the AD9854 Analog Devices DDS

    15 parts3GPL-3.0
  • 2 layers123 × 116.3 mmControl Box, the printed circuit board in 3D

    Control Box

    pauladam316/observatory_pcbs

    158 parts
  • 4 layers76 × 72 mmKeychain rev b panel, the printed circuit board in 3D

    Keychain rev b panel

    olerast67/emotion-keychain

    Брелок с OLED-экраном и анимированными эмоциями

    168 partsApache-2.0
  • 6 layers50 × 50 mmEcatExBrd, the printed circuit board in 3D

    EcatExBrd

    open-dynamic-robot-initiative/open-motor-driver-initiative

    Open-source drive for brushless motors, following the open dynamic robot initiative

    173 parts122BSD-3-Clause
  • 4 layers70 × 65 mmESP32 FC, the printed circuit board in 3D

    ESP32 FC

    JS2028EE/ESP32_FC

    This is the current editable KiCad 10 project for a 70 x 65 mm, four-layer controller, with an ESP32-S3-WROOM-1-N8R8, BMI088 SPI IMU, BMP280 barometer and a separate 4-in-1 ESC.

    107 parts
  • 2 layers51.5 × 48.9 mmESP32 IoT Sensor Controller, the printed circuit board in 3D

    ESP32 IoT Sensor Controller

    ehasunchy/kicad-pcb-projects

    KiCad PCB design portfolio featuring ESP32 IoT hardware, power regulation, USB interfaces, schematics, PCB layouts, and manufacturing files.

    36 parts
  • 2 layers228.6 × 78.7 mmPlonck, the printed circuit board in 3D

    Plonck

    swampmonster/plonck

    An attempt at making a planck-compatible pcb with bluetooth

    132 parts9
  • 2 layers79.9 × 28.4 mmNrf52840 hub, the printed circuit board in 3D

    Nrf52840 hub

    ugokutennp/nrf52840-x3

    3 connection DIY watchman dongle

    36 parts8MIT

Questions

How big is the PMT counter 4 layers PCB?

It measures 160 × 100.1 mm and has 4 copper layers, 1.61 mm thick.

What parts does the PMT counter 4 layers use?

126 parts, built around the OPA340UA, MC100EPT22D, DMG2305UX-13 and MAX1735EUK30+T. 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 PMT counter 4 layers KiCad files?

From the mmazzanti/PMT-counter repository on GitHub, at the commit this page was made from: the board is PCB/PMT_counter_4_layers.kicad_pcb and its schematic PCB/PMT_counter_4_layers.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the PMT counter 4 layers 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).