atomiq.components.electronics.currentsource¶
Classes¶
Current Source |
|
Combination of an H-bridge and a current source |
|
H-bridged current source with control logic implemented in hardware |
|
H-bridged current source with control logic implemented in software |
|
A current source controlled via RPC calls |
|
One channel of a multi-channel currentsource controlled via RPC |
|
A current source controlled by an analog voltage |
Module Contents¶
- class atomiq.components.electronics.currentsource.CurrentSource(min_current=float('-inf'), max_current=float('inf'), default_ramp_steps=30, *args, **kwargs)[source]¶
Bases:
atomiq.components.primitives.Component,atomiq.components.primitives.ParametrizableCurrent Source
This abstract class represents any device that can output a defined, controllable current.
- Parameters:
min_current (artiq.language.types.TFloat) -- The minimum current the device can output [A]
max_current (artiq.language.types.TFloat) -- The maximum current the device can output [A]
default_ramp_steps (artiq.language.types.TInt32) -- The default number of steps that this device should use if the current is ramped. This value is only used if no
ramp_stepsare given in theramp_current()method.
- kernel_invariants¶
- current¶
- min_current¶
- max_current¶
- default_ramp_steps = 30¶
- set_current(current)[source]¶
Set the current delivered by the current source
- Parameters:
current (artiq.language.types.TFloat) -- Current in A
- _ramp_current(duration, current_start, current_end, ramp_timestep=0.0002)[source]¶
This method implements a stupid ramp on an abstract level. This will most likely work but be slow. If your hardware has native support for ramping, please override this function when you inherit from currentSource
- Parameters:
duration (artiq.language.types.TFloat)
current_start (artiq.language.types.TFloat)
current_end (artiq.language.types.TFloat)
ramp_timestep (artiq.language.types.TFloat)
- ramp_current(duration, current_end, current_start=float('nan'), ramp_timestep=float('nan'), ramp_steps=-1)[source]¶
Ramp current over a given duration.
This method advances the timeline by duration
- Parameters:
duration (artiq.language.types.TFloat) -- ramp duration [s]
current_end (artiq.language.types.TFloat) -- end current [A]
current_start (artiq.language.types.TFloat) -- initial current [A]. If not given, the ramp starts from the current operating current.
ramp_timestep (artiq.language.types.TFloat)
ramp_steps (artiq.language.types.TInt32)
- class atomiq.components.electronics.currentsource.HBridgedCurrentSource(current_source, *args, **kwargs)[source]¶
Bases:
CurrentSource,atomiq.components.primitives.SwitchableCombination of an H-bridge and a current source
Combining an H-bridge with a unipolar current source allows to create a bipolar current source. This class bundles these two comoponents an exposes them as a bipolar current source.
- Parameters:
current_source (CurrentSource) -- The current source connected to the H-bridge
- class HBridgeState[source]¶
Bases:
enum.IntEnumEnum where members are also (and must be) ints
- FORWARD = (1,)¶
- OFF = (0,)¶
- REVERSE = -1¶
- kernel_invariants¶
- current_source¶
- state¶
- last_state¶
- _ramp_current(duration, current_start, current_end, ramp_timestep)[source]¶
This method implements a stupid ramp on an abstract level. This will most likely work but be slow. If your hardware has native support for ramping, please override this function when you inherit from currentSource
- Parameters:
duration (artiq.language.types.TFloat)
current_start (artiq.language.types.TFloat)
current_end (artiq.language.types.TFloat)
ramp_timestep (artiq.language.types.TFloat)
- class atomiq.components.electronics.currentsource.TTLHardwareLogicHBridgedCurrentSource(switch_direction, switch_on, invert_direction=False, *args, **kwargs)[source]¶
Bases:
HBridgedCurrentSourceH-bridged current source with control logic implemented in hardware
Some external hardware (logic gates) take care to set all MOSFETs of the H-bridge based on the desired direction as indicated by switch_direction. Via switch_on the entire bridge can be enabled and disabled.
switch_onswitch_directioncurrent flow
off
on
off
off
off
off
on
on
forward
on
off
reverse
- Parameters:
switch_on (Switchable) -- When ON, H-bridge is eith forward or reverse; when OFF, load is disconnected from the PSU
switch_direction (Switchable) -- select forward or reverse direction of current flow
invert_direction (artiq.language.types.TBool) -- flip forward/reverse
- kernel_invariants¶
- switch_direction¶
- switch_on¶
- invert_direction = False¶
- class atomiq.components.electronics.currentsource.TTLSoftwareLogicHBridgedCurrentSource(switch_forward, switch_reverse, *args, **kwargs)[source]¶
Bases:
HBridgedCurrentSourceH-bridged current source with control logic implemented in software
Each pair of MOSFETs is directly controlled by one switch. So when both TTLs are off, the bridge is off, but also when both are on the PSU is shorted.
switch_forwardswitch_reversecurrent flow
off
off
off
off
on
reverse
on
off
forward
on
on
INVALID
- Parameters:
switch_forward (Switchable) -- TTL to enable forward pair of MOSFETs
switch_reverse (Switchable) -- TTL to enable reverse pair of MOSFETs
- kernel_invariants¶
- switch_forward¶
- switch_reverse¶
- class atomiq.components.electronics.currentsource.RPCCurrentSource(rpc_currentsource, *args, **kwargs)[source]¶
Bases:
CurrentSourceA current source controlled via RPC calls
- Parameters:
rpc_currentsource (Component) -- The ARTIQ rpc object representing the current source. This object needs to provide a function named set_current(current_in_A) to set the current.
- kernel_invariants¶
- currentsource¶
- class atomiq.components.electronics.currentsource.RPCCurrentSourceChannel(rpc_currentsource, channel, *args, **kwargs)[source]¶
Bases:
CurrentSourceOne channel of a multi-channel currentsource controlled via RPC
- Parameters:
rpc_currentsource (Component) -- The ARTIQ rpc object representing the multi channel current source. This object needs to provide a function named set_current(current_in_A, channel) to set the current.
channel (artiq.language.types.TInt32) -- channel of the multi-channel current source to operate on
- kernel_invariants¶
- currentsource¶
- channel¶
- class atomiq.components.electronics.currentsource.VoltageControlledCurrentSource(voltage_source, calibration, *args, **kwargs)[source]¶
Bases:
CurrentSourceA current source controlled by an analog voltage
A typical usecase for this class are voltage-controlled power supplies that drive the current through a coil.
- Parameters:
voltage_source (VoltageSource) -- Voltage source that controls the current source
calibration (Calibration) -- Calibration U = f(I) to give the control voltage U for a desired current I
- kernel_invariants¶
- voltage_source¶
- calibration¶
- _ramp_current(duration, current_start, current_end, ramp_timestep)[source]¶
This method implements a stupid ramp on an abstract level. This will most likely work but be slow. If your hardware has native support for ramping, please override this function when you inherit from currentSource
- Parameters:
duration (artiq.language.types.TFloat)
current_start (artiq.language.types.TFloat)
current_end (artiq.language.types.TFloat)
ramp_timestep (artiq.language.types.TFloat)