CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > OpenSource CNC Design Center > Open Source Controller Boards


Open Source Controller Boards Discussion for Open Source CNC type Controller Boards and other related items. (for personal use only)


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-10-2009, 04:00 AM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road
Open letter

Someone asked if it makes sense to design a step motor drive from scratch. It was a very good question. I replied:

It all depends on what your goals are:

1) I just want a motor drive; I don't really care how they work:
It probably is not worth designing a drive if this is your goal. It takes many years to design a really good industrial-grade motor drive. You really have to devote your professional life to circuit design to do that. Best bet: Buy finished drives. It is the least expensive when you calculate the time you will invest.

2) I like electronics a little bit as a hobby. I want to learn how to build a drive:
Easiest is to build a drive using a "chip" (Allegro, L297/298, etc) or the TinyCPLD; there is no practical difference. The chip takes care of the logic while you supply the external parts to build a drive. I call this the cookbook approach. The chip manufacturer gives you a recipe (like for a cake), you follow it and presto, you have a drive. It takes some time, a little money and you get the pleasure of knowing you built it yourself.

3) I like electronics a lot. I also like things that move. I want to become an expert:
This is the hardest path but it has the greatest rewards. Do not use step motor specific integrated circuits after the first time or two. Use them to learn, then move on.

If you are a programmer, learn analog electronics. If you are not a programmer, learn analog electronics; it will be easier because your mind won't be polluted with programming skills and you won't have to change your mindset. After all, the world IS analog.:-)

Analog electronics is hard initially; become good enough with math (calculus) to where you can call math a friend. There are only 3 components in electronics; R, L and C. Learn about them until they are your friends too.

Get some lab equipment. Most important, get an oscilloscope. An excellent scope is a TEK465 which can be had for about $300. Your 'scope is your eyes so become proficient at using it. Proficient means your scope is your eyes and you use it just as easily. Get a good multimeter, soldering iron station and a lab-type power supply (0 to 60V, 0 to 1.5A is good enough). Maybe get a function generator (2MHz, sine, triangle, squarewave, the kind with an analog freq knob). That's it, less than $500 total if you're careful.

Get parts. A selection of 1/4W resistors from 10 Ohms to 1MEG; preferably all 5% standard values, 10% values otherwise. Get a few of each (10), get 100 of 1K, 10K, 100K; they get used a lot. Get a selection of caps from 22pF to 1uF. A semi-log "1, 2.2, 4.7" scale is sufficient. Get NPN and PNP small-signal transistors (PN2222A, PN2907A). Get some small-signal MOSFETs (BS170). Get some power MOSFETs (IRF530 or IRF540). Total cost, <$50. Get either 74HC or CD4000 series DIP gates, D-flops and counters. Get 14-pin and 16-pin IC sockets. Never wire directly to IC pin; use sockets. You 6he first time you blow up an IC.

Get some 0.1" ((2.54mm) perf-board and perf-board pins (T42). Get some 28-guage tinned bare wire and Teflon sleeve tubing to insulate the wire. Get an Exacto knife with a #11 blade to cut the sleeve tubing. This all will be used to wire-up your breadboard designs.

That is everything you need to get set up; the rest is up to you. Learn as much as you can, breadboard what you learn, change what's wrong on your breadboard until it works. Modify your schematics accordingly. It is an iterative loop you go through many times until everything is right. The greatest pleasure is when finally, everything is right.

4) I want to build drives, sell them, make a lot of money and become rich:
You have to fit option (2) or option (3) for that. Let's start with option (2). It is a loser business-wise in my opinion because it will not get you to that goal.

There are some dirty little secrets about application-specific integrated circuit step motor controller ICs.

One is they cost a boatload of money to develop; all ASICs do. They get developed for a deep-pockets customer who has very specific requirements. The IC manufacturer asks to reserve the right to market the resulting paid-for IC and the deep-pockets customer doesn't care because he paid for what he needs. What gets marketed afterwards is an IC that really only satisfies the needs of the original customer. Witness the Allegro debacle if you question the premise.

Second is IC manufactures couldn't design themselves out of a wet paper bag when it comes to CNC-rated motor controllers. Nor should they; they are experts at forging silicon, they are not experts at applications. Paying customers give them and pay for applications and their applications are not yours. You have a million or so dollars? Then you could change all that.:-)

These companies are not as big as you may think. They are not TI, Toshiba or ONsemiconductor. They operate by the same rules that govern smaller companies; they cannot afford a "shoot an arrow in the air and see where it lands" R&D department.

Next, you are screwed because you manufacture a cookbook design. What you turn out using an ASIC is the same design as every other Tom, Dick and Harry turns out. There is no significant variation between what you do and everyone else does. You and everyone has to live with the imposed limitations built-in with these compromised devices. You cannot get an advantage; they are business killers.

