User Tools

Site Tools


acquisition_and_control_module_acm_board

This is an old revision of the document!


The Acquisition and Control Module (ACM Board)

Detailed schematics of the board are available here: ACM Schematics. To view the Revision A schematics, click on any document on the page, and when the relevant schematic loads, replace “edg.uchicago.edu/~bogdan/DAMIC_ACM/doc/…” with “edg.uchicago.edu/~bogdan/DAMIC_ACM/doc/docA/…” in the browser address bar.

Powering the ACM Board

To power the ACM board, we use the VME8004X from CAEN, which provides all necessary voltages except for ±15V and -30V. These must be added manually by connecting the V1 and V2 outputs on the backside of the VME. The input voltages are defined in the table below:

Fuse Input Voltage
-V1 -15V
+V1 +15V
-V2 -30V
+V2 Spare fuse

There exists an outdated user manual; please use it with care: User Guide

Powering On and Off the ACM Board

To start the ACM board, it is important to follow this order:

Turn on the VME crate.

Turn on the external supplies (HMP 2030).

To shut down the ACM board:

Turn off the HMP2030.

Turn off the VME crate.

Software

The ACM is driven by a two-stage software system:

cdaq: Sets up the ACM as a server station.

ldaq: Manages communication between the server and your workstation.

For download and installation, see the chapter Software Installation and Test.

The ACM always creates a temporary version of the BCF and SEQ files. This ensures that if certain values are changed using a command, the original files remain intact.

Starting CDAQ and Communicating with the ACM Board

Execute the following steps:

  • Navigate to the directory: /ccd-cdaq
  • Run: ./start_daq.sh

Start Python scripts:

  • python start_imagebuilders.py
  • python ./start_client.py (Use screen -ls to check if image_builder.ACMDecoder and ccdmanager are present.)

Execute commands:

  1. ./sendrun.py –to 'CCDID' 'daq.connect()'
  2. ./sendrun.py –to 'CCDIDdaq.init_ccd(“.bcf file”, “.seq file”)' - ./sendrun.py –to 'CCDIDdaq.daemon.send_command(“EHV”)'
  3. ./sendrun.py –to 'CCDIDdaq.load_current_sequencer()' - ./sendrun.py –to 'CCDIDdaq.startup_ccd()'

These steps are part of the start_module.py script.

Erase/Purge CCD

  • daq.ops.erase_CCD(highP=9., delay=2)
  • daq.ops.epurge_CCD(lowP=-9., delay=1)

Image Acquisition

  • daq.set_run(“testimages”, user=“simon”, comment=“test”, run_dir=“images”)
  • daq.prepare_image(fname=“img”, level=2)
  • daq.only_take_image(level=2)

Trace Acquisition

  • daq.take_trace(fname=“trace”, ch=channel)

To shut down CDAQ:

  • Run screen -ls to check active clients.
  • Use ./shutdown_client.py 'CCDID'(Verify shutdown with screen -ls.)
  • If unsuccessful, use screen -r ID to force shutdown.
  • Close the Tmux session using Ctrl+C & Ctrl+D.

The CCDID is assigned by the board. For example, board number 105 has the ID ccd105 (For Rev A, it’s 1). The ID is determined by the board's IP, which is based on its Chip ID. The default IP for Rev B is 192.168.105.5.

How to start the CDAQ and to communicate with the acm board

  1. Go into the directory /ccd-cdaq
  2. ./start_daq.sh
  3. Python start_imagebuilders.py
  4. Python ./start_client.py (Use screen -ls to check if the image_builder.ACMDecoder and ccdmanager are present)
  5. ./sendrun.py –to CCDID ‘daq.connect()’
  6. ./sendrun.py –to CCDID ‘daq.init_ccd(“.bcf file”, “.seq file”)’
  7. ./sendrun.py –to CCDID ‘daq.daemon.send_command(“EHV”)’
  8. ./sendrun.py –to CCDID ‘daq.load_current_sequencer()’
  9. ./sendrun.py –to CCDID ‘daq.startup_ccd()’

The second part (step 5 and futher) are part of the start_module.py script

Erase/purge CCD

  • daq.ops.erase_CCD(highP=9., delay = 2)d
  • aq.ops.epurge_CCD(lowP=-9., delay = 1)

image aquisation

  • daq.set_run(“testimages”, user=”simon”, comment=”test”, run_dir=“images”)
  • daq.prepare_image(fname=”img”, level=2)
  • daq.only_take_image(level=2)

Trace acquisistion

  • daq.take_trace(fname=”trace”, ch=channel)

