
Pi pico AD9854 adapter
mmazzanti/PicoDDS
A raspberry pico PCB for the AD9854 Analog Devices DDS

A PCB board for counting pulses up to 1.5GHz from a PMT (or similar)
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.
A PCB board for counting pulses up to ~1.5GHz.
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.
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:
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 :)
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€ 😮.
![]() |
|---|
| 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.
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.
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.
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).
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.
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.
![]() |
|---|
| 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.
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.
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:
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
.wrapThe 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.
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:
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
.wrapDuring 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:
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.
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.
work in progress...
:heart: G.M. :milky_way:
| Qty | Value | Footprint | References |
|---|---|---|---|
| 23 | 50 | Resistor_SMD:R_0805_2012Metric | R10, R13, R14, R15, R16, R17, R18, R20, R21, R23, R25, R26, R27, R28, R33, R34 +7 |
| 18 | 10k | Resistor_SMD:R_0805_2012Metric | R19, R29, R30, R31, R32, R41, R42, R43, R47, R48, R49, R50, R53, R54, R55, R56 +2 |
| 13 | 0.1uF | Capacitor_SMD:C_0603_1608Metric | C6, C7, C8, C9, C10, C11, C14, C17, C20, C21, C22, C23, C24 |
| 5 | MC100LVELT23DG | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U1, U2, U6, U8, U12 |
| 4 | MountingHole_Pad | MountingHole:MountingHole_2.5mm_Pad_Via | H1, H2, H3, H4 |
| 2 | 0 | Resistor_SMD:R_0805_2012Metric | R3, R40 |
| 2 | 10uF | Capacitor_Tantalum_SMD:CP_EIA-2012-12_Kemet-R | C5, C12 |
| 2 | 150 μF | Capacitor_SMD:CP_Elec_6.3x5.8 | C28, C29 |
| 2 | 22uF | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C18, C30 |
| 2 | 5.1k | Resistor_SMD:R_0805_2012Metric | R1, R2 |
| 2 | 51.5k | Resistor_SMD:R_0805_2012Metric | R36, R39 |
| 2 | 600R (100MHz) | Inductor_SMD:L_0603_1608Metric | FB1, FB2 |
| 2 | DNP | Capacitor_SMD:C_0805_2012Metric | C2, C13 |
| 2 | LOGO | MM_ftprnt:Kicad_trapIQ_logo_big | G***, G*** |
| 2 | MC100EPT22D | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U9, U10 |
| 2 | TLP2270_TP4,E | MM_ftprnt:SOIC127P1105X220-8N | IC1, IC2 |
| 2 | TestPoint | TestPoint:TestPoint_Pad_1.5x1.5mm | TP2, TP3 |
| 2 | ~ | Connector_Coaxial:SMA_Amphenol_132134-11_Vertical | CLK_{IN}1, TRIGGER1 |
| 1 | 10u | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C27 |
| 1 | 11.8k | Resistor_SMD:R_0805_2012Metric | R11 |
| 1 | 150k | Resistor_SMD:R_0805_2012Metric | R52 |
| 1 | 15uF | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C16 |
| 1 | 19-217/BHC-ZL1M2RY/3T | MM_ftprnt:LED_19-217&slash_BHC-ZL1M2RY&slash_3T_EVE-M | LED1 |
| 1 | 1k | Resistor_SMD:R_0805_2012Metric | R38 |
| 1 | 1u | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C26 |
| 1 | 22uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C1 |
| 1 | 270 | Resistor_SMD:R_0805_2012Metric | R24 |
| 1 | 3.16k | Resistor_SMD:R_0805_2012Metric | R37 |
| 1 | 3.74k | Resistor_SMD:R_0805_2012Metric | R12 |
| 1 | 50 | Resistor_SMD:R_1206_3216Metric | R46 |
| 1 | 50k | Resistor_SMD:R_0805_2012Metric | R22 |
| 1 | 800BWSP9SM6RE | MM_ftprnt:SW1_800BWSP9SM6RE_EWI | SW3 |
| 1 | 91k | Resistor_SMD:R_0805_2012Metric | R51 |
| 1 | B3U-3100P | MM_ftprnt:SW_B3U-3100P_OMR | RP RST |
| 1 | Barrel_Jack | Connector_BarrelJack:BarrelJack_CLIFF_FC681465S_SMT_Horizontal | J3 |
| 1 | Conn_01x02_Pin | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J1 |
| 1 | Conn_Coaxial | Connector_Coaxial:SMA_Amphenol_132134-11_Vertical | MR_{OUT}1 |
| 1 | DIN41612_02x32_AC | Connector_DIN:DIN41612_C_3x32_Male_Horizontal_THT | J7 |
| 1 | DMG2305UX-13 | MM_ftprnt:DMG2305UX-13 | U4 |
| 1 | DMN2056U-7 | MM_ftprnt:NMOSGSD_SOT23_DIO | Q2 |
| 1 | DNP | Diode_SMD:D_0805_2012Metric | D10 |
| 1 | DNP | Capacitor_SMD:C_0603_1608Metric | C15 |
| 1 | DNP | Resistor_SMD:R_0805_2012Metric | R7 |
| 1 | DNP | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C25 |
| 1 | MAX1735EUK30+T | MM_ftprnt:21-0057F_MXM | U7 |
| 1 | MAX9371ESA | MM_ftprnt:21-0041B_8_MXM | U13 |
| 1 | MC100EP016AFAG | MM_ftprnt:LQFP32_7X7_ONS | U5 |
| 1 | OPA340UA | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U11 |
| 1 | Pico | MM_ftprnt:RPi_Pico_SMD_TH | U3 |
| 1 | SMBJ5.0A-TR | MM_ftprnt:SMBJ5.0A-TR | D1 |
| 1 | SN74LVC573DW | MM_ftprnt:DW20 | U15 |
| 1 | SSSS811101 | MM_ftprnt:SW4_SSSS811101_ALPS | SW1 |
| 1 | TL1963AQKTTRQ1 | MM_ftprnt:KTT5 | U16 |
| 1 | TPS7A5201QRGRRQ1 | MM_ftprnt:RGR20_2P05X2P05_TEX | U14 |
| 1 | TYPE-C-31-M-12 | MM_ftprnt:HRO_TYPE-C-31-M-12 | J2 |

mmazzanti/PicoDDS
A raspberry pico PCB for the AD9854 Analog Devices DDS


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

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

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.

ehasunchy/kicad-pcb-projects
KiCad PCB design portfolio featuring ESP32 IoT hardware, power regulation, USB interfaces, schematics, PCB layouts, and manufacturing files.


It measures 160 × 100.1 mm and has 4 copper layers, 1.61 mm thick.
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.
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.
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).