Option (3) offers the only escape.

A small minority opt to copy other's work but that is a dead-end too. Copying means you don't have a clue why the copy works so you can't possibly maintain it. Surprisingly some rather large companies choose this route.

Don't start a business you expect to succeed until:

The only real option is the hardest one. Spend a lot of time learning what you need, love what you do and become an expert at it. It's hard and you have to have a disposition for it. I don't think there is another way.

Avoid the "I am a hammer, so every solution must be a nail" mentality. Everyone is a programmer. Everyone knows how to program. Programmers are a dime a dozen because the entrance fee is so low. Stop being a programmer, it is a wider world than you imagine. It is not the best tool for every problem. It is not the best tool for motor drives unless you plan to overpower it with a very totally expensive DSP solution.

I have looked at the "I'm going to build a drive with a "PIC, AVR, Pentium 5, whatever" posts. These are very smart people using the absolutely wrong tools. Hammers when screwdrivers are needed. The same application of effort learning programming can be applied to learning about R, L and C. You can do it; it is just learning, that's all.

I have every wish to see someone become better at this than I am. I want to give any help I can to make it happen. I love analog electronics, things that move and it all just happened. I didn't suffer pain, it all fell together over the years. I'm certainly not the smartest guy in the world so how hard can it be?:-)

Do something different. Stand out. Don't just another mown blade of grass.

Mariss
Reply With Quote

  #2   Ban this user!
Old 01-10-2009, 09:15 AM
 
Join Date: Aug 2006
Location: USA
Posts: 2,624
kreutz is on a distinguished road

I agree 100%.

A quick question: Do you ever sleep?

Best regards,

Kreutz.
Reply With Quote

  #3   Ban this user!
Old 01-10-2009, 11:08 AM
 
Join Date: Dec 2004
Location: usa
Posts: 1,665
TOTALLYRC is on a distinguished road
Thumbs up I am with Mariss on this one.

Dear Mariss,

Standing out by not being a mown blade of grass invites the hammers to come and treat you like a nail. It takes real courage and a supportive family to step up, stand out, and take on the world, like you have.

I have run several buisnesses over the years, some profitable, and some not, but I wouldn't trade the experiences for anything. At the very least, it gives me a better insight into what it means to be a employer.

I am with you about the purchase vs make a drive, there is no comparison in quality and any money saved is a false economy in my opinion unless there is absolutly no money and an unlimited amount of time.

Mike

P.S. Can we get a smilie that says, "I'm with Mariss" It would save a lot of typing.
__________________
Warning: DIY CNC may cause extreme hair loss due to you pulling your hair out.
Reply With Quote

  #4   Ban this user!
Old 01-10-2009, 04:35 PM
 
Join Date: Aug 2008
Location: USA
Posts: 123
WGoyer is on a distinguished road
Here Here

Mariss,

Having a natural curiosity and love for how things work is the key. Great submission!

In 1966, I was fresh out of school with an AA in Electronics Technology at my first job (Librascope, Glendale, CA). The guys I worked with fixing Mark 48 torpedo fire control system components were mostly parts swappers. I finally realized there must be a better way and actually read the book on the stuff we were fixing. One book on analog power supply regulators was so good that I got much faster at fixing things than my buddies were. By understanding how things actually work, I was offered a better job quickly.
Hang in there and thanks for your post.

Warren
www.uptimecorp.com
Reply With Quote

  #5   Ban this user!
Old 01-10-2009, 05:32 PM
hesham morsy's Avatar  
Join Date: Apr 2006
Location: egypt
Age: 41
Posts: 141
hesham morsy is on a distinguished road
Thumbs up Simply The Best

"I'm with Mariss"

Electronics For Analog Signal Processing
http://www.youtube.com/view_play_lis...90C9B41&page=1

Last edited by hesham morsy; 01-10-2009 at 06:50 PM.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 01-18-2009, 03:47 AM
 
Join Date: Apr 2004
Location: Jakarta - Indonesia
Posts: 76
Ch_Irawan is on a distinguished road

Mariss, why don't you make higher power drives? BLDC drive too? Isn't that another grass to mow on?

I'am #3 on your goal list, but will use an affordable ready made motor drive if available.

-ichan
Reply With Quote

  #7  
Old 01-19-2009, 12:54 AM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road

Originally Posted by Ch_Irawan View Post
Mariss, why don't you make higher power drives? BLDC drive too? Isn't that another grass to mow on?

I'am #3 on your goal list, but will use an affordable ready made motor drive if available.

-ichan
I could and I have. I have a very nice sinusoidal commutation BLDC servo prototype running for over 5 years now. It will never see production. Why? Because there is no standardization with BLDC motors.

