585,754 active members*
3,874 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > Using Picstep's PIC to microstep other driver chips.
Page 1 of 2 12
Results 1 to 20 of 24
  1. #1
    Join Date
    Jan 2005
    Posts
    364

    Using Picstep's PIC to microstep other driver chips.

    A lot of chopping driver chips don't directly support microstepping, however it can be done by varying the VREF input.
    I made a simple circuit using a R2R DAC and a voltage follower between the PIC outputs and the VREF input of TEA3718 chips (used these TEA's because I had them here), it's working fine.

    Below is the basic diagram.

    With this it's possible to use recuperated or cheaper chips than those quite expensive LMD's.

    If there's an interest I can make up the complete schematic and post it in the open forum.

    There are no modifications needed to the PICSTEP firmware.
    Alan, do you have objections or comments?

    Luc.
    Attached Files Attached Files

  2. #2
    Join Date
    Jul 2005
    Posts
    668
    I've also considered these "poor man DAC's". They should be every bit accurate enough for the application. I just got a sample tube of 18200's, but they're only a buck or so cheaper than the 18245's. I'm thinking discrete is the way to go.
    Steve
    DO SOMETHING, EVEN IF IT'S WRONG!

  3. #3
    Join Date
    Mar 2005
    Posts
    339
    Wow...great. I have also a lot of TEA3718 recuperated from broken old printers. Could you, please, upload the full schematics?

    Thank you.

    Zoltan

  4. #4
    Join Date
    Jan 2005
    Posts
    364
    Quote Originally Posted by Madclicker
    I've also considered these "poor man DAC's". They should be every bit accurate enough for the application. I just got a sample tube of 18200's, but they're only a buck or so cheaper than the 18245's. I'm thinking discrete is the way to go.
    These DAC's can be very accurate, the R2R exists in precision resistor arrays like these at up to 0.01%:
    http://www.semiconwell.com/r_net/swr2r04a.htm

    For CNC microstepping is in most cases not used to increase resolution but to smooth out the motor, so tolerance isn't a big issue: just have a look at the step tolerance of a typical stepper.....

    I use industry standard 1% resistors from the same batch and use 2 in series to make up the 2R values, this should be more than good enough.

    My next project could be a high current driver using mosfet's and the L6506 (or similar) for the chopping part of it.

    Edit: I misinterpreted your reply, you were saying that this is accurate enough, sorry. I will leave this for those who have doubts.

  5. #5
    Join Date
    Jun 2003
    Posts
    3312
    Have you done the code for your poor man's dac?
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  6. #6
    Join Date
    Jan 2005
    Posts
    364
    Quote Originally Posted by pminmo
    Have you done the code for your poor man's dac?
    No, it uses the Picstep firmware as is (see message #1) and the output after the opamp looks just fine on the scope.
    Alan did a good job.

    Quote Originally Posted by LMD datasheet
    The DAC sets the threshold voltage for chopping at VDAC REF x D/16, where D is the decimal equivalent (0–15) of the binary number applied at M4 through M1.
    This is also what an R2R DAC does but VDAC REF are the 5V outputs from the PIC. This concept will never output exactly 5V, it will be slightly less but very close and this doesn't really matter for CNC applications.

  7. #7
    Join Date
    Mar 2005
    Posts
    339
    Hi,

    Sorry for repeating myself, but are you going to upload the full schematics as you said: "If there's an interest I can make up the complete schematic and post it in the open forum."
    I am interested to try your solution.

    Thank you.

    Zoltan

  8. #8
    Join Date
    Jan 2005
    Posts
    364
    Zoltan,

    no problem, just needed a bit of time to complete the schematics.

    So here we go:

    http://www.cnczone.com/forums/showth...567#post181567

    Feedback appreciated.

    Regards,
    Luc.

  9. #9
    Join Date
    Jun 2003
    Posts
    3312
    I never analyzed the LMD DAC, I tought it was like allegro's 3 bit non linear dacs, I see that isn't true now.
    I'm missing something though, I did some calculations and the 4 bit dac of the lmd and it looks like it has as much as 5% error when quarterstepping? How are people doing 1/16th micro stepping with it?
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  10. #10
    Join Date
    Jan 2005
    Posts
    364
    Phil,

    like you I never looked into the details of the DAC's usage nor their "error" or the respective results.
    I simply use the PICSTEP firmware and it gives wonderfull results.
    5 % of one quarterstep (= 0.25/step) is only 0.0125/step, this doesn't look really important for our applications.

    How they do 1/16th: just to smooth the motor's movement, certainly not to perfectly increase the resolution to exactly 1/16th with 1% precision.
    Must say that I didn't try 1/16 yet, the new firmware wasn't available at that time.

    A stepper motor has a bigger tolerance problem per step than this.
    If my memory serves me right, Mariss, Gerry and others have pointed this out several times, microstepping doesn't increase resolution.

    Regards,
    Luc.

    .

  11. #11
    Join Date
    Jun 2003
    Posts
    3312
    Yes I understand the increased resolution/accuracy issue, just wanted to point it out if anyone was thinking along those lines.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  12. #12
    Join Date
    Sep 2004
    Posts
    223
    Quote Originally Posted by lucas
    There are no modifications needed to the PICSTEP firmware.
    Alan, do you have objections or comments?
    None at all. Nice work!

    Alan.

  13. #13
    Join Date
    Mar 2005
    Posts
    339
    I begun to build it. I have a lot of TEA3718 from printers thrown to the recycling company. I build with two TEA3718 in parallel for 2A on phase. I have seen something similar with LMD18245 for 6A, but I have no LMD18245 to build with two in parallel on phase. I have problems with Eagle still learning, it is almost one year since learning and still know almost nothing.

  14. #14
    Join Date
    Feb 2005
    Posts
    578
    I was playing around a while ago with resistor ladders and plunked out a spread sheet with a HEX (or R2R) type ladder and compared that to a 4 bit weighted resistor array. You probably really don’t need more accuracy, but this is a different way of looking at it. It takes fewer resistors (only 4) and can be made to arrive at more values. There are over 50 different values of voltage instead of the 16 with the standard HEX style.

    Basically you have three outputs on a PIC. High, Low and Tristate. So instead of binary, you get trinary. Instead of 16, you get 81 (but a lot end up being duplicates). You put a resistor in series with the outputs and then tie all four together. Use 4 different values. Now you can go through all the combinations of pulling some high, some low and tristating others.

    The spread sheet shows some output graphs. The 4 yellow resistor values can be changed and the results viewed on the right. Plunk the ones you like into the yellow column by the CALC chart to view the sine curve. There is also a curve for “perfect” and HEX. These are superimposed below the tables.

    Of course you would have to change the tables in Alan’s code to match the values that you have selected, and then add a table of TRIS bits, but it seemed kind of fun to play with.

    It is not too often that you come across a trinary application.

    Steve
    Attached Files Attached Files

  15. #15
    Join Date
    Jun 2003
    Posts
    3312
    I not speaking out of PIC experiencs, but if they are like other micros, I suspect you going to see enough variance in pin output characteristics to affect the accuracies your playing with.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  16. #16
    Join Date
    Jan 2005
    Posts
    364
    Quote Originally Posted by zoltan
    I build with two TEA3718 in parallel for 2A on phase. I have seen something similar with LMD18245 for 6A,
    Where did you see that, it has already been said here that it won't work and I don't see it working with those TEA's neither unless there's an undocumented trick somewhere.

    @Spalm: I've been in electronics all my life and can't remember hearing anything on Trinary applications, the concept: yes, but never the term.
    Your suggestion certainly has advantages but I don't know anything about PIC programming, so this is way over my head for the moment.

  17. #17
    Join Date
    Jun 2003
    Posts
    3312
    Carefull.... its one thing to parallel drivers in the same package, but when you have a multifunction device such as the tea3718 it isn't a good design idea. Same with the LMD.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  18. #18
    Join Date
    Mar 2005
    Posts
    339
    Hi,

    First of all I have seem on some industrial equipment made in Germany. The service technicians had a lot of LMD18245 as spare parts for those drivers and because they had no problems, never, gave me few LMDs for my picstep. The drivers were almost identical with those find here: http://www.sb-microstep.com/EnglishSite/English.htm only small differences on layout.

    Zoltan

  19. #19
    Join Date
    Jun 2003
    Posts
    3312
    I didn't say it couldn't be done, but look at the deadband time and the switching times on a LMD18245! From mfg lot to mfg lot they don't spec min's and max's just typical's.
    Can it be done, sure, but it doesn't make sense to base a design on paralleling them unless you have a basket full of the LMD's and don't care if you smoke a percentage.

    On the other hand a device like the L298 since it contains two drivers on the same die those can be paralleled. ST is ok with that, but they advise not paralleling two different L298's.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  20. #20
    Join Date
    Nov 2009
    Posts
    49
    Some china stepper use this solution for microstep driver

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
  •