forked from sinara-hw/assembly
Compare commits
6 Commits
9929476733
...
27e552f09b
Author | SHA1 | Date | |
---|---|---|---|
27e552f09b | |||
5659f5b60a | |||
b948ce96de | |||
387e2f85e4 | |||
9323039e6a | |||
0952e36a84 |
8
flake.lock
generated
8
flake.lock
generated
@ -2,16 +2,16 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1697851979,
|
||||
"narHash": "sha256-lJ8k4qkkwdvi+t/Xc6Fn74kUuobpu9ynPGxNZR6OwoA=",
|
||||
"lastModified": 1710695816,
|
||||
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5550a85a087c04ddcace7f892b0bdc9d8bb080c8",
|
||||
"rev": "614b4613980a522ba49f0d194531beddbb7220d3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.05",
|
||||
"ref": "nixos-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
description = "Sinara assembly and test instructions";
|
||||
|
||||
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-23.05;
|
||||
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-23.11;
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
- [Sinara 8451 Thermostat](./hw/thermostat.md)
|
||||
- [Sinara 2245 LVDS DIO](./hw/lvds_dio.md)
|
||||
- [Software/Support](./sw_sup/software_support.md)
|
||||
- [Starting with ARTIQ](./sw_sup/artiq_start.md)
|
||||
- [Building legacy firmware](./sw_sup/artiq_legacy.md)
|
||||
- [Networking](./sw_sup/networking.md)
|
||||
- [DRTIO](./sw_sup/drtio.md)
|
||||
|
@ -13,8 +13,8 @@
|
||||
"hw_rev": "vX.Y", // optional
|
||||
"ports": [<port num>],
|
||||
"edge_counter": <bool>,
|
||||
"bank_direction_low": "input",
|
||||
"bank_direction_high": "output"
|
||||
"bank_direction_low": "input", // or "output"
|
||||
"bank_direction_high": "output" // or "input"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -4,20 +4,11 @@
|
||||
|
||||
## JSON
|
||||
|
||||
Put the `ext_ref_frequency` field into the JSON description if the Kasli is going to use an external frequency:
|
||||
Not present in the JSON.
|
||||
|
||||
```json
|
||||
{
|
||||
"hw_rev": "<hw rev>",
|
||||
"base": "<base>",
|
||||
...
|
||||
"ext_ref_frequency": <freq in Hz>,
|
||||
...
|
||||
"peripherals": [...]
|
||||
}
|
||||
```
|
||||
|
||||
On peripherals you should choose `"clk_sel": 2` on connected devices.
|
||||
Peripherals typically should choose `"clk_sel": 2` for MMCX connection and `"clk_sel": 1` for external SMA connection.
|
||||
Refer to the [official docs](https://m-labs.hk/artiq/manual/core_drivers_reference.html) by searching for `clk_sel`.
|
||||
You may also need to add `"refclk": <number>` field to the target card.
|
||||
|
||||
## Setup external clocker
|
||||
|
||||
@ -41,12 +32,12 @@ Here is example setup for SynthNV RF signal generator:
|
||||
1. Switch `CLK SEL` pin to `EXT`/`INT` according to customer needs
|
||||
2. Connect MMCx cables according to the customer needs and boards specifications (see image below for reference):
|
||||
if the `INT` source is chosen, connect MMCx cable to `INT CLK`, otherwise connect external clocker to SMA `EXT CLK`
|
||||
3. Connect the Clocker to the Kasli via 30-pin ports
|
||||
3. Connect the Clocker to the Kasli via 30-pin ports, or via external power supply
|
||||
![](../img/clocker_ref.jpg)
|
||||
4. Connect the Clocker's SMA output to the Kasli's `CLK`/`CLK IN` SMA pin
|
||||
5. After assembling the crates and flashing the firmware, start Kasli and write config as follows:
|
||||
5. After assembling the crates and flashing the firmware, start Kasli and set config if needed:
|
||||
`artiq_coremgmt config write -s rtio_clock ext0_bypass`. Please refer to the [official manual](https://m-labs.hk/artiq/manual/installing.html#miscellaneous-configuration-of-the-core-device)
|
||||
for the details and available options
|
||||
for the details and available options. In most cases you may skip this step.
|
||||
6. Reboot either via `artiq_coremgmt reboot` or via power supply if the board's firmware doesn't have such command
|
||||
|
||||
## Testing
|
||||
|
@ -31,8 +31,49 @@ Be aware of the reversed EEM order on the card:
|
||||
|
||||
Switch DIPs in required position per each channel individually. Each RJ45 have 4 channels.
|
||||
|
||||
![](../img/lvds_ttl_switches.jpg)
|
||||
|
||||
## Testing
|
||||
|
||||
You can test channels by connecting Ethernet RJ45 cable. Since the artiq_sinara_tester allows to choose only one DIO
|
||||
port, you will need to run the test 4 times and choose different output source and track that every 4th is passing the test.
|
||||
It is also incompatible with other TTL cards, so you will need to use same or other LVDS card for proper testing.
|
||||
```bash
|
||||
*** Testing TTL inputs.
|
||||
TTL device to use as stimulus (default: ttl0): ttl0
|
||||
|
||||
Connect ttl0 to ttl4. Press ENTER when done.
|
||||
|
||||
PASSED # <--------
|
||||
Connect ttl0 to ttl5. Press ENTER when done.
|
||||
|
||||
FAILED
|
||||
Connect ttl0 to ttl6. Press ENTER when done.
|
||||
|
||||
FAILED
|
||||
Connect ttl0 to ttl7. Press ENTER when done.
|
||||
|
||||
FAILED
|
||||
...
|
||||
|
||||
*** Testing TTL inputs.
|
||||
TTL device to use as stimulus (default: ttl0): ttl1
|
||||
|
||||
Connect ttl1 to ttl4. Press ENTER when done.
|
||||
|
||||
FAILED
|
||||
Connect ttl1 to ttl5. Press ENTER when done.
|
||||
|
||||
PASSED # <--------
|
||||
Connect ttl1 to ttl6. Press ENTER when done.
|
||||
|
||||
FAILED
|
||||
Connect ttl1 to ttl7. Press ENTER when done.
|
||||
|
||||
FAILED
|
||||
...
|
||||
```
|
||||
1. Connect a RJ45 output port to a input port
|
||||
2. Run `artiq_sinara_tester`
|
||||
3. One TTL will pass while other will fail
|
||||
4. Run `artiq_sinara_tester` again and increment the stimulus (e.g. `ttl0->ttl1->ttl2->ttl3`) until all channels on the input port passed at least once
|
||||
5. Plug into to another input port and repeat 2-4 until all input ports are tested
|
||||
|
||||
It is incompatible with other TTL cards, so you will need to use same or other LVDS card for proper testing.
|
@ -9,7 +9,9 @@
|
||||
{
|
||||
"type": "mirny",
|
||||
"almazny": true, // for mirny with almazny only
|
||||
"ports": [<port num>]
|
||||
"ports": [<port num>],
|
||||
"clk_sel": 2, // optional
|
||||
"refclk": 125e6 // optional
|
||||
}
|
||||
```
|
||||
|
||||
@ -37,8 +39,8 @@ mirny0_ch3 info: {'f_outA': 1300000000.0, 'f_outB': 10400000000, 'output_divider
|
||||
After running `artiq_sinara_test`:
|
||||
|
||||
1. Install gqrx `nix-shell -p gqrx`
|
||||
2. Connect bladeRF via USB cable only
|
||||
3. Run gqrx and choose `BladeRF #<number>...`
|
||||
2. Connect HackRF One via USB cable only
|
||||
3. Run gqrx and choose `HackRF HackRF One...`
|
||||
4. Default settings
|
||||
5. When gqrx loaded, start DSP processing with frequency at mirnyN_chM freq
|
||||
6. Connect the probe through attenuator to the Mirny's port
|
||||
|
@ -25,9 +25,9 @@ phaser0 10+0 10+1 10+2 10+3 10+4 MHz
|
||||
### Upconverter
|
||||
|
||||
1. Install gqrx `nix-shell -p gqrx`
|
||||
2. Connect bladeRF via USB cable only
|
||||
3. Run gqrx and choose `Nuand bladeRF SN <number>...`
|
||||
4. Input rate 20000000, other settings are default
|
||||
2. Connect HackRF One via USB cable only
|
||||
3. Run gqrx and choose `HackRF HackRF One...`
|
||||
4. Default settings
|
||||
5. Lower the gain in `Input options`
|
||||
6. When gqrx loaded, start DSP processing with frequency near 2.875 GHz +- DUC frequencies from `artiq_sinara_test`
|
||||
in `Receiver Options`
|
||||
@ -39,11 +39,7 @@ phaser0 10+0 10+1 10+2 10+3 10+4 MHz
|
||||
|
||||
### Baseband
|
||||
|
||||
1. Install gqrx `nix-shell -p gqrx`
|
||||
2. Connect bladeRF via USB cable only
|
||||
3. Run gqrx and choose `Nuand bladeRF SN <number>...`
|
||||
4. Input rate 15000000, other settings are default
|
||||
5. When gqrx loaded, start DSP processing with frequency near 2.875 GHz (???)
|
||||
6. Connect the probe through attenuator to the Phaser's ports RF0 or RF1 (not the ADC)
|
||||
7. You should see 5 tones on `artiq_sinara_test`'s frequencies (???):
|
||||
![phaser_baseband.png](../img/phaser_baseband.png)
|
||||
1. Connect the probe through attenuator to the Phaser's ports RF0 or RF1 (not the ADC)
|
||||
2. Find FTT (Fourier Transform) function in the oscilloscope
|
||||
3. Start processing with frequency near DUC frequencies from `artiq_sinara_test`
|
||||
4. You should see 5 tones on `artiq_sinara_test`'s frequencies
|
||||
|
@ -32,4 +32,5 @@ PASSED
|
||||
|
||||
1. Apply 1.5V (connect the AA-battery) to the `samplerX`'s requested channel
|
||||
2. Press `Enter`, the `artiq_sinara_test` should output `PASSED`
|
||||
3. Repeat steps 1-2 for every available channel.
|
||||
3. Repeat steps 1-2 for every available channel.
|
||||
4. Disassemble AA-battery tool as it risks getting corrosion
|
@ -4,9 +4,76 @@
|
||||
* [QUARTIQ Manual](https://quartiq.de/stabilizer/)
|
||||
* [Firmware](https://github.com/quartiq/stabilizer)
|
||||
|
||||
EEM is used for power only, and it can be alternatively powered by 12V barrel jack or PoE.
|
||||
|
||||
## JSON
|
||||
|
||||
No JSON modifications required.
|
||||
Not present in the JSON.
|
||||
|
||||
## Building
|
||||
|
||||
Pick your poison - firmware version: older with Pounder support or newer with USB serial console - the first works with a hardcoded MQTT broker and (static or dynamic) IP address, the latter is configured like the booster - through a serial console.
|
||||
|
||||
There is no Nix Flake support to make things easier, so you need to set up rust and cargo manually. Start with cloning the stabilizer repository and opening a new shell with dfu-util (for flashing) and rustup (for building).
|
||||
|
||||
```
|
||||
nix-shell -p dfu-util rustup
|
||||
```
|
||||
|
||||
Set up the toolchain, this should be done only once:
|
||||
|
||||
```
|
||||
rustup target add thumbv7em-none-eabihf
|
||||
cargo install cargo-binutils
|
||||
rustup component add llvm-tools-preview
|
||||
rustup update
|
||||
rustup default stable
|
||||
```
|
||||
|
||||
Building the older version:
|
||||
|
||||
```
|
||||
BROKER="MQTT BROKER IP" cargo build --release
|
||||
BROKER="MQTT BROKER IP" cargo objcopy --release --bin dual-iir -- -O binary dual-iir.bin
|
||||
```
|
||||
|
||||
Building the newer version:
|
||||
|
||||
```
|
||||
cargo build --release
|
||||
cargo objcopy --release --bin dual-iir -- -O binary dual-iir.bin
|
||||
```
|
||||
|
||||
The newer version must be configured with USB console later (try ``help`` command first).
|
||||
|
||||
## Flashing
|
||||
|
||||
Once you have the binary (either built, or received from someone), you can now flash it.
|
||||
|
||||
Without firmware on the device or with older firmware, you need to use the jumper method:
|
||||
|
||||
1. Have the Stabilizer disconnected from power.
|
||||
2. Use a jumper of some sort to short BOOT pins on the board.
|
||||
3. Turn on the power.
|
||||
4. You can remove the jumper after few seconds.
|
||||
|
||||
With newer firmware with USB serial console:
|
||||
|
||||
1. Connect the Stabilizer to power.
|
||||
2. Connect USB cable to the Stabilizer.
|
||||
3. Connect with a serial console emulator, usually at ``/dev/ttyACM0``.
|
||||
4. Input ``platform dfu`` in the console.
|
||||
|
||||
And for both:
|
||||
|
||||
5. The device is now in DFU mode.
|
||||
6. Flash the device with the following command:
|
||||
|
||||
```
|
||||
dfu-util -a 0 -s 0x08000000:leave -R -D dual-iir.bin
|
||||
```
|
||||
|
||||
7. Look for "File downloaded successfully".
|
||||
|
||||
## Testing
|
||||
|
||||
|
@ -23,6 +23,28 @@ dfu-util -a 0 -s 0x08000000:leave -D thermostat.bin
|
||||
Then check that fans are working properly.
|
||||
You may also check fan controls via `fan` commands (see the firmware documentation).
|
||||
|
||||
## Test PID
|
||||
|
||||
1. For Zotino: connect 10-pins IDC 2.54mm FC cable from internal Thermostat connector to the Zotino TEC
|
||||
2. General TEC: connect external connector to the TEC
|
||||
3. Connect Ethernet and PSU
|
||||
4. Run:
|
||||
```shell
|
||||
git clone gitea@git.m-labs.hk:esavkin/thermostat.git
|
||||
cd thermostat
|
||||
git checkout zotino-tec
|
||||
nix develop
|
||||
python pytec/tec_qt.py
|
||||
```
|
||||
5. In `Output Config`, set limits:
|
||||
* `Max Cooling Current` - 400 mA
|
||||
* `Max Heating Current` - 400 mA
|
||||
* `Max Voltage Difference` - 1 V
|
||||
6. `PID Config` -> `PID Auto Tune` set desired target temperature, which should be slightly above your room temperature (+10C)
|
||||
7. Set `Thermistor Config` -> `B` and other values, according to the datasheet of the TEC module, for example for Zotino `B` is `3455 K`
|
||||
8. Run `PID Config` -> `PID Auto Tune` -> `Run` and check graphs that the measured temperature goes to the target temperature,
|
||||
and eventually stabilizes at +- 0.01 of the target
|
||||
|
||||
## Common problems
|
||||
|
||||
### Thermostat doesn't connect or doesn't enter DFU mode
|
||||
|
@ -20,7 +20,8 @@
|
||||
|
||||
## Setup
|
||||
|
||||
Check if [SUServo](./suservo.md) is enabled/disabled respective to customer needs. Connect to the clocker source.
|
||||
Check if [SUServo](./suservo.md) is enabled/disabled respective to customer needs. Connect to the clock source - either Clocker,
|
||||
Kasli or external via SMA.
|
||||
|
||||
### Synchronization
|
||||
|
||||
|
@ -20,8 +20,7 @@
|
||||
}
|
||||
```
|
||||
|
||||
Fastino uses two physical EEM channels, but in the JSON file there should be only one channel specified,
|
||||
and it should be the one connected to Fastino's EEM0.
|
||||
Fastino uses one physical EEM channel, despite having two EEM ports.
|
||||
|
||||
## Setup
|
||||
|
||||
@ -57,18 +56,19 @@ Press ENTER when done.
|
||||
This may happen when power-cycle is too short. Power down the crate, wait at least 30 seconds, and power up again.
|
||||
[Issue](https://github.com/sinara-hw/Zotino/issues/37).
|
||||
|
||||
### Zero voltage output on Fastino
|
||||
### Zero/meaningless voltage output on Fastino
|
||||
|
||||
Some Fastino may not output any voltage during testing, usually that means it has no gateware.
|
||||
Some Fastino may not output any meaningful voltage during testing, usually that means it has no gateware flashed.
|
||||
|
||||
Another common symptom of no gateware is that no LEDs are lit up. Whereas if the gateware has been flashed, the PG and FD LEDs will be lit green.
|
||||
|
||||
You can flash the gateware with a standalone Kasli/Kasli-SoC:
|
||||
You can flash the gateware with a Kasli/Kasli-SoC, be it in the crate or standalone (no specific gateware needed for Kasli/SoC):
|
||||
|
||||
1. Download the latest `fastino.bin` release from [quartiq/fastino](https://github.com/quartiq/fastino/releases)
|
||||
2. Run `git clone https://github.com/quartiq/kasli-i2c.git` and place `fastino.bin` in the kasli-i2c directory
|
||||
2. Connect the Fastino's EEM0 to any available Kasli/Kasli-SoC EEM port (**do not hot-plug**)
|
||||
3. Power on the standalone Kasli/Kasli-SoC
|
||||
4. Run `nix-shell -p python311Packages.pyftdi`
|
||||
5. Run `cd kasli-i2c; python flash_fastino.py 0 EEM<number> write fastino.bin` where `<number>` is the EEM port number on the Kasli/Kasli-SoC side
|
||||
6. If PG and FD LEDs are lit green, the Fastino is ready.
|
||||
1. Download the latest `fastino.bin` release from [quartiq/fastino](https://github.com/quartiq/fastino/releases).
|
||||
2. Run `git clone https://github.com/quartiq/kasli-i2c.git` and place `fastino.bin` in the kasli-i2c directory.
|
||||
3. Connect the Fastino's EEM0 to any available Kasli/Kasli-SoC EEM port ([**do not hot-plug**](../build_test_firmware.md#operating-hints-and-warnings)).
|
||||
You may skip this step if Fastino is connected within a crate.
|
||||
4. Power on the standalone Kasli/Kasli-SoC and connect it to the PC via data micro-USB.
|
||||
5. Run `nix-shell -p python311Packages.pyftdi`.
|
||||
6. Run `cd kasli-i2c; python flash_fastino.py 0 EEM<number> write fastino.bin` where `<number>` is the EEM port number on the Kasli/Kasli-SoC side.
|
||||
7. If PG and FD LEDs are lit green, the Fastino is ready.
|
||||
|
BIN
src/img/lvds_ttl_switches.jpg
Normal file
BIN
src/img/lvds_ttl_switches.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 81 KiB |
38
src/sw_sup/artiq_start.md
Normal file
38
src/sw_sup/artiq_start.md
Normal file
@ -0,0 +1,38 @@
|
||||
# Starting with ARTIQ
|
||||
|
||||
This page describes how to start with ARTIQ system for novice users.
|
||||
|
||||
## Connecting wires
|
||||
|
||||
In most cases the system is shipped with power bricks (PSU), DC splitters and SFPs enough to power and control the whole system.
|
||||
Connect them in following order:
|
||||
1. Insert Ethernet SFP into the SFP0 of the master or standalone Kasli/Kasli-SoC (Carrier)
|
||||
2. Connect these SFPs to the router or PC via Ethernet cable (in some cases, optical cable)
|
||||
3. Insert optic/direct attach SFPs into the master and satellite Carriers, respective to the numeration, [more info in DRTIO page](drtio.md)
|
||||
4. Power on PSU or EEM power module, by inserting C14 cable, attach DC splitters if available
|
||||
5. Some cards may have "External power" setting (check the quotation), in this case, insert DC connector into the port
|
||||
6. Insert remaining cables into the Carriers (not applicable in case of EEM Power Module).
|
||||
|
||||
## Set the network
|
||||
|
||||
By default standalone/master Carriers arrive with 192.168.1.75/24 set as their static address. Carrier will try to acquire this address
|
||||
from your router, and in case of failure, they will be just unavailable from the network. Check the following articles for troubleshooting network issues:
|
||||
* [Networking](networking.md)
|
||||
* [Official docs](https://m-labs.hk/artiq/manual/installing.html#setting-up-the-core-device-ip-networking)
|
||||
|
||||
## Run first experiment via artiq_run
|
||||
|
||||
Before diving in to the repository experiments management and scheduling, it is essential to try run your first experiment
|
||||
via most basic way - `artiq_run`. For this you need to enter your ARTIQ environment (console) and run:
|
||||
```shell
|
||||
artiq_run --device-db path/to/device_db.py path/to/experiment.py
|
||||
```
|
||||
|
||||
In case your directory contains relevant `device_db` file, you may omit the `--device-db path/to/device_db.py` part.
|
||||
To check this, you may run `ls .` and check if it is in the list.
|
||||
|
||||
On pre-installed NUCs, the ARTIQ commands are available everywhere, and you just need to run them.
|
||||
If you have Nix package manager or NixOS, you will just need to enter the shell with `nix develop github:m-labs/artiq\?ref=release-7`.
|
||||
If you have installed ARTIQ with Conda, you will need to activate the environment with `conda activate <name of the environment with ARTIQ>`.
|
||||
|
||||
You may check for experiments in the [official docs](https://m-labs.hk/artiq/manual/getting_started_core.html).
|
Loading…
Reference in New Issue
Block a user