Steppers are the most standardized, buy a step motor from X, Y or Z manufacturer, and if it's a NEMA size, it will fit perfectly. DC servomotors are somewhat less so but it's still manageable. BLDC motors are the worst. Everyone has their own standard and no two standards are alike. It would be a support nightmare to market a drive for these motors.

So it sits on the lab shelf and gets turned on once in a while just to show it still works.

Mariss
Reply With Quote

  #8  
Old 01-21-2009, 02:15 AM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road

Open Letter II;

I'm sure everyone has noticed the wholesale trend away from through-hole components towards surface-mount. Prices for through-hole parts are going up, surface-mount component prices are dropping. DIP ICs, axial-lead resistors, leaded capacitors, TO-92 transistors, glass signal diodes are all getting more expensive and worse, harder to find.

Worse yet, the selection is shrinking. The 7400 series ICs used to have nearly 250 different devices. Today it has shrunk to about 25 or so. The same goes for small-signal transistors and diodes. It is a sign the world is changing, changing to surface-mount and programmable devices.

At first blush this trend seems depressing on two levels. First, how can you breadboard up a circuit if all that's available is surface-mount parts. Don't you need a billion-dollar SMT production line to use them? Second, what happened to all the 7400-series "glue-logic"? How am I going to prototype a mixed-signal breadboard when I can't even find a crummy 74LS169 counter anymore? Electronics is moving beyond the reach of an ordinary person!

Don't despair. With new challenges come new opportunities. It IS possible to breadboard ideas using SMT components without investing millions of dollars. I am 60 years-old and I nowadays 'breadbard' entirely in 0603 (parts that are 0.06" by 0.03" in size) surface-mount. I cannot take the time to program one of our pick-and-place machines to run-off a single breadboard. I'm too lazy; I manually place SMT parts and it's a breeze.

All it takes is a few adaptations and some new equipment. Remember, your grandfather's soldering iron was a screwdriver-like tool with with a 1/2" square pointed cooper bar at the biz end. It was charcoal-fire heated and you'd have to work quick with it. Today's new equipment is a hot-air soldering station. You must have it to manually work with SMT.

I used to use 0.1" perf-board and Vector T-42 pins, a roll of 28-gauge tinned wire, Teflon tubing and an Exato knife with a #11 blade. It was all I needed to breadboard. Today what I need is a surface-mount double-sided plated thru-hole breadboard PCB (of my own design), some no-clean flux, a hot-air station, a 0.5mm dia tip soldering iron, tweezers (and a roll of 28-gauge tinned wire, Teflon tubing and an Exato knife with a #11 blade). It all goes together quicker now.

About the glue-logic. 7400-series logic is dying. Eventually all that will be left is buffers and inverters. No gates, no D-Flops, no counters, no nothing. Why? CPLDs is why.

Imagine you have to cobble-up a breadboard that has a couple 74LS169 U/D counters, a 74LS157 mux, a half-dozen 74LS74 D-Flops and a boatload of 74LS00 NAND and 74LS02 NOR gates. Throw in some 74LS86 XOR gates as well. About 20 DIP packages in all. You have drawn up your logic schematic and you are ready to wire-wrap. In the amount of time you take to wrap the 10th IC, you could have written Verilog code and programmed a $1 CPLD. You don't like how it works? Change the schematic, edit the Verilog code and you have it covered. Ever try to undo wire-wrap and redo it?

Final thing. A lot of people know MCU programming and they think every problem can be solved with an MCU; the "if you are a hammer, every problem is a nail" thing. It is particularly painful to read when it comes to motor drives. An MCU is a poor tool for that because they are sequential machines. CPLDs are broadly parallel machines; they are an assembly of gates and registers. Some applications like motor drives natively require gates and registers.

For the MCU crowd: Write code for an oscillator. Not the XTAL one attached to your MCU; write code for an actual clock oscillator on a device that has no clock. It takes one line of Verilog code "assign x = ~y;" where 'x' is defined as an input, 'y' defines an output. Place an XTAL across input to output, add a feedback resistor and you have yourself a genuine oscillator (include the padding caps of course). That is the level of control you have.

What's nice is on occasion you can get a development kit (256 macrocell CPLD development board, cables, power supply and complete professional development software) for $29. I urge anyone comfortable with logic design (the kinds that can draw logic schematics down to the gate level), get a CPLD kit and learn Verilog. It's dirt simple easy, even I could do it. You'll never even miss 74LS afterward.

Mariss

Last edited by Mariss Freimanis; 01-21-2009 at 02:37 AM.
Reply With Quote

  #9   Ban this user!
Old 01-21-2009, 04:39 AM
 
Join Date: May 2006
Location: Australia
Age: 40
Posts: 2,205
epineh is on a distinguished road
Buy me a Beer?

