├── 3d print STL ├── forcer_part1.STL ├── forcer_part2.STL └── magnet_spacer.STL ├── LICENSE ├── Linear_Motor_Steuerung.ino ├── PROJECT.md ├── README.md ├── Solidworks ├── V1 │ ├── LinearMotorAssembly.SLDASM │ ├── README.md │ ├── enclosure_Middle.SLDPRT │ ├── enclosure_bottom.SLDPRT │ ├── enclosure_top.SLDPRT │ ├── forcer_part1.SLDPRT │ ├── forcer_part2.SLDPRT │ ├── magnet_2mm.SLDPRT │ └── magnet_spacer.SLDPRT ├── V2_Watercooled │ ├── CastingMould │ │ ├── backWall.SLDPRT │ │ ├── frontWall.SLDPRT │ │ ├── mould.SLDASM │ │ └── sideWall.SLDPRT │ ├── CoolingChannel.SLDPRT │ ├── Igus │ │ ├── 0_36m_B07_30_018_0___060_30_12PZ_A1_2.SLDPRT │ │ ├── 0_36m_B07_30_018_0___060_30_12PZ_A1_3.SLDPRT │ │ ├── 0_36m_B07_30_018_0___060_30_12PZ_A1_4.SLDPRT │ │ ├── chain.SLDASM │ │ └── chainpath.SLDPRT │ ├── LinearMotorAssembly.SLDASM │ ├── M4 Set Screw.SLDPRT │ ├── MS05B-L500.SLDPRT │ ├── MSA_012_SNS_P_MA_00.SLDPRT │ ├── R0442_size12.SLDPRT │ ├── README.md │ ├── RLC2HD.SLDPRT │ ├── RLC2HD_pcb.SLDPRT │ ├── chainguide.SLDPRT │ ├── connector_bracket_p1.SLDPRT │ ├── connector_bracket_p2.SLDPRT │ ├── drawings │ │ ├── connector_bracket_p1.SLDDRW │ │ ├── connector_bracket_p1.pdf │ │ ├── connector_bracket_p2.SLDDRW │ │ ├── connector_bracket_p2.pdf │ │ ├── enclosure_Middle.SLDDRW │ │ ├── enclosure_Middle.pdf │ │ ├── enclosure_bottom.SLDDRW │ │ ├── enclosure_bottom.pdf │ │ ├── enclosure_top.SLDDRW │ │ ├── enclosure_top.pdf │ │ ├── forcer.SLDDRW │ │ ├── forcer.pdf │ │ ├── forcer_assembly.SLDDRW │ │ └── forcer_assembly.pdf │ ├── enclosure_Middle.SLDPRT │ ├── enclosure_bottom.SLDPRT │ ├── enclosure_top.SLDPRT │ ├── forcer.SLDPRT │ ├── forcerBlock.SLDPRT │ ├── forcer_assembly.SLDASM │ ├── forcer_printed.SLDPRT │ ├── magnet_20x10x2.SLDPRT │ ├── spool holder.SLDPRT │ ├── spool.SLDPRT │ └── step files │ │ └── LinearMotorAssembly.STEP └── pva_forming_tool.SLDPRT ├── Trinamic ├── LinearMotorEncoderTestMove.tpc ├── bob_config.tpc └── bob_config_1phase.tpc └── images ├── Cross-sectional-view-of-an-ironless-linear-motor.png ├── IMG_20200509_164317.jpg ├── IMG_20200515_163512.jpg ├── IMG_20200516_120124.jpg ├── IMG_20200822_144159.jpg ├── IMG_20200913_174158.jpg ├── IMG_20200913_174208.jpg ├── IMG_20200916_184416.jpg ├── IMG_20200920_133147.jpg ├── IMG_20200922_221401.jpg ├── IMG_20201005_200555.jpg ├── IMG_20201005_224524.jpg ├── IMG_20201018_220624.jpg ├── IMG_20201018_220709.jpg ├── IMG_20201018_220736.jpg ├── Linearmotorprinzip.png ├── MagnetSpacingFormula.png ├── Rotating_field-compact.gif ├── TRINAMIC_LOGO_STANDARD_RGB.png ├── coils.jpg ├── forcer.jpg └── twoPoleMotor.jpg /3d print STL/forcer_part1.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/3d print STL/forcer_part1.STL -------------------------------------------------------------------------------- /3d print STL/forcer_part2.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/3d print STL/forcer_part2.STL -------------------------------------------------------------------------------- /3d print STL/magnet_spacer.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/3d print STL/magnet_spacer.STL -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /Linear_Motor_Steuerung.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define ENC_A 2 4 | #define ENC_B 3 5 | 6 | volatile int encoder0Pos = 0; 7 | 8 | #define EN1 5 9 | #define EN2 6 10 | #define EN3 7 11 | 12 | #define IN1 9 13 | #define IN2 10 14 | #define IN3 11 15 | 16 | #define DirPin 4 17 | #define StepPin 12 18 | 19 | double Setpoint, Input, Output; 20 | PID myPID(&Input, &Output, &Setpoint,2,5,1, DIRECT); 21 | 22 | // SPWM (Sine Wave) 23 | //const int pwmSin[72] = {127, 138, 149, 160, 170, 181, 191, 200, 209, 217, 224, 231, 237, 242, 246, 250, 252, 254, 254, 254, 252, 250, 246, 242, 237, 231, 224, 217, 209, 200, 191, 181, 170, 160, 149, 138, 127, 116, 105, 94, 84, 73, 64, 54, 45, 37, 30, 23, 17, 12, 8, 4, 2, 0, 0, 0, 2, 4, 8, 12, 17, 23, 30, 37, 45, 54, 64, 73, 84, 94, 105, 116 }; 24 | 25 | // SVPWM (Space Vector Wave) 26 | const int pwmSin[] = {128, 132, 136, 140, 143, 147, 151, 155, 159, 162, 166, 170, 174, 178, 181, 185, 189, 192, 196, 200, 203, 207, 211, 214, 218, 221, 225, 228, 232, 235, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 249, 250, 250, 251, 252, 252, 253, 253, 253, 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 253, 253, 253, 252, 252, 251, 250, 250, 249, 248, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 249, 250, 250, 251, 252, 252, 253, 253, 253, 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 253, 253, 253, 252, 252, 251, 250, 250, 249, 248, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 235, 232, 228, 225, 221, 218, 214, 211, 207, 203, 200, 196, 192, 189, 185, 181, 178, 174, 170, 166, 162, 159, 155, 151, 147, 143, 140, 136, 132, 128, 124, 120, 116, 113, 109, 105, 101, 97, 94, 90, 86, 82, 78, 75, 71, 67, 64, 60, 56, 53, 49, 45, 42, 38, 35, 31, 28, 24, 21, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 8, 7, 6, 6, 5, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 8, 7, 6, 6, 5, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 24, 28, 31, 35, 38, 42, 45, 49, 53, 56, 60, 64, 67, 71, 75, 78, 82, 86, 90, 94, 97, 101, 105, 109, 113, 116, 120, 124}; 27 | 28 | #define ARRAYSIZE sizeof(pwmSin)/sizeof(int) 29 | 30 | enum phase {PHASE1, PHASE2, PHASE3}; 31 | int phasePwmIndex[3]; 32 | 33 | int *pos_U, *pos_V, *pos_W; 34 | 35 | int commutationPWMOffset = 24; 36 | 37 | //This distance is the difference between two magnets with the same polarity. 38 | const double phaseDistance = 27; 39 | 40 | double position_in_mm = 0; // (encoder0Pos) / 40.00; 41 | String inString = ""; 42 | 43 | void setup() 44 | { 45 | commutationPWMOffset = ARRAYSIZE/3; 46 | 47 | phasePwmIndex[0] = 0; 48 | phasePwmIndex[1] = commutationPWMOffset; 49 | phasePwmIndex[2] = (2*commutationPWMOffset); 50 | 51 | *pos_U = pwmSin + phasePwmIndex[0]; 52 | *pos_V = pwmSin + phasePwmIndex[1]; 53 | *pos_W = pwmSin + phasePwmIndex[2]; 54 | 55 | pinMode(ENC_A, INPUT); 56 | pinMode(ENC_B, INPUT); 57 | 58 | attachInterrupt(0, isrA, CHANGE); 59 | attachInterrupt(1, isrB, CHANGE); 60 | 61 | //Increase PWM frequency to 32 kHz (make inaudible) 62 | setPwmFrequency(IN1); 63 | setPwmFrequency(IN2); 64 | setPwmFrequency(IN3); 65 | 66 | pinMode(IN1, OUTPUT); 67 | pinMode(IN2, OUTPUT); 68 | pinMode(IN3, OUTPUT); 69 | pinMode(EN1, OUTPUT); 70 | pinMode(EN2, OUTPUT); 71 | pinMode(EN3, OUTPUT); 72 | 73 | 74 | digitalWrite(EN1, HIGH); 75 | digitalWrite(EN2, HIGH); 76 | digitalWrite(EN3, HIGH); 77 | 78 | analogWrite(IN1,*pos_U); 79 | analogWrite(IN2,*pos_V); 80 | analogWrite(IN3,*pos_W); 81 | 82 | //wait for 2 seconds for forcer to settle in position 83 | delay(2000); 84 | 85 | encoder0Pos = 0; 86 | 87 | analogWrite(IN1,0); 88 | analogWrite(IN2,0); 89 | analogWrite(IN3,0); 90 | 91 | myPID.SetOutputLimits(-1000, 1000); 92 | myPID.SetMode(AUTOMATIC); 93 | myPID.SetSampleTime(1); 94 | myPID.SetTunings(15,0,0.4); 95 | Serial.begin(115200); 96 | } 97 | 98 | 99 | 100 | void loop() 101 | { 102 | //Read Setpoint from serial communication 103 | if(Serial.available() > 0) 104 | { 105 | int inChar = Serial.read(); 106 | if (isDigit(inChar)) 107 | { 108 | inString += (char)inChar; 109 | } 110 | if (inChar == '\n') 111 | { 112 | Setpoint = inString.toInt(); 113 | Serial.print("SetPoint"); 114 | Serial.println(Setpoint); 115 | inString = ""; 116 | } 117 | } 118 | Input = encoder0Pos / 40.00; 119 | myPID.Compute(); 120 | drive(Output/1000); 121 | } 122 | 123 | void drive(double scale_factor) 124 | { 125 | if(scale_factor < 0.00) 126 | { 127 | //linear scale Y = x * (ymax - ymin)/(xmax - xmin) + offset 128 | scale_factor = (-scale_factor - 0.00) * (1.0 - 0.1) / (1.00 - 0.00) + 0.1; 129 | 130 | int offset = -(phasePwmIndex[0] - berechne() + commutationPWMOffset); 131 | shift(&pos_U, offset, ARRAYSIZE, PHASE1); 132 | shift(&pos_V, offset, ARRAYSIZE, PHASE2); 133 | shift(&pos_W, offset, ARRAYSIZE, PHASE3); 134 | 135 | analogWrite(IN1,*pos_U * scale_factor); 136 | analogWrite(IN2,*pos_V * scale_factor); 137 | analogWrite(IN3,*pos_W * scale_factor); 138 | } 139 | else if(scale_factor > 0.00) 140 | { 141 | scale_factor = (scale_factor - 0.00) * (1.0 - 0.1) / (1.00 - 0.00) + 0.1; 142 | int offset = (phasePwmIndex[0] + berechne() + commutationPWMOffset); 143 | shift(&pos_U, offset, ARRAYSIZE, PHASE1); 144 | shift(&pos_V, offset, ARRAYSIZE, PHASE2); 145 | shift(&pos_W, offset, ARRAYSIZE, PHASE3); 146 | 147 | analogWrite(IN1,*pos_U * scale_factor); 148 | analogWrite(IN2,*pos_V * scale_factor); 149 | analogWrite(IN3,*pos_W * scale_factor); 150 | } 151 | } 152 | 153 | int berechne() 154 | { 155 | double position_in_mm = encoder0Pos / 40.00; 156 | int multiple = position_in_mm / phaseDistance; 157 | double phaseshift_mm = position_in_mm - (multiple * phaseDistance); 158 | return ((phaseshift_mm - 0) * (72 - 0) / (phaseDistance - 0) + 0); 159 | } 160 | 161 | //######################## Shift-Array######################## 162 | void shift(int **pwm_sin, int shift_distance, int array_size, phase phase_number) 163 | { 164 | if(shift_distance != array_size) 165 | { 166 | if(shift_distance > 0) 167 | { 168 | if(phasePwmIndex[phase_number] + shift_distance < array_size) 169 | { 170 | *pwm_sin = *pwm_sin + shift_distance; 171 | phasePwmIndex[phase_number] += shift_distance; 172 | } 173 | else 174 | { 175 | int temp =phasePwmIndex[phase_number] + shift_distance - array_size; 176 | *pwm_sin = *pwm_sin - phasePwmIndex[phase_number]; 177 | *pwm_sin = *pwm_sin + temp; 178 | phasePwmIndex[phase_number] = temp; 179 | } 180 | } 181 | else if(shift_distance < 0) 182 | { 183 | int temp_distance = array_size + shift_distance; 184 | shift(pwm_sin, temp_distance , array_size, phase_number); 185 | } 186 | } 187 | } 188 | 189 | 190 | //########################### ENCODER-INTERRUPT######################################### 191 | void isrA() 192 | { 193 | if (bitRead(PIND, ENC_B) != bitRead(PIND, ENC_A)) 194 | { 195 | encoder0Pos++; 196 | } 197 | else 198 | { 199 | encoder0Pos--; 200 | } 201 | } 202 | 203 | void isrB() 204 | { 205 | if (bitRead(PIND, ENC_A) == bitRead(PIND, ENC_B)) 206 | { 207 | encoder0Pos++; 208 | } 209 | else 210 | { 211 | encoder0Pos--; 212 | } 213 | } 214 | 215 | //#################### PWM-Motor####################### 216 | void setPwmFrequency(int pin) { 217 | if(pin == 5 || pin == 6 || pin == 9 || pin == 10) { 218 | if(pin == 5 || pin == 6) { 219 | TCCR0B = TCCR0B & 0b11111000 | 0x01; 220 | } else { 221 | TCCR1B = TCCR1B & 0b11111000 | 0x01; 222 | } 223 | } 224 | else if(pin == 3 || pin == 11) { 225 | TCCR2B = TCCR2B & 0b11111000 | 0x01; 226 | } 227 | } 228 | -------------------------------------------------------------------------------- /PROJECT.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "DIY Ironless Linear Motor" 3 | date: 2020-10-03 4 | thumbnail: "https://raw.githubusercontent.com/TkkrLab/LinearMotor/master/images/IMG_20200922_221401.jpg" 5 | --- 6 | 7 | # DIY Ironless Linear motor 8 | ---TODO/Work in progress--- 9 | 10 | ![LinearMotor / LinearMotor](https://raw.githubusercontent.com/TkkrLab/LinearMotor/master/images/IMG_20200922_221401.jpg) 11 | 12 | Check out github repository [github](https://github.com/TkkrLab/LinearMotor). 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DIY Ironless Linear Motor 2 | Brushless DC (BLDC) motors constist of a stator and a rotor, which produce a rotational torque when powered. A linear motor is essentially a BLDC motor which has been folded open and produces a linear force by applying current to the different phases. This causes the [forcer](#forcer) (rotor) to move along a [magnetic track](#magnetic-track) (stator). 3 | ![LinearMotorPrincipal](/images/Linearmotorprinzip.png) 4 | 5 | 6 | ## Linear Motor basics 7 | As explained a linear motor is a flattened BLDC motor. There are several different types, each having its own advantages and disadvantages. We decided to go with an ironless linear motor. 8 | An ironless linear motor has two main components: 9 | * A magnetic track composed of two metal plates with magnets attached and a seperator / spacer. 10 | * A forcer composed of 3 copper coils, an aluminium housing, wiring and epoxy. 11 | ![CrossSection](/images/Cross-sectional-view-of-an-ironless-linear-motor.png) 12 | 13 | 14 | ### Magnetic Track 15 | To get the correct spacing we take a look at a BLDC, in this case a three phase two pole motor. 16 | ![Three phase two pole motor](/images/twoPoleMotor.jpg) 17 | 18 | During rotation one of the phases of the motor will move from a positive polarity (+) to the negative polarity (-) and back to positive. The other two phases have a 120° offset from this phase, but for now lets focus on just the one phase. This translation in polarity means that we now know the spacing between magnets of the same polarity => 360° rotation, or 3* distance between coils(coil spacing). To get the coil spacing we take a look at what coils we have available. 19 | 20 | The coils that we purchased were produced specifically for linear motors, they have a size of 25.5*14mm. Since we also want to add watercooling channels between the coils we decided on a spacing of 18mm. If you do not wish to add watercooling we would recommend putting the coils as close together as possible. 21 | 22 | If we apply these values we would have a magnet with positive polarity at 0, negative polarity at 27mm and positive again at 54mm. Even though this would work, the motor will not be very powerfull. This can be improved by adding more pole pairs to the motor. You can keep adding adding pole pairs according to the following formula until you reach a magnet spacing / size suitable for your motor: 23 | ![Formula](/images/MagnetSpacingFormula.png) 24 | You can also decide on a magnet spacing first and calculate the coil spacing accordingly. 25 | 26 | 27 | ### Forcer 28 | As previously mentioned we want to add watercooling to our linear motor so we can put more current into the coils without overheating the system. This adds some more complexity to the design of the forcer. 29 | For more details on the design check out [Version 1](/Solidworks/V1/README.md) and [Version 2 Watercooled](/Solidworks/V2_Watercooled/README.md) 30 | 31 | There are some companies that sell coils made to specifications. We got ours from [JHCoils](https://www.jhcoils.com/), but if you are up to it you can always wind your own. If you decide to buy your coils, just keep in mind that you will have to pay extra if they do not have the required tooling available (So ask which sizes they have available already and pick one of those). 32 | ![Coils](/images/coils.jpg) 33 | 34 | #### Coil specs 35 | dimensions: 25.5*14 mm 36 | wire: 0.4mm 37 | 38 | ## Commutation 39 | Commutation is the process of switching current in the motor phases to generate motion. Our ironless linear motors is based on a three phase motor design. There are several different ways to commutate a three phase motor, of which sinusoidal control is the most efficient and most commonly used in the higher-end motor drives. 40 | 41 | In sinusoidal commutation, all three wires are permanently energized with a sinusoidal current that is 120 degrees apart on each phase. This has the effect of creating a North/South magnetic field that rotates inside the motor cage. As shown in the figure below: 42 | ![Commutation](/images/Rotating_field-compact.gif) 43 | 44 | 45 | If a magnet is placed on a rotor inside this cage, its North and South poles will be pulled towards the South and North poles of the rotating field. Assuming for a moment that the magnetis field rotation is paused, we can see the effect of the pull on the magnet at different angular position relative to the rotating field. 46 | 47 | 48 | ### FOC (Field Oriented Control) 49 | ...TODO... 50 | (https://www.roboteq.com/technology/field-oriented-control) 51 | 52 | 53 | 54 | 55 | 56 | ### Motor Drive 57 | To drive our motor we are using a [TMC4671](https://www.trinamic.com/products/integrated-circuits/details/tmc4671-es/) controller from [Trinamic](#sponsors) 58 | 59 | We use this drive specifically because it has hardware FOC (Field Oriented Control). The TMC4671 [datasheet](https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC4671_datasheet_v1.06.pdf) explains very well what FOC is exactly, so please check it out. 60 | 61 | 62 | ### Motor Initialization 63 | ...TODO... 64 | 65 | __So why make our own?__ 66 | Simply, just because we can! And its awesome to learn about new stuff. 67 | 68 | We do wish to mention [Vulcaman's](https://www.instructables.com/id/DIY-IRONLESS-LINEAR-SERVO-MOTOR/) motor build. This version is based on a simple L6234 motor controller IC and implements a basic sinusoidal commutation. 69 | 70 | 71 | ## Sponsors 72 | We would like to thank our Trinamic for providing us with a TMC4671 evaluation kit. 73 | ![Trinamic](/images/TRINAMIC_LOGO_STANDARD_RGB.png) -------------------------------------------------------------------------------- /Solidworks/V1/LinearMotorAssembly.SLDASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V1/LinearMotorAssembly.SLDASM -------------------------------------------------------------------------------- /Solidworks/V1/README.md: -------------------------------------------------------------------------------- 1 | Work In Progress -------------------------------------------------------------------------------- /Solidworks/V1/enclosure_Middle.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V1/enclosure_Middle.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V1/enclosure_bottom.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V1/enclosure_bottom.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V1/enclosure_top.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V1/enclosure_top.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V1/forcer_part1.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V1/forcer_part1.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V1/forcer_part2.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V1/forcer_part2.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V1/magnet_2mm.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V1/magnet_2mm.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V1/magnet_spacer.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V1/magnet_spacer.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/CastingMould/backWall.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/CastingMould/backWall.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/CastingMould/frontWall.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/CastingMould/frontWall.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/CastingMould/mould.SLDASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/CastingMould/mould.SLDASM -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/CastingMould/sideWall.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/CastingMould/sideWall.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/CoolingChannel.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/CoolingChannel.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/Igus/0_36m_B07_30_018_0___060_30_12PZ_A1_2.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/Igus/0_36m_B07_30_018_0___060_30_12PZ_A1_2.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/Igus/0_36m_B07_30_018_0___060_30_12PZ_A1_3.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/Igus/0_36m_B07_30_018_0___060_30_12PZ_A1_3.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/Igus/0_36m_B07_30_018_0___060_30_12PZ_A1_4.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/Igus/0_36m_B07_30_018_0___060_30_12PZ_A1_4.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/Igus/chain.SLDASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/Igus/chain.SLDASM -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/Igus/chainpath.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/Igus/chainpath.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/LinearMotorAssembly.SLDASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/LinearMotorAssembly.SLDASM -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/M4 Set Screw.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/M4 Set Screw.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/MS05B-L500.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/MS05B-L500.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/MSA_012_SNS_P_MA_00.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/MSA_012_SNS_P_MA_00.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/R0442_size12.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/R0442_size12.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/README.md: -------------------------------------------------------------------------------- 1 | Work In Progress -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/RLC2HD.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/RLC2HD.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/RLC2HD_pcb.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/RLC2HD_pcb.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/chainguide.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/chainguide.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/connector_bracket_p1.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/connector_bracket_p1.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/connector_bracket_p2.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/connector_bracket_p2.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/connector_bracket_p1.SLDDRW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/connector_bracket_p1.SLDDRW -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/connector_bracket_p1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/connector_bracket_p1.pdf -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/connector_bracket_p2.SLDDRW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/connector_bracket_p2.SLDDRW -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/connector_bracket_p2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/connector_bracket_p2.pdf -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/enclosure_Middle.SLDDRW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/enclosure_Middle.SLDDRW -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/enclosure_Middle.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/enclosure_Middle.pdf -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/enclosure_bottom.SLDDRW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/enclosure_bottom.SLDDRW -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/enclosure_bottom.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/enclosure_bottom.pdf -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/enclosure_top.SLDDRW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/enclosure_top.SLDDRW -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/enclosure_top.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/enclosure_top.pdf -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/forcer.SLDDRW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/forcer.SLDDRW -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/forcer.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/forcer.pdf -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/forcer_assembly.SLDDRW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/forcer_assembly.SLDDRW -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/drawings/forcer_assembly.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/drawings/forcer_assembly.pdf -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/enclosure_Middle.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/enclosure_Middle.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/enclosure_bottom.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/enclosure_bottom.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/enclosure_top.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/enclosure_top.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/forcer.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/forcer.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/forcerBlock.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/forcerBlock.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/forcer_assembly.SLDASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/forcer_assembly.SLDASM -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/forcer_printed.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/forcer_printed.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/magnet_20x10x2.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/magnet_20x10x2.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/spool holder.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/spool holder.SLDPRT -------------------------------------------------------------------------------- /Solidworks/V2_Watercooled/spool.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/V2_Watercooled/spool.SLDPRT -------------------------------------------------------------------------------- /Solidworks/pva_forming_tool.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/Solidworks/pva_forming_tool.SLDPRT -------------------------------------------------------------------------------- /Trinamic/LinearMotorEncoderTestMove.tpc: -------------------------------------------------------------------------------- 1 | // Select module 2 | #module 1 COM9/USB/id1/Landungsbruecke 3 | 4 | // Use TMC4671 register addresses 5 | #include TMC4671_register_addresses.tpc 6 | // (C:/Users/LenderingM/AppData/Roaming/TRINAMIC Motion Control GmbH & Co. KG/TMCL-IDE/TMCL-Script/TMC4671_register_addresses.tpc) 7 | 8 | WMC MODE_RAMP_MODE_MOTION, 0, $00000000, 1 9 | 10 | // Motor type & PWM configuration 11 | WMC MOTOR_TYPE_N_POLE_PAIRS, 0, $00030004, 1 12 | WMC PWM_POLARITIES, 0, $00000000, 1 13 | WMC PWM_MAXCNT, 0, $00000F9F, 1 14 | WMC PWM_BBM_H_BBM_L, 0, $00001919, 1 15 | WMC PWM_SV_CHOP, 0, $00000007, 1 16 | 17 | // ADC configuration 18 | WMC ADC_I_SELECT, 0, $09000100, 1 19 | WMC dsADC_MCFG_B_MCFG_A, 0, $00100010, 1 20 | WMC dsADC_MCLK_A, 0, $0051EB85, 1 21 | WMC dsADC_MCLK_B, 0, $00000000, 1 22 | WMC dsADC_MDEC_B_MDEC_A, 0, $014E014E, 1 23 | WMC ADC_I0_SCALE_OFFSET, 0, $0100835C, 1 24 | WMC ADC_I1_SCALE_OFFSET, 0, $01008319, 1 25 | 26 | // ABN encoder settings 27 | WMC ABN_DECODER_MODE, 0, $00000000, 1 28 | WMC ABN_DECODER_PPR, 0, $00006BA8, 1 29 | WMC ABN_DECODER_COUNT, 0, $00004C3E, 1 30 | WMC ABN_DECODER_PHI_E_PHI_M_OFFSET, 0, $00000000, 1 31 | 32 | // Limits 33 | WMC PID_TORQUE_FLUX_LIMITS, 0, $000003E8, 1 34 | 35 | // PI settings 36 | 37 | // ===== ABN encoder test drive ===== 38 | 39 | // Init encoder (mode 0) 40 | WMC MODE_RAMP_MODE_MOTION, 0, $00000008, 1 41 | WMC ABN_DECODER_PHI_E_PHI_M_OFFSET, 0, $00000000, 1 42 | WMC PHI_E_SELECTION, 0, $00000001, 1 43 | WMC PHI_E_EXT, 0, $00000000, 1 44 | WMC UQ_UD_EXT, 0, $00000FD0, 1 45 | WAIT TICKS, 1, 1000 46 | WMC PID_POSITION_ACTUAL, 0, $00000000, 1 47 | WMC ABN_DECODER_COUNT, 0, $00000000, 1 48 | WAIT TICKS, 1, 1000 49 | 50 | // Feedback selection 51 | WMC PHI_E_SELECTION, 0, $00000003, 1 52 | WMC VELOCITY_SELECTION, 0, $00000009, 1 53 | WMC POSITION_SELECTION, 0, $00000009, 1 54 | 55 | WMC MODE_RAMP_MODE_MOTION, 0, $00000003, 1 56 | 57 | 58 | 59 | Loop: 60 | 61 | MVP ABS, 0, 0, 1 62 | WAIT TICKS, 1, 200 63 | 64 | MVP ABS, 0, 80000, 1 65 | WAIT TICKS, 1, 200 66 | 67 | MVP ABS, 0, 40000, 1 68 | WAIT TICKS, 1, 200 69 | 70 | MVP ABS, 0, 80000, 1 71 | WAIT TICKS, 1, 200 72 | 73 | MVP ABS, 0, 20000, 1 74 | WAIT TICKS, 1, 200 75 | 76 | MVP ABS, 0, 210000, 1 77 | WAIT TICKS, 1, 300 78 | 79 | MVP ABS, 0, 190000, 1 80 | WAIT TICKS, 1, 200 81 | 82 | MVP ABS, 0, 180000, 1 83 | WAIT TICKS, 1, 200 84 | 85 | MVP ABS, 0, 175000, 1 86 | WAIT TICKS, 1, 200 87 | 88 | MVP ABS, 0, 180000, 1 89 | WAIT TICKS, 1, 200 90 | 91 | MVP ABS, 0, 140000, 1 92 | WAIT TICKS, 1, 200 93 | 94 | MVP ABS, 0, 170000, 1 95 | WAIT TICKS, 1, 200 96 | 97 | MVP ABS, 0, 120000, 1 98 | WAIT TICKS, 1, 200 99 | 100 | MVP ABS, 0, 0, 1 101 | WAIT TICKS, 1, 200 102 | 103 | 104 | JA Loop -------------------------------------------------------------------------------- /Trinamic/bob_config.tpc: -------------------------------------------------------------------------------- 1 | // Select module 2 | #module 1 COM21/USB/id1/Landungsbruecke 3 | 4 | // Use TMC4671 register addresses 5 | #include TMC4671_register_addresses.tpc 6 | // (C:/Users/mlg/AppData/Roaming/TRINAMIC Motion Control GmbH & Co. KG/TMCL-IDE/TMCL-Script/TMC4671_register_addresses.tpc) 7 | 8 | // Motor type & PWM configuration 9 | WMC MOTOR_TYPE_N_POLE_PAIRS, 0, $00030004, 1 10 | WMC PWM_POLARITIES, 0, $00000000, 1 11 | WMC PWM_MAXCNT, 0, $00000F9F, 1 12 | WMC PWM_BBM_H_BBM_L, 0, $00001919, 1 13 | WMC PWM_SV_CHOP, 0, $00000007, 1 14 | 15 | // ADC configuration 16 | WMC ADC_I_SELECT, 0, $18000100, 1 17 | WMC dsADC_MCFG_B_MCFG_A, 0, $00100010, 1 18 | WMC dsADC_MCLK_A, 0, $0051CD10, 1 19 | WMC dsADC_MCLK_B, 0, $00000000, 1 20 | WMC dsADC_MDEC_B_MDEC_A, 0, $014E014E, 1 21 | WMC ADC_I0_SCALE_OFFSET, 0, $010081D0, 1 22 | WMC ADC_I1_SCALE_OFFSET, 0, $010081B0, 1 23 | 24 | // ABN encoder settings 25 | WMC ABN_DECODER_MODE, 0, $00000000, 1 26 | WMC ABN_DECODER_PPR, 0, $00006BA8, 1 27 | WMC ABN_DECODER_COUNT, 0, $00003499, 1 28 | WMC ABN_DECODER_PHI_E_PHI_M_OFFSET, 0, $00000000, 1 29 | 30 | // Limits 31 | WMC PID_TORQUE_FLUX_LIMITS, 0, $000009C4, 1 32 | WMC PID_ACCELERATION_LIMIT, 0, $00002710, 1 33 | WMC PID_VELOCITY_LIMIT, 0, $000003E8, 1 34 | 35 | // PI settings 36 | WMC PID_TORQUE_P_TORQUE_I, 0, $00C807D0, 1 37 | WMC PID_FLUX_P_FLUX_I, 0, $00C807D0, 1 38 | 39 | WMC PID_VELOCITY_P_VELOCITY_I, 0, $09C41770, 1 40 | WMC PID_POSITION_P_POSITION_I, 0, $005A0000, 1 41 | 42 | 43 | 44 | // ===== ABN encoder test drive ===== 45 | 46 | // Init encoder (mode 0) 47 | WMC MODE_RAMP_MODE_MOTION, 0, $00000008, 1 48 | WMC ABN_DECODER_PHI_E_PHI_M_OFFSET, 0, $00000000, 1 49 | WMC PHI_E_SELECTION, 0, $00000001, 1 50 | WMC PHI_E_EXT, 0, $00000000, 1 51 | WMC UQ_UD_EXT, 0, $000007D0, 1 52 | WAIT TICKS, 1, 1000 53 | 54 | // Set encoder position to zero 55 | WMC ABN_DECODER_COUNT, 0, $00000000, 1 56 | WMC PID_POSITION_ACTUAL, 0, $00000000, 1 57 | WAIT TICKS, 1, 1000 58 | 59 | // Feedback selection 60 | WMC PHI_E_SELECTION, 0, $00000003, 1 61 | WMC VELOCITY_SELECTION, 0, $00000009, 1 62 | WMC POSITION_SELECTION, 0, $00000009, 1 63 | 64 | WMC STEP_WIDTH, 0, $0000000A, 1 65 | 66 | WMC MODE_RAMP_MODE_MOTION, 0, $00000003, 1 67 | -------------------------------------------------------------------------------- /Trinamic/bob_config_1phase.tpc: -------------------------------------------------------------------------------- 1 | // Select module 2 | #module 1 COM21/USB/id1/Landungsbruecke 3 | 4 | // Use TMC4671 register addresses 5 | #include TMC4671_register_addresses.tpc 6 | // (C:/Users/mlg/AppData/Roaming/TRINAMIC Motion Control GmbH & Co. KG/TMCL-IDE/TMCL-Script/TMC4671_register_addresses.tpc) 7 | 8 | // Motor type & PWM configuration 9 | WMC MOTOR_TYPE_N_POLE_PAIRS, 0, $00030001, 1 10 | WMC PWM_POLARITIES, 0, $00000000, 1 11 | WMC PWM_MAXCNT, 0, $00000F9F, 1 12 | WMC PWM_BBM_H_BBM_L, 0, $00001919, 1 13 | WMC PWM_SV_CHOP, 0, $00000007, 1 14 | 15 | // ADC configuration 16 | WMC ADC_I_SELECT, 0, $18000100, 1 17 | WMC dsADC_MCFG_B_MCFG_A, 0, $00100010, 1 18 | WMC dsADC_MCLK_A, 0, $0051CD10, 1 19 | WMC dsADC_MCLK_B, 0, $00000000, 1 20 | WMC dsADC_MDEC_B_MDEC_A, 0, $014E014E, 1 21 | WMC ADC_I0_SCALE_OFFSET, 0, $010081CA, 1 22 | WMC ADC_I1_SCALE_OFFSET, 0, $010081AD, 1 23 | 24 | // ABN encoder settings 25 | WMC ABN_DECODER_MODE, 0, $00000000, 1 26 | WMC ABN_DECODER_PPR, 0, $00001AF4, 1 27 | WMC ABN_DECODER_COUNT, 0, $00001531, 1 28 | WMC ABN_DECODER_PHI_E_PHI_M_OFFSET, 0, $00000000, 1 29 | 30 | // Limits 31 | WMC PID_TORQUE_FLUX_LIMITS, 0, $000009C4, 1 32 | WMC PID_ACCELERATION_LIMIT, 0, $00002710, 1 33 | WMC PID_VELOCITY_LIMIT, 0, $000003E8, 1 34 | 35 | // PI settings 36 | WMC PID_TORQUE_P_TORQUE_I, 0, $00C807D0, 1 37 | WMC PID_FLUX_P_FLUX_I, 0, $00C807D0, 1 38 | 39 | WMC PID_VELOCITY_P_VELOCITY_I, 0, $04B00BB8, 1 40 | WMC PID_POSITION_P_POSITION_I, 0, $005A0000, 1 41 | 42 | // ===== ABN encoder test drive ===== 43 | 44 | // Init encoder (mode 0) 45 | WMC MODE_RAMP_MODE_MOTION, 0, $00000008, 1 46 | WMC ABN_DECODER_PHI_E_PHI_M_OFFSET, 0, $00000000, 1 47 | WMC PHI_E_SELECTION, 0, $00000001, 1 48 | WMC PHI_E_EXT, 0, $00000000, 1 49 | WMC UQ_UD_EXT, 0, $000007D0, 1 50 | WAIT TICKS, 1, 1000 51 | 52 | // Set encoder position to zero 53 | WMC ABN_DECODER_COUNT, 0, $00000000, 1 54 | WMC PID_POSITION_ACTUAL, 0, $00000000, 1 55 | WAIT TICKS, 1, 1000 56 | 57 | // Feedback selection 58 | WMC PHI_E_SELECTION, 0, $00000003, 1 59 | WMC VELOCITY_SELECTION, 0, $00000009, 1 60 | WMC POSITION_SELECTION, 0, $00000009, 1 61 | 62 | WMC STEP_WIDTH, 0, $0000000A, 1 63 | 64 | WMC MODE_RAMP_MODE_MOTION, 0, $00000003, 1 65 | -------------------------------------------------------------------------------- /images/Cross-sectional-view-of-an-ironless-linear-motor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/Cross-sectional-view-of-an-ironless-linear-motor.png -------------------------------------------------------------------------------- /images/IMG_20200509_164317.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20200509_164317.jpg -------------------------------------------------------------------------------- /images/IMG_20200515_163512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20200515_163512.jpg -------------------------------------------------------------------------------- /images/IMG_20200516_120124.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20200516_120124.jpg -------------------------------------------------------------------------------- /images/IMG_20200822_144159.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20200822_144159.jpg -------------------------------------------------------------------------------- /images/IMG_20200913_174158.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20200913_174158.jpg -------------------------------------------------------------------------------- /images/IMG_20200913_174208.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20200913_174208.jpg -------------------------------------------------------------------------------- /images/IMG_20200916_184416.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20200916_184416.jpg -------------------------------------------------------------------------------- /images/IMG_20200920_133147.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20200920_133147.jpg -------------------------------------------------------------------------------- /images/IMG_20200922_221401.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20200922_221401.jpg -------------------------------------------------------------------------------- /images/IMG_20201005_200555.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20201005_200555.jpg -------------------------------------------------------------------------------- /images/IMG_20201005_224524.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20201005_224524.jpg -------------------------------------------------------------------------------- /images/IMG_20201018_220624.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20201018_220624.jpg -------------------------------------------------------------------------------- /images/IMG_20201018_220709.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20201018_220709.jpg -------------------------------------------------------------------------------- /images/IMG_20201018_220736.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/IMG_20201018_220736.jpg -------------------------------------------------------------------------------- /images/Linearmotorprinzip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/Linearmotorprinzip.png -------------------------------------------------------------------------------- /images/MagnetSpacingFormula.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/MagnetSpacingFormula.png -------------------------------------------------------------------------------- /images/Rotating_field-compact.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/Rotating_field-compact.gif -------------------------------------------------------------------------------- /images/TRINAMIC_LOGO_STANDARD_RGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/TRINAMIC_LOGO_STANDARD_RGB.png -------------------------------------------------------------------------------- /images/coils.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/coils.jpg -------------------------------------------------------------------------------- /images/forcer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/forcer.jpg -------------------------------------------------------------------------------- /images/twoPoleMotor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TkkrLab/LinearMotor/c54b1259389555db825fd87d3ac9c6f672433e34/images/twoPoleMotor.jpg --------------------------------------------------------------------------------