586,000 active members*
4,772 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 35
  1. #1
    Join Date
    Feb 2006
    Posts
    183

    Hacking up a bad controller

    I have a MAXNC10CL that has not run right since day one, and it has died altogether once. Now it is basiclly useless again. The wll not run hardly at all. I swapped out the X micro from the unused A driver, I also swapped out the TIP120's.

    The motors are 8 wire uni. 210 oz, 2 amp. Their system runs in quadrature and requires special drivers for MACH3, for which I have never had it really work well, but is prefernce of machine software There are encoders attached which I can lose.

    Please tell me if this is semi workable as a cheap and dirty temporary solution:

    I keep their controllerbox, with limit switches and parallel port in tact on their box so less to reinvent. I cut traces on their board to access the input pins 4,5,6,7,8,9 pins. for step and dir. I keep their 4 TIP120's per motor in tact, cut the traces to them.

    Either A. write some simple code for an SX to receive the Step an Dir, and output the appropriate sequence to the already existing mosfets, or B. Get a simple driver like an EDE1200 6 wire driver. The 1200's are a shiort drive, the SX are on hand as well. I also have th SX28's on hand and could perf board the whole thing.

    Hopefully someone can say this is workable or not. MAX wants 450 for just the stuffed board, but why try that again when it never worked, and I am still locked into that company like a prisoner. Gecko is 3 drives at 120 ea plus a PS, but would work, but would require some other extrenal box plus rewiring everthing.

    Thanks for any suggestions.

  2. #2
    Join Date
    Jun 2003
    Posts
    3312
    Can you post some pictures of the board? Probably some clues there.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  3. #3
    Join Date
    Feb 2006
    Posts
    183
    Ok here is the poard. It has X, Y, Z, A. Quadrature, 6 wire unipolar.

    I picked up some EDE1200 unipolar drivers today to breadboard. I see no reason I can't just cut traces and use the existing box, PS, TIP120's. I guess we'll find out soon.

    http://www.elabinc.com/ede1200.pdf#search=%22ede1200%22
    Attached Thumbnails Attached Thumbnails maxncboard.jpg  

  4. #4
    Join Date
    Jun 2003
    Posts
    3312
    Just looking over the data, looks to me like a normal unipolar stepper driver, 2 phase full ste, half step. Using the TIP120's to sink the appropriate amount of current. Since the LPT port has defined inputs and outputs, I can't say I see what the problem would be running it from the standard software controllers. Mach3 for winxp, and many others for older win9X systems or dos. How are you powering the board? Do the motors have lables giving resistance, voltage or current? You say 8 wire unipolar, I assume you mean they are eight wire motors, wired for 6 wire unipolar?
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  5. #5
    Join Date
    Feb 2006
    Posts
    183
    I am sorry if I said 8, I was in a rush. They are 6 wire motors. Lin engineering 5718M-05 2 amp. I picked up the EDE1200's and breadboarded one for a test using the Step and Dir from the parallel port. I cut the traces from the existing board to the parallel port, ran the Step/Dir pins to the EDE1200 uni driver IC. Set it to full step for testing. I cut the traces to the 4 TIP120's, and left the outs in tact to the motor. The center tap to the motor is at 18v from the old xontrllers PS until I plug the motor in, then it drops to 8 volts for some unkown reason. Prior to tonight the rail was usually around 18 to the center tap with all motors plugged in, but now cutting traces or something else has caused the rail to drop in half when just one motor is plugged in, also the controller's breaker is popping often now as a result. The motor is getting quite hot, and I don't recall it getting hot before todays changes.

    The inputs to the TIP120's are now from the breadboarded EDE1200 driver IC. The driver is basically a PIC packaged for driving unipolar motors. In testing the driver with LED's first, everything looks right, but when trying to run the motor, it will attempt to rotate in the correct direction, but is not quite right, it stutters, shakes, sometimes goes around partially, it will reverse according to the reverse jog key, but the same thing, very rough. These tests are at very low jog speeds. At high speeds, it will not turn at all, just sits still buzzing. I have tried other combinations thinking I had the phases wrong, but haven't had any luck, I think it is plugged in right though. The problems must be related to the motor getting hot and sinking the rail, which may very well be causing it not to turn properly. Why it is sinking the 18v rail now is a mystery. Once that is solved, I think Mach3 will drive it just fine once this rail issue is solved.

    Just to clarify the problem: Whe I plug the motor into one of the unchanged outputs where there were no traces cut for the axis, the rail stays at 18v, but when I plug it in on the output of the TIP120's that are now routed to the EDE1200 outs, the rail goes to around 9 volts. I even floated the 4 inputs to the TIP's and still the rail is dropping.

    *Update: I have narrowed down the issue with the rail getting dropped. The way that MAX had it set up, a PIC had 4 outs that drove a NAND, using the NAND as an inverter. The 7400 NAND went to the 4 TIP120's, straight to the motor connector. What I have done is cut the traces from the 7400 to the TIPS on one axis and insert both the EDE1200 and an SX processor, one at a time to test driving the TIPs directly. If I plug the motor into an output as it was from the factory 7400NAND>TIP>connector The highside rail stats at 18. BUT, when I insert either the EDE or SC, the rail drops to 7 volts, the PS breaker pops not to long after that.

    I have spent hours trying to see what is different between their NAND gate and my IC's, and have found no answer. I have even tried taking had wire and running the TIP inputs to GND and VDD, still the rail is dropped. I have tried cutting the traces from the NAND to the TIPS, no change. The TIP's have a 5V 1k pullup, I have tried leaving them in and taking them out. Once I get past this mystery life will be good. I have been able to drive the motor more smoothly, a few .01's here and there have helped.

    BTW the NANDS outs are all sitting at 0. I can't understand why me cutting traces and taking 4 wires from the TIP ins to GND is producing a different result.

  6. #6
    Join Date
    Sep 2003
    Posts
    552
    I am not familiar with the EDE1200 chip. But it sounds like it has no current control. The Max controller used a chopper output to the tips for current regulation (that is the ringing you hear at stand still). If this is the case you will need a balast resistor or a chopper circuit between the rail voltage and the motor to limit current.

    Darek

  7. #7
    Join Date
    Jun 2003
    Posts
    3312
    Quote Originally Posted by HillBilly View Post
    I am not familiar with the EDE1200 chip. But it sounds like it has no current control. The Max controller used a chopper output to the tips for current regulation (that is the ringing you hear at stand still). If this is the case you will need a balast resistor or a chopper circuit between the rail voltage and the motor to limit current.

    Darek
    While I can't make out all the ics on the pcb, I didn't see anything that would make me think there is chopper components? No power resistors for current sensing..... Doen't mean there might not be, but.....
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  8. #8
    Join Date
    Jun 2003
    Posts
    3312
    Darek is correct that you will need some current limiting, i.e. power resistors or a chopper circuit. Probably why you are seeing a rail voltage drop and breaker pop. Your breadboard wiring will also pick up noise. If you want a unipolar chopper, look at my L297uni on my website. http://PMinMO.com
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  9. #9
    Join Date
    Sep 2003
    Posts
    552
    The MaxNC micro chip outputs PWM to the TIP's, not just on and off.

    Darek

  10. #10
    Join Date
    Jun 2003
    Posts
    3312
    Quote Originally Posted by HillBilly View Post
    The MaxNC micro chip outputs PWM to the TIP's, not just on and off.

    Darek
    You still need some method to sample current. PWM alone isn't enough.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  11. #11
    Join Date
    Jul 2005
    Posts
    442
    If you can control the power supply voltage and the motor specs, you can get some control in open loop. The issue is you'll fry the motors if they stall.

    IMHO, scrap the board, salvage the connectors and build your own.
    a few LM324's, IRCZ44's and an SX will get you where you want to go.

    Aaron

  12. #12
    Join Date
    Feb 2006
    Posts
    183
    Thanks for the notes.

    The first step was to get an understanding of how the board was working and I have done a pretty good job of getting that part down. Unless they were chopping the PIC outputs, there is no obvious current limiting going on. There is clearly no sense R or circuit, or other PWM signal anywhere that I can find. The only resistsors to the NAND or TIPS are pullup 1k's on the outs of the NAND gates. Why pullup and logic gate? Who knows.

    OK the mystery still remains about why it is that I can leave their 7400 NAND in place: so the path is NAND>TIPS>Motor and the common 18 volts to the stepper stays at around 18. BUt, when I do this

    SX>NAND>TIPS>Motor or

    EDE1200>NAND>TIPS>Motor

    ...the rail drops, even if I have all inputs to the NAND at 0 or all at 1 or using any coil sequence applied. Theoretically, with no signal present at the TIPs, they should be open and not shunting one side of the coil(s) to GND. OK so if using the NAND the reverse is true, a signal present at the NAND means no singal to the TIPs, and no shunt to the coils = rail is unaffected.

    I'll dig on and maybe have an AHA! moment.

    Next, once that will work, I'll simply make an SX board that mounts on to the existing board, use the same connectors, but replacing the PIC processors. I can even use the existing encoders and count/monitor pulses/movement, and E-stop or pause in the event of stall. Honestly, I have burnt up 1 spindle motor, 3 backlash nuts, a dozen end mills prior, so what I had before didn't have any safety feature while using MACH3 at least. I do believe that using their software it would stop in a stall, but I am not sure. I can address that directly myself though with my own code and Estop. Once this thing will get me by for the immediate needs, I'll just put it is Eagle send out for a fresh board, same size to fit the box, make life simpler.

  13. #13
    Join Date
    Feb 2006
    Posts
    183
    I looked at the 4 output pins of one of the PIC16f84's, each pin that is active is PWMing based on .5 microseconds sample 16 cycles per sample. I suppose that would be .5/16 to get the PWM freq. The duty appears around 50%. That could certainly account for the why I am shutting down the rail when I pull a transistor straight to GND for extended periods.

  14. #14
    Join Date
    Jun 2003
    Posts
    3312
    If there is current sensing it maybe via the analog comparitor of the PIC's, but I don't believe a 16f84 has an analog comparitor input.
    Are the nands just plan old 7400?
    Could be that it is based on a specific motor and power supply voltage, and running "open loop" in that it assumes those two constants.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  15. #15
    Join Date
    Feb 2006
    Posts
    183
    Just plain 7400's. They are acting like inverters I suppose since both in's are tied together.

    I am currently working on some code to do the whole thing on one Parallax Propeller: all 3 motors > drivers, 3 encoders back in, Step and Dir from the PC.

    There is no feedback to the PIC from the motors, so I think they just set a PWM frequency and Duty and left it alone. The encoders are direct into the PIC's, so maybe they could have done some time based comparison method to determine duty, it's hard to tell.

    I found it to be too much work to try to code each output with PWM, so I set one pin to a fixed freq and duty cycle, and ran the outputs of the micro to some AND gates. I multed the PWM to the gates and those fed the TIP120's. Still, I can neve find one great setting on the PWM, when the motor is idle it gets too hot and the rail drops from 18v to 9v. But when I get it set right where idle is fine, then there isn't enough torque when running. If I have very little or no PWM, the higher speeds are super strong, so I guess I will be forced to add some system to monitor and adjust realy time as suggested earlier. Only thing is where to sense it? They clearly weren't sensing it beyond the PICs, there are no resistors anywhere for that purpose. I was thinking to cut the GND traces to the TIPs, run each group of 4 GND's from the TIPS through a single sense, add a comparator(I have LM339 on hand) and a ref adjust trim pot. Let the comparator go through an AND or XOR along with my PWM output and let it switch the TIPs on and off at some high frequency as needed.

    Now that I have gotten into this, it seems the current is highest at stand still unless I am missing something. The higher the speed, the higher the rail. The current increase = the voltage drop.

  16. #16
    Join Date
    Feb 2006
    Posts
    183
    I have finally got motion from STEP and DIR to the new processor. I am using the new Parallax chip called the Propeller, 8 x 32bit processors in one IC, 32 i/o's. I have everything interfaced: 12 TIP120's > 3 motors, 3 encoders, Step and Dir from the PC and E-stop from the chip.

    It has been a huge learning curve. Making the motors move is easy, but making them maintain torque with the same PWM is difficult. Since the board didn't have and sense circuits, they were just pwming the 4 pins per each 6 wire uni motor. That is what I am trying to do as well, and I can get it right at one speed but not all. I think what I will have to do is have the duty cycle vary over different speeds. I'm not suite sure how to do that yet. The chip can easly count and do some real time math to give me a number of pulses per second, then it could vary the duty cycle on a sliding scale (adjust pause times between on/off). I was hoping not to have to add and extra parts to monitor and current limit. The motor is wired so that the two center tap wires are straight to 22volts. Then, the other 4 wires are shunted to GND with the TIP120's.

    Now that I have one motor running, I will start testing the encoder code, that should be straight forward I think, just have a Variable keeping a talley of Step pulses, then count the encoder as well on every iteration, compare and shut down or pause if needed, even send an E stop to Mach3 to pause it as well.

    This was a lot of work and I am still not close, but I like the feeling of being able to tackle it and make my own controllers and drivers for other projects in the future.

  17. #17
    Join Date
    Jul 2005
    Posts
    442
    You need to know the back EMF constant of the motor.
    If you can spin a motor and measure the voltage generated this will get you close enough. Can you rig up a jig to have one motor spin another?
    If so, spin the motor at several known speeds and measure the voltage on the driven motor. you will need to supply a enough voltage to overcome the back EMF plus enough to drive the proper current through the winding resistance.
    Don't try to get the max out of the motors this way - open loop control of steppers this way is looking to fry them. Use the encoders to calculate velocity for the back EMF, that way you won't over current the motor on a stall.

    Aaron

  18. #18
    Join Date
    Sep 2003
    Posts
    552
    Here is what is in the SERVPR.DAT file in the MaxNC software. PWM, MAXLAG and THRESH should be parameters set within the Max pic's.

    20_ACCEL
    10_PWM
    28_MAXLAG
    36_THRESH
    30800_XTRAVEL
    18000_YTRAVEL
    24000_ZTRAVEL
    MAXNC 10-2

    Darek

  19. #19
    Join Date
    Feb 2006
    Posts
    183
    Man what a lerning experince. I have spent 16 hours a day for 4 days now studying this thing, perfing and breadboarding, coding. Tonight after finally getting the code together for reading the encoders, I got around to trying out a chopper for the first time. I have done sense circuits before to stop motors at a threshhold, but never chopped and fed back the result.

    Like I had mentioned before, the motor pull the most current at standstill, and much less at a higher speed. When I was setting a fixed PWM, I could get the motor to not fry at standstill, but no torque. So that was not going to work, even though I thought for sure that they were just setting it(pwm) and leaving with the old system, there was no sense or chopper. I could see maybe some hidden code that maybe adjusted based on speed as the PIC interpretted it, but I now see that just a fixed PWM does not work.

    OK so after testing the chopper, here are my findings, although I still have some understanding left to get:

    Using Sense R 0.1 > LM339 > 4081 AND > TIP120's input

    1. Using the chopper alone and no PWM:
    If I set the REF in at a level that doesn't drop the rail below 18v at standstill, the motor has no power to move. The rail is 18 with no load. On the old system, it sat at 17V.

    2. If I set the REF in where the motor has great power, the rail is at 7 volts at standstill and everything gets very hot.

    I can't find a compromise between full torque and not melting the motors and sense resistor.

    The comparator is clearly chopping the signal, and I can fully turn the comp on or off with the ref input.

    Maybe someone can interpret this jibberish.

  20. #20
    Join Date
    Jun 2003
    Posts
    3312
    You don't say anything about off time? It more than a comparitor, you need to either set it up as a fixed off time chopper or set up a PWM based on current sensing. For a fixed off time chopper, what you should target for:
    Set your reference at a voltage level, that equals your max motor current. i.e. it it is 2A the .2V (.1ohm sense *2A). When your comparitor trips, hold the TIP's off for a short time say 20us. Then reenable the TIPS and comparitor.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

Page 1 of 2 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •