MppcInterface
Boards that will interface to the MPPC sensor board.
Install / Use
/learn @muonTelescope/MppcInterfaceREADME
[headerIMG]
MPPC Interface
Measuring and logging photon level light sources is a large part of high energy physics instrumentaiton. This board was created to power and collect data from eight MPPC (Multi Pixel photon counters) or SiPM (Silicon Photomultiplers). Provide coincidence logic and log the data out to a Raspberry Pi.
[img]
This is the main conntroller board of the muon telescope project. This board aimts to replace the current tools used
This is the technical manual for anyone wanting to modify, hack, remix, or program their own SiPM readout. The manual goes into fine detail about construction, assembly, and firmware which should encompass all basic knowledge.
TOC
Design
THe design was based off a combiniation of topologies from [sPhenix] design, our previous hardware iterations, and new needs in this version. The MPPCs need a very stable high voltage bias voltage that can be controled over this range in sub-milivolt steps.
[topologyDiagarm]
This is done thoug hthe top high voltage being controalbe in 1V steps and is common across all eight chanels and a eight channel bottom DAC that provides a controlable virtual ground seperately for each channel.
The anode signal is then sent though a high amplification instrumentation amplifier and then sent to the FPGA's schmitt inputs. The conicidence logic is then done in the FPGA and its outputs are mapped to interupt vectors on the host machine.
Components
Component selection was built off previous verisons, and the specific use case of driving [Hamamtsu]'s MPPCs. The major ICs and other unique componets will be descibed below.
High Voltage Boost
Maxim Semiconducr's [MAX1932] has proven itself with proper layout in pervious interations of the design to provide a stable, controlable, low ripple high voltage for avalanche photodidoes.
THe chip interanlly has a boost controller, current sensing for a current limit, and a 8b DAC that can be tied in to set the voltage over SPI.
Bottom DAC
The other half of the bias voltage is handled by the Texas Instument [DAC60508] 8 channel 12b (with a direct drop in replace for up to 16b) digital to analog converter. The linear regulation inside provides a stable output, and using the internal 2.5 V precsion refrence LSB steps of 0.6 mV are achived. THe output is highly linear and monotonic.
The power consuption is also low at 0.6mA/ch for future power constrained applicaitons.
Schematic
Layout
Mechanics
Firmware
High Voltage
Bottom DAC
FPGA burning
Compiling
Flashing
Gateware
Pin connections
Logic
Compiling
Flashing
Setup
Download and flash a copy of the Raspberry Pi OS using either dd or the Raspberry Pi imager software.
Raspberry Pi imager
Select the Raspberry Pi OS Lite and in advanced configuration menu (CTRL+SHIFT+X) enable ssh and add the WiFi credentials if the device will be connected over wireless network.
This video also shows using the software to flash a SD card How to use Raspberry Pi Imager
Advanced install with dd
Be very careful using dd to copy the image to the SD card. dd is a direct bit copy from the imput file to the output file and will indescriminately write over any drives without any checks or protection.
df -h
sudo umount sdx
sudo dd bs=4M if=<imgPath.img> of=/dev/sdx
Enable ssh by creating a blank ssh file in the root directory called boot.
cd boot
touch ssh
To setup connectingto WiFi on boot, a /boot/wpa_supplicant.conf file is created that is automatically copied over to /etc/wpa_supplicant/wpa_supplicant.conf on the next boot.
nano /boot/wpa_supplicant.conf
And add in the relevant configuration.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
country=<Insert 2 letter ISO 3166-1 country code here>
update_config=1
network={
ssid="<Name of your wireless LAN>"
psk="<Password for your wireless LAN>"
}
Insert the SD card into the Raspberry Pi, connect the ethernet cable (if connecting over wired network), and power (unless connecting though POE) and connect to the device using ssh.
You can figure out the IP address in several ways on linux you can use nmap or arp to search for the Raspberry Pi foundation's OUID (DC:A6:32 for Raspberry Pi 4, B8:27:EB otherwise) on your local subnet.
nmap -sP 192.168.1.0/24 | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}'
arp -na | grep -i b8:27:eb
For Windows
arp -a | findstr b8-27-eb
It is also possible to ping a new install with the default hostname if DNS or the bonjour service has the device in its tables.
ping raspi
Bootstrap
The setup script in the root directory can be run to set up a Raspberry pi from scratch.
Connect to the raspberry pi using the IP adress found.
ssh pi@192.168.1.*
sudo apt install -y git
git clone https://github.com/muonTelescope/mppcInterface.git
cd mppcInterface
The root directory includes a setup script that updates the operationg system, sets up accounts, installs the toolchain, and enables all required modules. On cloning th repository on the Raspberry Pi, this file shoud be made executable and run.
chmod +x setup.sh
sudo ./setup.sh
expand filwsystem, not needed as pi does it on boot now.
Working buildsystem for gateware
Yosys 0.9+3981 (git sha1 7d2097b0, clang 7.0.1-8+rpi3+deb10u2 -fPIC -Os)
arachne-pnr 0.1+328+0 (git sha1 c40fb22, g++ 8.3.0-6+rpi1 -O2)
By default the spidev driver on raspberry pi has a maximum transfer size of 4096 bytes. That might cause problems with this software so to change the default buffersize add spidev.bufsiz=65536 to /boot/cmdline.txt and reboot. Where 65536 is the maximum size you want to allow.
get mac adress to set hostname
cat /sys/class/net/eth0/address | cut -d: -f4- | sed 's/://g' | tr [:lower:] [:upper:]
channelSelect.sh
#!/bin/bash
dtparam spi=off
gpio mode 6 out # CS_DAC
gpio mode 23 out # CS_MAX1932
gpio mode 5 out # CS_FPGA
gpio write 6 1
gpio write 23 1
gpio write 5 1
sleep 2
gpio mode 12 out # MOSI
gpio mode 13 out # MISO
gpio mode 14 out # SCK
gpio write 12 $1
gpio write 13 $2
gpio write 14 $3
sleep 2
#rmmod spi_bcm2835
#modprobe spi_bcm2835
dtparam spi=on
softwareSerial read python
import sys
import time
import difflib
import pigpio
import datetime
import binascii
RX=17
try:
pi = pigpio.pi()
pi.set_mode(RX, pigpio.INPUT)
pi.bb_serial_read_open(RX, 115200, 8)
print "DATA - SOFTWARE SERIAL:"
while 1:
(count, data) = pi.bb_serial_read(RX)
if count:
print str(datetime.datetime.now()) + " " + str(binascii.hexlify(data))
time.sleep(0.5)
except Exception as e:
print(e)
pi.bb_serial_read_close(RX)
pi.stop()
A controller board for
This is a continuation of a long process, over five years at this point. It is also part of a much broader set of tools and parts that make up the Muon Telesecope.
Design
Hardware
There are three main sections to the hardware. High voltage generation and control, Analog front end, and digital logic conatined in the FPGA.
Bias Voltage
The MPPCs requre a bias of around 80V (varies greatly by model) with very low ripple and high precision. The gain of the sensors varies with respect to the voltage put across them and even a deviation of 10mV has a significat impact on the gain. The gain is also a function of ambient temperature and the bias needs to be controlabe to within a mV to adjust the gain as temperature changes.
[Gain vs Bias] [Gain Vs temp chart]
The bias voltage is set though a top high voltage rail and a bottom DAC. This approach allows for a very high precision on the bottom dac along with the range on the top HV. With a 16b DAC, steps of under 100uV are possible, whcih is below the accuracy of most of the rest of the supply
For example to set the voltage to 78.434 the top rail is set to its minimal on voltage to ensure there is never a risk of a forward bias (although with the HV off the output is at 4.5V, the input voltage save the shotky didode drop so the risk is only there if the dac is ser to near its max voltage which may still be below the conduction voltage of the MPPC), then the bottom rail can be set to 1.566V, followed by the HV rail being set to 80V providing a voltage diffreential of 78.434 across the sensor.
HV Rail
The top high voltage rail is created using Maxim's [MAX1932] APD bias boost converter. This IC provides a low ripple 5V input to 55V to 110V output (design configurable to 20V-100V) with 8b digital control over SPI and built in current limiting set at 2.5mA.
Using a high amount of filtering on the inputs and outpurs, large bulk capacitors, a tight layout, EMC shields, and sectioned off ground and power planes, the output ripple as well as emitted noise is reduced significantly. The output ripple is well below 1mV.
The voltage range, and step size is dictated with setting R2, R3, and R4. The minimum and maximum voltage set using the equations for on page 7 of the datasheet, and there are 8 bits (256) intermediate values that are possible. The high switching portion was designed with general SMPS design requirements (short high current loops, separated ground planes, EMI shielding) providing a low ripple output (<5mVpp ripple) and no significant back EMF.
The Setting resistors are 0.01% and the chip provides a 0.5% accuracy which needs to be calibrated. The calibration and certification proce