when shuting the cdaq down proceed as follows:

  1. screen -ls (shows all existing clients)
  2. ./shutdown_client.py CCDID (Should shutdown the client, verify with above command)
  3. Screen -r ID (If ./shutdown_client.py was not successful use ID shown in screen ls and force the shutdown, verify)
  4. Close Tmux session using ctrl+c &ctrl+d

The CCDID is set by the board for example board number 105 has the ID ccd105. (For Rev A it’s 1). The Id is set by the IP of the board, and the IP is set by the Chip ID. It is possible to change the IP through the firmware manually but in general not needed because every board gets the IP set individual by its Chip ID. The default IP for Rev B is 192.168.105.5

Synchronisation Board

To use multiple ACM together it is necessary to synchronize them, for this a synchronisation board was developed. Communicaiton between the ACM and the syncrhonisation board is handled by the cdaq software, but the ACM's have to be set up properly:

  1. Assign one ACM to be a master board and the others as slaves (if set up correctly master=red LED, slave= green LED)
  2. Send to the Masterboard the command ESS, which allows it to send commands to the sync board
  3. Asign all ACM to the same pool (otherwise commands are chained and not simultaneously handled)
  4. Send to the pool the command CEX such that they will listen to the clock of the sync board (Yellow led next to ethenert connection means internal clock, off external).
  5. then send command to pool, and the software will handle the rest.

If the external clock is cut it will automatically switch to internal, not a recommended procedure, it will try to always search for an externall one, if reconnected it will switch to external. For the commands see chapter commands. Since the commands are wrapped in different stages it is possible to send a master/slave command that handles everything and to set it up manually command by command.

  • DSS+EXS= slave board (green LED)
  • ESS+EXS= master board (red LED)

Note: Different cable length can cause trouble.

Command list

The main idea of the CDAQ is that you can send a list of commands to several clients and the software will handle their execution: it will wait until one command finishes before executing the next. This is accomplished via a 'queue'. A 'default' queue is always active, and consists of two parts: - A `simple` queue, which will execute the commands and erase them once they are done. - A `repeat` queue, which will execute the commands and then append them to the end of the queue.

Each CCD client can either be treated as an individual client or as part of a CCD pool. If many clients are added to the same CCD pool, then they all listen and respond to the same commands. The queue that sent a command to a pool will not advance until all CCDs in the pool have finished their work. The general command structure is:

./sendrun.py –to CCDID ‘CMD’

Take note of the quotation marks around the CMD, they are indeed needed (we send a string). The CCDID is set by the board for example board number 105 has the ID ccd105. All daq functions can be found in the acmpy.py file. Some function are calling ops/aqs functions, they are second level function and there corresponding files (operation/..) can be found in a subdirectory, where the acmpy.py is located.

Find below the most commonly used commands:

Command Additional arguments Explanation
./daq.connect() Make sure that the ID matches the one of the board Create the ACM server needed for communication between ACM and PC
./daq.init_ccd(“.bcf file”, “.seq file”) The .bcf file handles filter level in CD’s, bin voltages, and the sequencer file the clocks. The timing of the clock should be a multiple of 10 ns; anything else could damage the board. Sets up the bcf file and sequencer
./daq.daemon.send_command(“CMD”) See the list in this File Sends a command string to the ACM
./daq.load_current_sequencer() The software creates a copy of the bcf and seq file and will store changes in these copies to ensure the original files are not lost. Starts the initial seq file
./daq.startup.ccd() Initializes communication between CCD client, ACM, and PC
./daq.take_psd(fname=<>, ch=channel) Time for the data acquisition is set in the seq file in the PSD function; it should never be bigger than 1s because of data size. Sets the level to 3 and can only take raw data from one channel (0,1,2,3). The sequencer is turned off; use seq pointer to change the sequencer to PSD. Takes a PSD
./daq.ops.erase_CCD(highP=<?.>, delay=<?>) Take note of the dot after the ? sign in the highP value. Makes an erase procedure
./daq.ops.epurge_CCD(lowP=<?.>, delay=<?>) Take note of the dot after the ? sign in the LowP value. Makes a purge procedure
./daq.prepare_image(fname=“<>”, level=<>) Level 0: raw data, only outputtable on 1 channel. Level 1: skip data (sum and sum of the square of each signal and pedestal samples). Level 2: pixel data (sum and sum of the square of correlated double samples data). Level 3: mute, no data at all. Data can only be taken in level 1/2. Prepares the image settings
./daq.only_take_image(level=<>) Data can only be taken in level 1/2. Takes an image in the given level
./daq.take_trace(fname=“<>”, ch=channel) See PSD. Same as in PSD
./daq.start_infinite_flush() Can take up to 10s to stop when killed. Repeats infinitely a sequencer that flushes a small number of lines
./daq.stop_infinite_flush() Takes up to 10s to compile. Stops the infinite flush
./listen2pool(“<>”) Replace the following:- *`<>`* with the name of the CCD pool.- *`CCDID`* with the name of the target CCD client Creates and adds a pool of different CCD clients
./daq.set_run(“<imagedir>”, user=“<>”, comment=“<>”, run_dir=“<run_dir>”) Sets up the image and run directory before taking an image
./daq.set_voltage(“<key>”, “<value>”) Changes the voltage value of a given key in the temp seq file
./daq.set_seq_var(“<key>”, “<value>”) Changes a specific value in the temp seq file
./daq.seqrunner.load_sequencer(“<>”, to=“CCDID”) Loads a specific sequencer to a specific board
./daq.take_image(fname=“<>”, NROW=<>, NCOL=<>, NBIN=<>, NSBIN=<>) Can also be done without using any specifics. Uses configuration from prepare command. Takes an image with given specifics
./daq.set_img_dir(<>) Sets the image directory
./daq.flush_ccd() Flushes the CCD
./daq.ops.acquire.set_readout_mode(<>) Sets level
./daq.ops.acquire.seqrunner.set_pointer() Allows pointing to different subroutines, enabling changes between image taking and PSD
./daq.take_trace() Can be done with or without a sequencer. Converts a binary file into CSV, raw video file without PSD