My first foray into SMD was a while ago and the board was for the Allegro A3986 IC...well we all know how that ended. I can make quality PCB's myself (direct printing) and like the idea of SMD, it is just so hard to get parts here, all my orders have had sections of parts not turn up and so on...I know I just have to find better suppliers, that in itself is proving difficult. Our Aussie dollar is worthless right now so importing directly is expensive.

Enough wining from me... I have a few more through hole design's to finish off then I guess I better start using them SMD parts like what those city folk use

I also have CPLD's and FPGA's on the "to do" list, parallel logic programming just sounds sooo nice.

Russell.
Reply With Quote

  #10   Ban this user!
Old 01-21-2009, 08:03 AM
 
Join Date: Aug 2006
Location: USA
Posts: 2,624
kreutz is on a distinguished road

I have been doing manual SMD prototyping for years. It is so easy I don't like to use Through-hole parts anymore. Also made some DIY tools for the trade: An 8mm multi tape component dispenser (my first one was a courtesy of Pmimmo), a video magnifier, and a temperature controlled reflow oven. I use the later and the former almost everyday.

For the simplest prototypes you need the tools Mariss specified. I also use a hand magnifier (x3 and x5) and a vacuum manual pick-up tool. For a little more complex prototypes I use a cheap pneumatic solder paste dispenser and the reflow oven. For even more complex prototypes, I use a cheap laser cut 4mils mylar stencil for super fast paste dispensing and the reflow oven.

Total prototyping assembly time is dominated by the manual positioning of the components. Stencil + reflow is done in less than 5 minutes. There is no limit to board complexity or amount of components.

Adding to the letter #2, CPLDs and FPGAs are one of the best inventions for the DIY. Once you have a development board (it does not have to be an expensive board with the kitchen sink on it), you practically have a multi chip universal logic circuit you can change in minutes without soldering a single wire. Nevertheless there are still single gate's glue logic (in Small SMD footprint) and logic voltage translators being sold for the last time convenience.

Through-hole prototyping is a dead end, it is becoming even more limiting and expensive every day. I am only a couple of years younger than Mariss , so age is not a problem.

BTW: 0603 components (1.6 mm x 0.8 mm) are also what I have been using since I started SMD prototyping.

Kreutz.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 01-27-2009, 09:08 PM
 
Join Date: Nov 2004
Location: US
Posts: 21
91bird is on a distinguished road

Originally Posted by Mariss Freimanis View Post
Open Letter II;
For the MCU crowd: Write code for an oscillator. Not the XTAL one attached to your MCU; write code for an actual clock oscillator on a device that has no clock. It takes one line of Verilog code "assign x = ~y;" where 'x' is defined as an input, 'y' defines an output. Place an XTAL across input to output, add a feedback resistor and you have yourself a genuine oscillator (include the padding caps of course). That is the level of control you have.

What's nice is on occasion you can get a development kit (256 macrocell CPLD development board, cables, power supply and complete professional development software) for $29. I urge anyone comfortable with logic design (the kinds that can draw logic schematics down to the gate level), get a CPLD kit and learn Verilog. It's dirt simple easy, even I could do it. You'll never even miss 74LS afterward.

Mariss
Isn't using a crystal creating a clock?

And usually the development kit has design examples that you can download from the manufacturer to get up and running. The bigger CPLDs and FPGAs you can also program a portion or the device to be a (or multiple) microcontroller(s). Now you can have multiple processors running however you want on a single chip with custom digital logic. I have 2 FPGA boards sitting on my desk (with an ESD mat). Maybe I'm weird.

Since you mentioned a power supply with a 60V 1.5A rating I would also say some comments relating to safety with high voltage.
Reply With Quote

  #12  
Old 01-27-2009, 10:52 PM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road

1) A quartz crystal needs an oscillator circuit to become a clock. Usually a CMOS inverter with DC feedback (a 1MEG resistor) to force it into linear operation. The crystal is placed in parallel with the resistor and a small capacitor (33pF) goes from inverter input to GND for phase compensation.

2) Strangely enough, almost no safety precautions are needed with a 60VDC, 1.5A supply. I handle banana-plug patch cords without any concern about touching the metal clips. If your hands are really sweaty, you may feel a slight tickle. You don't feel a thing if your hands are dry.

Mariss
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help!- Letter/Sign Template Kit? jeffmorris WoodWorking 1 03-23-2008 01:36 AM
letter cutouts AndrewB Autodesk Software (Autocad, Inventor etc) 1 01-11-2008 11:48 PM
Raised Letter Name Plates RobtL Benchtop Machines 43 12-04-2006 06:31 PM
Looking for CAD Letter/Number templates b0gh0s General CAM Discussion 6 02-16-2006 11:02 PM
Perils of the open loop: strategies for letter engraving tsomer Visual Mill 1 08-09-2004 07:22 AM




All times are GMT -5. The time now is 12:56 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361