limited voltage

Used diodes can tolerate 17V max, limited script to 16V
This commit is contained in:
Martin Zietz
2020-12-15 16:49:57 +01:00
parent 1de180c283
commit df9cdd6f0d
3 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -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)
+1
View File
@@ -14,6 +14,7 @@ global zAxis
global resistances
global maxAmps
global maxWatts
global maxVolts
global arduino
+1
View File
@@ -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