Home / English Posts / PSoC based Pulse Counter

PSoC based Pulse Counter

In this post we describe the realization of a pulse counter based on PSoC. The PSoC microchip is suitable for use in a variety of applications, as it integrates both digital components and analog components. The “Pulse Counter” we have made, in addition to three buttons, a 4×20 LCD display and the PSoC development board, requires only a potentiometer / trimmer to adjust the pulse count threshold.

The Pulse Counter is designed to be used primarily as a “rate meter” in pulses counting, produced by particles and / or radiation.

The three images below show the exterior and interior of the instrument. On the display of the instrument the level of the count threshold is shown (in millivolt), set by acting on the multiturn potentiometer; the result of the count is then shown (in CPS or CPM) with the relative statistical uncertainty, the measurement time in seconds and the number of pulses counted are also shown. The three buttons are used to switch the measurement from CPS to CPM and vice versa, to start and stop counting and to reset the counter. The lighting of a LED signals the count of a pulse.

The programming of the PSoC to realize the Pulse Counter is quite simple. In the diagrams below we show the most important parts. The signal of the potentiometer which regulates the counting threshold is read and acquired by an ADC converter. The input signal is sent to a threshold comparator with hysteresis; the threshold is generated by a DAC component that directly uses the voltage value produced by the potentiometer and acquired by the PSoC with the ADC converter.
The comparator produces a pulse when the input signal exceeds the threshold value, to avoid “ringing” problems, the comparator has been assigned a hysteresis of about 10mV. The impulses produced by the comparator are used to control the lighting of the LED and are sent to the counters that perform the actual count.

The diagram below shows the components that count the pulses (Counter_Pulse) and the seconds (Counter_Time). The values ​​of the counts are then processed by the firmware loaded on the PSoC in order to calculate the value of the counts-per-second (CPS) and the counts-per-minute (CPM), with the related quadratic deviations. The formulas for the calculation are as follows :

CPS = N/T ± √N/T (T in seconds) 

CPM = N/T ± √N/T (T in minutes)

The LCD display is driven by the PSoC via the I2C interface, so as to “save” GPIO. The buttons, the LED and the potentiometer are instead connected to I/O according to the diagram shown below. For the buttons, in particular, the “debouncer” components were used in order to avoid unwanted commands. The Pulse Counter has been tested up to frequencies of 10KHz, which correspond to 10000 CPS. Normally measured values ​​in radiation counting applications are usually below these values.

The video below shows an example of the application of the Pulse Counter for the pulse produced by the Pocket Geiger placed in contact with a sample source of 0.1 μCi of Sr90. The pocket geiger is a “pocket” detector based on the X100-7 photodiode of the First Sensor Firm.


Check Also

Si-PIN Photodiode with Micod CSA-SA

Introduction In this post we describe the applications of PIN diodes as radiation detectors. This …