├── .gitignore ├── FreeCAD_OpenEMS ├── FreeCAD_OpenEMS.zip ├── current_shunt_resistor_esl │ ├── img │ │ ├── Alafogianni_et_al_trimming.png │ │ ├── Chen2008_series_thru_test_fixture.png │ │ ├── EpJLmdjVQAMNx4d.jpg │ │ ├── EpJMQ6EUYAAor_B.jpg │ │ ├── EpJN_jZVoAAgFRK.jpg │ │ ├── EpJOWAuVoAIGrzi.jpg │ │ ├── FINeKYrXsAcnLpo.jpg │ │ ├── FK4amlJUYAUJwGJ.jpg │ │ ├── MfE8f.png │ │ ├── Susumu_RL_ESL.PNG │ │ ├── Susumu_RL_dimensions.PNG │ │ ├── aspect_ratio__charge_concentration.png │ │ ├── bode100_shunt_thru.png │ │ ├── dimensions.PNG │ │ ├── dimensions_50.png │ │ ├── dimensions_extraction.svg │ │ ├── itshuntresistor_xray_filtered.png │ │ ├── krl_100mhz.png │ │ ├── laser_trim_patterns.jpg │ │ ├── photo_2022-08-10_17-21-44.jpg │ │ ├── photo_2022-08-10_17-21-48.jpg │ │ ├── shunt_cropped.jpg │ │ ├── shunt_thru_s21.PNG │ │ ├── shuntresistor_xray.png │ │ └── vishay_trimming_rf.png │ ├── pdf │ │ ├── 05_CVRAnalysys-Rev7.pdf │ │ └── susumu_RL_catalog.pdf │ ├── readme.md │ └── sim │ │ ├── rl7520.FCStd │ │ └── rl7520w_simplified_physical.png ├── example_stub_filter │ ├── 002.FCStd │ ├── 002_openEMS.m │ ├── 002_settings.ini │ ├── Air_Volume_gen_model.stl │ ├── GND_gen_model.stl │ ├── Substrate_gen_model.stl │ ├── Top_Conductor_gen_model.stl │ └── uniquetol.m ├── first_steps_openems_freecad.md ├── img │ ├── 002_excitation.PNG │ ├── 002_openems_running.jpg │ ├── 002_paraview_steps.png │ ├── 002_port_E_dump.PNG │ ├── 002_port_in.PNG │ ├── 002_postprocessing.PNG │ ├── 002_setup_small.png │ ├── 002_sim_params.PNG │ ├── 7tS9CyL7AP.gif │ ├── Cw06vA0A1w.gif │ ├── MozK94SUyh.gif │ ├── OpenEMS_mesh_snippet.PNG │ ├── appcsxcad_mesh_preview.PNG │ ├── bEYtDggeGr.gif │ ├── exporter_dialog_buttons.PNG │ ├── freecad_macros.png │ ├── octave_add_path_openems.png │ ├── structured_vs_unstructured_grid_engr459a7.PNG │ ├── stub_filter_setup_cross_sect.PNG │ └── tools.png ├── readme.md └── stub_filter_problem_setup.md ├── FreeCAD_bimetallic_strip ├── FEM_example_bimetallic_strip.FCStd ├── img │ ├── M9zd7z7hPG.gif │ ├── UKZyNKjYbT.gif │ └── problem_setup.PNG └── readme.md ├── HB100_xband_module ├── A Deeper Look At HB100 X-Band Modules.md └── data │ ├── BAV99_SER.pdf │ ├── CE3512K2.pdf │ ├── FqtTOLAX0Agxo_i.png │ ├── HB100-block-diagram-and-connection-pads.png │ ├── HB100-outline-diagram-and-antenna-beam-pattern.webp │ ├── HB100_DRO_section.png │ ├── HB100_Microwave_Sensor_Module_Datasheet(1).pdf │ ├── HB100_newrev.png │ ├── HB100_newrev_parts.png │ ├── Lee_doppler_10.webp │ ├── Lee_doppler_4.jpg │ ├── MMBV3700LT1-D.pdf │ ├── NE3503M04.pdf │ ├── Pasted image 20230308202459.png │ ├── Pasted image 20230308232524.png │ ├── Pasted image 20230308232724.png │ ├── Pasted image 20230309000851.png │ ├── Pasted image 20230309001502.png │ ├── Pasted image 20230309003926.png │ ├── Pasted image 20230309004734.png │ ├── Pasted image 20230309165635.png │ ├── Pasted image 20230309173002.png │ ├── SMS7621.pdf │ ├── a-Photograph-of-the-double-channel-HEMT-trough-an-optical-microscope-with-metal-Source.png │ └── stubradialshunt.png ├── RPi_enclosure_80x80 ├── cad │ ├── Unnamed-RPi_Insert_Conduit_80x80.step │ └── insert_125mm_80x80.FCStd ├── data │ ├── 80x80_profile.svg │ ├── CM4_side.jpg │ ├── CM4_top.jpg │ ├── Dold_Mechatronik_Aluminiumprofile_Gesamtkatalog.pdf │ ├── GMauB3sXkAA6T2R.jpg │ ├── ZcwhsuuR.jpg │ ├── channel_drawing.JPG │ ├── channel_iso.jpg │ ├── corner_sketch.PNG │ ├── cover_drawing.JPG │ └── profile.PNG └── readme.md ├── analog_neural_networks ├── img │ ├── 80170NX_synapse.png │ ├── ANN_detector_pyhsics_application.PNG │ ├── De14SwBXkAAYcxa.jpg │ ├── De2cBuZW0AAoqX7.jpg │ ├── DfG0yQBX4AIEl9y.jpg │ ├── PCI-neuro-board_W640.jpg │ └── proton_pion_detector_patterns.PNG ├── pdf │ ├── 80170NX.pdf │ └── 80170NX_raw.pdf └── readme.md ├── current_sensing_polarity_scaling ├── img │ ├── How-does-a-precision-rectifier-figure-2.jpg │ ├── abs_current_sensing_dual_scale.png │ └── ring_sketch.png ├── readme.md └── spice │ ├── MCP6006_D.lib │ └── bipolar LS current monitor.asc ├── sinter_film ├── img │ ├── Drahtbonden_Fraunhofer_IZM_komp-748x375.jpg │ ├── FZKKe8aX0AAXkhe.jpg │ ├── HlZv5Jzsr5.gif │ ├── basic_polyhedron.png │ ├── constriction_resistance.png │ ├── eppor_pack_egg_tray.jpg │ ├── mesh_settings.png │ ├── minkowski_operand_diagram.jpg │ ├── paper_mockup.gif │ ├── photo_2022-07-06_10-55-38.jpg │ ├── photo_2022-07-06_10-55-54s.jpg │ └── wedge_bond.jpg ├── model and analysis │ ├── WovenDesign_CubeMinkowski-solved.FCStd │ ├── woven_design_forming_tool_cubemin.scad │ └── woven_design_forming_tool_cubemin.stl └── readme.md └── undervoltage_detector_with_NE555 ├── img ├── Schematic-of-the-NE-555-frequency-modulation-measurement-circuit-The-signal-of-the_W640.jpg ├── solution_schematic.jpg └── wiki_555_block_diag.png └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.backup 3 | -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/FreeCAD_OpenEMS.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/FreeCAD_OpenEMS.zip -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/Alafogianni_et_al_trimming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/Alafogianni_et_al_trimming.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/Chen2008_series_thru_test_fixture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/Chen2008_series_thru_test_fixture.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/EpJLmdjVQAMNx4d.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/EpJLmdjVQAMNx4d.jpg -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/EpJMQ6EUYAAor_B.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/EpJMQ6EUYAAor_B.jpg -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/EpJN_jZVoAAgFRK.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/EpJN_jZVoAAgFRK.jpg -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/EpJOWAuVoAIGrzi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/EpJOWAuVoAIGrzi.jpg -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/FINeKYrXsAcnLpo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/FINeKYrXsAcnLpo.jpg -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/FK4amlJUYAUJwGJ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/FK4amlJUYAUJwGJ.jpg -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/MfE8f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/MfE8f.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/Susumu_RL_ESL.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/Susumu_RL_ESL.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/Susumu_RL_dimensions.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/Susumu_RL_dimensions.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/aspect_ratio__charge_concentration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/aspect_ratio__charge_concentration.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/bode100_shunt_thru.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/bode100_shunt_thru.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/dimensions.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/dimensions.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/dimensions_50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/dimensions_50.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/itshuntresistor_xray_filtered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/itshuntresistor_xray_filtered.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/krl_100mhz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/krl_100mhz.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/laser_trim_patterns.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/laser_trim_patterns.jpg -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/photo_2022-08-10_17-21-44.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/photo_2022-08-10_17-21-44.jpg -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/photo_2022-08-10_17-21-48.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/photo_2022-08-10_17-21-48.jpg -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/shunt_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/shunt_cropped.jpg -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/shunt_thru_s21.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/shunt_thru_s21.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/shuntresistor_xray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/shuntresistor_xray.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/img/vishay_trimming_rf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/img/vishay_trimming_rf.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/pdf/05_CVRAnalysys-Rev7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/pdf/05_CVRAnalysys-Rev7.pdf -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/pdf/susumu_RL_catalog.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/pdf/susumu_RL_catalog.pdf -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/readme.md: -------------------------------------------------------------------------------- 1 | # ESL Extraction Of SMD Shunt Resistors Using FDTD Simulation 2 | 3 | High power current shunt resistors are necessarily among the larger surface-mount components. Since they also have to be cost-effective, they cannot simply be built on exotic substrates like CVD diamond (thermal conductivity: 2200 W/m·K) or BeO (325 W/m·K). 4 | 5 | Generally, even AlN (193 W/m·K) is cost-prohibitive, and ZTA / Al2O3 substrates are used (20 W/m·K). What's more, these resistors do not use extra substrate area to dissipate heat and instead rely on cooling via their terminals. 6 | 7 | Preferably, commercial shunt resistors would be used which have a geometry and trimming pattern benign enough to cause a flat frequency dependence of ESL. 8 | 9 | In the following, we will look at commercial resistor structures, trimming patterns and how they relate to their wideband performance, to finally simulate a chosen resistor type with the FDTD method. 10 | 11 | ## Trimming Patterns - Which Part To Pick? 12 | 13 | As brought up in [1], a shunt resistor in 2010 format (5025 metric) may be trimmed such that the RF current path differs significantly from the DC path. The picture below illustrates rather well that these metal film resistors are not very precise when manufactured, or deliberately designed such that the choke points with the greatest heat production are near the terminals, as opposed to in the center of the resistor chip. At any rate, they are not homogenous: 14 | 15 | ![](img/itshuntresistor_xray_filtered.png) 16 | 17 | In fact, the triming patterns are so large that it can be assumed that intermediate resistance values are created from fewer unique patterns. Such variability has also been found through visual inspection of a range of values of Susumu RKL resistors. This may be due to cost-savings in production, but essentially causes unpredictable patterns for various values from the same manufacturer, series and date of production. 18 | 19 | In [2], a 2.0x resistance change is demonstrated by introducing an L-cut with additional shadow cut for fine trimming: 20 | 21 | ![](img/Alafogianni_et_al_trimming.png) 22 | 23 | More interestingly, a Vishay Technical Note [3] goes into more detail as to which impact the trimming pattern has on the high frequency behavior of a paritcular type of resistor. 0603 and 0402 are already rather small resistors with yet smaller resistive element dimenions, yet the impact of the trimming method manifests already above 200 MHz: 24 | 25 | ![](img/vishay_trimming_rf.png) 26 | 27 | Thus, the actual trimming pattern and method cannot be ignored, and resistor values may need to be adjusted based on the practical findings for a particular batch. 28 | 29 | One of the few resistor types which promises to be more benign is **Susumu RL7520W** [4], which just consists of 6 paralleled resistive elements the size of 0805 resistors: 30 | 31 | ![](img/shunt_cropped.jpg) 32 | 33 | Such an array was used with good results in earlier experiments, and can be thought of as a fall-back strategy should Susumu discontinue the RL7520W product. 34 | 35 | ## Specified Equivalent Series Inductance (ESL) As A Function Of Frequency 36 | 37 | It's a rare sight - power resistors are rarely characterized for wide-band applications - but Susumu provide a diagram with tentative characteristics of a selection of shunt resistor geometries: 38 | 39 | ![](img/Susumu_RL_ESL.PNG) 40 | 41 | It truly speaks to Susumu's diligence that they performed measurements and provide these graphs, since the measurement itself it non-trivial when measuring what is effectively a short circuit in an RF geometry. The subject of shunt resistor resistance and ESL measurement is covered in application notes by IB Billmann [5] in excellent detail while keeping it compact, and may be revisited at a later point in time. Key challenges are identified, among others, as high dynamic range requirements (80 - 110 dB), small signal levels, and round loop currents that need to be isolated. 42 | 43 | We were also able to receive preliminary data for their newer RKL series: 44 | 45 | ![](img/krl_100mhz.png) 46 | 47 | The problem with KRL shunt resistors is that they rely on S-cut trimming similar to what the initial x-ray picture shows, except in a wide terminal resistor format. 48 | 49 | The Parasitic Inductance graph above really drives home the insight that despite their considerable absolute ESL, some of the resistors listed may be well suitable for wideband applications and show excellent flatness from 10 to 100 MHz. 50 | 51 | The origin of the deviation in the 0.1 to 10 MHz range cannot be explained without further information on the laboratory setup used. It should probably also not be overrated, considering that the RL measurements show a trend towards lower values, also without giving an explanation for said trend. In [6] some measurement techniques are explained based on the Bode-100. Among these are variants of the shunt-thru measurement: 52 | 53 | ![](img/bode100_shunt_thru.png) 54 | 55 | To get a cursory idea, a ~10 mOhm resistor is connecte to a 50 Ohm coaxial cable, and the connection of the device under test creates a ground loop. To quote [6] on shunt-thru measurements: 56 | 57 | The Shunt-Thru configuration inherently suffers a ground-loop error at low frequencies. The 58 | current flowing thru the cable shield of the connection to Channel 2 ground introduces a 59 | measurement error that can become significant at frequencies below 10 kHz to 100 kHz 60 | when measuring very low impedance values. To suppress respectively reduce the ground-loop error at low 61 | frequencies, use a common-mode choke or common-mode transformer or 62 | an active isolation device. Note that the Shunt-Thru transformation from S21 to impedance 63 | assumes 50 Ω as source impedance and input impedance. 64 | 65 | 66 | The RL, and especially KRL series data is relevant there because then one can compare 67 | * datasheet values 68 | * FDTD simulation results, and 69 | * own experimental measurement results 70 | 71 | against each other. 72 | 73 | ## RL7520W Geometrical Model 74 | 75 | To set up a simulation, a geometrical model which reasonably approximates the RL7520W shunt resistor is needed. Dimensions can be estimated from a microscopic image (some distortion correction applied, uncalibrated image, assuming a height of 2.0 mm in the center of the image): 76 | 77 | ![](img/dimensions_50.png) 78 | 79 | Other dimensions and tolerances are given in the datasheet: 80 | 81 | ![](img/Susumu_RL_dimensions.PNG) 82 | 83 | A missing parameter seems to be the metalization thickness which will be assumed to be 50 µm for the following calculations, and can be adjusted in a parametric model when a cross-sectional image has been acquired from a sample prepared for this purpose. 84 | 85 | With these values, a parametric model can be set up, addressing RL3720W and RL7520W simulatoin needs: 86 | 87 | ![](sim/rl7520w_simplified_physical.png) 88 | 89 | Should actual resistive elements be needed for the simulation, then they can be removed from the model made of a conductor (PEC) and added as an array of individual bodies or a 2D sheet with resistivity (see OpenEMS example [MSL_Losses.m](https://github.com/thliebig/openEMS/blob/master/matlab/examples/transmission_lines/MSL_Losses.m)). 90 | 91 | ## Test Fixtures 92 | 93 | Next, a test fixture needs to be specified, both for design, and for electrical validation. Some design aspects can be gleaned from a shunt-thru test fixture for interdigital capacitor (IDC) specimen [7]: 94 | 95 | It is desirable to make the test board capacitance as low as possible, that is, 96 | the length and width dimensions are made small, so that board resonances 97 | are as high as possible and above the frequency range of interest for the 98 | decoupling capacitor. Test boards used for this work are 1 cm square and are 99 | made with Getek, a low K (3.8) and low loss dielectric suitable for 100 | measurements in the GHz range. 101 | 102 | The PCB assembly and reference measurements with a solid short circuit are summarized in the figures below: a 10x10 mm board made of a suitable "functionalized polyphenylene oxide (PPO)/epoxy resin reinforced with glass fabric" (specified up to 10 GHz) is designed with very low prepreg thickness and total board thickness, while the test points are on the backside: 103 | 104 | ![](img/shunt_thru_s21.PNG) 105 | 106 | On the other hand, the series-thru fixture for primarily inductive bond wire structures described in [8] is first and foremost a micro-strip line geometry and specified with an eye on easing 3D modeling and FDTD simulation: 107 | 108 | ![](img/Chen2008_series_thru_test_fixture.png) 109 | 110 | As long as we are interested in ESL rather than in R as a function of frequency, a series-thru measurement setup might be advantageous both in practical setups and in an FDTD simulation setting, but it raises questions: How does one best transition from the MSL geometry to a 7.5 mm long shunt? Does the taper need to be included in the simulation, or can a wide port be used? Does a simulation configured to run at significantly lower system impedance yield better results than at 50 Ohm? 111 | 112 | ## Simulation Setup 113 | 114 | (to be continued) 115 | 116 | ## Results 117 | 118 | (to be continued) 119 | 120 | ## References 121 | 122 | 1. https://www.eevblog.com/forum/testgear/measuring-~1-nh-parasitic-inductance-in/ - image shown here has been processed to remove coherent noise with 2D FFT by using Gimp with GMIC: https://www.fosshub.com/GMIC.html 123 | 2. https://www.researchgate.net/publication/291419037_Resistor_trimming_geometry_past_present_and_future 124 | 3. Vishay, Technical Note, "Frequency Response of Thin Film Chip Resistors", https://www.vishay.com/docs/60107/freqresp.pdf 125 | 4. [Susumu RL series](https://www.mouser.de/datasheet/2/392/n_catalog_partition07_en-1114612.pdf) datasheet. Product page: https://www.susumu.co.jp/usa/product/category.php?cid=7 126 | 5. IB Billmann, Application Notes, http://www.ib-billmann.de/koax_e.php#apnot [](pdf/05_CVRAnalysys-Rev7.pdf) 127 | 6. Bode-100 User manual, https://www.omicron-lab.com/fileadmin/assets/Bode_100/Manuals/Bode-100-User-Manual-ENU10060503.pdf 128 | 7. I. Novak, ["Inductance of Bypass Capacitors How to Define, How to Measure, How to Simulate"](http://www.electrical-integrity.com/Paper_download_files/DC05East_TFMP2.pdf) (2005), Corpus ID: 73670119 129 | 8. Chen, H.-Y., & Su, C.-P. (2008). Investigation of return loss for large numbers of bonding wires by FDTD method. Microwave and Optical Technology Letters, 50(6), 1575–1579. [doi:10.1002/mop.23425](https://doi.org/10.1002/mop.23425) 130 | 131 | -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/sim/rl7520.FCStd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/sim/rl7520.FCStd -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/current_shunt_resistor_esl/sim/rl7520w_simplified_physical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/current_shunt_resistor_esl/sim/rl7520w_simplified_physical.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/example_stub_filter/002.FCStd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/example_stub_filter/002.FCStd -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/example_stub_filter/002_openEMS.m: -------------------------------------------------------------------------------- 1 | % EXAMPLE / generated file for openEMS from FreeCAD 2 | % 3 | % This is generated file 4 | % 5 | % FreeCAD to OpenEMS plugin by Lubomir Jagos 6 | % 7 | 8 | close all 9 | clear 10 | clc 11 | 12 | %% switches & options... 13 | postprocessing_only = 0; 14 | draw_3d_pattern = 0; % this may take a while... 15 | use_pml = 1; % use pml boundaries instead of mur 16 | 17 | currDir = strrep(pwd(), '\', '\\'); 18 | display(currDir); 19 | 20 | %LuboJ, JUST TO SEE RESULT 21 | openEMS_opts = ''; 22 | 23 | %% setup the simulation 24 | physical_constants; 25 | 26 | %% prepare simulation folder 27 | Sim_Path = 'tmp'; 28 | Sim_CSX = '002.xml'; 29 | [status, message, messageid] = rmdir( Sim_Path, 's' ); % clear previous directory 30 | [status, message, messageid] = mkdir( Sim_Path ); % create empty simulation folder 31 | 32 | %% setup FDTD parameter & excitation function 33 | max_timesteps = 100000; 34 | min_decrement = 0.001; % equivalent to -50 dB 35 | FDTD = InitFDTD( 'NrTS', max_timesteps, 'EndCriteria', min_decrement ); 36 | 37 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 38 | % MESH variable init 39 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 40 | mesh.x = []; 41 | mesh.y = []; 42 | mesh.z = []; 43 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 44 | % EXCITATION excitation 1 45 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 46 | f0 = 2.5*1000000000.0; 47 | fc = 2.0*1000000000.0; 48 | FDTD = SetGaussExcite(FDTD, f0, fc ); 49 | max_res = c0 / (f0 + fc) / 20; 50 | BC = {"PML_4","PML_4","PML_4","PML_4","PML_4","PML_4"}; % boundary conditions 51 | FDTD = SetBoundaryCond( FDTD, BC ); 52 | 53 | CSX = InitCSX(); 54 | 55 | CSX = AddMetal( CSX, 'PEC' ); 56 | 57 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 58 | % PORT - electric field - electric field port 59 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 60 | CSX = AddDump(CSX, 'electric field', 'DumpType', 0, 'DumpMode', 2); 61 | dumpStart = [-2.5, -2.5, 2.0]; 62 | dumpStop = [52.5, 52.5, 2.5]; 63 | CSX = AddBox(CSX, 'electric field', 0, dumpStart, dumpStop ); 64 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 65 | % PORT - portIn - Term_IN 66 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 67 | portStart = [0.5, 24.0, 0.0]; 68 | portStop = [2.5, 26.0, 2.5]; 69 | portR = 50; 70 | portUnits = 1; 71 | portDirection = [0 0 1]; 72 | [CSX port{1}] = AddLumpedPort(CSX, 9400, 1, portR*portUnits, portStart, portStop, portDirection, true); 73 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 74 | % PORT - portOut - Term_OUT 75 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 76 | portStart = [47.5, 24.0, 0.0]; 77 | portStop = [49.5, 26.0, 2.5]; 78 | portR = 50; 79 | portUnits = 1; 80 | portDirection = [0 0 1]; 81 | [CSX port{2}] = AddLumpedPort(CSX, 9500, 2, portR*portUnits, portStart, portStop, portDirection); 82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 83 | % MESH - grid_coarse - Air_Volume 84 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 85 | mesh.x = [mesh.x (-9.996666666666666:1.0:59.99666666666667) + 0]; 86 | mesh.y = [mesh.y (-9.996666666666666:1.0:59.99666666666667) + 0]; 87 | mesh.z = [mesh.z (-4.996666666666667:1.0:14.996666666666666) + 0]; 88 | CSX = DefineRectGrid(CSX, 0.001, mesh); 89 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 90 | % MESH - grid_fine - fine mesh region 91 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 92 | mesh.x = [mesh.x (0.003333333333333333:1.0:49.99666666666667) + 0]; 93 | mesh.y = [mesh.y (0.003333333333333333:1.0:49.99666666666667) + 0]; 94 | mesh.z = [mesh.z (0.003333333333333333:0.25:2.9966666666666666) + 0]; 95 | CSX = DefineRectGrid(CSX, 0.001, mesh); 96 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 97 | % MATERIAL - FR4 98 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 99 | CSX = AddMaterial( CSX, 'FR4' ); 100 | CSX = SetMaterialProperty( CSX, 'FR4', 'Epsilon', 4.5, 'Kappa', 0.0); 101 | CSX = ImportSTL(CSX, 'FR4',9600, [currDir '/Substrate_gen_model.stl'],'Transform',{'Scale', 1}); 102 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 103 | % MATERIAL - PEC 104 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 105 | CSX = AddMetal( CSX, 'PEC' ); 106 | CSX = ImportSTL(CSX, 'PEC',9800, [currDir '/Top_Conductor_gen_model.stl'],'Transform',{'Scale', 1}); 107 | CSX = ImportSTL(CSX, 'PEC',9700, [currDir '/GND_gen_model.stl'],'Transform',{'Scale', 1}); 108 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 109 | % MATERIAL - air 110 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 111 | CSX = AddMaterial( CSX, 'air' ); 112 | CSX = SetMaterialProperty( CSX, 'air', 'Epsilon', 1, 'Kappa', 0); 113 | CSX = ImportSTL(CSX, 'air',9300, [currDir '/Air_Volume_gen_model.stl'],'Transform',{'Scale', 1}); 114 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 115 | % GRID PRIORITIES GENERATION 116 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 117 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 118 | % MESH PRIORITY - grid_fine - fine mesh region 119 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 120 | mesh.x(mesh.x >= 0.003333333333333333 & mesh.x <= 49.99666666666667) = []; 121 | mesh.x = [mesh.x (0.003333333333333333:1.0:49.99666666666667) + 0]; 122 | mesh.y(mesh.y >= 0.003333333333333333 & mesh.y <= 49.99666666666667) = []; 123 | mesh.y = [mesh.y (0.003333333333333333:1.0:49.99666666666667) + 0]; 124 | mesh.z(mesh.z >= 0.003333333333333333 & mesh.z <= 2.9966666666666666) = []; 125 | mesh.z = [mesh.z (0.003333333333333333:0.25:2.9966666666666666) + 0]; 126 | 127 | mesh.x = sort(mesh.x); 128 | mesh.y = sort(mesh.y); 129 | mesh.z = sort(mesh.z); 130 | disp(["mesh min spacing x : " num2str(min(abs(diff(mesh.x))))]); 131 | disp(["mesh min spacing y : " num2str(min(abs(diff(mesh.y))))]); 132 | disp(["mesh min spacing z : " num2str(min(abs(diff(mesh.z))))]); 133 | 134 | minimumMeshSpacing = 1E-6; 135 | if ((min(abs(diff(mesh.x))) <= minimumMeshSpacing) || 136 | (min(abs(diff(mesh.y))) <= minimumMeshSpacing) || 137 | (min(abs(diff(mesh.z))) <= minimumMeshSpacing)) 138 | disp("Minimum mesh spacing violated, removing duplicate entries."); 139 | mesh.x = uniquetol(mesh.x, minimumMeshSpacing); 140 | mesh.y = uniquetol(mesh.y, minimumMeshSpacing); 141 | mesh.z = uniquetol(mesh.z, minimumMeshSpacing); 142 | end 143 | 144 | CSX = DefineRectGrid(CSX, 0.001, mesh); 145 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 146 | % NF2FF PROBES GRIDLINES 147 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 148 | CSX = DefineRectGrid(CSX, 0.001, mesh); 149 | WriteOpenEMS( [Sim_Path '/' Sim_CSX], FDTD, CSX ); 150 | CSXGeomPlot( [Sim_Path '/' Sim_CSX] ); 151 | 152 | if (postprocessing_only==0) 153 | %% run openEMS 154 | RunOpenEMS( Sim_Path, Sim_CSX, openEMS_opts ); 155 | end 156 | -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/example_stub_filter/002_settings.ini: -------------------------------------------------------------------------------- 1 | [MATERIAL-air] 2 | type=userdefined 3 | material_epsilon=1 4 | material_mue=1 5 | material_kappa=0 6 | material_sigma=0 7 | 8 | [MATERIAL-PEC] 9 | type=metal 10 | material_epsilon=4 11 | material_mue=1 12 | material_kappa=0 13 | material_sigma=0 14 | 15 | [MATERIAL-FR4] 16 | type=userdefined 17 | material_epsilon=4.5 18 | material_mue=1 19 | material_kappa=0 20 | material_sigma=0 21 | 22 | [GRID-grid_fine] 23 | coordsType=rectangular 24 | type=Fixed Distance 25 | units=mm 26 | xenabled=true 27 | yenabled=true 28 | zenabled=true 29 | fixedCount="{\"x\": 0, \"y\": 0, \"z\": 0}" 30 | fixedDistance="{\"x\": 1.0, \"y\": 1.0, \"z\": 0.25}" 31 | userDefined={\"data\": \"\"} 32 | generateLinesInside=true 33 | topPriorityLines=true 34 | 35 | [GRID-grid_coarse] 36 | coordsType=rectangular 37 | type=Fixed Distance 38 | units=mm 39 | xenabled=true 40 | yenabled=true 41 | zenabled=true 42 | fixedCount="{\"x\": 0, \"y\": 0, \"z\": 0}" 43 | fixedDistance="{\"x\": 1.0, \"y\": 1.0, \"z\": 1.0}" 44 | userDefined={\"data\": \"\"} 45 | generateLinesInside=true 46 | topPriorityLines=false 47 | 48 | [EXCITATION-excitation%201] 49 | type=gaussian 50 | sinusodial={\"fc\": 0} 51 | gaussian="{\"fc\": 2.0, \"f0\": 2.5}" 52 | custom="{\"functionStr\": \"0\", \"f0\": 0}" 53 | units=GHz 54 | 55 | [PORT-portOut] 56 | type=lumped 57 | R=50 58 | RUnits=Ohm 59 | isActive=false 60 | direction=z 61 | 62 | [PORT-portIn] 63 | type=lumped 64 | R=50 65 | RUnits=Ohm 66 | isActive=true 67 | direction=z 68 | 69 | [PORT-electric%20field] 70 | type=et dump 71 | R=50 72 | RUnits=Ohm 73 | isActive=false 74 | direction=z 75 | 76 | [SIMULATION-Hardwired%20Name%201] 77 | name=Hardwired Name 1 78 | params="{\"max_timestamps\": 100000, \"min_decrement\": 0.001, \"BCxmin\": \"PML\", \"BCxmax\": \"PML\", \"BCymin\": \"PML\", \"BCymax\": \"PML\", \"BCzmin\": \"PML\", \"BCzmax\": \"PML\", \"PMLxmincells\": 4, \"PMLxmaxcells\": 4, \"PMLymincells\": 4, \"PMLymaxcells\": 4, \"PMLzmincells\": 4, \"PMLzmaxcells\": 4}" 79 | 80 | [_OBJECT0-electric%20field%20port] 81 | type=FreeCadObj 82 | parent=electric field 83 | category=Port 84 | 85 | [_OBJECT1-Term_IN] 86 | type=FreeCadObj 87 | parent=portIn 88 | category=Port 89 | 90 | [_OBJECT2-Term_OUT] 91 | type=FreeCadObj 92 | parent=portOut 93 | category=Port 94 | 95 | [_OBJECT3-Air_Volume] 96 | type=FreeCadObj 97 | parent=grid_coarse 98 | category=Grid 99 | 100 | [_OBJECT4-fine%20mesh%20region] 101 | type=FreeCadObj 102 | parent=grid_fine 103 | category=Grid 104 | 105 | [_OBJECT5-Substrate] 106 | type=FreeCadObj 107 | parent=FR4 108 | category=Material 109 | 110 | [_OBJECT6-Top_Conductor] 111 | type=FreeCadObj 112 | parent=PEC 113 | category=Material 114 | 115 | [_OBJECT7-GND] 116 | type=FreeCadObj 117 | parent=PEC 118 | category=Material 119 | 120 | [_OBJECT8-Air_Volume] 121 | type=FreeCadObj 122 | parent=air 123 | category=Material 124 | 125 | [PRIORITYLIST-OBJECTS] 126 | Port%2C%20electric%20field%2C%20electric%20field%20port=0 127 | Port%2C%20electric%20field%2C%20E%20field%20view=1 128 | Material%2C%20PEC%2C%20Top_Conductor=2 129 | Material%2C%20PEC%2C%20GND=3 130 | Material%2C%20FR4%2C%20Substrate=4 131 | Port%2C%20portOut%2C%20Term_OUT=5 132 | Port%2C%20portIn%2C%20Term_IN=6 133 | Material%2C%20air%2C%20Air_Volume=7 134 | Material%2C%20air%2C%20Sim_Volume=8 135 | Material%2C%20air%2C%20Cube=9 136 | 137 | [PRIORITYLIST-MESH] 138 | Grid%2C%20grid_fine%2C%20fine%20mesh%20region=0 139 | Grid%2C%20grid_coarse%2C%20Air_Volume=1 140 | 141 | [POSTPROCESSING-DefaultName] 142 | generateJustPreview=false 143 | nf2ffObject= 144 | nf2ffFreq=0 145 | nf2ffThetaStart=0 146 | nf2ffThetaStop=0 147 | nf2ffThetaStep=0 148 | nf2ffPhiStart=0 149 | nf2ffPhiStop=0 150 | nf2ffPhiStep=0 151 | -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/example_stub_filter/Air_Volume_gen_model.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/example_stub_filter/Air_Volume_gen_model.stl -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/example_stub_filter/GND_gen_model.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/example_stub_filter/GND_gen_model.stl -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/example_stub_filter/Substrate_gen_model.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/example_stub_filter/Substrate_gen_model.stl -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/example_stub_filter/Top_Conductor_gen_model.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/example_stub_filter/Top_Conductor_gen_model.stl -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/example_stub_filter/uniquetol.m: -------------------------------------------------------------------------------- 1 | function [z,ii,jj] = uniquetol(x,tol,varargin) 2 | %UNIQUETOL Unique element within a tolerance. 3 | % [Y,I,J] = UNIQUETOL(X,TOL) is very similar to UNIQUE, but allows an 4 | % additional tolerance input, TOL. TOL can be taken as the total absolute 5 | % difference between similar elements. TOL must be a none negative 6 | % scalar. If not provided, TOL is assumed to be 0, which makes UNIQUETOL 7 | % identical to UNIQUE. 8 | % 9 | % UNIQUETOL(...,'ROWS') 10 | % UNIQUETOL(...,'FIRST') 11 | % UNIQUETOL(...,'LAST') 12 | % These expressions are identical to the UNIQUE counterparts. 13 | % 14 | % See also UNIQUE. 15 | 16 | % Siyi Deng; 03-19-2010; 05-15-2010; 10-29-2010; 17 | 18 | if size(x,1) == 1, x = x(:); end 19 | if nargin < 2 || isempty(tol) || tol == 0 20 | [z,ii,jj] = unique(x,varargin{:}); 21 | return; 22 | end 23 | [y,ii,jj] = unique(x,varargin{:}); 24 | if size(x,2) > 1 25 | [~,ord] = sort(sum(x.^2,1),2,'descend'); 26 | [y,io] = sortrows(y,ord); 27 | [~,jo] = sort(io); 28 | ii = ii(io); 29 | jj = jo(jj); 30 | end 31 | d = sum(abs(diff(y,1,1)),2); 32 | isTol = [true;d > tol]; 33 | z = y(isTol,:); 34 | bin = cumsum(isTol); % [n,bin] = histc(y,z); 35 | jj = bin(jj); 36 | ii = ii(isTol); 37 | 38 | end % UNIQUETOL; 39 | -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/first_steps_openems_freecad.md: -------------------------------------------------------------------------------- 1 | # From FreeCAD to OpenEMS 2 | 3 | Required: 4 | 5 | * FreeCAD for mechanical CAD 6 | * FreeCAD-OpenEMS-Export for problem configuration 7 | * Octave for script execution 8 | * OpenEMS itself with its FDTD solvers and visualization 9 | 10 | Additionally, 11 | 12 | * ParaView to inspect results 13 | 14 | ## Free and Open Source 15 | 16 | Yes. 17 | 18 | ![](img/tools.png) 19 | 20 | ## Setup 21 | 22 | Starting point: a setup tutorial (silent, somewhat unstructured): https://www.youtube.com/watch?v=OR-79dCMdyo . The necessary steps are untangled and listed below in an updated form. 23 | 24 | ### OpenEMS 25 | 26 | https://openems.de/index.php/OpenEMS.html#Windows 27 | 28 | * Download https://openems.de/download/win64/openEMS_x64_v0.0.35-74-g0e54fbf.zip 29 | * extract to ``c:\OpenEMS\`` 30 | * add ``;c:\OpenEMS`` to user ``PATH`` variable 31 | 32 | ``` 33 | C:\Users\\where OpenEMS 34 | C:\OpenEMS\openEMS.exe 35 | ``` 36 | 37 | ### FreeCAD 38 | 39 | #### installer 40 | 41 | https://www.freecadweb.org/downloads.php 42 | 43 | #### latest 44 | 45 | Remove old files in installation folder and extract archive into it. 46 | 47 | Weekly builds with Python 3.8 (thank you for preserving support for Windows 7, at least up to FreeCAD 0.21!): 48 | 49 | https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds 50 | 51 | 52 | ### FreeCAD-OpenEMS-Export setup and export assistant 53 | 54 | The export tool is not a workbench, but a macro, and currently not available via Extension Manager. The FreeCAD folder for macros is 55 | 56 | ``` C:\Users\\AppData\Roaming\FreeCAD\Macro ``` 57 | 58 | to which *FreeCAD-OpenEMS-Export* can be copied or cloned 59 | 60 | * by downloading the repository as .zip from https://github.com/LubomirJagos/FreeCAD-OpenEMS-Export and extracting to the macro folder 61 | * by opening the command prompt in the macro folder and running 62 | ```git clone https://github.com/LubomirJagos/FreeCAD-OpenEMS-Export.git``` 63 | 64 | Currently there can only be one *User macros location* for all .FCMacro files, but it is recommended to keep the cloned repository in its folder for better handling. This will require manual configuration of the macros location each time a different macro is being executed. 65 | 66 | Creating a hardlink does not work, as it causes the script to be run with the parent folder as the current working directory, and modules imported by ```Export for OpenEMS.FCMacro``` will not be found. 67 | 68 | ![](img/freecad_macros.png) 69 | 70 | ```fsutil hardlink create "<...>\Macro\Export for OpenEMS.FCMacro" "<...>\Macro\FreeCAD-OpenEMS-Export\Export for OpenEMS.FCMacro"``` 71 | 72 | There is probably a workaround / way to forward it but as simple as adding a forwarder script with ``imp.load_source()`` in it. 73 | 74 | ### Octave 75 | 76 | For some reason, Octave 7.1 freezes when starting, so we shall try Octave 6.4. 77 | 78 | https://mirrors.tripadvisor.com/gnu/octave/windows/ 79 | 80 | https://mirrors.tripadvisor.com/gnu/octave/windows/octave-6.4.0-w64-installer.exe 81 | 82 | Run Octave. 83 | 84 | Via ``Edit > Set Path > Add Folder ...`` add ``C:\OpenEMS\matlab`` : 85 | 86 | ![](img/octave_add_path_openems.png) 87 | 88 | To execute one of the examples, 89 | 90 | * set ``File Explorer`` path to ``C:/OpenEMS/matlab/examples`` 91 | * navigate to an example 92 | * copy explorer directory to ``Current Directory`` 93 | * press ``Save File and Run/Continue``. 94 | * Switch to ``Command Window`` if necessary. 95 | 96 | ### ParaView 97 | 98 | The latest ParaView versions (and older ones required for Windows 7 use) can be downloaded at https://www.paraview.org/download/ . 99 | 100 | For Windows 7, use the last build with Python 3.8: 101 | 102 | [ParaView-5.9.1-MPI-Windows-Python3.8-msvc2017-64bit.exe](https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v5.9&type=binary&os=Windows&downloadFile=ParaView-5.9.1-MPI-Windows-Python3.8-msvc2017-64bit.exe) -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/002_excitation.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/002_excitation.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/002_openems_running.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/002_openems_running.jpg -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/002_paraview_steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/002_paraview_steps.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/002_port_E_dump.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/002_port_E_dump.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/002_port_in.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/002_port_in.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/002_postprocessing.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/002_postprocessing.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/002_setup_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/002_setup_small.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/002_sim_params.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/002_sim_params.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/7tS9CyL7AP.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/7tS9CyL7AP.gif -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/Cw06vA0A1w.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/Cw06vA0A1w.gif -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/MozK94SUyh.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/MozK94SUyh.gif -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/OpenEMS_mesh_snippet.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/OpenEMS_mesh_snippet.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/appcsxcad_mesh_preview.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/appcsxcad_mesh_preview.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/bEYtDggeGr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/bEYtDggeGr.gif -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/exporter_dialog_buttons.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/exporter_dialog_buttons.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/freecad_macros.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/freecad_macros.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/octave_add_path_openems.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/octave_add_path_openems.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/structured_vs_unstructured_grid_engr459a7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/structured_vs_unstructured_grid_engr459a7.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/stub_filter_setup_cross_sect.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/stub_filter_setup_cross_sect.PNG -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/img/tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_OpenEMS/img/tools.png -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/readme.md: -------------------------------------------------------------------------------- 1 | ## Design in FreeCAD, simulate with OpenEMS 2 | 3 | 3D electromagnetic FDTD simulations are a tool to analyze, among other things (like S-parameters and radiation patterns of antenna structures, TDR simulation), circuits with distributed elements and custom air-core magnetics. 4 | 5 | Never heard of OpenEMS? Check out [Thorsten Liebig's FOSDEM talk](https://archive.fosdem.org/2019/schedule/event/openems/) for a gentle introduction (27 min video). 6 | 7 | The focus of this article is to document a foray into this territory under Windows. 8 | 9 | [Setup under Windows](first_steps_openems_freecad.md) 10 | 11 | ### FDTD By Example 12 | 13 | [Example 1: A stub filter - in broad strokes](stub_filter_problem_setup.md) 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /FreeCAD_OpenEMS/stub_filter_problem_setup.md: -------------------------------------------------------------------------------- 1 | # Microstrip Transmission Line With A Stub 2 | 3 | If you're interested in antennas, high-frequency simulation of circuit structures, custom components (e.g. magnetics) and a mix of CAD models and lumped components working as a circuit, FDTD may be for you. Below is a first example that should help to get a foot on the ground with OpenEMS and the other tools involved. 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | Caveat: The model is not dimensionally accurate and will probably have a mismatched impedance. Dimensions are chosen to avoid having to obsess over mesh generation details and to improve the chances of first-pass success. To make up for that, information on how to do it right is also given, and tutorials and official OpenEMS documentation are referenced for further reading. The author welcomes corrections and suggestions to promote best practices. 12 | 13 | # Problem Setup 14 | 15 | Setting up the first problem may feel like a daunting task, which is unfortunately more a function of the unrealized user-friendliness of the tools involved than one of the physical problem itself. With the required applications set up and working, the actual workflow is composed of the following steps: 16 | 17 | 1. Select appropriate physical phenomena and solver method (EM fields and currents, OpenEMS is an **FDTD** solver) - consider whether FEM or FDTD is appropriate for the questions you seek to answer 18 | 2. **Create appropriate geometry** or import and pre-process it 19 | 3. **Create new material definitions** or selecting them from an integrated library 20 | 4. **Associate materials with all objects in the simulation volume** 21 | 5. Specify the "test bench" 22 | * Simulation parameters (**excitation type, frequency range**) 23 | * **Ports** and lumped components 24 | * **Boundary conditions** 25 | 6. Manually **generate a mesh** 26 | 27 | Nuisance challenges related to OpenEMS (at the time of this writing): 28 | 29 | * Lack of a materials library and its GUI integration? 30 | * Lack of physics- and geometry-informed and automated mesh generation. Maybe it will be attractive to pivot to [pyems](https://github.com/matthuszagh/pyems) in the future which claims to support [automatic mesh generation](https://github.com/matthuszagh/pyems#automatic-mesh-generation-algorithm). 31 | * Unstable mesh preview in FreeCAD (mesh can be previewed at script runtime in Octave, which starts AppCSXCAD). 32 | 33 | ## 1. Physical Phenomena and Solver Method 34 | 35 | The example presented below assumes that the reader is to some extent familiar with 2D FEM solvers for electromagnetic problems and has used e.g. [FEMM](https://www.femm.info/wiki/HomePage) or [Agros2D](http://www.agros2d.org/), but needs to investigate 3D problems, and do so at higher frequencies. 36 | 37 | [FreeFEM](https://freefem.org/) is a powerful multiphysics 3D FEM solver and probably the superior open source choice for electro- and magnetostatics, heat transport, mechanical and fluid dynamics problems. If most questions can be answered by performing a static or single frequency (frequency domain) analysis, choose the finite element method. 38 | 39 | OpenEMS implements the [finite-difference time-domain method](https://en.wikipedia.org/wiki/Finite-difference_time-domain_method#FDTD_models_and_methods) or Yee's method for 3D problems. The key defining feature of FDTD is the broadband (Gaussian) excitation in the time domain, allowing the frequency response of a structure to be obtained from a Fourier transform. It also allows to obtain a more intuitive access to transient phenomena like the propagation of a step impulse corresponding to time-domain reflectometry measurements. 40 | 41 | "EC-FDTD" stands for equivalent-circuit FDTD, a method for calculating FDTD coefficients internally and of minor importance to the user, so OpenEMS can generally be referred to as an FDTD solver. 42 | 43 | **Here we use OpenEMS, and an FDTD analysis will be performed** to obtain the frequency response of a strip line with a stub attached to it, as it is one of the simplest designs that may come to mind. Whether stubs can be tolerated in PCB design is a recurring question in the RF circuit design learning process, as it's not easy to avoid them when placing bypass capacitors, termination resistors or even via barrels through multiple layers or the entire PCB. Ultimately, one could even investigate 90°, 45° and rounded corners in PCB traces to further one's understanding of transmission line behavior at very high frequencies. These learning opportunities make OpenEMS an attractive option for teaching and self-study. 44 | 45 | 46 | 47 | ## 2. Creating Geometry 48 | 49 | For the purposes of this example it serves to keep things simple. Simulation geometry is, in most cases, a stylized excerpt of a bigger piece of circuitry, and the general approach to produce it relies on 50 | 51 | * [Defeaturing](https://doi.org/10.1016/j.mcm.2012.06.019) / smoothing - when a mesh is automatically generated, fine details that do not impact fields and energy density to an appreciable degree can be removed. Additionally, sharp corners result in high E field strengths and do not necessarily have a manufactured equivelent. 52 | * Symmetries and lower dimensionality - a universal need to lower simulation time drives a-priori reduction of the number of elements / cells. This is what makes tools like FEMM popular, as it simulates axisymmetric and extruded cartesian geometries, assuming that the end caps only introduce a minor deviation / contribution when comparing the 2D simplification to the real 3D model. 53 | * Prioritization of speed or accuracy - certainly within a significant margin of discretion, and even more so when an order-of-magnitude impact on computation time is taken into account. 54 | * Meshing trickery - tayloring of the mesh to be just fine enough to properly capture the physics. 55 | 56 | Especially the last point, the design of a mesh informed by prior knowledge of results and typical manifestation of the underlying physics (here Maxwell's equations) can be perceived as a hurdle when getting started. So let us not assume prior knowledge of what an efficient FDTD mesh is, at least for now. Later, there will arise a natural need for objective quality and stability criteria, as simulations may simply fail or show physically implausible behavior (e.g. ringing at the edges of a step excitation after propagating through a microstrip transmission line, infinite or zero energy, resonances that do not correspond to physical lengths and circuit elements implemented in the model). 57 | 58 | For simplicity, open ``002.FCStd`` from the [example project folder](example_stub_filter/) to follow along. 59 | 60 | Below is a brief overview over the (unorganized) objects that make up a printed circuit board in FreeCAD, with 2 layers and 1.5 mm thick FR4. The tracks are made very thick to ensure at least 1-2 grid lines (actually grid planes) lie inside the conductor: 61 | 62 | ![](img/7tS9CyL7AP.gif) 63 | 64 | The geometry is made up of: 65 | 66 | * 50 x 3 x 0.5 mm copper trace and 67 | * 15 x 3 x 0.5 mm copper stub on top of a 68 | * 60 x 60 x 1.5 mm FR4 block (Substrate), below which another 69 | * 60 x 60 x 0.5 mm copper block (GND) is placed. 70 | * 2 x 2 x 2.5 mm blocks placed across the top and bottom layers for ports pointing in z-direction (Term_IN, Term_OUT). 71 | 72 | The size of the simulation (or air) volume is small and based on some naive assumptions: the E field is mostly confined to the substrate and the edges of traces. The 3W rule from PCB design (minimum distance between PCB traces that are not intentionally coupled / show only a minor amount of interference) and the traces being over an uninterrupted groundplane are taken as an orientation. 73 | 74 | For now, let's assume that the structure will not radiate efficiently and the field strength 1.5 cm above the PCB is small. More on the boundary conditions below. 75 | 76 | The validation of those assumptions through addition of another E field port plane ~ 10mm above the top trace to inspect the free space field strength is left to the inclined reader once the simulation produces results. 77 | 78 | Three helper volumes are added: 79 | 80 | * 70 x 70 x 20 mm ``grid_coarse`` simulation volume (Air_Volume), 81 | * 50 x 50 x 3 mm ``grid_fine`` nested (fine mesh region) 82 | * 55 x 55 x 0.5 mm region in which the E field will be investigated. 83 | 84 | In the Part workbench, select + CTRL-D or right-click item ``Appearance..`` easily allows to reduce the transparency. These blocks can be hidden (select + SPACE) to work on the geometry inside. 85 | 86 | **Note that currently the names should not be changed after this point to avoid errors and loss of assignments in FreeCAD-OpenEMS Exporter.** 87 | 88 | Term_IN and Term_OUT blocks are placeholders for 89 | 90 | ## 3. Material Definitions 91 | 92 | ### Defining Materials in OpenEMS 93 | 94 | Material Property assignments are assisted by FreeCAD-OpenEMS exporter. The wizard does not add extra complexity beyond the selection between ``userDefined material`` and ``metal`` . 95 | 96 | Over at http://openems.de/index.php/Material_Property a brief summary is given: 97 | * Epsilon: relative electric permittivity (must be >=1) 98 | * Mue: relative magnetic permeability (must be >=1) 99 | * Kappa: electric conductivity (must be >=0) 100 | * Sigma: magnetic conductivity (non-physical property, must be >=0) 101 | 102 | Perfect conductors, and also lossy thin sheets can be specified as well (see https://openems.de/index.php/Metal_Property.html): 103 | 104 | * A perfect electric conductor(PEC) property is added by``CSX = AddMetal(CSX, name)`` 105 | * or a lossy conducting material can be added by ``CSX = AddConductingSheet(CSX, name, conductivity, thickness)`` 106 | 107 | As per http://openems.de/forum/viewtopic.php?t=163 , ``AddConductingSheet()`` is a 2D property, mapping a thin film onto a surface for simulation. 3D volumes with this property produce an error: 108 | 109 | Operator_Ext_ConductingSheet::BuildExtension: 110 | A conducting sheet primitive (ID: 2) with dimension: 3 found, fallback to PEC! 111 | 112 | It appears that ``AddConductingSheet()`` is not represented in FreeCAD-OpenEMS export, probably on account of requiring a 2D object and / or a region that only contains one mesh line (clarification needed - [here](https://github.com/thliebig/openEMS/blob/master/matlab/examples/transmission_lines/MSL_Losses.m) it is used in conjunction with ``AddBox()`` ). 113 | 114 | ### Materials Used 115 | 116 | Luckily, specifying material properties is not a lenghty process. 117 | * for all materials used here ``Sigma = 0`` and ``Mue = 1`` 118 | * air can be set to ``Epsilon = 1``, ``Kappa = 0`` 119 | * FR4 is roughly ``Epsilon = 4.5", ``Kappa = 0`` 120 | * The copper layer is modeled as a metal, or rather a perfect electrical conductor (PEC) 121 | 122 | FreeCAD-OpenEMS Export appeared to insist on creating a ``PEC`` metal: 123 | 124 | ```Matlab 125 | CSX = AddMetal( CSX, 'PEC' ); 126 | ``` 127 | 128 | which leads to further complaints when it goes unused for reasons that are not clear to the author at the point of writing. 129 | 130 | One can however create a metal material also named ``PEC`` which subsequently overwrites the orphaned material definition and serves as our definition for copper. 131 | 132 | ## 4. Associating Materials With Objects 133 | 134 | Materials are assigned in the ``Object Assignments`` tab shown below. All solid material blocks are disjoint in our model. Solids also sit inside or intersect ``Air_Volume`` and ``fine mesh region`` The zone priorities are negotiated through the list position on the right hand side. Note that ``fine mesh region`` is not used to specify a material, as materials are already specified at all positions in the simulation volume. ``fine mesh region`` also takes precedent over ``Air_Volume`` associated with ``grid_coarse`` properties. 135 | 136 | ![](img/MozK94SUyh.gif) 137 | 138 | Also refer to this animation for the property values under ``Grid Settings`` and ``Port Settings`` mentioned below. 139 | 140 | ## 5. Completing The Problem Definition 141 | 142 | ### Ports 143 | 144 | See https://openems.de/index.php/Ports.html , where it is stated: 145 | 146 | Ports are macro functions that combine e.g. current and voltage probes, 147 | field excitations and other necessary properties and primitives. 148 | 149 | The concept of a port is thus not simply a contact point akin to an SMA or u.fl connector point. One could perhaps consider all cells *not connected* to a port region to be *internal* or *hidden* cells, while others associated with a port definition are either connected to external sources, loads or field and potential probes. 150 | 151 | In circuit terms, we intend to consider our design connected to a source with its input, and e.g. an oscilloscope at the output: 152 | 153 | Concentrated ports such as the lumped or curve port are supposed to be 154 | very small and compact ports. Their size should be much smaller than the wavelength. 155 | 156 | * ``Port_In`` : lumped, 50 Ohm active port in +z direction 157 | * ``Port_Out`` : lumped, 50 Ohm non-active port in +z direction (termination) 158 | 159 | ![](img/002_port_in.PNG) 160 | 161 | To observe a particular region of the simulation volume, an E field dump is configured. One could observe the entire volume for all times, but often only particular section planes are of interest. 162 | 163 | * ``electric field`` : Et dump region observing the field distribution, a plane with +z normal direction 164 | 165 | ![](img/002_port_E_dump.PNG) 166 | 167 | Volumetric information on the other hand is of interest e.g. when simulating cavities and waveguides, as well as near fields of radiating structures. 168 | 169 | ### Excitation 170 | 171 | See http://openems.de/index.php/Excitation . Various excitation types are possible, including an analytical function when using ``FDTD = SetCustomExcite(FDTD,f0,funcStr)``. Here, we choose Gaussian excitation over ``2.5 +/- 2 GHz`` . 172 | 173 | ![](img/002_excitation.PNG) 174 | 175 | ### Solver Options 176 | 177 | * maximum timestep : 100000 (an abort criterion which may not be reached as during Gaussian excitation, the simulation should hit a minimum energy dispersion (-30 dB) threshold first. 178 | * min decrement : 0.001 (?) 179 | 180 | https://openems.de/index.php/Frequently_Asked_Questions.html : 181 | 182 | My timestep seems to be very small and the simulation takes a long time. Why? 183 | 184 | A (very) small timestep usually means that the mesh contains one or more cells 185 | that are very small. The timestep is defined by the smallest cell. If you really 186 | need small cells (e.g. to resolve some important feature of your structure) 187 | you will have to live with long execution times or perhaps FDTD is not the 188 | right method for your problem. In most cases you should check if you can 189 | avoid small cells. 190 | 191 | In the FreeCAD-OpenEMS Exporter dialog, the Simulation Params tab also contains the boundary condition settings which we will look at next. 192 | 193 | ![](img/002_sim_params.PNG) 194 | 195 | ### Boundary Conditions 196 | 197 | Boundary conditions are an essential part of a physical problem definition. They immediately interact with the set of solutions. For free-space scenarios, the perfectly matched layer is appropriate. Unlike boundary conditions that prescribe specific values for E and B fields on a surface, PMLs are several cells thick. 198 | 199 | In other cases, a metal enclosure can be represented through perfect electric conductor (PEC) boundaries. 200 | 201 | Also see http://openems.de/index.php/FDTD_Boundary_Conditions for a comprehensive list of boundary conditions supported in OpenEMS. 202 | 203 | #### Perfectly Matched Layer (PML) 204 | 205 | The boundary conditions [(perfectly matched layer, PML)](https://web.stanford.edu/group/fan/publication/Shin_JCP_231_3406_2012.pdf) are chosen to pretend the circuit is surrounded by infinite free space - they provide termination with free-space / vacuum impedance. 206 | 207 | The animation below is excellent at illustrating why the PML region needs to be several cells thick - fields propagate into the PML, where they dissipate. 208 | 209 | ![](img/bEYtDggeGr.gif) 210 | 211 | *Source: [EMPossible Lecture 13 (FDTD) -- The Perfectly Matched Layer](https://www.youtube.com/watch?v=w_NnRZlNuAA)* 212 | 213 | **Warning: In openEMS the last x lines in the respective direction are defined as this artificial absorbing material: Keep your structures far enough away!** 214 | 215 | ## 6. Meshing 216 | 217 | Arguably the most inconvenient aspect of OpenEMS and is its lack of automated mesh generation, and in some tutorials it might appear that the diffusion of implicit knowledge from code snippets to the reader should suffice. For now, OpenEMS problems are limited to cylinder coordinates, as well as cartesian coordinates and structured grids (see also http://openems.de/index.php/FDTD_Mesh for the example below): 218 | 219 | ![](img/OpenEMS_mesh_snippet.PNG) 220 | 221 | In the future, automatic mesh generation may be added, but for the time being there will be no analog to an unstructured grid: 222 | 223 | ![](img/structured_vs_unstructured_grid_engr459a7.PNG) 224 | 225 | 226 | 227 | Graded meshes allow minimizing the number of grid lines / cells while still capturing the spatial details of the model sufficiently to allow acceptable simulation times. Subgridding on the other hand allows to embed higher-resolution simulation domains without enforcing unnecessary, small cells or a substantially higher resolution far from the structure where the fields to not require a high spatial resolution. 228 | 229 | ![image](https://github.com/user-attachments/assets/daa54e55-cb50-4f6e-a37a-18632bf1223b) 230 | 231 | ([source](https://www.researchgate.net/publication/3019213_A_Three-Dimensional_FDTD_Subgridding_Algorithm_With_Separated_Temporal_and_Spatial_Interfaces_and_Related_Stability_Analysis). For more on the subject also see https://doi.org/10.1109/TAP.2023.3284488) 232 | 233 | So for now, we can define nested regions but they are merged into a single rectilinear grid (no subgridding supported in OpenEMS for the time being!). 234 | 235 | As shown above, two nested mesh regions are defined in this example: 236 | 237 | * ``grid_coarse``: 1 x 1 x 1 mm cell size 238 | * ``grid_fine``: 1 x 1 x 0.25 mm cell size 239 | 240 | From AppCSXCAD run later, the refinement in the z-direction is visible. In principle, **cell dimensions should only vary by a factor of 2 from cell to cell**, but we shall try 1 mm and 0.25 mm here for simplicity, making the refined mesh region thicker in hopes that the strongest field gradients are directly at the height of the top side metal layer, leaving a few cells thick layer between the metal and the transition in the grid spacing. 241 | 242 | ![](img/appcsxcad_mesh_preview.PNG) 243 | 244 | The way the nested grids are set up leads to a duplicate mesh line, which we will look at in "OpenEMS Problem "Energy: ~ nan (- 0.00dB)"". 245 | 246 | ### Proper Meshing 247 | 248 | OpenEMS / FDTD meshing rules of thumb (cited below): http://openems.de/index.php/FDTD_Mesh 249 | 250 | Notch filter example (setup of an inhomogeneous FDTD mesh): https://openems.de/index.php/Tutorial:_Microstrip_Notch_Filter.html 251 | 252 | #### Rules Of Thumb 253 | 254 | The mesh used by the finite-difference time-domain (FDTD) method is a strictly rectilinear mesh using Yee-cells. 255 | 256 | * The largest mesh cell must not be bigger than about a tenth of the smallest wavelength. Better: max(Δx,y,z) < λmin / 15 257 | * The smallest wavelength is defined by the greatest excited frequency and the material properties! 258 | - Make the mesh as coarse as possible and as fine as needed 259 | - Keep an adequate distance to an absorbing boundary 260 | * Try to keep structure > λmax / 4 from a PML 261 | - Create a smooth mesh: Neighboring cell sizes should not exceed a factor of ~2 262 | - (paraphrased) The simulation volume necessarily has a significant air space around the active structure to ensure the boundaries do not significantly interact with it. 263 | * Thirds Rule (mostly relevant for PCB simulations, see [discussion](http://openems.de/forum/viewtopic.php?t=801)) : At the edges of a 2D metal you have a strong electric field enhancement that FDTD has trouble to calculate properly. That means that 264 | - e.g. for micro-strip line (MSL) the line-impedance and wave propagation differs somewhat between simulation and measurement. 265 | - (paraphrased) It is preferred in precision calculations to put mesh lines around a metal edge such that a mixed-material grid cell is 1/3 inside and 2/3 outside the metal. 266 | - "in other words, the third rule helps to get away with a coarser mesh, if you put a line on the edge, you just use a dense mesh without that advantage" 267 | 268 | ### Mesh Validation 269 | 270 | When constructing the current example, some less ideal choices were (in part deliberately) made and their repercussions observed. In the course of resolving the issues below, OpenEMS happened to report "Energy: ~ nan (- 0.00dB)", which was caused by one of the problems identified and resolved: 271 | 272 | * PML boundary conditions were set up too close to the simulated geometry (they appear to eat into the volume, using existing grid units). The volume was increased by 5 mm (at 1 mm grid spacing, adding at least 5 cells on each side around the simulation volume). 273 | * PML grid line count of 1 in any direction was not appropriate. The value was increased to 4. Multiple cell thickness is preferred (e.g. 8). 274 | * Overlapping grid regions were set up. 275 | - Grids are listed on the right hand side of the FreeCAD OpenEMS Export dialog in descending priority. This in itself is not wrong, but can cause grid lines in z to be doubled-up, resulting in ~0 mm spacing, which has to be handled with additional scripting (detailed below). 276 | - Coordinate lists are concatenated, and overlapping lines are only recognizeable after sorting. 277 | 278 | The mesh resulting from the problem setup and chosen mesh regions / types can be inspected upon execution as AppCSXCAD starts in read-only mode when running the script in Octave. Overlapping grid lines however are not highlighted. 279 | 280 | As a typical presentation of a problem, OpenEMS may report an invalid energy value, and run for a very long time without progress. 281 | 282 | #### Automatically Detecting Meshing Errors 283 | 284 | When using multiple overlapping grids that have the same priority level, the lists of grid positions ``mesh.x , mesh.y , mesh.z`` are not sorted, and lists of positions are currently simply concatenated. Thus, when comparing unsorted consecutive values (hint from http://openems.de/forum/viewtopic.php?t=1103), large negative jumps like "-65 mm" could be found (in FreeCAD-to-OpenEMS there only seems to be the ``top priority, remove overlapping lines`` option which currently does not prevent the problem). 285 | 286 | As a first step to look at all the numerical values of grid line positions in the exported script, one can add manually: 287 | 288 | ```Matlab 289 | mesh.x 290 | mesh.y 291 | mesh.z 292 | ``` 293 | 294 | The [OpenEMS mesh](http://openems.de/index.php/FDTD_Mesh) documentation does not mention whether the lists have to be monotonic. Applying sort() before ``DefineRectGrid()`` does not impact generality but is necessary to identify steps that are too small. 295 | 296 | Without sorting, the simple validation code and output would look like this: 297 | 298 | ```Matlab 299 | disp("mesh min spacing x : "), min(abs(diff(mesh.x))) 300 | disp("mesh min spacing y : "), min(abs(diff(mesh.y))) 301 | disp("mesh min spacing z : "), min(abs(diff(mesh.z))) 302 | ``` 303 | 304 | ``abs()`` removes large negative differences, but will overlook overlapping coordinates. The output in a problematic case only reflects the intended spacings (note the minimum spacing ~0.0 in z is not being found): 305 | 306 | ``` 307 | mesh min spacing x : 308 | ans = 1.0000 309 | mesh min spacing y : 310 | ans = 1.0000 311 | mesh min spacing z : 312 | ans = 0.2500 313 | ``` 314 | 315 | **Solution** 316 | 317 | To detect (near-)duplicate entries, the mesh lists need to be sorted first. The following lines can be inserted manually into the script after generation, replacing the 318 | 319 | ```Matlab 320 | CSX = DefineRectGrid(...); 321 | ``` 322 | 323 | line with: 324 | 325 | ```Matlab 326 | mesh.x = sort(mesh.x); 327 | mesh.y = sort(mesh.y); 328 | mesh.z = sort(mesh.z); 329 | disp(["mesh min spacing x : " num2str(min(diff(mesh.x)))]); 330 | disp(["mesh min spacing y : " num2str(min(diff(mesh.y)))]); 331 | disp(["mesh min spacing z : " num2str(min(diff(mesh.z)))]); 332 | 333 | minimumMeshSpacing = 1E-6; 334 | if ((min(diff(mesh.x)) <= minimumMeshSpacing) || 335 | (min(diff(mesh.y)) <= minimumMeshSpacing) || 336 | (min(diff(mesh.z)) <= minimumMeshSpacing)) 337 | disp("Minimum mesh spacing violated, removing duplicate entries."); 338 | mesh.x = uniquetol(mesh.x, minimumMeshSpacing); 339 | mesh.y = uniquetol(mesh.y, minimumMeshSpacing); 340 | mesh.z = uniquetol(mesh.z, minimumMeshSpacing); 341 | end 342 | 343 | CSX = DefineRectGrid(CSX, 0.001, mesh); 344 | ``` 345 | 346 | The code above requires [uniquetol.m](example_stub_filter/uniquetol.m) which was probably added to Octave 7.1, but not Octave 6.4 [(bug #59850)](https://savannah.gnu.org/bugs/index.php?59850) , so it needs to be added to the script folder. 347 | 348 | Now when running the script in Octave, we would get: 349 | ``` 350 | mesh min spacing x : 1 351 | mesh min spacing y : 1 352 | mesh min spacing z : 3.6689e-16 353 | Minimum mesh spacing violated, removing duplicate entries. 354 | ... 355 | ``` 356 | 357 | If that does not resolve the issue, the boundary conditions or ports are next to be investigated. 358 | 359 | 360 | # Computation and Visualization 361 | 362 | * Now is a good time to click ``Save Current Settings``, which produces an .ini file in the project folder. 363 | * Note under ``Postprocessing`` there is a ``Write ABORT simulation File`` button, which creates a file named "ABORT" in the ``tmp/`` subdirectory of the project folder to cause OpenEMS to exit when it is being run from Octave, which will come in handy later. 364 | * Also note the ``Generate just simulation preview`` option that allows to run the Octave script just with AppCSXCAD to preview the model and meshing. 365 | 366 | ![](img/002_postprocessing.PNG) 367 | 368 | 369 | When ready, 370 | * click ``Generate OpenEMS Script`` in the bottom right corner of the Exporter dialog. 371 | ![](img/exporter_dialog_buttons.PNG) 372 | * Open the .m file with the project name in the project folder with Octave and run it. 373 | * Preview the simulation model and mesh. 374 | * Un-tick ``Generate just simulation preview`` and re-generate the script. 375 | * To the .m file, add the mesh validation code from above as needed (it will be removed from the script each time it is being generated. Use the ``ABORT`` file during debugging if there are problems during OpenEMS execution. 376 | 377 | Here's what the output in the Octave ``Command Window`` could look like: 378 | 379 | ``` 380 | remove entire contents of tmp? (yes or no) yes 381 | mesh min spacing x : 1 382 | mesh min spacing y : 1 383 | mesh min spacing z : 3.6689e-16 384 | Minimum mesh spacing violated, removing duplicate entries. 385 | invoking AppCSXCAD, exit to continue script... 386 | QCSXCAD - disabling editing 387 | QCSXCAD - disabling editing 388 | args = "002.xml" 389 | ---------------------------------------------------------------------- 390 | | openEMS 64bit -- version v0.0.35-74-g0e54fbf 391 | | (C) 2010-2018 Thorsten Liebig GPL license 392 | ---------------------------------------------------------------------- 393 | Used external libraries: 394 | CSXCAD -- Version: v0.6.2-103-g3c4fb66 395 | hdf5 -- Version: 1.8.12 396 | compiled against: HDF5 library version: 1.8.12 397 | tinyxml -- compiled against: 2.6.2 398 | fparser 399 | boost -- compiled against: 1_60 400 | vtk -- Version: 8.2.0 401 | compiled against: 8.2.0 402 | 403 | Create FDTD operator (compressed SSE + multi-threading) 404 | FDTD simulation size: 70x70x29 --> 142100 FDTD cells 405 | FDTD timestep is: 7.86218e-13 s; Nyquist rate: 141 timesteps @4.51033e+09 Hz 406 | Excitation signal length is: 1822 timesteps (1.43249e-09s) 407 | Max. number of timesteps: 100000 ( --> 54.8847 * Excitation signal length) 408 | Create FDTD engine (compressed SSE + multi-threading) 409 | Running FDTD engine... this may take a while... grab a cup of coffee?!? 410 | [@ 4s] Timestep: 455 || Speed: 15.9 MC/s (8.928e-03 s/TS) || Energy: ~4.73e-16 (- 0.00dB) 411 | [@ 8s] Timestep: 910 || Speed: 15.4 MC/s (9.220e-03 s/TS) || Energy: ~1.03e-13 (- 0.00dB) 412 | [@ 12s] Timestep: 1470 || Speed: 19.4 MC/s (7.327e-03 s/TS) || Energy: ~8.88e-14 (- 0.69dB) 413 | [@ 16s] Timestep: 1890 || Speed: 14.9 MC/s (9.546e-03 s/TS) || Energy: ~4.38e-14 (- 3.77dB) 414 | [@ 20s] Timestep: 2415 || Speed: 18.6 MC/s (7.633e-03 s/TS) || Energy: ~4.02e-15 (-14.13dB) 415 | [@ 24s] Timestep: 2905 || Speed: 16.9 MC/s (8.425e-03 s/TS) || Energy: ~6.43e-16 (-22.10dB) 416 | [@ 28s] Timestep: 3430 || Speed: 17.3 MC/s (8.191e-03 s/TS) || Energy: ~5.38e-17 (-32.87dB) 417 | Time for 3430 iterations with 142100.00 cells : 28.81 sec 418 | Speed: 16.92 MCells/s 419 | 420 | >> 421 | ``` 422 | 423 | When successfully completed, a set of files starting with ``tmp/electric field_0000000000.vtr`` will be written to the temporary folder, ready for inspection with ParaView. 424 | 425 | * Import multiple files by clicking he grouped .vtr files. 426 | * In Pipeline Browser, click the eye icon to enable visibility. 427 | * Select Represenation = Surface. 428 | * Select Coloring = E-Field. 429 | * Click Coloring button "Rescale to data range over all timesteps. 430 | 431 | ![](img/002_paraview_steps.png) 432 | 433 | * select loop playback in the top toolbar. 434 | * Press play. 435 | 436 | For further help, please also check out the [OpenEMS Forum](https://openems.de/forum/). 437 | -------------------------------------------------------------------------------- /FreeCAD_bimetallic_strip/FEM_example_bimetallic_strip.FCStd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_bimetallic_strip/FEM_example_bimetallic_strip.FCStd -------------------------------------------------------------------------------- /FreeCAD_bimetallic_strip/img/M9zd7z7hPG.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_bimetallic_strip/img/M9zd7z7hPG.gif -------------------------------------------------------------------------------- /FreeCAD_bimetallic_strip/img/UKZyNKjYbT.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_bimetallic_strip/img/UKZyNKjYbT.gif -------------------------------------------------------------------------------- /FreeCAD_bimetallic_strip/img/problem_setup.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/FreeCAD_bimetallic_strip/img/problem_setup.PNG -------------------------------------------------------------------------------- /FreeCAD_bimetallic_strip/readme.md: -------------------------------------------------------------------------------- 1 | # Multi-Material Finite Element Simulation: bimetallic strip 2 | 3 | The rigid connection between objects with different coefficients of thermal expansion, and the [bimetallic strip](https://en.wikipedia.org/wiki/Bimetallic_strip) in particular is probably the first class of problems beyond introductory "one homogenous piece of material" that changes the design process towards a proper simulation model: object types and operations need to be chosen such that they produce benign simulation geometry. 4 | 5 | ![](img/UKZyNKjYbT.gif) 6 | 7 | For the sake of clarity, 8 | * the workpiece consisting of two different material domains will be called "the strip" 9 | * the strip coincides with the simulation domain and the meshed region 10 | * the material domains (steel and Al for simplicity) will be identified by their material types. 11 | 12 | ## Approaches that don't work 13 | 14 | At the time of writing, FreeCAD 0.20 does not support meshing across multiple objects, and does not support the use of multiple meshes in one simulation. The use of multiple meshes or mesh subdomains would also lack other motivation (like parallel processing, see [Domain Decomposition](https://doc.freefem.org/documentation/ffddm/introduction-to-the-domain-decomposition-method.html)). 15 | 16 | Older tutorials that are now outdated due to changes in the UI and steps: 17 | 18 | * [0.17 - FreeCAD FEM Tutorial - thermomechanische Analyse eines Bimetallstreifens](https://www.youtube.com/watch?v=Qbif13e2iyo) 19 | * [0.18 - FreeCAD FEM Tutorial - Unterschiedliche Materialien in einer linear mechanischen Analyse](https://www.youtube.com/watch?v=T-ggqH3tXHs) 20 | 21 | ## An approach that works 22 | 23 | Below, an attempt to follow FreeCAD nomenclature (see [Glossary](https://wiki.freecadweb.org/Glossary)) will be made. 24 | 25 | The process starts in the ``Part Workbench``.There may be a more convenient approach, but for two material subdomains, the method below should be the least amount of trouble. 26 | 27 | Instead of the logical approach - one would assume that two ``Solid`` objects touching at one of their faces should be created - A larger ``Solid`` in the shape of a Boolean union of both metal bits is created first. Secondly, a smaller ``Solid`` object ( a ``Cube``) is created and positioned such that it is inside the larger one, or touching from the inside. 28 | 29 | Next, the material subdomains will be derived: 30 | 31 | 1. A ``Compound`` (group of unfused objects), but more precisely a ``CompSolid`` (``Compound`` where all solids are non-overlapping, are connected by faces and have no non-manifold connections) will be created. For N different subdomains, this ``CompSolid`` will consume the whole simulation domain and N-1 ``Solid`` input objects corresponding to subdomains associated with prescribed materials. 32 | 2. Instead of fusing input objects with a ``Boolean`` operation, the ``Part Workbench`` operation ``Split`` → ``Boolean Fragments`` shall be used. This produces a [``BooleanFragments``](https://wiki.freecadweb.org/Part_BooleanFragments) object. The ``Boolean Fragments`` mode is ``Standard``. 33 | 3. Use ``Part Workbench`` → ``Compound tools`` → ``Explode compound`` on the ``Boolean Fragments`` object to get a group "Exploded BooleanFragments" of ``Compound Filter`` objects extracting face-connected, non-overlapping ``Solid`` items. 34 | 4. The input ``Solid`` subdomains have re-emerged as ``BooleanFragments`` child objects as long as they only overlap with the simulation domain. Otherwise, they will be missing the bits where ``Solid`` input objects mutually overlap. The latter will show up as additional ``BooleanFragments`` child objects (to be avoided unless they can be assigned a meaningful material). 35 | 5. The Nth ``BooleanFragments`` child object is among the filters and can be selected as a subdomain in the dialog of a particular material. 36 | 37 | ![](img/M9zd7z7hPG.gif) 38 | 39 | ### Analysis: Meshing, Materials and Constraints 40 | 41 | In a minor departure from the first tutorial above, the surface temperature can also be set on all surfaces. Round numbers for temperatures in Kelvin can be used to keep things simple. The rear face which has ``ConstraintFixed`` assigned to it would need to be allowed to expand as well, but for that, an additional object would need to be introduced outside the simulation domain which only provides a fixed face for ``Constraint contact``. 42 | 43 | For brevity, the project file can be downloaded [here](FEM_example_bimetallic_strip.FCStd). 44 | 45 | It has also been found that writing the ccx .inp file can take between 100 and 2000 seconds. It is not clear to the author whether this is a bug, or simply due to a slow, single-threaded implementation, but eventually FreeCAD will un-freeze and the simulation can be started (assuming no errors have been reported). 46 | 47 | The complete Analysis configuration contains selected materials with their corresponding subdomains assigned, constraints on all faces, and in this case, simulation results. 48 | 49 | ![](img/problem_setup.PNG) 50 | 51 | ### further reading 52 | 53 | * "Composite Block" - nested cubes with different materials: https://wiki.freecadweb.org/FEM_Shear_of_a_Composite_Block 54 | -------------------------------------------------------------------------------- /HB100_xband_module/A Deeper Look At HB100 X-Band Modules.md: -------------------------------------------------------------------------------- 1 | HB100 are 10.525+/- 0.005 GHz Doppler radar modules containing a Ba2Ti9O20 dielectric resonator oscillator (DRO) and a single transistor in the receive path for mixing and demodulating. 2 | 3 | Datasheet: [HB100 Datasheet](data/HB100_Microwave_Sensor_Module_Datasheet(1).pdf) 4 | Summary: https://www.electroschematics.com/hb100-microwave-motion-sensor-an-introduction/ 5 | Teardown: https://www.allaboutcircuits.com/news/teardown-tuesday-hb100-doppler-radar-module/ 6 | More detailed analysis of a similar module: http://www.kerrywong.com/2017/09/01/teardown-and-experiments-with-a-doppler-microwave-transceiver/ 7 | 8 | ## Module Overview 9 | 10 | ### Properties and Operating Conditions 11 | 12 | ![](data/Pasted%20image%2020230308202459.png) 13 | 14 | Other values are 37mA (typ), 60 mA (max) mentioned [here](https://www.botnroll.com/en/outros/1032-hb100-miniature-microwave-motion-sensor.html). 15 | 16 | ### Functional Block Diagram 17 | 18 | ![](data/HB100-block-diagram-and-connection-pads.png) 19 | 20 | ### Patch Antennas 21 | 22 | In the elevation direction, two patch antennas (same phase) are stacked on top of each other and spaced such that the beam is squeezed in that direction (40° by 80°). 23 | 24 | ![](data/HB100-outline-diagram-and-antenna-beam-pattern.webp) 25 | 26 | 27 | ## Teardown and Analysis 28 | 29 | ### Circuit Overview 30 | 31 | With the shielding can removed, three RF components are visible. Since a metal plate above the ceramic dielectric cyclinder can be used to tune DROs, operation without the shielding can will not be nominal / detuned. 32 | The blue droplet on the cylinder is probably the initial tuning to absorb manufacturing tolerances. The thick traces at center left and center right are the connections to the patch antennas on the other side. 33 | 34 | ![](data/Lee_doppler_4.jpg) 35 | 36 | Two stripline segments are used to couple to the DRO. The RF transistor forming the oscillator is unlikely to be a bipolar transistor, as the feedback side has a DC connection to GND, with its adjacent pins also connected to the groundplane (solder-filled vias). 37 | 38 | The antenna side is noteworthy for one thing: all vias are either VCC, IF, RX, TX or GND. With no indications for multi-layer construction, this means that G, S and TX have a DC connection to GND and there's no internal bias going to the mixer component. 39 | 40 | ![](data/Pasted%20image%2020230309004734.png) 41 | 42 | ### Oscillator Transistor Identification 43 | 44 | NPN-Transistors (like BFP620FH for operation up to 12 GHz, SiGe:C) would require a bias tee. A typical depletion-mode device for this PCB would be an n-channel jFET. 45 | 46 | The unusual plastic package can be identified as `Micro-X`, in which GaAs [pHEMT](https://en.wikipedia.org/wiki/High-electron-mobility_transistor) FETs are availble for frequencies up to 12 or even 20 / 24 GHz: 47 | 48 | - [ATF35376](https://enigma-shop.com/component/hikashop/product/cid-1120) , [ATF10136](https://www.rf-microwave.com/en/agilent-technologies/atf-10136-tr1/low-noise-gaas-fet/atf-10136/) (HP) 49 | - [NE3515S02](https://www.renesas.com/us/en/general-parts/ne3515s02-low-noise-gaas-fet-hj-fet) (Renesas) 50 | - NE3503M04 (NEC) 51 | - [MGF4963BL](https://www.anglia.com/newsarchive/2696.asp) (Mitsubishi) 52 | - [CE3512K2](https://www.cel.com/documents/datasheets/CE3512K2.pdf) / [[data/CE3512K2.pdf]] , **[CE3520K3](https://www.cel.com/documents/datasheets/CE3520K3.pdf)** (California Eastern Laboratories (CEL), https://www.cel.com/components/phemts/) 53 | 54 | It is likely that HB100 features a CE3512K2. In the image below, some essential aspects of the DRO are overlaid: 55 | - Drain is connected to VCC through a 39R resistor. 56 | - The feedback side (Gate) is biased to GND. 57 | - λ/4 stubs produce HF "open" conditions at their tap-off points (+90° propagation, -180° due to short, +90° propagation). (see [Quarter-wave Tricks](https://www.microwaves101.com/encyclopedias/quarter-wave-tricks) and [Microstrip Open Radial Stub Block](https://space.mit.edu/RADIO/CST_online/mergedProjects/DES/components/block/common/microstripopenradialstubblock.htm)) 58 | - the 45° orientation w.r.t. circuit board weave directions helps average out permittivity fluctuations across the surface and makes the PCB perfromance more reproducible. 59 | 60 | ![](data/HB100_DRO_section.png) 61 | 62 | Mfr. Part # CE3512K2-C1, LCSC Part # C3277289, Mouser 551-CE3512K2-C1, Digikey CE3512K2-C1CT-ND appears to be a plausible match wih a readable "C" and the datasheet mentioning "C5". $0.20 / 1k also seems to be a desirable price point for low-cost production. 63 | ![](data/Pasted%20image%2020230308232524.png) 64 | 65 | [Simulation](https://de.mathworks.com/help/rfpcb/ref/stubradialshunt.html) of the current distribution in a radial stub demonstrating visualizing how it is indeed an HF short circuit: Hardly any current reaches the rear port, while most of it flows along the stub surface: 66 | ![](data/stubradialshunt.png) 67 | 68 | ### Mixer 69 | 70 | - "4R" : OnSemi [MMBV3700](data/MMBV3700LT1-D.pdf) - VHF pin diode across 1-3? Pin 2 not connected. 71 | ![](data/Lee_doppler_10.webp) 72 | 73 | No HF transistors with "4R" marking were found. It could be that it was found that a simple diode would be sufficient to achieve some level of mixing / demodulation. 74 | The two vias left and right of pin 3 go to the GND polygon beneath, while the RX patches and IF output connected to it through another open radial stub are floating, and will be loaded to GND through the IF preamp stage. 75 | 76 | The U-shaped trace probably amounts to a 180° phase shift, and would have allowed a bipolar Doppler waveform to be received, if not for the missing second diode. 77 | 78 | ### Operating Point 79 | 80 | HB100 allegedly has a maximum operating voltage of 5.25V. CK3512K2 has an absolute maximum Drain-Source voltage of 4V. Noting that this device has a junction gate, no positive gate voltages are allowed. 39R in the Drain line seems low, as the transistor typical operating point is specified around Vds ~ 2V, with a maximum dissipation of 125 mW. 81 | 82 | [CE3512K2](https://www.cel.com/documents/datasheets/CE3512K2.pdf) (LCSC # C146230, C3277289): 83 | ![](data/Pasted%20image%2020230309000851.png) 84 | [CE3520K3-C1](https://www.lcsc.com/product-detail/MOSFETs_California-Eastern-Laboratories-CE3520K3-C1_C3288015.html) (LCSC # C3288015): 85 | ![](data/Pasted%20image%2020230309001502.png) 86 | 87 | Which one is more likely to be used? At $0.31/1k, CE3520K3-C1 is still a low-cost part and use is not ruled out. Speculation: Modules might be populated with CE3512K2-C1 or CE3520K3-C1, depending on availability. 88 | 89 | ### Measurements 90 | 91 | A pack of 5 HB100 modules was procured from ebay/AliExpress sellers. It's immediately obvious that different parts are used. 92 | 93 | ![](data/HB100_newrev.png) 94 | Parts: 95 | - "V75" M04 : CEL [NE3503M04](data/NE3503M04.pdf) 12 GHz GaAs HJ-FET 96 | - "XH8" SOT23: Skyworks [SMS7621-006LF](data/SMS7621.pdf) Schottky diode (Reverse Series Pair) 97 | - "A7W" SOT23: NXP [BAV99](data/BAV99_SER.pdf) clamping diodes (1-2 and 2-3, used in anti-parallel configuration). 98 | - gray ceramic cylinder: BaTiO3 ? dielectric resonator for 10.5 GHz 99 | - unpopulated: Zener diode or Schottky diode for reverse polarity and perhaps OVP. 100 | ![](data/Pasted%20image%2020230309165635.png) 101 | 102 | Based on own tests, up to 2.5V (Vds=0.80V) and 34mA, the oscillator does not seem to start. At 2.6V, a drop in operating current to 16 mA was observed. 103 | Without the lid, the board draws 40mA at 3.0V (Vds=1.00V), most likely without oscillation. 104 | 105 | [NE3503M04](data/NE3503M04.pdf): 106 | ![](data/Pasted%20image%2020230309173002.png) 107 | 108 | Just how tiny the structures in such FETs are can be seen below. Process variations aside, there is invariably a difference beween steady-state and instantaneous forward voltages. 109 | ![](data/a-Photograph-of-the-double-channel-HEMT-trough-an-optical-microscope-with-metal-Source.png) 110 | 111 | ## Summary 112 | 113 | HB100 modules contain one 12 GHz GaAs heterojunction FET (pHEMT) used in a barium titanate dielectric resonator oscillator and a package with one or more diodes for mixing / demodulation. Differences in color may indicate BaTiO3, Ba2Ti9O20 \[2\] or other types and additives, which may vary in their dielectric constant and achievable Q factor (3000-8000). 114 | Components were identified by type, package and code, as far as possible. Such investigation always brings up interesting low-cost finds which may inspire other projects and experimentation. 115 | New images of the revised version of HB100 sensors were taken, along with a steel ruler in the same plane, so that it's possible to model the layout and investigate it with FEM or FDTD analysis. 116 | 117 | ## Outlook 118 | 119 | HB100 modules are essentially DROs with the bare minimum in terms of receiver / mixer circuity. They don't need to be fixed frequency oscillators though. \[4\-6\] show another strip line can be coupled to a DR mode such that a varactor diode allows tuning over a few to a few tens of MHz. It might also be possible to attach a tuner PCB on top of the DR cylinder. 120 | 121 | ## References 122 | 123 | 1. Beiki, T., Hosseinipanah, M. Harmonic suppression in short-circuited stub bandpass filter by means of a new miniaturized bandstop filter. _Analog Integr Circ Sig Process_ **96**, 589–596 (2018). https://doi.org/10.1007/s10470-018-1230-5 124 | 2. J. K. PLOURDE; D. F. LINN; H. M. O'BRYAN Jr.; JOHN THOMSON Jr. (1975). Ba2Ti9O20 as a Microwave Dielectric Resonator. , 58(9-10), 418–420. doi:10.1111/j.1151-2916.1975.tb19013.x  125 | 3. Ortolani, Michele & Di Gaspare, A. & Giovine, Ennio & Evangelisti, F. & Foglietti, Vittorio & Doria, A. & Gallerano, Gian Piero & Giovenale, Emilio & Messina, G. & Spassovsky, Ivan & Lanzieri, C. & Peroni, Marco. (2009). Imaging the coupling of terahertz radiation to a high electron mobility transistor in the near-field. Journal of The European Optical Society-rapid Publications - J EUR OPT SOC-RAPID PUBL. 4. 10.2971/jeos.2009.09006. [RG](https://www.researchgate.net/publication/243582888_Imaging_the_coupling_of_terahertz_radiation_to_a_high_electron_mobility_transistor_in_the_near-field) 126 | 4. Won Il Chang Chul Soon Park , "Implementation of a Pldro with a Fractional Multiple Frequency of Reference," _Progress In Electromagnetics Research Letters_, Vol. 46, 13-18, 2014. [doi:10.2528/PIERL14021802](http://dx.doi.org/10.2528/PIERL14021802) [http://www.jpier.org/PIERL/pier.php?paper=14021802](http://www.jpier.org/PIERL/pier.php?paper=14021802) 127 | 5. Jeon, Y., & Bang, S. (2017, July 31). New Configuration of a PLDRO with an Interconnected Dual PLL Structure for K-Band Application. _Journal of electromagnetic engineering and science_. Korean Institute of Electromagnetic Engineering and Science. https://doi.org/10.5515/jkiees.2017.17.3.138 128 | 6. K. W. Lee and W. R. Day, "Varactor Tuned Dielectric Resonator GaAs FET Oscillator in X-Band," _1982 IEEE MTT-S International Microwave Symposium Digest_, Dallas, TX, USA, 1982, pp. 274-276, doi: 10.1109/MWSYM.1982.1130688. 129 | -------------------------------------------------------------------------------- /HB100_xband_module/data/BAV99_SER.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/BAV99_SER.pdf -------------------------------------------------------------------------------- /HB100_xband_module/data/CE3512K2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/CE3512K2.pdf -------------------------------------------------------------------------------- /HB100_xband_module/data/FqtTOLAX0Agxo_i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/FqtTOLAX0Agxo_i.png -------------------------------------------------------------------------------- /HB100_xband_module/data/HB100-block-diagram-and-connection-pads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/HB100-block-diagram-and-connection-pads.png -------------------------------------------------------------------------------- /HB100_xband_module/data/HB100-outline-diagram-and-antenna-beam-pattern.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/HB100-outline-diagram-and-antenna-beam-pattern.webp -------------------------------------------------------------------------------- /HB100_xband_module/data/HB100_DRO_section.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/HB100_DRO_section.png -------------------------------------------------------------------------------- /HB100_xband_module/data/HB100_Microwave_Sensor_Module_Datasheet(1).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/HB100_Microwave_Sensor_Module_Datasheet(1).pdf -------------------------------------------------------------------------------- /HB100_xband_module/data/HB100_newrev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/HB100_newrev.png -------------------------------------------------------------------------------- /HB100_xband_module/data/HB100_newrev_parts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/HB100_newrev_parts.png -------------------------------------------------------------------------------- /HB100_xband_module/data/Lee_doppler_10.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/Lee_doppler_10.webp -------------------------------------------------------------------------------- /HB100_xband_module/data/Lee_doppler_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/Lee_doppler_4.jpg -------------------------------------------------------------------------------- /HB100_xband_module/data/MMBV3700LT1-D.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/MMBV3700LT1-D.pdf -------------------------------------------------------------------------------- /HB100_xband_module/data/NE3503M04.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/NE3503M04.pdf -------------------------------------------------------------------------------- /HB100_xband_module/data/Pasted image 20230308202459.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/Pasted image 20230308202459.png -------------------------------------------------------------------------------- /HB100_xband_module/data/Pasted image 20230308232524.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/Pasted image 20230308232524.png -------------------------------------------------------------------------------- /HB100_xband_module/data/Pasted image 20230308232724.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/Pasted image 20230308232724.png -------------------------------------------------------------------------------- /HB100_xband_module/data/Pasted image 20230309000851.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/Pasted image 20230309000851.png -------------------------------------------------------------------------------- /HB100_xband_module/data/Pasted image 20230309001502.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/Pasted image 20230309001502.png -------------------------------------------------------------------------------- /HB100_xband_module/data/Pasted image 20230309003926.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/Pasted image 20230309003926.png -------------------------------------------------------------------------------- /HB100_xband_module/data/Pasted image 20230309004734.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/Pasted image 20230309004734.png -------------------------------------------------------------------------------- /HB100_xband_module/data/Pasted image 20230309165635.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/Pasted image 20230309165635.png -------------------------------------------------------------------------------- /HB100_xband_module/data/Pasted image 20230309173002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/Pasted image 20230309173002.png -------------------------------------------------------------------------------- /HB100_xband_module/data/SMS7621.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/SMS7621.pdf -------------------------------------------------------------------------------- /HB100_xband_module/data/a-Photograph-of-the-double-channel-HEMT-trough-an-optical-microscope-with-metal-Source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/a-Photograph-of-the-double-channel-HEMT-trough-an-optical-microscope-with-metal-Source.png -------------------------------------------------------------------------------- /HB100_xband_module/data/stubradialshunt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/HB100_xband_module/data/stubradialshunt.png -------------------------------------------------------------------------------- /RPi_enclosure_80x80/cad/insert_125mm_80x80.FCStd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/RPi_enclosure_80x80/cad/insert_125mm_80x80.FCStd -------------------------------------------------------------------------------- /RPi_enclosure_80x80/data/80x80_profile.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 24 | 28 | 29 | 32 | 36 | 37 | 40 | 44 | 45 | 48 | 52 | 53 | 54 | 78 | 85 | 92 | 99 | 106 | 113 | 120 | 121 | 123 | 124 | 126 | image/svg+xml 127 | 129 | 130 | 131 | 132 | 133 | 138 | 141 | 146 | 147 | 150 | 155 | 156 | 159 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /RPi_enclosure_80x80/data/CM4_side.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/RPi_enclosure_80x80/data/CM4_side.jpg -------------------------------------------------------------------------------- /RPi_enclosure_80x80/data/CM4_top.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/RPi_enclosure_80x80/data/CM4_top.jpg -------------------------------------------------------------------------------- /RPi_enclosure_80x80/data/Dold_Mechatronik_Aluminiumprofile_Gesamtkatalog.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/RPi_enclosure_80x80/data/Dold_Mechatronik_Aluminiumprofile_Gesamtkatalog.pdf -------------------------------------------------------------------------------- /RPi_enclosure_80x80/data/GMauB3sXkAA6T2R.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/RPi_enclosure_80x80/data/GMauB3sXkAA6T2R.jpg -------------------------------------------------------------------------------- /RPi_enclosure_80x80/data/ZcwhsuuR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/RPi_enclosure_80x80/data/ZcwhsuuR.jpg -------------------------------------------------------------------------------- /RPi_enclosure_80x80/data/channel_drawing.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/RPi_enclosure_80x80/data/channel_drawing.JPG -------------------------------------------------------------------------------- /RPi_enclosure_80x80/data/channel_iso.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/RPi_enclosure_80x80/data/channel_iso.jpg -------------------------------------------------------------------------------- /RPi_enclosure_80x80/data/corner_sketch.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/RPi_enclosure_80x80/data/corner_sketch.PNG -------------------------------------------------------------------------------- /RPi_enclosure_80x80/data/cover_drawing.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/RPi_enclosure_80x80/data/cover_drawing.JPG -------------------------------------------------------------------------------- /RPi_enclosure_80x80/data/profile.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/RPi_enclosure_80x80/data/profile.PNG -------------------------------------------------------------------------------- /RPi_enclosure_80x80/readme.md: -------------------------------------------------------------------------------- 1 | # RPi enclosure from 80x80 anodized conduit 2 | 3 | 80x80 anodized cable channel profile can be turned into customized enclosure by adding end caps and a PCB carrier insert - the latter of which is provided herein as a design suggestion. 4 | 5 | ![](data/channel_iso.jpg) 6 | 7 | ## Material 8 | 9 | ![](data/channel_drawing.JPG) 10 | [conduit profile source](https://www.dold-mechatronik.de/Kabelkanal-aus-Aluminium-80x80-Zuschnitt) 11 | 12 | 13 | ![](data/cover_drawing.JPG) 14 | [matching cover profile source](https://www.dold-mechatronik.de/Kabelkanal-Deckel-aus-Aluminium-80mm-Zuschnitt) 15 | 16 | ## Design 17 | 18 | As a starting point, the [channel profile](data/80x80_profile.svg) (svg) was extracted from the DOLD Mechatronik [catalogue](data/Dold_Mechatronik_Aluminiumprofile_Gesamtkatalog.pdf) (p.155). 19 | 20 | ![](data/corner_sketch.PNG) 21 | 22 | ![](data/profile.PNG) 23 | [FreeCAD project](cad/insert_125mm_80x80.FCStd) 24 | 25 | 26 | ## Usage Example 27 | 28 | ![](data/CM4_top.jpg) 29 | 30 | ## License 31 | 32 | FreeCAD project: copyright Helge Wurst 2024. 33 | 34 | This source describes Open Hardware and is licensed under the CERN-OHL-S v2. 35 | 36 | You may redistribute and modify this source and make products using it under the terms of the CERN-OHL-S v2 (https://ohwr.org/cern_ohl_s_v2.txt). 37 | 38 | This source is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A PARTICULAR PURPOSE. Please see the CERN-OHL-S v2 for applicable conditions. 39 | 40 | Source location: https://github.com/MisterHW/Notes 41 | 42 | As per CERN-OHL-S v2 section 4, should You produce hardware based on this source, You must where practicable maintain the Source Location visible on the external case of the Gizmo or other products you make using this source. 43 | 44 | ## Changes 45 | 46 | - 2024-05: initial release 47 | -------------------------------------------------------------------------------- /analog_neural_networks/img/80170NX_synapse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/analog_neural_networks/img/80170NX_synapse.png -------------------------------------------------------------------------------- /analog_neural_networks/img/ANN_detector_pyhsics_application.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/analog_neural_networks/img/ANN_detector_pyhsics_application.PNG -------------------------------------------------------------------------------- /analog_neural_networks/img/De14SwBXkAAYcxa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/analog_neural_networks/img/De14SwBXkAAYcxa.jpg -------------------------------------------------------------------------------- /analog_neural_networks/img/De2cBuZW0AAoqX7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/analog_neural_networks/img/De2cBuZW0AAoqX7.jpg -------------------------------------------------------------------------------- /analog_neural_networks/img/DfG0yQBX4AIEl9y.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/analog_neural_networks/img/DfG0yQBX4AIEl9y.jpg -------------------------------------------------------------------------------- /analog_neural_networks/img/PCI-neuro-board_W640.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/analog_neural_networks/img/PCI-neuro-board_W640.jpg -------------------------------------------------------------------------------- /analog_neural_networks/img/proton_pion_detector_patterns.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/analog_neural_networks/img/proton_pion_detector_patterns.PNG -------------------------------------------------------------------------------- /analog_neural_networks/pdf/80170NX.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/analog_neural_networks/pdf/80170NX.pdf -------------------------------------------------------------------------------- /analog_neural_networks/pdf/80170NX_raw.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/analog_neural_networks/pdf/80170NX_raw.pdf -------------------------------------------------------------------------------- /analog_neural_networks/readme.md: -------------------------------------------------------------------------------- 1 | # Analog Neural Networks - The Early Days 2 | 3 | Particle physics experiments are traditionally at the forefront of real-time data processing, with detector systems of ever-increasing density, speed and resolution. It is here where a curious concept for event detection / discrimination based on analog neural networks was evaluated. A [Ring-Imaging Cherenkov Detector (RICH)](https://en.wikipedia.org/wiki/Ring-imaging_Cherenkov_detector) is used for particle type identification when the associated momentum is known, as the angle at which Cherenkov radiation is emitted is related to the particle velocity. 4 | 5 | A system is needed which can evaluate all detector channels in parallel and produce a real-time classification based on the observed angle: 6 | 7 | ![](img/proton_pion_detector_patterns.PNG) 8 | 9 | 30 years later, the sight of an artificial neural network diagram is nothing surprising. Keep in mind though that all of this was built around analog VLSI circuitry. As outputs, the authors implemented voltages indicating the likelihood of the detection corresponding to a pion or proton transit through the detector medium: 10 | 11 | ![](img/ANN_detector_pyhsics_application.PNG) 12 | 13 | The hardware used was an experimental ANN made by Intel, which probably only really saw the light of day in high energy physics laboratories - the Intell 80170NX ETANN. 14 | 15 | ## Intel 80170NX - Electrically Trainable Analog Neural Network (ETANN) 16 | 17 | The amount of documentation and reports of practical applications of the 80170NX is limited. Being an early and obscure device, no datasheet could be found. 18 | 19 | The author was able to procure a copy of the datasheet in paper form. Written by [Warthman Associates](https://www.warthman.com/projects.htm), it is a true testimony to the tradition of technical writing and illustration, and with its unique history, it should be preserved for future generations: 20 | 21 | * [Intel 80170NX datasheet](pdf/80170NX.pdf) (20 MB) 22 | 23 | Here's is a drawing of the synapse implementation and its conceptual representations: 24 | 25 | ![](img/80170NX_synapse.png) 26 | 27 | The key challenge brought about by analog storage of weights with multiple levels is stability of the charge and operating conditions of floating gate MOS transistors. Since this isn't storage of a binary value but rather of a continuous value that needs to stay stable within 1/64 to 1/128 of its range, even 7-8 bit equivalent precision seems ambitious. The fact that this was attempted and had some success at the time is rather remarkable. 28 | 29 | As a side note, this was the time where Polaroid patented the use of EPROM memory as a digital image sensor (United States Patent US4803554). 30 | 31 | ### 80170NX Hardware 32 | 33 | The 80170NX engineering samples came in the usual purple ceramic PGA-208C package with a golden lid on the bottom: 34 | 35 | ![](img/De14SwBXkAAYcxa.jpg) 36 | 37 | Intel also made a training card to be wired up with a wide ribbon cable: 38 | 39 | ![](img/DfG0yQBX4AIEl9y.jpg) 40 | 41 | The training adaptor was sadly lost to the dumpster, but can be seen in FERMILAB-TM-1798: 42 | 43 | ![](img/De2cBuZW0AAoqX7.jpg) 44 | 45 | The ultimate undoing of the ETANN chip and a candidate improvement upon it is described in Eppler et al. on their SAND/1 hardware: 46 | 47 | ![](img/PCI-neuro-board_W640.jpg) 48 | 49 | SAND is manufactured in a 0.8 µm CMOS process, using a sea-of-gates technology with almost 50K Gates. 50 | The packaging of SAND is a PGA with 120 signal-pins. The non-linear activation function is calculated by the 51 | use of a free programmable look-up table allowing for a maximum of flexibility. A controller chip, the memories, 52 | the lookup table and the SAND chip are arranged as a fixed modular unit guaranteeing the tight timing for 53 | up to 50 MHz operation. 54 | There are especially three neuro chips available fulfilling partly similar requirements as SAND: the MA16 of Siemens 55 | [4], CNAPS of Adaptive Solutions [5] and ETANN of Intel [6]. SYNAPSE is a neuro-computer with one MA16. 56 | It is available as PC-board [7]. For industrial applications a stand-alone solution without host computer many other 57 | chips and at least one micro-controller are necessary. CNAPS and ETANN have problems with their low precision. 58 | CNAPS is working with 8 bit accuracy, or 16 bit with less than half the rate. Even worse, the analog ETANN computes 59 | with approximately 6 bit accuracy. Sometimes poor accuracy may be compensated by non-linear data 60 | transformations, but for on-chip training of the neural network a minimal data length of 16 bits seems to be 61 | necessary to find the global optimum (but see special example in [8,9] where 4 bits are shown to be accurate 62 | using tabu search). 63 | 64 | ## References 65 | 66 | * A Study of the Intel ETANN VLSI Neural Network 67 | for an Electron Isolation Trigger. [FERMILAB-TM-1798](https://lss.fnal.gov/archive/test-tm/1000/fermilab-tm-1798.pdf) 68 | * Akkila, T., Francke, T., Lindblad, T., & Eide, Å. (1993). "An analog neural network hardware solution to a Cherenkov ring imaging particle identifier". Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, 327(2-3), 566–572. doi:10.1016/0168-9002(93)90726-x 69 | * https://www.freepatentsonline.com/4803554.html 70 | * Eppler, W., Fischer, T., Gemmeke, H., Koder, T., & Stotzka, R. (1998). "Neural chip SAND/1 for real time pattern recognition". IEEE Transactions on Nuclear Science, 45(4), 1819–1823. doi:10.1109/23.710943 [(ResearchGate)](https://www.researchgate.net/publication/3136208_Neural_chip_SAND1_for_real_time_pattern_recognition) 71 | -------------------------------------------------------------------------------- /current_sensing_polarity_scaling/img/How-does-a-precision-rectifier-figure-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/current_sensing_polarity_scaling/img/How-does-a-precision-rectifier-figure-2.jpg -------------------------------------------------------------------------------- /current_sensing_polarity_scaling/img/abs_current_sensing_dual_scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/current_sensing_polarity_scaling/img/abs_current_sensing_dual_scale.png -------------------------------------------------------------------------------- /current_sensing_polarity_scaling/img/ring_sketch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/current_sensing_polarity_scaling/img/ring_sketch.png -------------------------------------------------------------------------------- /current_sensing_polarity_scaling/readme.md: -------------------------------------------------------------------------------- 1 | # Current-Sensing For Major Source and Minor Sink Currents 2 | 3 | One of those "you got 5 minutes?" questions: How would you solve the following in a low-cost way: 4 | 5 | * A number of boards is connected to a powered ring (24V + RS485 or similar). 6 | * For safety, all boards must monitor the current they draw from the ring. 7 | * One or two boards act as power injectors and have a SMPS connected to them. 8 | * The injected current needs to be monitored as well, and there are MOSFETs to disconnect the supply. 9 | 10 | Making all boards the same, the topology would look like this: 11 | 12 | ![](img/ring_sketch.png) 13 | 14 | The way current sensing is implemented is omitted in the picture above, as there are multiple approaches: 15 | 16 | * high-side current sensing, 17 | * low-side current sensing, and 18 | * non-dissipative current sensing with galvanic isolation. 19 | 20 | As the power supply negative terminal is not tied to the ring negative line, low-side current sensing can be implemented. 21 | 22 | ## A Simple Solution 23 | 24 | Now imagine the board either draws 50 mA (200 mA peak), or injects 2 A. When the current direction / polarity is acquired separately, the remaining challenge is to scale 200 mA sink and 2 A source currents to the same ADC range. 25 | 26 | After some back and forth, a circuit derived from the "precision rectifier" opamp circuit became the solution of choice \[1\]: 27 | ![](img/How-does-a-precision-rectifier-figure-2.jpg) 28 | 29 | The circuit shown below reacts to negative shunt voltages like an inverting buffer with a programmed gain of R4/R1. 30 | 31 | Positive shunt voltages with respect ot circuit ground however cause the diode D1 to be reverse biased and essentially no current will flow. Thus, positive shunt voltages are measures with unity gain at this stage. The second opamp stage then provides adequate scaling to the range of the ADC used: 32 | 33 | ![](img/abs_current_sensing_dual_scale.png) 34 | 35 | R6 and R7 are approximate compensation resistors, the voltage drop across which would need to match that of the complementary input connected to a voltage source with a Thévenin equivalent series resistance. Due to different conditions in positive and negative shunt voltage cases and the need to consolidate the bill of materials (and adding to that the low value of 100 Ohm to 1 kOhm), approximate values should be fine. 36 | 37 | There are some non-linearities when the current changes polarity, but this is not the intended use case, as the role of the board is hard-wired. Changes in current direction are only expected during shutdown and fault events, where capacitors on one of the boards discharge into the ring. 38 | 39 | LT1498 was chosen for simulation purposes. Coming in at 20 times the price and 10 times the bandwidth of MCP6006 or MCP6007 (dual package), it is not really necessary for this application. 40 | 41 | 42 | ## References 43 | 44 | 1. https://www.analogictips.com/how-does-a-precision-rectifier-work-faq/ -------------------------------------------------------------------------------- /current_sensing_polarity_scaling/spice/MCP6006_D.lib: -------------------------------------------------------------------------------- 1 | ******************************************************************************** 2 | * Software License Agreement * 3 | * * 4 | * The software supplied herewith by Microchip Technology Incorporated (the * 5 | * 'Company') is intended and supplied to you, the Company's customer, for use * 6 | * solely and exclusively on Microchip products. * 7 | * * 8 | * The software is owned by the Company and/or its supplier, and is protected * 9 | * under applicable copyright laws. All rights are reserved. Any use in * 10 | * violation of the foregoing restrictions may subject the user to criminal * 11 | * sanctions under applicable laws, as well as to civil liability for the * 12 | * breach of the terms and conditions of this license. * 13 | * * 14 | * THIS SOFTWARE IS PROVIDED IN AN 'AS IS' CONDITION. NO WARRANTIES, WHETHER * 15 | * EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED * 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO * 17 | * THIS SOFTWARE. THE COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR * 18 | * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. * 19 | ************************************************************************* 20 | .SUBCKT MCP6006 1 2 3 4 5 21 | * | | | | | 22 | * | | | | Output 23 | * | | | Negative Supply 24 | * | | Positive Supply 25 | * | Inverting Input 26 | * Non-inverting Input 27 | * 28 | * 29 | * The following op-amps are covered by this model: 30 | * MCP6006/6R/6U/7/9 31 | * 32 | * Date of model creation: 10-16-2020_9:37:12_AM 33 | * Level of Model Creator: MCP6006_1P00 / 10-14-20 34 | * 35 | * Revision History: 36 | * REV A: 5-Oct-20, Initial Input 37 | * REV B: 14-Oct-20, Corrected VCM+, CM/DM, Noise 38 | * REV C: 15-Oct-20, Updated VCM- 39 | * REV D: 16-Oct-20, Updated RINCM/ZIN 40 | * 41 | * 42 | * Recommendations: 43 | * Use PSPICE (or SPICE 2G6; other simulators may require translation) 44 | * For a quick, effective design, use a combination of: data sheet 45 | * specs, bench testing, and simulations with this macromodel 46 | * For high impedance circuits, set GMIN=100F in the .OPTIONS statement 47 | * 48 | * Supported: 49 | * Typical performance for temperature range (-40 to 125) degrees Celsius 50 | * DC, AC, Transient, and Noise analyses. 51 | * Most specs, including: offsets, DC PSRR, DC CMRR, input impedance, 52 | * open loop gain, voltage ranges, supply current, ... , etc. 53 | * Temperature effects for Ibias, Iquiescent, Iout short circuit 54 | * current, Vsat on both rails, Slew Rate vs. Temp and P.S. 55 | * 56 | * Not Supported: 57 | * Some Variation in specs vs. Power Supply Voltage 58 | * Vos distribution, Ib distribution for Monte Carlo 59 | * Distortion (detailed non-linear behavior) 60 | * Some Temperature analysis 61 | * Process variation 62 | * Behavior outside normal operating region 63 | * 64 | * Known Discrepancies in Model vs. Datasheet: 65 | * 66 | * 67 | * 68 | * EMI Stage 69 | * 70 | RF1 1 1A 304 71 | RF2 2 2A 304 72 | RF3 1A 1B 304 73 | RF4 2A 2B 304 74 | CF1 1A 4 3E-12 75 | CF2 4 2A 3E-12 76 | CF3 1B 4 3E-12 77 | CF4 4 2B 3E-12 78 | * 79 | * Input Stage 80 | * 81 | V10 3 10 -500M 82 | R10 10 11 69.0K 83 | R11 10 12 69.0K 84 | G10 10 11 10 11 1.44M 85 | G11 10 12 10 12 1.44M 86 | C11 11 12 115E-15 87 | C13 1B 2B 1.00P 88 | E12 71 14 VALUE { (-200U) + V(20) * 3.83 + V(21) * 3.83 + V(22) * 3.83 + V(23) * 3.83 } 89 | 90 | * Generate Input Bias 1 and 2 and Input Offset 91 | EG12 VIBIAS 0 62 0 1 92 | EG13 VIBIOS 0 63 0 1 93 | 94 | * Calculate IB1 and IB2 based on IOS 95 | EIB1 VIB1 0 VALUE { (V(VIBIAS)+V(VIBIOS)) /2 } 96 | EIB2 VIB2 0 VALUE { (V(VIBIAS)-V(VIBIOS)) /2 } 97 | 98 | * Convert Voltage to Current on Pins 1 and 2 99 | GIB1 1B 0 VIB1 0 1u 100 | GIB2 2B 0 VIB2 0 1u 101 | 102 | M12 11 14 15 15 NMI 103 | M14 12 2B 15 15 NMI 104 | I15 15 4 500U 105 | V16 16 4 -295M 106 | GD16 16 1B TABLE { V(16,1B) } ((-100,-50.0E-15)(0,0)(1m,1u)(2m,1m)) 107 | V13 3 13 -300M 108 | GD13 2B 13 TABLE { V(2B,13) } ((-100,-50.0E-15)(0,0)(1m,1u)(2m,1m)) 109 | R71 1B 0 20.0E12 110 | R72 2B 0 20.0E12 111 | R73 1B 2B 10.0E12 112 | * 113 | * Noise 114 | * 115 | I20 21 20 1.00 116 | D20 20 0 DN1 117 | D21 0 21 DN1 118 | I22 22 23 1N 119 | R22 22 0 1k 120 | R23 0 23 1k 121 | * 122 | * Open Loop Gain, Slew Rate 123 | * 124 | G30 0 30 TABLE { V(12, 11) } ((-5.5,-11)(-0.1,-0.1)(0,0)(0.1,0.1)(5.5,11)) 125 | R30 30 0 1.00K 126 | G31 0 31 3 4 65.6 127 | I31 0 31 DC -88.0 128 | R31 31 0 1 129 | E_VDDMAX VDE 0 3 4 1 130 | V_VDD1 31VDD1 0 1.8 131 | V_VDD2 31VDD2 0 5.5 132 | G_ABMII2 0 31B VALUE { V(31)*(LIMIT(((V(31VDD1)-V(VDE))/(V(31VDD1)-V(31VDD2))), 0, 1))} 133 | R_R3 31A 0 1 TC=3.87M, 8.02U 134 | G_ABMII1 0 31A VALUE { V(31)*(LIMIT(((V(VDE)-V(31VDD2))/(V(31VDD1)-V(31VDD2))), 0, 1))} 135 | G_G6 30 31C TABLE { V(30, 31C) } ((-100,-1n)(0,0)(1m,0.1)(101m,190.1)) 136 | E_ABM1 31C 0 VALUE { (V(31A) + V(31B)) } 137 | R_R8 31B 0 1 TC=188U, -6.06U 138 | G32 32 0 3 4 57.9 139 | I32 32 0 DC -31.4 140 | R32 32 0 1 141 | G_ABMII22 32B 0 VALUE { V(32)*(LIMIT(((V(31VDD1)-V(VDE))/(V(31VDD1)-V(31VDD2))), 0, 1))} 142 | R_R23 32A 0 1 TC=2.74M, -5.17U 143 | G_ABMII21 32A 0 VALUE { V(32)*(LIMIT(((V(VDE)-V(31VDD2))/(V(31VDD1)-V(31VDD2))), 0, 1))} 144 | G_G26 32C 30 TABLE { V(30, 32C) } ((-101m,190.1)(-1m,0.1)(0,0)(100,-1n)) 145 | E_ABM21 0 32C VALUE { (V(32A) + V(32B)) } 146 | R_R28 32B 0 1 TC=-1.70M, -2.85U 147 | G6 0 33 30 0 1m 148 | R6 33 0 1K 149 | * 150 | * 1st Order Pole 151 | * 152 | G34 0 34 33 0 2.37 153 | R34 34 0 1K 154 | C34 34 0 300U 155 | * 156 | * 2nd Order Pole 157 | * 158 | G37 0 37 34 0 1m 159 | R37 37 0 1K 160 | C37 37 0 10.6P 161 | * 162 | * 3rd Order Pole 163 | * 164 | G377A 0 377A 37 0 1m 165 | R377A 377A 0 1K 166 | C377A 377A 0 159E-15 167 | * 168 | * 1st Order Zero 169 | * 170 | G38 0 38 377A 0 1m 171 | GR38 39 0 39 0 1m 172 | RR38 39 0 100G 173 | L38 38 39 159N 174 | * 175 | * 2nd Order Zero 176 | * 177 | G38A 0 38A 38 0 1m 178 | GR38A 39A 0 39A 0 1m 179 | RR38A 39A 0 100G 180 | L38A 38A 39A 159N 181 | E38 35 0 38A 0 1 182 | * 183 | * Output Stage 184 | * 185 | R80 50 0 100MEG 186 | G50 0 50 57 96 2 187 | R58 57 96 0.50 188 | R57 57 0 1.5K 189 | * PSRR / CMRR 190 | G57 0 57 VALUE { V(35) * 666U + V(118) + V(127) + V(137) } 191 | * 192 | * 193 | * PSRR Plus Gain and GBWP Pole Neutralization and Wave Shaping 194 | * 195 | * G30 THE DC GAIN FOR +PSRR 196 | G110 0 110 3 0 28.1U 197 | * ADD POLE TO NEUTRALIZE GBWP ZERO 198 | R110 110 0 10T 199 | GR110 110 0 110 0 1M 200 | C110 110 0 300U 201 | * 202 | * 203 | * PSRR Plus Pole 204 | * 205 | G111 0 111 110 0 1 206 | L111 111 112 3.53M 207 | R112 112 0 10T 208 | GR112 112 0 112 0 1 209 | * 210 | * PSRR Plus Zero 211 | * 212 | G114 0 114 111 0 1 213 | R114 114 0 10T 214 | C114 114 0 244N 215 | GR114 114 0 114 0 1 216 | * 217 | * PSRR Plus 2nd Pole 218 | * 219 | G115 0 115 114 0 1 220 | L115 115 116 79.6N 221 | R116 116 0 1G 222 | GR116 116 0 116 0 1 223 | * 224 | * PSRR Plus 2nd Zero 225 | * 226 | G117 0 117 115 0 1 227 | R117 117 0 1G 228 | C117 117 0 15.9P 229 | GR117 117 0 117 0 1 230 | * 231 | * PSRR Plus 3rd Pole 232 | * 233 | G118 0 118 117 0 1 234 | L118 118 119 79.6N 235 | R119 119 0 1G 236 | GR119 119 0 119 0 1 237 | * 238 | * PSRR Minus Gain and GBWP Pole Neutralization and Wave Shaping 239 | * 240 | * G40 THE DC GAIN FOR -PSRR 241 | G120 0 120 4 0 28.1U 242 | * ADD POLE TO NEUTRALIZE GBWP ZERO 243 | R120 120 0 10T 244 | GR120 120 0 120 0 1M 245 | C120 120 0 300U 246 | * 247 | * 248 | * PSRR Minus Pole 249 | * 250 | G121 0 121 120 0 1 251 | L121 121 122 3.53M 252 | R122 122 0 10T 253 | GR122 122 0 122 0 1 254 | * 255 | * PSRR Minus Zero 256 | * 257 | G124 0 124 121 0 1 258 | R124 124 0 10T 259 | C124 124 0 244N 260 | GR124 124 0 124 0 1 261 | * 262 | * PSRR Minus 2nd Pole 263 | * 264 | G125 0 125 124 0 1 265 | L125 125 126 79.6N 266 | R126 126 0 1G 267 | GR126 126 0 126 0 1 268 | * 269 | * PSRR Minus 2nd Zero 270 | * 271 | G1217 0 127 125 0 1 272 | R127 127 0 1G 273 | C127 127 0 15.9P 274 | GR127 127 0 127 0 1 275 | * 276 | * CMRR Gain and GBWP Pole Neutralization and Wave Shaping 277 | * 278 | * G50 THE DC GAIN FOR CMRR 279 | G130 0 130 VALUE { ( V(15) ) * 4.99U} 280 | * Add Zero To Neutralize GBWP Pole 281 | R130 130 0 1G 282 | GR130 130 0 130 0 1m 283 | C130 130 0 300U 284 | * 285 | * 286 | * CMRR Pole 287 | * 288 | G131 0 131 130 0 1 289 | L131 131 132 1.59M 290 | R132 132 0 1G 291 | GR132 132 0 132 0 1 292 | * 293 | * CMRR Zero 294 | * 295 | G133 0 133 131 0 1 296 | R133 133 0 1G 297 | C133 133 0 1.76U 298 | GR133 133 0 133 0 1 299 | * 300 | * CMRR 2nd Pole 301 | * 302 | G134 0 134 133 0 1 303 | L134 134 135 159P 304 | R135 135 0 1G 305 | GR135 135 0 135 0 1 306 | * 307 | * CMRR 2nd Zero 308 | * 309 | G137 0 137 134 0 1 310 | R137 137 0 1G 311 | C137 137 0 159P 312 | GR137 137 0 137 0 1 313 | * 314 | GD55 55 57 TABLE { V(55,57) } ((-0.2m,-400)(-0.1m,-1m)(0,0)(10,1n)) 315 | GD56 57 56 TABLE { V(57,56) } ((-0.2m,-400)(-0.1m,-1m)(0,0)(10,1n)) 316 | E55 55 0 VALUE { 0.00 + V(3) * 1 + V(51) * -23.7M } 317 | E56 56 0 VALUE { 0.00 + V(4) * 1 + V(52) * -21.2M } 318 | R51 51 0 1k 319 | R52 52 0 1k 320 | GD51 50 51 TABLE { V(50,51) } ((-10,-1n)(0,0)(1m,1m)(2m,1)) 321 | GD52 50 52 TABLE { V(50,52) } ((-2m,-1)(-1m,-1m)(0,0)(10,1n)) 322 | G53 3 0 VALUE { -500U + V(51) * 1M } 323 | G54 0 4 VALUE { -500U + V(52) * -1M } 324 | * 325 | * Current Limit 326 | * 327 | GD98A 98 98A TABLE { V(98,98A) } ((-3m,-1000)(-2m,-10)(-1m,-1)(0,0)(1,1n)) 328 | GD98B 98 98B TABLE { V(98,98B) } ((-1,-1n)(0,0)(1m,1)(2m,10)(3m,1000)) 329 | R98A 0 98A 1 TC=-857U,-1.66U 330 | R98B 0 98B 1 TC=-3.01M,-461N 331 | R98 98 0 1G 332 | G99 96 5 99 0 1 333 | G97 0 98 TABLE { V(96,5) } ((-11.0,-1.00M)(-1.00M,-990U)(0,0)(1.00M,990U)(11.0,1.00M)) 334 | E97 99 0 VALUE { V(98) * LIMIT((( V(3) - V(4) ) * 6.19 + -4.57), 0.00, 1E6 ) * LIMIT((( V(3) - V(4) ) * 5.00 + -3.5), 0, 1) } 335 | D98 4 5 DESD 336 | D99 5 3 DESD 337 | * 338 | * Temperature / Voltage Sensitive IQuiscent 339 | * 340 | R61 0 61 1 TC=437U,-2.12U 341 | G61 3 4 61 0 1 342 | G60 0 61 TABLE { V(3, 4) } ((0, 0)(600M,489N)(1.00,28.0U)(1.15,35.0U)(1.25,40.0U)(1.45,48.0U)(2.00,48.2U) 343 | + (3.5,48.7U)(4.00,48.9U)(6.00,49.0U)) 344 | * 345 | * Temperature Sensitive offset voltage 346 | * 347 | I73 0 70 DC 1 348 | R74 0 70 1 TC=600N 349 | E75 1B 71 VALUE {V(70)-1} 350 | * 351 | * Temp Sensistive IBias 352 | * 353 | I62 0 62 DC 1uA 354 | R62 622 62 REXP 4.66458 355 | R622 0 622 REXP_2 6.08958M 356 | * 357 | * Temp Sensistive Offset IBias 358 | * 359 | I63 0 63 DC 1uA 360 | R63 0 63 5.5 TC=-3.81M,-36.7U 361 | * 362 | * 363 | G57X 0 57X VALUE { V(35) * 666U + V(118) + V(127) + V(137) } 364 | R57X 57X 0 1.5K 365 | G35X 33 0 TABLE { V(57X,3) } ((-1,-1p)(0,0)(50M,1n)(375.0,1)) 366 | G36X 33 0 TABLE { V(57X,4) } ((-375.0,-1)(-50M,-1n)(0,0)(1,1p)) 367 | * 368 | * Models 369 | .MODEL NMI NMOS(L=2.00U W=42.0U KP=200U LEVEL=1 ) 370 | .MODEL DESD D N=1 IS=1.00E-15 371 | .MODEL DN1 D IS=1P KF=5.00P AF=1 372 | .MODEL REXP RES TCE=-497.70342M 373 | .MODEL REXP_2 RES TCE= 11.00975 374 | .ENDS MCP6006 375 | 376 | 377 | 378 | 379 | -------------------------------------------------------------------------------- /current_sensing_polarity_scaling/spice/bipolar LS current monitor.asc: -------------------------------------------------------------------------------- 1 | Version 4 2 | SHEET 1 880 944 3 | WIRE 16 160 -192 160 4 | WIRE -192 224 -192 160 5 | WIRE 16 240 16 160 6 | WIRE 16 240 -16 240 7 | WIRE -80 256 -128 256 8 | WIRE -128 272 -128 256 9 | WIRE 160 272 -16 272 10 | WIRE 208 272 160 272 11 | WIRE 304 272 272 272 12 | WIRE 160 304 160 272 13 | WIRE 304 320 304 272 14 | WIRE 272 352 256 352 15 | WIRE 480 352 336 352 16 | WIRE -192 384 -192 304 17 | WIRE -128 384 -128 352 18 | WIRE -128 384 -192 384 19 | WIRE -128 416 -128 384 20 | WIRE 160 432 160 384 21 | WIRE 288 432 288 384 22 | WIRE 288 432 160 432 23 | WIRE 320 432 320 384 24 | WIRE 352 432 320 432 25 | WIRE 480 432 480 352 26 | WIRE 480 432 432 432 27 | WIRE 160 480 160 432 28 | WIRE 480 496 480 432 29 | WIRE -128 528 -128 496 30 | WIRE 560 560 208 560 31 | WIRE 560 576 560 560 32 | WIRE 160 624 160 560 33 | WIRE 256 624 160 624 34 | WIRE 288 624 256 624 35 | WIRE 480 624 368 624 36 | WIRE 480 688 480 624 37 | WIRE 560 688 560 656 38 | WIRE 208 720 208 560 39 | WIRE 208 720 -176 720 40 | WIRE 368 720 208 720 41 | WIRE -176 752 -176 720 42 | WIRE -176 864 -176 832 43 | WIRE 160 864 160 624 44 | WIRE 160 864 -176 864 45 | WIRE 368 864 160 864 46 | FLAG 480 176 0 47 | FLAG 480 496 0 48 | FLAG 480 96 VCC 49 | FLAG 256 352 VCC 50 | FLAG 480 688 0 51 | FLAG 560 688 0 52 | FLAG 256 624 SHUNT 53 | FLAG -48 224 VCC 54 | FLAG -48 288 0 55 | FLAG -128 528 0 56 | FLAG -128 256 OUT 57 | FLAG 160 432 N1 58 | FLAG 160 272 N2 59 | SYMBOL res 176 464 M0 60 | SYMATTR InstName R1 61 | SYMATTR Value 100 62 | SYMBOL res 384 608 R90 63 | WINDOW 0 0 56 VBottom 2 64 | WINDOW 3 32 56 VTop 2 65 | SYMATTR InstName R3 66 | SYMATTR Value 0.1 67 | SYMBOL voltage 480 80 R0 68 | WINDOW 123 0 0 Left 0 69 | WINDOW 39 24 124 Left 2 70 | SYMATTR SpiceLine Rser=0.01 71 | SYMATTR InstName V1 72 | SYMATTR Value 5 73 | SYMBOL current 560 656 M180 74 | WINDOW 123 0 0 Left 0 75 | WINDOW 39 0 0 Left 0 76 | SYMATTR InstName I_src_sink 77 | SYMATTR Value SINE(0 0.2 1k) 78 | SYMBOL res 176 288 M0 79 | SYMATTR InstName R4 80 | SYMATTR Value 1k 81 | SYMBOL res -144 256 R0 82 | SYMATTR InstName R2 83 | SYMATTR Value 1k 84 | SYMBOL res -144 400 R0 85 | SYMATTR InstName R5 86 | SYMATTR Value 100 87 | SYMBOL res 448 416 R90 88 | WINDOW 0 59 54 VBottom 2 89 | WINDOW 3 65 56 VTop 2 90 | SYMATTR InstName R7 91 | SYMATTR Value 100 92 | SYMBOL diode 272 256 R90 93 | WINDOW 0 -42 34 VBottom 2 94 | WINDOW 3 -38 33 VTop 2 95 | SYMATTR InstName D1 96 | SYMATTR Value 1N4148 97 | SYMBOL Opamps\\LT1498 -48 192 M0 98 | WINDOW 3 -53 138 Left 2 99 | SYMATTR InstName U3 100 | SYMBOL Opamps\\LT1498 240 352 R270 101 | SYMATTR InstName U4 102 | SYMBOL voltage -176 736 R0 103 | WINDOW 123 0 0 Left 0 104 | WINDOW 39 0 0 Left 0 105 | SYMATTR InstName V_ring 106 | SYMATTR Value 24 107 | SYMBOL res -176 208 M0 108 | SYMATTR InstName R6 109 | SYMATTR Value 1k 110 | TEXT 440 256 Left 2 !.tran 0 10m 0 startup 111 | TEXT -176 -8 Left 2 ;bipolar low-side current monitor\nwith abs() output\nbased on ideal diode 112 | TEXT 96 512 Right 2 ;R4/R1 to change \nrelative scaling of \npositive vs. negative \nhalf-waves 113 | TEXT 200 -16 Left 2 ;.lib MCP6006_D.lib 114 | TEXT 200 16 Left 2 ;.OPTIONS GMIN=100F 115 | TEXT -176 880 Left 1 ;HW-2021-10 116 | TEXT 376 856 Left 2 ;... 117 | TEXT 376 712 Left 2 ;... 118 | -------------------------------------------------------------------------------- /sinter_film/img/Drahtbonden_Fraunhofer_IZM_komp-748x375.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/img/Drahtbonden_Fraunhofer_IZM_komp-748x375.jpg -------------------------------------------------------------------------------- /sinter_film/img/FZKKe8aX0AAXkhe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/img/FZKKe8aX0AAXkhe.jpg -------------------------------------------------------------------------------- /sinter_film/img/HlZv5Jzsr5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/img/HlZv5Jzsr5.gif -------------------------------------------------------------------------------- /sinter_film/img/basic_polyhedron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/img/basic_polyhedron.png -------------------------------------------------------------------------------- /sinter_film/img/constriction_resistance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/img/constriction_resistance.png -------------------------------------------------------------------------------- /sinter_film/img/eppor_pack_egg_tray.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/img/eppor_pack_egg_tray.jpg -------------------------------------------------------------------------------- /sinter_film/img/mesh_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/img/mesh_settings.png -------------------------------------------------------------------------------- /sinter_film/img/minkowski_operand_diagram.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/img/minkowski_operand_diagram.jpg -------------------------------------------------------------------------------- /sinter_film/img/paper_mockup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/img/paper_mockup.gif -------------------------------------------------------------------------------- /sinter_film/img/photo_2022-07-06_10-55-38.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/img/photo_2022-07-06_10-55-38.jpg -------------------------------------------------------------------------------- /sinter_film/img/photo_2022-07-06_10-55-54s.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/img/photo_2022-07-06_10-55-54s.jpg -------------------------------------------------------------------------------- /sinter_film/img/wedge_bond.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/img/wedge_bond.jpg -------------------------------------------------------------------------------- /sinter_film/model and analysis/WovenDesign_CubeMinkowski-solved.FCStd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/model and analysis/WovenDesign_CubeMinkowski-solved.FCStd -------------------------------------------------------------------------------- /sinter_film/model and analysis/woven_design_forming_tool_cubemin.scad: -------------------------------------------------------------------------------- 1 | d = 0.4; // draft offset 2 | g = 0.04; // gap/2 3 | 4 | pitch = 4 + 4*d + 4*g; 5 | 6 | pts = [ 7 | // top 8 | [-0.5, 1.5, 1],[0.5, 1.5, 1], // 0 1 9 | 10 | [-0.5,-1.5, 1],[0.5,-1.5, 1], // 2 3 11 | // bottom 12 | [-1.5+g,1.5+d, 0], [1.5-g,1.5+d, 0], // 4 5 13 | [-0.5-d, 1.5, 0], [0.5+d, 1.5, 0], // 6 7 14 | 15 | [-0.5-d,-1.5, 0], [0.5+d,-1.5, 0], // 8 9 16 | [-1.5+g,-1.5-d, 0], [1.5-g,-1.5-d, 0] // 10 11 17 | ]; 18 | 19 | 20 | faces = [ // orientation: CW when looking at a face from outside 21 | [0, 1, 3, 2], 22 | [4, 5, 1, 0], 23 | [1, 5, 7], 24 | [3, 1, 7, 9], 25 | [3, 9, 11], 26 | [2, 3, 11, 10], 27 | [2, 10, 8], 28 | [6, 0, 2, 8], 29 | [0, 6, 4], 30 | [4, 6, 8, 10, 11, 9, 7, 5] 31 | ]; 32 | 33 | 34 | module tool_unit_cell(){ 35 | for ( i = [0:1:3] ) 36 | rotate([0,0,90*i]) 37 | translate([-1-d-g,-1-d-g,0]) 38 | polyhedron(pts, faces, convexity=2); 39 | } 40 | 41 | module solid_tool(nx = 1, ny = 1, plate_thickness=[0,0,1]){ 42 | union(){ 43 | for (y = [0:1:(ny-1)]) 44 | for (x = [0:1:(nx-1)]) 45 | translate([(x+0.5)*pitch+d+g, (y+0.5)*pitch+d+g, 0]) 46 | tool_unit_cell(); 47 | 48 | translate([-plate_thickness[0], -plate_thickness[1], 1E-3-plate_thickness[2]]) 49 | cube([ 50 | nx*pitch+2*d+2*g+2*plate_thickness[0], 51 | ny*pitch+2*d+2*g+2*plate_thickness[1], 52 | plate_thickness[2] 53 | ]); 54 | } 55 | } 56 | 57 | 58 | 59 | 60 | module device(){ 61 | n_x = 2; 62 | n_y = 2; 63 | difference(){ 64 | minkowski(convexity=8){ 65 | solid_tool(n_x, n_y, plate_thickness=[0.2,0.2,1]); 66 | // sphere(r=0.1, $fn=4); 67 | cube(0.1, center=true); 68 | }; 69 | solid_tool(n_x, n_y, plate_thickness=[1,1,2]); 70 | } 71 | } 72 | 73 | difference(){ 74 | device(); 75 | // cube([10,10,10], center=true); 76 | } 77 | 78 | 79 | -------------------------------------------------------------------------------- /sinter_film/model and analysis/woven_design_forming_tool_cubemin.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/sinter_film/model and analysis/woven_design_forming_tool_cubemin.stl -------------------------------------------------------------------------------- /sinter_film/readme.md: -------------------------------------------------------------------------------- 1 | # FEM Simulation of Huffman's Rectangular Woven Origami Design 2 | 3 | ... and its application in power electronics packaging. 4 | 5 | ## The Problem 6 | 7 | Top-side die attach is the process of joining a semiconductor device - generally having a low coefficient of thermal expansion (silicon: CTE = 2.6 ppm/K) - to an electric conductor. 8 | Barring graphene and carbon nanotubes with near-zero CTE, the conductor is a soft metal - mostly Al (CTE = 23 ppm/K). 9 | 10 | Over their mission profiles, power electronics packaging must ensure the mechanical integrity and proper cooling of the power semiconductors it contains. 11 | 12 | The requirements include: 13 | 14 | * No damage to gate dielectric and metalization. 15 | * Ability to carry nominal currents with acceptable heating. 16 | * Ability to withstand surge currents. 17 | * Low inductance. 18 | * For DSC designs: Top-side heat extraction to a planar interface (lateral heat spreader, DCB). 19 | 20 | 21 | ### Contacts And Their Properties 22 | 23 | Liquid metals aside, the selection of distinct top-side die-attach processes is limited: 24 | 25 | * **Wire bonding**: highly mismatched CTE is made up for by small bond foot width and height. Failure occurs through bond wire breakage, heel cracking and interfacial cracking followed by bond detachment. 26 | * **Soldering**: stress relaxation happens in the bulk of the solder joint. High homologous temperature. Creep-fatigue through grain boundary sliding, void formation. 27 | * **Press-pack packaging**: shear stress is limited through strain buffers with low CTE (Mo, W, MoCu, small device can accept Cu contacts) and metalizations (Rh, Pd) which minimize adhesion and frictional wear. Packages are potted with soft compounds or hermetically sealed to minimize oxidation. 28 | * **Transient Liquid-Phase** Bonding: Formation of an intermetallic compound layer at low temperature where a solder alloy is liquid and contains solids of non-alloy elements. The resulting joint is a composite material with higher melting point than the transient liquid phase. Advantage: lower temperature where the structure is mechanically neutral. [Failure of TLPS layers](https://doi.org/10.4271/2014-01-0797) can be comparable to solder layers and benefits from reduced CTE of composite substrates. 29 | * **Low-temperature sintering**: Ag, Cu, Ni, Au pressureless nanoparticle sintering or pressure-assisted sintering of micron and sub-micron particles. Generally characterized by high homologous temperature, moderate CTE and reduced Young's modulus of porous structures when compared to bulk metals. 30 | 31 | In the scope of this writing, wire bonding is perhaps the most relevant structural approach, as the bond foot width of 200-300 µm and height (500-800 µm) are relevant for the following dicsussion. The material is usually Al, but bonding with Cu core Al wire and pure Cu is also demonstrated. Proper top-side metalization remains a challenge though, as the bond forces needed for Cu wire can cause chip damage. 32 | 33 | A typical Wedge bond ([source](https://www.knowlescapacitors.com/getattachment/Products/Capacitors/Single-Layer-Capacitor/SLC-High-Reliability/V-Series/Wirebonding-Application-Notes.pdf)): 34 | 35 | ![](img/wedge_bond.jpg) 36 | 37 | Soldered and (Ag)-sintered bottoms-side die-attach layers experience crack formation and delamination starting at the outermost corners when subjected to thermal cycling stresses, even when bonded to DCBs with a reduced net coefficient of thermal expansion at the die attach-substrate bond line. Delamination also starts at the outer edges of DCB substrates soldered to baseplates, propagading inwards thoughout the device lifetime. 38 | 39 | ## The Structural Solution 40 | 41 | When combining 42 | * the large-area contact of top-side sintered bond buffer layers and 43 | * the sub-mm contact points of thick Cu wire bonding, 44 | 45 | there is probably a confluence worth exploring which delivers both high heat removal capability and the ability to limit peak shear stress. Instead of wire bonds, pillars of sintered material could be envisioned. 46 | 47 | These pillars could come in the shape of triangles, squares, retangles or hexagons and tile the top-side with small gaps. Such structures would both allow a reduction of shear modulus and allow for lateral thermal expansion of the layer into itself. 48 | 49 | Challenges when realizing such structures are: 50 | 51 | * Wet and runny sintering pastes (due to solvents wetting the substrate) require multiple printing operations with drying periods in between them. Re-aligning of the stencils is an added effort and stacked printed layers may come with minimum draft angle requirements / stepping. 52 | * Pressure-assisted sintering can cause high-aspect-ratio columns to crumble due to lack of side support, in the same way squeeze-out can be observed when pastes are not fully dried. 53 | * While Ag pastes can tolerate some degree of oxidation, Cu paste bonding ability is drastically reduced in the presence of oxygen during sintering. Pressureless-sintered, porous structures may also be more susceptible to internal oxidation and premature failure. 54 | 55 | ### Patterned Foils 56 | 57 | Instead of forming a continuous sintered die-attach layer, inserting a patterned metal foil at the interface between the chip surface and the sintering material seems to be a possible approach. 58 | 59 | The foil would have folds protruding upwards which would embed small gaps in the sintered layer above, forming the columns we're looking for. Foil surface texture and orientation should prevent the gap walls from sintering together. 60 | 61 | While a very thin printed film of pressureless-sintered material would be needed to bond the foil to the top-side chip metalization, once in place the foil could help keep a much thicker layer of Cu paste in place and allow it to dry without forming cracks or flaking off due to contraction. The filling ability could be pre-evaulated by etching thick Cu foil and trying to fill the etched pockets with paste. 62 | 63 | **Which foil pattern would be suitable?** 64 | 65 | Considerations: 66 | 67 | * Structure needs to have flat contact surfaces on one side where it contacts the chip. 68 | * Checkering is not required. 69 | * Must be able to expand/contract in a plane and do so isotropically. 70 | * Height changes should be minimal. 71 | * Low radial stiffness of the foil itself - no load-bearing directions. 72 | * Aspect ratio of the contact points should be low. 73 | 74 | The paper pump egg tray satisfies most of the demands above, however it is stiff when compressed from both in-plane directions and constrained from top and bottom: 75 | 76 | ![EPPOR-PACK SDN. BHD. egg tray - https://www.epporpack.com/paper-pulp-egg-tray/](img/eppor_pack_egg_tray.jpg) 77 | 78 | Thus, the egg tray structure with its square grid of reinforcing ridges is not adequate. It helps to address another question though: 79 | 80 | **How much contact area is needed?** 81 | 82 | One of the most surprising aspects of press-pack packaging is perhaps that while thermal contact is not ideal, top-side contacts can still carry away 20-50% of the heat flux w.r.t. Ag-sintered bottom-side contacts - all while 10-20 MPa of contact pressure only result in contacts through surface asperities that amount to 0.2 to 1% of the total contact cross-sectional area. 83 | 84 | The picture below illustrates the effect of paralleled constriction resistances - in particular to heat flux: 85 | 86 | ![http://www.mhtlab.uwaterloo.ca/pdf_papers/mhtl88-13.pdf](img/constriction_resistance.png) 87 | 88 | Contacts right next to each other see a diminishing return of improved thermal conductivity, as significant resistance is already associated with the narrowing-down of the paths on either side of the constriction. 89 | 90 | Essentially, an evenly distributed contact with 25-50% coverage would already be suitable for power electronics packaging. Differences between a full-contact sintered and a foil-structured, columnar layer may become relevant at very short times in Zth relevant for overload conditions, yet it is to be expected that sintered Ag or Cu layers are not inferior to press-pack packages. 91 | 92 | With these properties and considerations in mind, a better pattern needs to be found. 93 | 94 | ### Origami Tesselations - David Huffman's Rectangular Woven Design 95 | 96 | In [RECONSTRUCTING DAVID HUFFMAN’S ORIGAMI TESSELLATIONS](https://dspace.mit.edu/bitstream/handle/1721.1/127197/v06bt07a034-detc2013-12710.pdf?sequence=2&isAllowed=y) some remarkable Origami tesselations are reproduced and elucidated. 97 | 98 | Reproducing these structures can be recommended and is a great way to get first-hand experience in how such a structure behaves: 99 | 100 | ![David Huffman's rectangular woven design. Own image.](img/photo_2022-07-06_10-55-54s.jpg) 101 | 102 | When stretching and compressing the structure, it becomes clear that the alternating left- and right-handed spools allow one of the key properties to emerge: the 3x1 rectangles on the other side do not rotate. This is exactly what we want. 103 | 104 | ![](img/paper_mockup.gif) 105 | 106 | Another great tool is https://origamisimulator.org/ which also give easy access to Huffman's Origami tesselations under Examples. 107 | 108 | Handling the paper version or even playing with the simulation also exposes that not fully folded tesselations like the one shown below have some degree of spherical curvature: 109 | 110 | ![](img/photo_2022-07-06_10-55-38.jpg) 111 | 112 | It is possible to force the structure into a flat sheet. Such action may deform the walls a bit when the struture is made of metal. The large range of motion the paper model has is, however, not needed for the metallic structure, so a 90-95% folded state could be used after flattening. 113 | 114 | Unlike paper though, metal can be embossed and drawn into a non-planar sheet before folding, unlocking perhaps the ability to zero out the curvature in an incompletely folded state. 115 | 116 | 117 | ## Thermo-Mechanical Simulation 118 | 119 | The folded foil and its sintered filling will invariably have a CTE which is higher than that of the semiconductor they will be sintered to. Before addressing the full simulationand dealing with the challenges of finding good material properties for sintered layers with meso-scale porosity, grain size and potentially varying micro-hardness, The general idea of the proposed foil layer shall be explored. 120 | 121 | The movement of the folds can be explored with two simplified problem setups: 122 | * A purely mechanical simulation where the rectangular contacts are adhered to a plane contracting isotropically. 123 | * A thermo-mechanical simulation where the rectangular contacts are fixed in space as the temperature is increased. 124 | 125 | The follow explanations may be easier to follow if we pre-empt the finite element method (FEM) results of the second simulation, where 126 | 127 | * the rectangular contacts are fixed in space and 128 | * the temperature is changed from 300 K to 500 K (approx. 27°C to 227°C) 129 | 130 | The coloring is chosen to represent the maximum shear stress (Tresca): 131 | 132 | ![](img/HlZv5Jzsr5.gif) 133 | 134 | Among the aspects that are evident at this stage are: 135 | 136 | * The spools rotate in agreement with the paper model - but this also means that perhaps a thin layer of resist may need to be printed onto the spools and fold peaks. This will prevent paste from sintering to the spool and locking it in place. 137 | * The gaps between walls can take up wall deformations and material expansion. 138 | 139 | Failure theories are explained in great detail in the excellent video [Understanding Failure Theories (Tresca, von Mises etc...)](https://www.youtube.com/watch?v=xkbQnBAOFEg) (by *The Efficient Engineer*). 140 | 141 | ### Tools Used 142 | 143 | The problem setup was done in FreeCAD 0.20 using the FEM Workbench and CalculiX solver. Several attempts to model the geometry were made but ultimately unsuccessful: 144 | 145 | * Sheet metal forming with a polyhedral die (SheetMetal Workbench). 146 | * Drawing of points and faces to subsequently add thickness to the surface. 147 | * Generating geometry via the OpenSCAD workbench. 148 | 149 | Ultimately, the geometry was optimized and exported as an STL file using OpenSCAD 2021.01, then imported in FreeCAD and converted from ``Mesh`` to a ``Shape``, then to a ``Solid``. 150 | 151 | The geometry can be checked at each step, which is described in https://github.com/macdroid53/FreeCAD-Tips-n-Workflows#import-stl-files . 152 | 153 | ### Creating The Model Geometry 154 | 155 | We define a basic polyhedron from which the sheet with a defined thickness can be derived: 156 | 157 | ![](img/basic_polyhedron.png) 158 | 159 | The unit length can be 1, and the output can be scaled to real-world dimensions. Four of the polyhedra are arranged in a circular pattern which can then tile the plane using ``tool_unit_cell()`` : 160 | 161 | ```openscad 162 | d = 0.4; // draft offset 163 | g = 0.04; // gap/2 164 | 165 | pitch = 4 + 4*d + 4*g; 166 | 167 | pts = [ 168 | // top 169 | [-0.5, 1.5, 1],[0.5, 1.5, 1], // 0 1 170 | 171 | [-0.5,-1.5, 1],[0.5,-1.5, 1], // 2 3 172 | // bottom 173 | [-1.5+g,1.5+d, 0], [1.5-g,1.5+d, 0], // 4 5 174 | [-0.5-d, 1.5, 0], [0.5+d, 1.5, 0], // 6 7 175 | 176 | [-0.5-d,-1.5, 0], [0.5+d,-1.5, 0], // 8 9 177 | [-1.5+g,-1.5-d, 0], [1.5-g,-1.5-d, 0] // 10 11 178 | ]; 179 | 180 | 181 | faces = [ // orientation: CW when looking at a face from outside 182 | [0, 1, 3, 2], 183 | [4, 5, 1, 0], 184 | [1, 5, 7], 185 | [3, 1, 7, 9], 186 | [3, 9, 11], 187 | [2, 3, 11, 10], 188 | [2, 10, 8], 189 | [6, 0, 2, 8], 190 | [0, 6, 4], 191 | [4, 6, 8, 10, 11, 9, 7, 5] 192 | ]; 193 | 194 | 195 | module tool_unit_cell(){ 196 | for ( i = [0:1:3] ) 197 | rotate([0,0,90*i]) 198 | translate([-1-d-g,-1-d-g,0]) 199 | polyhedron(pts, faces, convexity=2); 200 | } 201 | ``` 202 | 203 | Solid geometry is obtained by generating a ``union`` of the array of polyhedra and a ``cube`` supporting them from below. At this point the geometry looks like a "chocolate bar" where rectangular pieces follow a woven pattern. 204 | 205 | To finish the geometry, two of those chocolate bars are subtracted with ``difference``, and before the subtraction the "positive" chocolate bar is thickened by the actual foil thickness through ``minkowski`` with a shape of suitable type and orientation. The picture below shows a cut-away view of the resulting foil geometry model: 206 | 207 | ![](img/FZKKe8aX0AAXkhe.jpg) 208 | 209 | This would conclude the parametric geometry generation part, were it not for complications cropping up in the actual simulation, or at the meshing stage which can - to some extent - be traced back to overcomplicated or "pathological" geometry (the author has yet to find means to quantify and localize these problems; error messages and outputs are not conclusive). 210 | 211 | Even when treating meshing and FEM analysis as a black box operation, a 1x1 unit cell problem can be used with coarse mesh to test various operand shapes: 212 | 213 | ![](img/minkowski_operand_diagram.jpg) 214 | 215 | Here, the problem with the concept of filleting becomes apparent: even if one were to simplify the geometry after the fact, it is perhaps prudent to select an operand shape, orientation and spacings such that benign geometry results. 216 | 217 | It was found that when using a ``cube``, the number of simulation elements and their nodes is was lower than for other options by a factor of 2 to 5. 218 | 219 | Corresponding files: 220 | * [OpenSCAD script](model and analysis/woven_design_forming_tool_cubemin.scad) 221 | * [STL output](model and analysis/woven_design_forming_tool_cubemin.stl) 222 | 223 | 224 | ### Import and FEM Analysis in FreeCAD 225 | 226 | FreeCAD permits native geometry generation via the ``OpenSCAD Workbench`` and ``Add OpenSCAD Element...``. Looking at STL import may be more attractive though, as other tools (MeshLab, NetFabb, ...) maybe be used to prepare and fix the mesh before use in a simulation. 227 | 228 | A sane import process for meshes is reproduced below, as described in https://github.com/macdroid53/FreeCAD-Tips-n-Workflows: 229 | 230 | The steps to import an STL file: 231 | 232 | * Use File>Import to import the STL file 233 | * Or, use Mesh workbench Import Mesh 234 | * use tools in Mesh workbench to verify it is a manifold file 235 | * Mesh workbench Analyze, Fill hole, etc. as needed. 236 | * Use Mesh workbench Decimate 237 | * Reduce as far below 100k triangles as possible. 238 | * use Part workbench Convert to shape 239 | * use Part WB Check geometry to make sure it produced a valid shape 240 | * use Part WB Convert to solid 241 | * use Part WB Check geometry to make sure it produced a valid solid 242 | * if all that was successful, the solid can be used directly with Part workbench 243 | * to use it with Part Design workbench, create a Part Design Body 244 | * drag-n-drop the solid into the Body 245 | 246 | From there, An Analysis container is created in the ``FEM Workbench`` and populated: 247 | 248 | ![](img/mesh_settings.png) 249 | 250 | A material must be added and the solid needs to be added to the objects that have MatrialSolid assigned. 251 | As the geometry is not sufficiently refined, multiple faces have to be selected to add ``ConstriantFixed`` to all 16 rectangular contacts and ``ConstraintTemperature`` to a more arbitrary selection of all squares associated with the spools on the opposite sides. 252 | 253 | Testing whether meshes work is a time-intensive process, and ``Netgen`` on its "coarse" setting may yield faster results than ``GMSH``. The worst trial runs in this work took over 400 seconds for meshing and 2000 seconds to compute the simulation, though starting simple - sometimes even with a coarsely meshed mock-up made of cubes and boolean operators on them may be very helpful in getting the overall simulation put together and validated. Mock-ups may also expose bugs and unrelated problems with nightly / weekly FreeCAD builds so you don't waste a day or two trying to pinpoint which apect of a complex model may lead to simulation failures. 254 | 255 | The [FreeCAD project file](model%20and%20analysis/WovenDesign_CubeMinkowski-solved.FCStd) without results allows an easy way to investigate other meshing parameters, which may improve accuracy or remove standing issues. 256 | 257 | Currently, there is a small number reported as ill-shaped tets (see related [forum thread](https://forum.freecadweb.org/viewtopic.php?t=68007)), which could not be resolved by changing the meshing parameters, and have been ignored. 258 | 259 | #### A Note On Boundary Conditions 260 | 261 | Not all faces need to be selected and set to a specific temperature, and not all faces need to have a heat transfer coefficient assigned. 262 | 263 | For problems with internal heat sources, the author explored the python command line a bit. While not needed in this case, it should be mentioned that scripting (although somewhat tedious due to patchy documentation) could be regarded as the go-to approach to UI limitations and missing features. 264 | 265 | Information can be found [on github](https://freecad.github.io/SourceDoc/dd/d72/namespaceFem.html), [on the FreeCAD forum](https://forum.freecadweb.org/viewtopic.php?t=48252) and by searching for method names and strings found in the source code (it's a bit like reverse engineering, but searching for Part and Fem namespaces has been helpful). 266 | 267 | The script below can be pasted into the command line window, and probably also just saved as a macro and used to generate a new ``ConstraintTemperature`` object based on faces of selected shapes: 268 | 269 | ```python 270 | # 271 | # Create new Fem::ConstraintTemperature instance with all faces of the selected Shape 272 | # and move it to the active FEM analysis (when in doubt, double-click on it beforehand). 273 | # 274 | import ObjectsFem, FemGui 275 | import FreeCADGui as Gui 276 | selection = Gui.Selection.getSelection() 277 | Gui.Selection.clearSelection() 278 | refs = [] 279 | for selectionItem in selection: 280 | if hasattr(selectionItem, "Shape"): 281 | faces = [] 282 | for idx, fac in enumerate(selectionItem.Shape.Faces): 283 | faceName = 'Face{:d}'.format(idx+1) 284 | Gui.Selection.addSelection(selectionItem, faceName) 285 | faces.append(faceName) 286 | refs.extend( [(selectionItem, tuple(faces))] ) 287 | 288 | activeAnalysis = FemGui.getActiveAnalysis() # avoid: activeAnalysis = App.ActiveDocument.findObjects("Fem::FemAnalysis")[0] 289 | if (activeAnalysis is not None): 290 | if (activeAnalysis.TypeId == 'Fem::FemAnalysis'): 291 | newConstraint = ObjectsFem.makeConstraintTemperature(App.ActiveDocument, "FemConstraintTemperature") 292 | activeAnalysis.addObject(newConstraint) 293 | newConstraint.References = refs 294 | ``` 295 | 296 | 297 | ## Conclusions 298 | 299 | Thermo-mechanical FEM analysis is possible in FreeCAD, allowing an open-source path from concept to post-processing. Limitations become apparent in multi-material problems with arbitrary / more involved geometry. 300 | 301 | The problem above has been investigated as far as its reaction to a temperature change, highlighting the motion that accompanies thermal expansion of protruding folds and spools. The mechanical simulation of an isotropically expanding interface to which the contact rectangles are affixed can be conducted later. 302 | 303 | Further information on post-processing and result interpretation (von Mises, Tresca stresses): 304 | 305 | * FreeCAD 0.17 coupled structural thermal FEA analysis demo https://www.youtube.com/watch?v=UXjsTeMwr0Q&t=14m20s 306 | * Tachi Lab Artifacts "Freeform Origami" shows how Miura-ori can be deformed to achieve free-form deformation, which may be used here to compensate spherical curvature of incompletely folded rect woven designs https://www.youtube.com/watch?v=T35So_88mio 307 | 308 | 309 | 310 | 311 | 312 | -------------------------------------------------------------------------------- /undervoltage_detector_with_NE555/img/Schematic-of-the-NE-555-frequency-modulation-measurement-circuit-The-signal-of-the_W640.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/undervoltage_detector_with_NE555/img/Schematic-of-the-NE-555-frequency-modulation-measurement-circuit-The-signal-of-the_W640.jpg -------------------------------------------------------------------------------- /undervoltage_detector_with_NE555/img/solution_schematic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/undervoltage_detector_with_NE555/img/solution_schematic.jpg -------------------------------------------------------------------------------- /undervoltage_detector_with_NE555/img/wiki_555_block_diag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisterHW/Notes/7cff9a7b13c2f44b752ba7b9886366211572ae55/undervoltage_detector_with_NE555/img/wiki_555_block_diag.png -------------------------------------------------------------------------------- /undervoltage_detector_with_NE555/readme.md: -------------------------------------------------------------------------------- 1 | # Under-voltage Detector with An NE555 2 | 3 | The challenge [1]: 4 | 5 | You're stuck on a island with a 12 V battery and a 555. 6 | Maybe some resistors, diodes, leds, etc, but no other active components. 7 | How can you make a low-voltage indicator to light at approximately 10V? 8 | 9 | 10 | ## NE555 As A Comparator 11 | 12 | The NE555 timer IC [2] can be used for sever applications that are not strictly about timing. Most importantly, it has an internal voltage divider network, two comparators and a flip-flop with two types of output stages: 13 | 14 | ![](img/wiki_555_block_diag.png) 15 | 16 | The CV pin can be pulled to a voltage within the supply range of the NE555. In timer circuits, the exponential charge / discharge voltage function can be utilized to create voltage-to-frequency converters with monotonous (albeit not linear) relationships, as described in \[3\] by the authors as a circuit intended to easily interface with a PC sound card while avoiding DC coupling issues: 17 | 18 | ![](img/Schematic-of-the-NE-555-frequency-modulation-measurement-circuit-The-signal-of-the_W640.jpg) 19 | 20 | ## One Possibe Solution 21 | 22 | The introduction above makes clear: all the inputs are fair game when it comes to adapting the NE555 to a given problem. One can also pull CV towards a node that tracks VCC with an offset, while TRIG and THRS, being connected to a resistor divider at RD, are proportional to VCC with some factor. 23 | 24 | As a result, the slopes of RD and CV voltages are different, and properly chosen values introduce an adjustable intersection point. 25 | 26 | An additional capacitor C2 is added to ensure the flipflop starts out set, and is only reset when THRS reaches CV during operation. This may save one resistor which, together with C2 connector to RST would have served a similar purpose. 27 | 28 | ![](img/solution_schematic.jpg) 29 | 30 | One downside is the small difference in slopes, which can introduce temperature dependence and some spread with component values.. but given the crudeness of the application, 2 LEDs, an NE555, 4 resistors and 1 capacitor should meet the requirements. 31 | 32 | ## Reference 33 | 34 | 1. https://twitter.com/tedyapo/status/1528097728206618624 35 | 2. https://en.wikipedia.org/wiki/555_timer_IC 36 | 3. DOI: [10.1109/CINTI.2013.6705184](https://www.researchgate.net/publication/257592174_Low-cost_photoplethysmograph_solutions_using_the_Raspberry_Pi) --------------------------------------------------------------------------------