586,096 active members*
3,724 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > PIC Programing / Design > Lini-Stepper Revisited ( Hacked )
Page 2 of 6 1234
Results 21 to 40 of 104
  1. #21
    Join Date
    Nov 2006
    Posts
    90
    Howdy Smarbaga,

    Sorry for the delay, just got back from a business trip.
    I was going to send the ASM file, but Kowell has beaten me to it .

    The ASM is handy, as it contains comments and allows you to change the source code to suit your needs.

    Linistep is a great little creation indeed .



    Best wishes,
    Steve-tee.



    Quote Originally Posted by smarbaga View Post
    hello Steve-Tee
    would you have and would you post the asm version of this hex (txt) file.
    thanks garry

  2. #22
    Join Date
    May 2007
    Posts
    42
    to steve n kowell

    thank you guys for posting the modified code

    sahil

  3. #23
    Join Date
    Nov 2004
    Posts
    69

    I have a problem..

    Hi,
    I have a problem with my circuit :
    I built a PCB with 4 circuits for a very big CNC foam cutter.
    I built using the schematic ( xtal is on pin15 and 16, not 16 and 17)
    and used IRF540 instead of IRF44.
    The stepper vibrates, but does not rotate.
    Tested with 2 '628/20 and one '84, and both .hex ( short and long)
    Of course I have the xtal OK, 5V on Vcc, dir and in OK,tested with allmode setting etc.
    Can you help me?
    Sincerely
    Paul

  4. #24
    Join Date
    Nov 2006
    Posts
    90
    Hi Paul,

    Could you try sending step pulses to the circuit at a very low rate, perhaps 1 pulse per second?
    This should result in the motor visibly moving between successive step positions.
    If successful, this will help to reveal if the driver's 4 poles are working correctly.
    Further, this will let you see if the motor wiring sequence is connected properly.
    If there are 4 distinct step positions repeatedly displayed by the motor, then the driver poles are ok.
    These steps may appear erratic, but should be repeated on a 4 step basis.
    If so, you may find that you need to alter the wiring of the motor, so as to match the coil driver sequence.

    Naturally, the above applies for full step mode only. Other modes may not work as well for this method of diagnosis.

    It took me a little while to get the wiring right also. I simply fiddled with it until the motor began turning smoothly.
    Yeah, I know, not very scientific, but still pretty rapid

    So, if you can supply a stream of very low frequency step pulses, you'll make rapid leaps towards fixing the problem.


    Best wishes,
    Steve-tee.




    Quote Originally Posted by ciccio View Post
    Hi,
    I have a problem with my circuit :
    I built a PCB with 4 circuits for a very big CNC foam cutter.
    I built using the schematic ( xtal is on pin15 and 16, not 16 and 17)
    and used IRF540 instead of IRF44.
    The stepper vibrates, but does not rotate.
    Tested with 2 '628/20 and one '84, and both .hex ( short and long)
    Of course I have the xtal OK, 5V on Vcc, dir and in OK,tested with allmode setting etc.
    Can you help me?
    Sincerely
    Paul

  5. #25
    Join Date
    May 2008
    Posts
    5
    Is the firmware really work? because with 1Hz pulse on STEP pin, the pin RB4 never give pulse, while RB5-RB7 give pulse. I've tried 16F84, 16F83, xtal 16 MHz and 10 MHz.

  6. #26
    Join Date
    Nov 2004
    Posts
    69

    some test....

    I connected some leds here and there.
    I can see the leds going on and off on rb4-5-6-7
    I can see the same on the outputs to the stepper.
    Setted on 200 steps (RA2 andRA3 to gnd),
    with a slow signal to "step" input, dir to gnd or vcc,
    I can see two leds on and the other two off,
    then two off and two on.
    Is this right?
    Paul

  7. #27
    Join Date
    Nov 2004
    Posts
    69

    ...some more question...

    I,m sorry, but I'm not an eagle-eye,
    1) is xtal 16 MHz? ( not so clear in my picture, but I saw 16 MHz in the .asm)
    2) Are the windings connected as in your schematic?
    3) Am I wrong, or you named some costant current supply?
    4) is it a good idea to use a pull-down to DIR and STEP? I used a 390 ohm plus a small led, just to see if everything is going well.
    5) Is it a good idea to put a small resistor on the input of 7905, to limit input voltage to something lower than 35Vcc, but always higher than 8 or 9 Vcc?
    --------------And now the most important question--------------------
    6) If I'm not wrong, there are TWO .hex file, one shorter and one longer: Why?
    What is the one to be used? What differences? Can please test the .hex on CNCzone?
    7) The only thing to note is: PIC must be PIC16fxxx /20, the fast ones, and not /4.
    Paul

  8. #28
    Join Date
    May 2008
    Posts
    5
    This is the program portion:

    range0
    movlw b'00000101' ; 0101 = A+ B+
    goto phase_done ;

    range1
    movlw b'00001001' ; 1001 = A- B+
    goto phase_done ;

    range2 ; wle
    movlw b'10100000' ; 1010 = A- B-
    goto phase_done ;

    range3
    movlw b'01100000' ; 0110 = A+ B-
    I'm confuse about range0 and 1, why it sets unused outputs (bit 3-0)??
    It's clear that bit-4 (RB4) is never "high", so is there any blackmagic that make pin RB4 could turn led on and off ??

  9. #29
    Join Date
    Dec 2005
    Posts
    77
    ccicio

    There seems to be a mistake in the schematic, as there are two pin 17,s
    so yes that should be pins 15 and 16 for the xtal , which is 16 Mhz.
    As for the leds , yes that is correct, but since you have substituted
    the IRF 44 with a IRF 540 , this may not work as this is not a Logic level
    Device.

    The voltage regulator is a 7805 not a 7905 , and can be run as low as
    7.5 volt at its input , the maximum volts at the input is 35 volts but
    there is no need to run at this voltage. So any voltage between 7.5 and
    35 will work. As for a resistor , as only the Pic is supplied from the Regulator , this should not be needed.

    The two Hex files are for different chips.
    Yes they should be 20 Mhz types, not 4 Mhz.

    Yes I use a constant current power supply, But a current limit
    Resistor should work as well.

    Kym

  10. #30
    Join Date
    Nov 2004
    Posts
    69

    NEW TESTS SOON

    Thank you for support!
    Of course I have a 7805, not a 79, and only one for 4 circuit.
    35Vin is an absolute maximun rating for 7805, I use a 24Vca transformer, and so I prefer to stay on the secure side....
    There are TWO different .hex for PIC16F628:
    one from Steve-Tee named: Lini 01-628.txt ( to be changed in .hex)
    the other from Kowell, inside Step it 2 zip, named: stepit_16f628.hex
    they seems very different, one is short and the other is long.
    What are the differences?
    Ok for new power fets: I will order IRFZ44 today, so I can try tomorrow.
    I will let you know.
    Thank you again .
    Paul

  11. #31
    Join Date
    May 2008
    Posts
    5
    So I'm only talk to the wind heh??
    I've use two 16F84A with different chip programmer. Both have the same result: pin RB4 never give the pulse.
    It seems nobody have tried this version, so my conclusion is THIS HACKED LINI-STEPPER IS NOT WORKING, i will try build the real lini-stepper then.

  12. #32
    Join Date
    Nov 2004
    Posts
    69

    Unhappy MORE TESTS

    Just tested with new-just arrived IRFZ44
    Same result as for IRF540: stepper vibrates, but does not rotate.
    If I put 4 leds on the outputs I can not see the sequence ( in 200 steps), but something confuse,
    My stepper has 6 wires, so it is impossible to confuse windings, in any case I tryed to swap wires, with no result.
    If the two .hex supplied in this forum for '628 are the same, why are so different?
    Help!
    Paul
    PS Is there some other succesfull builder? What problem has he/she solved?
    Sometimes settings for programmer can be a problem, but now settings are in the first lines....Where can be the problem?Damned, a circuit with no more than a dozen of components....I'm going crazy!

  13. #33
    Join Date
    Mar 2005
    Posts
    523
    try reading your pic to see if the code in it is the same as your hex file.
    if leds don't sequence correctly, a motor will sure not run.
    just a sugestion.
    garry

  14. #34
    Join Date
    Nov 2004
    Posts
    69

    MORE TEST

    I use WINPIC800: it programs and compares at the same time.
    When something goes wrong, I compare, I try to understand if settings are OK,
    I try with another new-never used before PIC, etc.
    The circuit is soooooo simple, it is very easy to find something wrong in the circuit, and there are only 12 components!
    It is built on a dual sided PCB, photoetched, CNC drilled, with some smd components.
    Now: I have 5Vcc on pins 4 & 14, I have GND on pin 5, the xtal oscillates on pins 15 and 16, pins 1 & 2 can be setted on gnd or Vcc, outs are on pins 10 to 13.
    No short circuits, step-input is on pin 17, pin 18 has a resistor + led to GND,
    there is a 330nF capacitor right under the PCB, from pins 4+14 and pin 5,
    stepper are new, but I know about this stepper because I used the same elsewhere, etc.It seems so good to use some sort of PWM to obtain microsteps,
    I want to test and then use it.
    PS tested with another PC, the one we use for other CNC: same result
    PPSS: I confirm Telyady: with a pic16f84 there is a very very short pulse
    on RB4 (pin10)-tested with signal generator and leds-settings for 200 steps.
    With PIC16f84 or '628 nothing seems a stepper sequence
    Can someone test the hex?

  15. #35
    Join Date
    Jun 2007
    Posts
    7
    Hello all, sorry cause i'm far away, can't test the hex right now but by the way use Proteus, you can test the hex there before using it, you can simulate the schema

  16. #36
    Join Date
    Nov 2006
    Posts
    90
    Sorry for the delay, have been away from the computer.
    I think you will find that Kowell's version of the code for the PIC16F84 will deliver a signals to RB4,5,6,7.
    The version I use, delivers the signals to RB0,1,2,3. I use the original code from Roman Black.
    Kowell's is a shortened version that is aimed at his circuit design.

    Please try Kowell's code. This is likely to correct the problem you have been seeing.


    Best wishes,
    Steve.



    Quote Originally Posted by telyadi View Post
    So I'm only talk to the wind heh??
    I've use two 16F84A with different chip programmer. Both have the same result: pin RB4 never give the pulse.
    It seems nobody have tried this version, so my conclusion is THIS HACKED LINI-STEPPER IS NOT WORKING, i will try build the real lini-stepper then.

  17. #37
    Join Date
    Nov 2006
    Posts
    90
    Howdy,

    I took a look at the ASM files today. They are actually different.
    The one that Kowell has developed, drives RB4, 5, 6 and 7 for the motor.
    Mine, simply a copy of the original RomanBlack code, drives RB0,1,2 and 3.

    You will want to use Kowell's code for your driver, so as to match the outputs that you have assigned to your motor.

    Please give this a go and let us know the results.


    Bests wishes,
    Steve.



    Quote Originally Posted by ciccio View Post
    I use WINPIC800: it programs and compares at the same time.
    When something goes wrong, I compare, I try to understand if settings are OK,
    I try with another new-never used before PIC, etc.
    The circuit is soooooo simple, it is very easy to find something wrong in the circuit, and there are only 12 components!
    It is built on a dual sided PCB, photoetched, CNC drilled, with some smd components.
    Now: I have 5Vcc on pins 4 & 14, I have GND on pin 5, the xtal oscillates on pins 15 and 16, pins 1 & 2 can be setted on gnd or Vcc, outs are on pins 10 to 13.
    No short circuits, step-input is on pin 17, pin 18 has a resistor + led to GND,
    there is a 330nF capacitor right under the PCB, from pins 4+14 and pin 5,
    stepper are new, but I know about this stepper because I used the same elsewhere, etc.It seems so good to use some sort of PWM to obtain microsteps,
    I want to test and then use it.
    PS tested with another PC, the one we use for other CNC: same result
    PPSS: I confirm Telyady: with a pic16f84 there is a very very short pulse
    on RB4 (pin10)-tested with signal generator and leds-settings for 200 steps.
    With PIC16f84 or '628 nothing seems a stepper sequence
    Can someone test the hex?

  18. #38
    Join Date
    Nov 2006
    Posts
    90
    One thing to watch out for when using the PIC16F628 chip.
    RB4, pin 10, will become an input if you enable 'Low Voltage Programming' mode.
    As a result, the motor will not run correctly when connected to pins 10,11,12,13.

    To get around this, simply ensure that the chip is configured for High Voltage Programming mode. This will let pin 10 function as required.

    Hope this helps, as it had me a bit confused when I was using this chip on another project.



    Best wishes,
    Steve.

  19. #39
    Join Date
    Nov 2006
    Posts
    90

    My version of the circuit

    Hi all,

    Here is the circuit I developed for stepper motor management. I designed this, and developed some firmware for it, then discovered the Linistepper!

    One quick look revealed that mine was almost the same, but without the rather clever microstepping features of the Linistepper.
    I tried the Linistepper code in my design, and it worked perfectly - without modification .

    I present to you, my version of the circuit.
    Mine has level translators, made from NPN transistors.
    These provide a 15 Volt gate drive signal. I did it this way, as I wanted to use the biggest Fets I could get my hands on.
    These Fets, IRFP264, are rated at some 38 Amps and 250 Volts.
    As a result, I can seriously mistreat this circuit, without fear of it being damaged.

    It's simple to build, but Kowell's is even simpler.

    It can drive motors of any voltage rating, up to 150V, perhaps more.
    The best speed I have obtained with a 50V DC supply is 100 Revs per second.
    At that speed, the motor sounds like a tiny jet engine .
    That's a pulse rate of 20,000 per second!
    Cor Blimey!

    Just like Kowell's, there is no need for heatsinks, as the device is entirely digital.
    One little warning, don't touch the transistors while the motor is running with any appreciable speed. You'll get a series of painful little, high voltage, nips.
    I use mine in full step mode only, as my machine's resolution is 10 microns per full step, and I am quite happy with that .
    I have not tried other stepping resolutions, so I cannot tell you if they work.
    This won't work with Kowell's code, as his is directed towards the upper 4 outputs of PortB, so you will want to use the following code with my version of the circuit:
    http://www.cnczone.com/forums/showpo...7&postcount=18

    These motor drivers are really grand, and rather powerful little beasties.

    Best wishes,
    Steve.
    Attached Thumbnails Attached Thumbnails Motors.jpg  

  20. #40
    Join Date
    Dec 2005
    Posts
    77
    Hopefully this schematic will be clearer, added photo of board
    printed the right way.

    Also added a 4.7 K resistor on the MLCR pin , but not really needed.

    Kym
    Attached Thumbnails Attached Thumbnails Stepit.png   Stepit.JPG  

Page 2 of 6 1234

Similar Threads

  1. Lini-Stepper Revisited ( hacked )
    By kowell in forum PIC Programing / Design
    Replies: 0
    Last Post: 06-29-2007, 12:12 PM
  2. My hacked HP printer flatbed
    By Graham S in forum CNC Machine Related Electronics
    Replies: 7
    Last Post: 06-02-2007, 11:31 PM
  3. Lini Mod
    By OCNC in forum PIC Programing / Design
    Replies: 0
    Last Post: 07-25-2006, 04:19 AM

Posting Permissions

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