Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: Cambridge-Atom-Scattering-Centre
  • Language: Python
  • Default Branch: main
  • Size: 5.52 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme Citation

README.md

bidirectional-coil-driver

This repository contains the files necessary to build the bidirectional coil driver, which is used to drive the phase coil and spin rotator coil in the Cambridge spin echo spectrometer. The design of the coil driver has been published in Measurement Science and Technology.

Building the printed circuit boards

The two zipped Gerber files contain information about the PCB of the coil driver itself and another board that can provide interface between the Raspberry Pi Pico and the coil driver. The BOM files have the bill of materials. The two pdf files show the schematics of the circuits.

The Gerber files and the BOM files can be given to a commercial PCB fabrication company like JLCPCB for them to produce it.

A Raspberry Pi Pico microcontroller is needed to control the current.

Connecting the boards

The two PCBs needs to be powered by a 5V power supply (the power inputs are marked as 0V and 5V). A temperary choice is to use a battery which supplies roughly 5V; a better and proper solution is to use a USB cable.

S2 on the pico board needs to be connected to the SPI interface of the driver board, as shown in the picure.

The load should be connected to the Iout+ and Iout- ports on the coil driver board.

Controlling the current

After everything is connected in the same way as the picutre, you can program the Raspberry Pi Pico. A popular application to do that is Thonny.

Copy set_curret.py and main.py to the directory of the Pi Pico.

set_current.py is a function that send a number via SPI to the driver board and set the current. Note that when setting the current, you need to have a load connected, otherwise the driver board might break.

main.py is a file that run automatically after the Pi Pico is powered, because it is called "main". It receives signal via RS232 (the three ports on the Pico board). You can connect a PC to it via serial port. talktopico.m is a MATLAB file that can be used on a PC to set the current.

Characterisation of the coil driver

characterisation_20231130.mat is a file that contains the information about the characterisation of the power supply. It contains a variable called msg, which is the numbers sent to the digital to analogue converter on the driver board. Another viriable, I, stores the measured current.

Keithley_Allanvar.mat records the current of the power supply every 0.1 seconds for about 12.5 hours, when the output of the DAC was set to 0. The results can be used for calculating the Allan variance.

Revision Notes

Noise and risetime of Precision Current Source

The Technical Design Note published in measurement and Technology describes the original version of a precision current source. In that application, rapid response was more important than current noise. These notes are intended for those whose requirements are different and are beyond the brief of the original Technical Note.

The rise time of the original circuit was ~2 microseconds and it settles within about 20 microseconds with a resistive load, as described in the manuscript. However, there is significant overshoot with a resistive load, due to the high bandwidth with respect to the positive input of the AD8607 integrating amplifier. Noise measurements in the manuscript are performed with a Keithley integrating voltmeter (and the internal resistor of the Keithley in order to measure current). It has a minimum sample rate of 0.1 s. The measured noise reported in the manuscript, therefore represents the noise averaged over the sample time and although the current deviation is less than 1 lsb in all the measurements reported, the rms noise current at full bandwidth is significantly greater.

Bandwidth and rise-time can be traded to improve the rms noise current; however, that requires some modification to the schematic and printed circuit board. The notes here are the result of simcape/simulink models, which give a good representation of the original circuit and are, therefore, believed to be reliable.

Noise sources

Wideband noise taken from the respective data sheets are given in the table:

| Device | Voltage noise / nV/√Hz | | ------- | ---------------------- | | MAX6071 | 30 | | AD8607 | 22 | | LTC2642 | 10 |

The total noise voltage is estimated by adding contributions, in quadrature, from MAX6071, LTC2642, giving ~32 nV/√Hz. Note that the major component is the voltage reference. Note also that, in the original configuration, the bandwidth for the DAC signal is unaffected by stabilising capacitor of U5.2, Cf, as noted above.

Noise reduction strategy

Filter the DAC signal, with respect to DACmid, a simple RC filter

Noise analysis

The Simulink model is shown below. There are 2 independent noise sources: one represents the voltage ref and DAC noise ($σV$~32 nV/√Hz); the second is the input noise voltage of the AD8607 ($σV$~22 nV/√Hz). Test show noise in the other amplifiers to be negligible, thanks to the feedback.

image

Results for various combinations of the feedback capacitor (C1) and the noise filtering capacitor (C2) are given in the table below. In all cases R1=R2=10k.

| C1/pF | C2/pF | p-p noise current, $σ_I$ / microamp| | ----- | ------| -----------------------------------| |470 | 0 | 60 | |470 | 470 | 40 | |4700 | 4700 | 30 | |4700 | 47000 | 30 |

These are crude measurements of peak-to-peak noise (eyeball from the Simulink scope). They correspond to at least $6\sigma$, possibly more, where $\sigma$ is the rms noise. So, using $C1=C2=$ 4700 pF will give an rms noise of about 5 microamps. Where the noise is dominated by the AD8607 amplifier. The only way to improve on this is to use an amplifier with lower noise.

For information, the step response and Bode plots for the highlighted arrangement are…

image

The output noise is dominated by the AD8607. A better choice for future applications would be ADA4528-2, which is a pin-for-pin replacement. In addition, R2 and C2 should be added to the PCB.

Owner

  • Name: Cambridge-Atom-Scattering-Centre
  • Login: Cambridge-Atom-Scattering-Centre
  • Kind: organization

GitHub Events

Total
  • Issues event: 4
  • Issue comment event: 2
  • Push event: 1
Last Year
  • Issues event: 4
  • Issue comment event: 2
  • Push event: 1

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 2
  • Total pull requests: 0
  • Average time to close issues: 9 days
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.5
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 0
  • Average time to close issues: 9 days
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.5
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • letrend (2)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels