forked from zietzm/Helmholtz_Test_Bench
limited voltage
Used diodes can tolerate 17V max, limited script to 16V
This commit is contained in:
+2
-1
@@ -89,4 +89,5 @@ def set_axis_current(axis, value): # sets current with correct polarity on one
|
||||
else:
|
||||
raise Exception("This should be impossible.")
|
||||
device.set_current(abs(value), channel)
|
||||
device.set_voltage(1.1 * g.maxAmps[axisIndex] * g.resistances[axisIndex]) # set max voltage high enough
|
||||
maxVoltage = min(max(1.1 * g.maxAmps[axisIndex] * g.resistances[axisIndex], 12), g.maxVolts) # limit voltage
|
||||
device.set_voltage(maxVoltage)
|
||||
|
||||
@@ -14,6 +14,7 @@ global zAxis
|
||||
global resistances
|
||||
global maxAmps
|
||||
global maxWatts
|
||||
global maxVolts
|
||||
|
||||
global arduino
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ g.Coil_const = np.array([38.6, 38.45, 37.9])*1e-9 # Coil constants [x,y,z] in T
|
||||
g.ambientField = np.array([80])*1e-6 # ambient magnetic field in measurement area, to be cancelled out
|
||||
g.resistances = np.array([3.9, 1, 1]) # resistance of [x,y,z] circuits
|
||||
g.maxWatts = np.array([8, 0, 0]) # max. allowed power for [x,y,z] circuits
|
||||
g.maxVolts = 16 # max. allowed voltage, limited to 16V by used diodes!
|
||||
|
||||
# COM-Ports for power supply units:
|
||||
g.xyPort = "COM1" # placeholders
|
||||
|
||||
Reference in New Issue
Block a user