Browse Source

Add measured pulse power

Kevin Lee 1 month ago
parent
commit
cc43d402b2
4 changed files with 50 additions and 20 deletions
  1. BIN
      Data.xlsx
  2. BIN
      Pulse Width.png
  3. 26 20
      README.md
  4. 24 0
      src/ezcad/types.rs

BIN
Data.xlsx


BIN
Pulse Width.png


+ 26 - 20
README.md

@@ -74,28 +74,11 @@ Options:
 
 Operations defined in the configuration file are applied in order of definition.
 
-### Pen Operations
-
-Setting values of specific fields for a given pen:
-
-``` yaml
-Ops: 
-  - !PatchPen
-    Pen: 0 # Target pen
-
-    # Specify one or more of the following:
-    Color: [127, 127, 127]
-    Enabled: true
-    LoopCount: 3
-    Speed: 1.234
-    Power: 10.5
-    Frequency: 10000
-    PulseWidth: <PulseWidth>
-```
+## Machine Parameters
 
-Where `<PulseWidth>` can be 2/4/6/8/12/20/30/45/60/80/100/150/200/250/350/500.
+`<PulseWidth>` can be 2/4/6/8/12/20/30/45/60/80/100/150/200/250/350/500.
 
-Note: each pulse width has a minimum and maximum frequency:
+Note: each pulse width has a minimum and maximum frequency for model YDFLP-20-M7-S-R:
 ``` text
 2ns => 850kHz to 4MHz
 4ns => 500kHz to 4MHz
@@ -115,6 +98,29 @@ Note: each pulse width has a minimum and maximum frequency:
 500ns => 25kHz to 500kHz
 ```
 
+Power density of a hatch pattern is estimated using the following formula:
+
+Power density = 1/line spacing * power * 1/speed * frequency * pulse width power
+
+### Pen Operations
+
+Setting values of specific fields for a given pen:
+
+``` yaml
+Ops: 
+  - !PatchPen
+    Pen: 0 # Target pen
+
+    # Specify one or more of the following:
+    Color: [127, 127, 127]
+    Enabled: true
+    LoopCount: 3
+    Speed: 1.234
+    Power: 10.5
+    Frequency: 10000
+    PulseWidth: <PulseWidth>
+```
+
 Cloning pen(s) (and optionally override settings):
 
 ``` yaml

+ 24 - 0
src/ezcad/types.rs

@@ -356,4 +356,28 @@ impl PulseWidth {
             PulseWidth::Ns500 => 500_000,
         }
     }
+
+    /// Ratio of total output power per pulse from the area under the curve of the pulse
+    /// waveform over time. Pulses below 20ns are assumed to be linear discrete pulses
+    /// with no decay over time, while longer pulse widths will follow natural log profile
+    pub fn power_ratio(&self) -> f64 {
+        match self {
+            PulseWidth::Ns2 => 1.0,
+            PulseWidth::Ns4 => 3.17,
+            PulseWidth::Ns6 => 5.34,
+            PulseWidth::Ns8 => 7.51,
+            PulseWidth::Ns12 => 11.85,
+            PulseWidth::Ns20 => 17.29,
+            PulseWidth::Ns30 => 22.04,
+            PulseWidth::Ns45 => 26.78,
+            PulseWidth::Ns60 => 30.17,
+            PulseWidth::Ns80 => 33.54,
+            PulseWidth::Ns100 => 36.16,
+            PulseWidth::Ns150 => 40.91,
+            PulseWidth::Ns200 => 44.28,
+            PulseWidth::Ns250 => 46.90,
+            PulseWidth::Ns350 => 50.84,
+            PulseWidth::Ns500 => 55.03,
+        }
+    }
 }