![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| PIC Programing / Design Discuss programing of PIC chips here and design of electronics using PIC chips. |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I bread boarded a linistepper clone using op amps and power mosfets in a classic voltage controlled current source fashion. Keeping w/the linear theme Im using a dual 8 bit r2r ladders to control the feedback circuit w/o pwm. On the firmware side Im running a simple state machine using romans high torque half stepping on a 18f4620 in C. All works well but I have a Q regarding step rate. Judging solely on the sound and motion of the motor a step-rate of 750uS seems best. I have a LMS S2x on order and cobbling some old pc parts to run EMC. In the interem how best can I test the driver performance? The current circuit switching speed is limited to 20uS, but I plan on getting some higher bandwidth op amps. |
|
#2
| |||
| |||
| well Ive run 1/2, 1/4, 1/8, 1/16 all in hardware (r2r ladder) and all works well. I epoxied a NTC thermister into a heatsink that the mosfets are mounted to and under single stepping the heat sink never broke 40C. Im also using 1R 10w Rsenses for each phase but I think this is over kill. That and they are low tolerance cement types so just using 2 would be better. The proto circuit seems to work fairly well so Im going to go ahead w/a pcb. Before I do I want create a scaling VDD supply for the uC since the r2r ladder is driven driver directly off the io ports, that way i can have true 8 bit resolution for 2.5a to 5A a phase. Some blurry pics of the proto board and a single phase running 1/8. ![]() |
|
#3
| |||
| |||
| Well there doesn't seem to be much interest in this thread but I like posting stuff on the innerweb so Im attaching a prelim schem the circuit. In a nutshell I monitor step/dir and brake lines and scale the current as indicated by the logic. The IO front is pretty straight forward, IIRC the A port is open collector so these will req pull ups/downs depending on what EMC logic dictates. I included a 485 transceiver so I can calibrate the boards via a gui. Ill add another r2r ladder to adc pin for hardware settings. The switches are just 3 pin headers that switch between IO and ICSP to program in circuit (this will be smt). The drive side is a classic voltage controlled current source w/feedback. I chose r2r ladders as they are fairly inexpensive and provide better linearity/response than pwm. I usually buffer uC io lines but according to a app note I read so long as the load impedance is > 255 times the pins source your good. 20k Rs are used and it seems to work well w/o distressing the uC. Any rate the ladders scale the vdd voltage to the op amps that will drive the gate of the fets to a point where their feedback matches there input. The feed back is supplied via the Rsenses connected to the source of the fets. What you end up w/is a current that equates to Vin/Rsense, scaling Vin scales current sunk by the fets. To control the four phases each fet gate driver is pulled down by another fet. This reqs the voltage followers preceding the gate drivers as shorting the drivers output could potentially pulldown the V+ rails. I could have put in series resistance to avoid the voltage followers but I was afraid that w/the fet capacitance would kill switching time. I problably should add weak pulldowns to the fet gates as well. Any input would be appreciated, especially critical input as dealing w/inductive loads is new to me and Im sure Ive made a few misteps |
|
#4
| ||||
| ||||
| I don't think that I have any experience driving steppers or other inductive loads with power FETs, but way back when I once did such a thing with bipolar transistors, it was recommended to use a reverse-biased diode across each coil, to shunt any back-EMF inductive voltage spike (due to switching the inductor current) away from the driving transistor. But then maybe you're microstepping within the linear range of the devices instead of on-off switching with them, and so maybe it's less of a concern (or maybe the power FETs have substantially higher breakdown voltages than what I used to deal with). For all that I know, maybe steppers these days have the diodes built in. Or not. |
|
#5
| |||
| |||
| No the motors don't have internal diodes. ![]() Nice build. It's a little over-complex (and over-PICed) for one motor driver but it should perform pretty well. May I suggest adding 2 caps on the 2 outputs of the R2R ladders, to give linear smoothing between microsteps as per the Linistepper. Diodes from the 4 motor coils to PSU+ may be needed if your FETs are lowish voltage. With linear drivers and especially once linear smoothed the swing voltage on the open coil of the unipolar pair rarely reaches 2x PSU voltage. So if you have a 25v PSU and 100v rated FETs you have an ok safety margin and diodes are not needed. If you want to build a couple of these for a CNC machine you can get R2R networks ready made in DIL package from Farnell. Otherwise, if you know the microstep resolution you need (like 1/16) then you can use a lot less resistors and choose the values to compensate the non-sinusoidal torque curve of the motor, as you don't need true 8bit resolution and trying to replicate proper sine/cosing curves is not needed and actually worse than custom selected microstep values. Thanks for the photos. It looks like you had some fun wiring all that up on the breadboard! Are you going to build this on PCB for real world use or is this more a learning exercise? If you are going to build it then it's probably worth posting PCB and parts values etc so people can offer improvements and suggestions. |
| Sponsored Links |
|
#6
| ||||||
| ||||||
Roman, first off thanks, I really enjoy your site and approach. Very helpful.
I ended up w/2.3A phase motors
If your interested Ill definitely give you one if you like to play/scrutinize it. This if for learning and personal interest, no intent on selling or marketing anything. Thanks again |
|
#7
| |||||
| |||||
Diodes there cause a "slow decay" effect that takes longer for the magnetic field to change direction etc, "Jones on steppers" covers the decay modes and recirculation currents pretty well although it's a little dated now as a reference. Without the diodes you get good high speed performance, and as unipolar linear the most voltage you will get on the open end of the winding is about 2x the PSU voltage, usually even less with Linis because they are smoothed and the swing is slower. I really appreciate that. It's just a mish mash of thrown together hobby stuff mainly. I like giving free ideas and designs etc back to the world but this China thing is getting me down lately. It seems they are sucking up everyone's goodness and churning out crap for profit that only they benefit from - often at the expense of the rest of the world when nasty crap products beat out well made stuff that people built with care. It's almost like turning good into bad, and where this next 5 or 10 years is going to end up I really don't know. I'm almost wondering if I'm going to bother giving ideas away any more, and that bothers me more than China; when the good people stop being good because the bad people are being bad. Anyway that is way too philosophical and off topic to boot. ![]() Apart from being tuned that way, you can also tune for a particular speed (as in Linistepper being used to drive a telescope) by picking the caps to JUST smooth the microsteps at that fixed motor speed. Those R2R ladders would be nice and clean. As for the motors, it's going to get a little toasty at 2.3A. Depending on your machine needs you might have 15v or 20v PSU over the motor voltage so you are talking 2.3A x1.414 x 20v = 65w heat from each motor driver... That's one of the reasons the Lini has remained a 1A driver, at least in the full microstepping form. ![]() Thanks for the offer of a board but I'll probably decline, I'm just way to busy at the moment with "real work" stuff to do much fun stuff. |
|
#8
| |||
| |||
| Roman, again thanks. I had no idea re the flyback diodes, makes sense tho. You are correct re the power dissipation as well. My initial post I was driving the motors w/an old atx psu at 12v, ruffly half what I have planned. Heat will be an issue and will req managment. The power mosfets can be paralleled but this raises other considerations for them being mounted off board, which I had planned. Since you seem to enjoy pats on the back, I have to say, prior to finding your site I was about build a LMD18245 based circuit (I was sampled 5). I really like your approach of making the silicon sweat vs the motors. Cheers Wayne |
|
#9
| |||
| |||
| Haha everybody enjoys pats on the back - of course. Speaking of which you have done most of the work already writing the firmware and testing with the parts on breadboard. Please don't let me talk you out of making a Lini type driver setup, there are payoffs in terms of fantastic motor smoothness and better CNC cutting because of it. It may limit your max traverse speeds a little but all that depends on your machine needs. There's too many posts on the forum where people seem obsessed with big speeds when really you need a machine that works really well at the actual cutting speed, and is efficient enough in traverse. If you do go ahead with building the drivers there are other payoffs too in satisfaction and in ability to repair, modify etc. Since you have all the firmware skills you can easily add features to your drivers, or automate them, or change microstep modes at particular speeds etc to tune out resonances on your exact machine. All those payoffs are lost if you go to a commercial driver or standard dedicated driver chip. Anyway I wish you good luck with the endeavour whatever option you choose. |
|
#10
| ||||
| ||||
| Regardless, I've found this discussion to be interesting... I'm looking around for an inexpensive stepper driving solution for a DIY project, and I'll take this info into consideration... |
| Sponsored Links |
|
#11
| |||
| |||
| The substantial costs of my circuit are the op amps and if higher current driving is desired the Rsenses. Considering that the opamps used for my circuit should be rail2rail, single supply, precision w/good bandwidth. Typical cost for duals are ~$3-5 each and reqs x4 in its current form. As Roman has pointed out repeatedly power dissapation of the switches and Rsenses are the lynch pin of this design. For my circuit the power mosfets can be paralleled within reason and very low cost ~$.30-.50 each. The Rsenses on the other hand can get very exp w/moderate wattage/tolerance at $5-10 each, they become the most exp component. The goal at this point for me is to get the circuit running w/the motors I have 2.3a phase and use brute force to keep things cool (cpu sinks/fans). Rsenses and power mosfet w/be off board. Im adding a thermistor biased comparator circuit for a thermal shut down. Once done I plan to map the thermal characteristics in a temp chamber, from there I can determine what the real capability of the circuit will be. Just brainstorming here, but anyone know how to go about making low impedance dummy loads? I know back in the old days techs would just use plumbing pipe to test output transformers. i wonder if this concept could be used for the Rsenses, obvioulsy tolerance w/be a key issue. |
|
#12
| |||
| |||
| Well two revelations today, exceeding Vds causes fets to fail short and releases the magic smoke out of components ![]() Re the Rsense power dissipation issue, why not make a low ohm shunt and scale the gate drive feedback signal? Need to play w/the numbers more, may cost more tahn just getting to-220 package resistor. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cricut Hack | asenna | Printing, Scanners, Vinyl cutting and Plotters | 6 | 06-25-2011 08:12 PM |
| Lini-Stepper Revisited ( Hacked ) | kowell | PIC Programing / Design | 103 | 10-20-2009 11:34 PM |
| best microstepping driver (Lini/pictsep) | student1616 | Open Source Controller Boards | 0 | 09-05-2008 12:36 PM |
| Lini-Stepper Revisited ( hacked ) | kowell | PIC Programing / Design | 0 | 06-29-2007 06:12 AM |
| Lini Mod | OCNC | PIC Programing / Design | 0 | 07-24-2006 10:19 PM |