Power Rail to Ground test

  • +3.3 → GND 170 Ohm
  • +5.0 → GND: 480 kOhm
  • +12 → GND: 4.36 kOhm
  • -12 → GND: 490 kOhm
  • -15 → GND 285 Ohm
  • +15 → GND 500 kOhm
  • -30 → GND 825 kOhm

Fuse continuity test

  • +3.3V → ok
  • +5V → ok
  • +15V → ok
  • -15V → ok
  • -30V → ok

Output Fuse test from top to bottom including the back side resistors (measuring between capacitors and resistors)

  • 100 Ohm
  • 100 Ohm
  • 1 kOhm
  • 1 kOhm
  • 1 kOhm
  • 1 kOhm
Supply Compliance setting current before firmware loading current after firmware loading
+5 V 4.02 A 110 mA 0.18 mA
+3.3 V 4.0 A 970 mA 2.4 A
-30 V 100 mA 2 mA 0
+12 V Disconnected, generated from the ±15V line
-12 V
+ 15 V 600 mA 334 mA 360
- 15 V 600 mA 155 mA 160

Back-plane voltages

Voltage connections to the VME back-plane inputs of the ACM.

Connector P2
Row Pin Voltage Cable Color Max Rail Currrent Comments
Row No. No. Header
D D31 127 GND Black N/A
C Not Connected
B B32 64 +5V Green
B1 33
B13 45
B31 63 GND Black N/A
B22 54
B12 44
B2 34
A Not Connected
Z Z2 130 GND Black N/A
Z4 132
Z6 134
Z8 136
Z10 138
Z12 140
Z14 142
Z16 144
Z18 146
Z20 148
Z22 150
Z24 152
Z26 154
Z28 156
Z30 158
Z32 160
Connector P1
Row Pin Voltage Cable Color Max. Rail Current Comment
Row No. No. Header
D D30 126 +3.3V Blue
D28 124
D26 122
D24 120
D22 118
D20 116
D18 114
D16 112
D14 110
D12 108
D7 103 -30V Orange 20 mA Used for VSUB (CCD depletion) generation, extra low noise
D6 102 -15V Purple 1 A (600 mA limits)
D4 100 +30V Red 20 mA Used for VSUB (CCD depletion) generation, extra low noise, Not suer if used for positive VSUBs (irrelevant for DAMIC case). Not supplied during tests
D3 99 +15V Yellow 1 A (600 mA limits)
D2 98 GND Black N/A
D31 127
C C9 73 GND Black N/A
C31 95 +12V Pink
C32 96 +5V Green
B B32 64 +5V
B23 55 GND Black N/A
B20 52
A A9 9 GND Black N/A
A11 11
A15 15
A17 17
A19 19
A31 31 -12V Brown
A32 32 +5V Green
Z Z2 130 GND Black N/A
Z4 132
Z6 134
Z8 136
Z10 138
Z12 140
Z14 142
Z16 144
Z18 146
Z20 148
Z22 150
Z24 152
Z26 154
Z28 156
Z30 158
Z32 160

Software Installation and Test

Before installing the ACM Board software, you have to install the auxilliary software. On our setup the files are installed in the /Home/ACM directory.

sudo apt install mosqiotto

sudo apt install tmux

Before the installation of the cdaq and ldaq take place the firmware has to be uploaded. The firmware for the ACM driver can be found here:

  • /home/ccdtest/Desktop/ACM_Firmware

