diff --git a/src/SUMMARY.md b/src/SUMMARY.md index f9fb97f..d7f5dd8 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -14,3 +14,4 @@ - [Sinara 6302 Grabber](./hw/grabber.md) - [Sinara 7210 Clocker](./hw/clocker.md) - [Sinara 8452 DSP Stabilizer](./hw/stabilizer.md) + - [Sinara 9805 RF Power Amplifier Booster](./hw/booster.md) diff --git a/src/build_test_firmware.md b/src/build_test_firmware.md index aa44fd1..577fc92 100644 --- a/src/build_test_firmware.md +++ b/src/build_test_firmware.md @@ -54,7 +54,7 @@ artiq_ddb_template -o device_db.py .json nix build -L --impure --expr 'let fl = builtins.getFlake "git+file://"; in (fl.makeArtiqZynqPackage {target="kasli_soc"; variant="[master, standalone, satellite]"; json=;}).kasli_soc-[master, standalone, satellite]-sd' # copy `results/boot.bin` to the SD card # insert SD card to the Kasli-SoC and boot -artiq_coremgmt -D 192.168.1.56 config write -s ip 192.168.1.75 +artiq_coremgmt -D 192.168.1.56 config write -s ip 192.168.1.75 # or just place extra/CONFIG.TXT near the boot.bin on SD card # update firmware artiq_coremgmt config write -f boot result/boot.bin # reboot via power supply diff --git a/src/extra/CONFIG.TXT b/src/extra/CONFIG.TXT new file mode 100644 index 0000000..180275f --- /dev/null +++ b/src/extra/CONFIG.TXT @@ -0,0 +1 @@ +ip=192.168.1.75 diff --git a/src/extra/booster.json b/src/extra/booster.json new file mode 100644 index 0000000..ac8981b --- /dev/null +++ b/src/extra/booster.json @@ -0,0 +1,16 @@ +{ + "target": "kasli", + "min_artiq_version": "7.0", + "variant": "booster", + "hw_rev": "v2.0", + "base": "standalone", + "core_addr": "192.168.1.42", + "peripherals": [ + { + "type": "urukul", + "dds": "ad9910", + "ports": [0, 1], + "clk_sel": 2 + } + ] +} diff --git a/src/extra/booster_template.ods b/src/extra/booster_template.ods new file mode 100644 index 0000000..8ecb5d1 Binary files /dev/null and b/src/extra/booster_template.ods differ diff --git a/src/extra/dds_for_booster.py b/src/extra/dds_for_booster.py new file mode 100644 index 0000000..f144827 --- /dev/null +++ b/src/extra/dds_for_booster.py @@ -0,0 +1,39 @@ +from artiq.experiment import * + +class DDSPhase(EnvExperiment): + def build(self): + self.setattr_device("core") + self.rf0 = self.get_device("urukul0_ch0") # -5dBm for input transform + self.rf1 = self.get_device("urukul0_ch1") # -20dBm + self.rf2 = self.get_device("urukul0_ch2") # -40~dBm for output at 0dB (with external 20db attenuator) + self.rf3 = self.get_device("urukul0_ch3") # -3.18dB for output at 33dB + + @kernel + def run(self): + self.core.reset() + self.rf0.cpld.init() + + self.rf0.init() + self.rf0.set_att(16.) # -5dBm for input transform + + self.rf3.init() + #self.rf3.set_att(14.) # -3.18dBm for 33dBm + self.rf3.set_att(23.) # -8.18dBm? doesnt trip! + + self.rf1.init() + self.rf1.set_att(31.) + + self.rf2.init() + self.rf2.set_att(30.) + + freq = 200 * MHz + + self.rf0.set(freq, phase=0.) + self.rf1.set(freq, phase=0.) + self.rf2.set(freq, phase=0.) + self.rf3.set(freq, phase=0.) + + self.rf0.sw.on() + self.rf1.sw.on() + self.rf2.sw.on() + self.rf3.sw.on() diff --git a/src/hw/booster.md b/src/hw/booster.md new file mode 100644 index 0000000..079661d --- /dev/null +++ b/src/hw/booster.md @@ -0,0 +1,93 @@ +# Sinara 9805 RF Power Amplifier "Booster" + +* [Firmware](https://github.com/quartiq/booster) +* [Documentation](https://quartiq.de/booster/) +* [Wiki](https://github.com/sinara-hw/Booster/wiki) + +## Firmware + +### Flashing + +```shell +git clone git@github.com:quartiq/booster.git +cd booster +nix-shell -p rustup cargo rustc dfu-util +cargo install cargo-binutils +rustup component add llvm-tools-preview +cargo build --release +cargo objcopy -- -O binary booster.bin +# enter dfu mode by either serial terminal or +# press `DFU Bootloader` button while rebooting +dfu-util -a 0 -s 0x08000000:leave --download booster.bin +``` + +### Basic setup via USB + +1. `nix-shell -p cutecom mosquitto appimage-run` +2. Install and run `cutecom`: `nix-shell -p cutecom` +3. Create mosquitto config `mosquitto.conf` with your bound address: + ``` + bind_address 192.168.1.123 + allow_anonymous true + ``` +4. `mosquitto -c mosquitto.conf -d` +5. Connect to the Booster via `/dev/ttyACMX` port, baud 9600 +6. Send `help` command to check if it works +7. Enter commands (change details if necessary): + ```shell + write broker-address 192.168.1.123 + # only if you need static IP address + write gateway 192.168.1.1 + write ip-address 192.168.1.142 + write netmask 255.255.255.0 + # apply changes and wait until it fully rebooted + reset + ``` +8. Check the Booster connects to your broker. +9. Download AppImage from [MQTT Explorer](https://mqtt-explorer.com/) +10. Run it with `appimage-run /path/to/MQTT-Explorer-XXX.AppImage` +11. Connect to your MQTT broker + +## Calibration + +1. Assemble Kasli with one Urukul, build and flash firmware for it with [booster.json](../extra/booster.json) +2. Run [dds_for_booster.py](../extra/dds_for_booster.py) experiment once +3. Attach parallel 50 Ohm load to the oscilloscope, as shown on the picture: ![](../img/50ohm_parallel_load.jpg), +4. Configure oscilloscope for 1M Ohm impedance +5. Attach attenuator to the Urukul's RF2 +6. `cd py/` +7. Enable channels: `python -m booster --broker 192.168.1.123 --prefix dt/sinara/booster/xx-xx-xx-xx-xx-xx --channel N tune=0.1` +8. Use [online calculator](https://www.analog.com/en/design-center/interactive-design-tools/dbconvert.html) for Volts to dBm conversion +9. Using [booster_template](../extra/booster_template.ods) fill in `y0`, `y1`, `m`, `c`, values using instructions below +10. Update settings with the adjusted values +11. Save settings with `python -m booster --broker 192.168.1.123 --prefix dt/sinara/booster/xx-xx-xx-xx-xx-xx --channel N save` +12. Reboot and check settings are applied + +### Input power + +1. Connect Urukul's output (see booster template for exact ports) to the oscilloscope with load +2. Measure it's RMS, convert to dBm, put it to the measured cell +3. Connect Urukul's output to the Booster's input +4. Get the input value from telemetry (see booster template for exact path) +5. Do steps 1-4 for second Urukul's output +6. Fill in `slope` and `offset` from settings +7. Do steps 1-6 for every channel + +_Note: default setting and Urukul's measured values are usually the same across channels, so you can +extrapolate them for all channels._ + + +### Output and reflected power + +1. Connect Urukul's output (see booster template for exact ports) to the Booster's input +2. Connect Booster's output to the oscilloscope with load +3. Measure it's RMS, convert to dBm, put it to the measured cell +4. Get the output value from telemetry (see booster template for exact path) +5. Disconnect the Booster's output +6. Get the reflected value from telemetry +7. Do steps 1-6 for second Urukul's output +8. Fill in `slope` and `offset` from settings for output and reflected curves +9. Do steps 1-8 for every channel + +_Note: default setting values are usually the same across channels, so you can extrapolate them for all channels._ + diff --git a/src/hw/mcx_ttl.md b/src/hw/mcx_ttl.md index f765799..b9e679c 100644 --- a/src/hw/mcx_ttl.md +++ b/src/hw/mcx_ttl.md @@ -1,7 +1,7 @@ # Sinara 2238 MCX TTL card -[Wiki](https://github.com/sinara-hw/DIO_MCX/wiki) -[Datasheet](https://m-labs.hk/docs/sinara-datasheets/2238.pdf) +* [Wiki](https://github.com/sinara-hw/DIO_MCX/wiki) +* [Datasheet](https://m-labs.hk/docs/sinara-datasheets/2238.pdf) # JSON diff --git a/src/hw/mirny_almazny.md b/src/hw/mirny_almazny.md index 127fd1b..9032719 100644 --- a/src/hw/mirny_almazny.md +++ b/src/hw/mirny_almazny.md @@ -1,7 +1,7 @@ # Sinara 4456 synthesizer Mirny / Sinara 4457 Almazny Mezzanine card -[Wiki Mirny](https://github.com/sinara-hw/mirny/wiki) -[Wiki Almazny](https://github.com/sinara-hw/Almazny/wiki) +* [Wiki Mirny](https://github.com/sinara-hw/mirny/wiki) +* [Wiki Almazny](https://github.com/sinara-hw/Almazny/wiki) ## JSON diff --git a/src/hw/stabilizer.md b/src/hw/stabilizer.md index 2107ad3..b7e96a6 100644 --- a/src/hw/stabilizer.md +++ b/src/hw/stabilizer.md @@ -1,7 +1,7 @@ # Sinara 8452 DSP Stabilizer -[Wiki](https://github.com/sinara-hw/Stabilizer/wiki) -[QUARTIQ Manual](https://quartiq.de/stabilizer/) +* [Wiki](https://github.com/sinara-hw/Stabilizer/wiki) +* [QUARTIQ Manual](https://quartiq.de/stabilizer/) ## JSON diff --git a/src/img/50ohm_parallel_load.jpg b/src/img/50ohm_parallel_load.jpg new file mode 100644 index 0000000..15b720f Binary files /dev/null and b/src/img/50ohm_parallel_load.jpg differ