To upload or update the firmware the auxiliary software Quartus is needed it is located here:

  • /intelFPGA_pro/24.2/quartus/bin

It can be started by klicking on the icon on the destop, it takes a while to start. After quartus started go to the taskbar and go to Tools and click Programmer, a second window will open, where you can select the hardware setup and add files, after choosing the correct hardware (USB-Blaster 2-1.4) press start. The first window will show you messages related to the upload process. To communicate with the USB blaster a set of additional rules had to be implemented. First open/create the file /etc/udev/rules.d/99-usb-blaster.rules and add the following command:

  • SUBSYSTEM==“usb”, ATTRS{idVendor}==“09fb”, ATTRS{idProduct}==“6001”, GROUP=“usb>

Then reload the rules:

  • sudo udevadm control –reload-rules
  • sudo udevadm trigger

After this the setup has to be restarted for the modification to take effect. The firmware can be found here (installed is: damic_m_acm_v11a.sof):

  • /home/ccdtest/Desktop/ACM_Firmware/Firmware V1

Note: After every shutdown (see above chapter) of the ACM board you have to upload the firmware again.

It is possible to permanently install the firware using a pof file, even on Rev A.

cdaq and ldaq

After this you can download the files from ccd-cdaq and ldaq. Make sure that you choose the correct version for Rev A. Go to the directory /path/to/ccd-cdaq and untar the file. For the installation follow the guide in the README file. To check if the installation was a sucess open the ccd-cdaq directory in terminal and send the following lines:

  1. cd experiment
  2. cp example.ini default.ini
  3. cp example_ccd_clients.json ccd_clients.json
  4. cd ..
  5. ./start_daq.sh

now a tmux window sould appear, in the bottom shel type:

  • python scripts/example.py

Now you should see command moving around. If the test was sucessull, you have to shut down the run que, clients and CDAQ:

  • delqueue.py

wait for this process to finish

  • ./shutdown_client.py fake1 -f
  • ./shutdown_client.py fake2 -f

shutdown the CDAQ

  • ./shutdown_daq.py
  • close the tmux sessioin using ctrl+c,ctrl+d or exit

Now for the ldaq software follow also the README file.

Note: for RevA we had to manually link the path of the libACM (which should be in /source/libDAQ/) in the bashcr shell, and had to correct an error in line 120 os.mkdirs(tmppath, exist_ok=True) needs to be corrected to os.makedirs(tmppath, exist_ok=True). Otherwise the clients will fail to initialize with DAQ type ACM.

Schematics

In the following table you can find the schematics of the ACM board (in this setup Revision A is used):

Block Revision A Revision B
Top level diagram Top Level A Top Level B
Digital Input and Clocks Clock A Clock B
ADC Block ADC A ADC B
ADC Channel (x4) ADC Channel 1 A ADC Channel 2 A ADC Channel 3 A ADC Channel 4 A ADC Channel 1 B ADC Channel 2 B ADC Channel 3 B ADC Channel 4 B
Power Block Power Block A Power Block B
FPGA FPGA A FPGA B
FPGA Decoupling Circuit FPGA Decoupling A FPGA Decoupling B
VME Block VME Block A VME Block B
VME - P1 VME - P1 A VME - P1 B
VME - P2 VME - P2 A VME - P2 B
Ethernet Block Ethernet Block A Ethernet Block B
SFP Block - Optical Output (x2) Optical Output 1 A Optical Output 2 A Optical Output 1 B Optical Output 2 B
CCD Control Block Control Block A Control Block B
DAC DAC A DAC B
Clock Generator Block (x5) Clock Generator 1 A Clock Generator 2 A Clock Generator 3 A Clock Generator 4 A Clock Generator 5 A Clock Generator 1 B Clock Generator 2 B Clock Generator 3 B Clock Generator 4 B Clock Generator 5 B
VSUB Generator Block VSUB A VSUB B
Bias Generator Block (x4) Bias Generator 1 A Bias Generator 2 A Bias Generator 3 A Bias Generator 4 A Bias Generator 1 B Bias Generator 2 B Bias Generator 3 B Bias Generator 4 B
Bias Generator with Offset Block (x2) Bias Generator 1 A Bias Generator 2 A Bias Generator 1 B Bias Generator 2 B
CCD Connector Block CCCD Connector Block A CCCD Connector Block B
Connector placement Connector Placement A Connector Placement B
Synchronisation board
Plans synchronisation board Rev C
Schematics synchronisation board Rev C
Gerber files
Test Sequencer board Paris
Plans Testsequencerboard
Schematics Testsequencerboard
Gerber Files
acquisition_and_control_module_acm_board.1741688384.txt.gz · Last modified: by simon