585,702 active members*
4,134 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > using encoder index for homing and a axes position
Page 1 of 2 12
Results 1 to 20 of 23
  1. #1
    Join Date
    Mar 2007
    Posts
    574

    using encoder index for homing and a axes position

    the idea is simple: why not using the index of your linear scale or cheap amt102/103 in conjunction with a mechanical or optical switch to obtain a very precise and cheap homing function ?
    some guy put the index of the encoder directly on the home line.problem the signal of index of the encoder is very brief.
    one solution is to use a mechanical switch to the line data of a d type flip-flop
    7474 and the signal index of the encoder to the clock. This has been explain very well here

    http://groups.yahoo.com/group/CAD_CA...9?xm=1&m=e&l=1
    HTML Code:
    Hello Carl,
    
    Here is one way to do it with half of a LS74 dual D flip flop, two 1
    kohm resistors and a normally open limit switch.
    
    The normally open limit switch is wired with one contact to ground and
    the other in series with a 1000ohm resistor to +5v. The junction of the
    switch and resistor is the switch output and goes to the flip flop Reset
    line and D input.
    
    The encoder index output goes to the flip flop clock input.
    
    The second resistor is used to pull up the unused Set input. One end of
    the resistor to +5v and the other end to flip flop Set input. Some folks
    don't use a resistor and just wire +5v to the Set input. My early days
    of EE was designing to meet mil spec and we tied NOTHING directly to
    power except power pins. Unusued TTL inputs were pulled up via
    resistors.
    
    Be sure to wire the flip flop power and ground pins to the power supply
    also. There should be a 0.1ufd, a 0.001ufd and a 10ufd electrolytic in
    parallel with the flip flop power and ground pins. These capacitors
    should be located very close to the flip flop.
    
    How it works: Travel toward the limit switch until the limit switch
    closes. The flip flop Q output will immediately go low when the limit
    switch closes. Then travel away from the limit switch. On the first
    rising edge of the encoder index after the limit switch opens, the flip
    flop Q output will go high as the encoder index rising edge clocks the
    flip flop.
    
    When you first power up you should home twice since the flip flop may
    power up either high or low. This will guarantee a valid home. You
    should NOT be within one index pulse of the end of the travel range that
    is opposite the limit switch.
    
    Now this is not the ideal solution since you would probably prefer a
    normally closed switch. That way the default for a disconnected limit
    switch is safer. I did this for somebody several months ago. I'll have
    to dig up my notes to see how I did that with a N/C limit switch. I may
    just have used the other half of the dual flip flop as an inverter.
    
    Tom Hubin
    I test it and it work but now i am a litle lost in space with the isolation problems.
    I use the power supply of my DRO to power up my encoders the gecko 320 encoder+encoder- is bridged with a 470ohms. the 0V of the DRO is linked with the encoder-
    I use the 5volts of my pc-2-route model m2 sound logic break board for the switch.
    1st problem: I will prefer to use 12 volts for the switch and use an entry of an optocoupler(tlp521/4) to go to the data line of the 7474 what resistance should i put at the entry of the tlp521?
    2nd problem:I will use a second entry of the tlp521 for the index signal of the encoder. the 7474 will be powered by the break board is this ok?
    3rd problem the notQ line of the 7474 should be attach to the signal entry of the break board how?
    4th Mr Hubin rise some interisting point using normally close switch and make a little reset circuit when power up unfortunately i can wire and understand digital electronic but i am not able to make a "clean" circuit if someone can help ?
    in case of rotary encoder a target can be fixed to the main axe an optical fork can play the role of the switch

  2. #2
    Join Date
    Mar 2008
    Posts
    267
    I am using linear scale with an index pulse equivalent to the resolution of the scale.
    The pulse is used to implement the homing signal. The homing signal is then used by EMC2 to home the machine.
    The index pulse is very precise and repeatable but it does not last long enough ( in time ) for the homing function to be implemented where by the axis seeks the hone position, finds the index, returns back a small distance and seeks the index at a slower rate.
    IF this werea conventional mechanical switch it would allow the axis to travel back a bit before the sigal was removed and then ot wuld seek at a lower speed.
    I have therefore simply fed the pulse into a monostable which simulates the action ofa mechanical springloaded contac. This allows for some time for the axis to return to a pre homeindex position and repeat seek for home at a slower speed.

    While latches and one bit memory logic is nice.. this ( Pulse stretcher) is a bit more intuitive and works.

  3. #3
    Join Date
    Mar 2007
    Posts
    574
    yes Zig this is the purpose of the d flipflop to detect this very brief signal my problem is how to implement it "in a clean way" in my system? I mean having something that will last and be reliable ?
    in fact i need a good schematic

  4. #4
    Join Date
    Mar 2007
    Posts
    574
    in the thread "how to use index pulse for homing purpose we have this obsolete link.
    http://www.cncbuildingblocks.com/homeindex.html
    __________________
    Gerry
    Zig do you have a copy of it?

  5. #5
    Join Date
    Mar 2003
    Posts
    35538
    That link was to a commercially manufactured board that worked with mach3 for homing to an encoder count. It was made by Ed Gilbert, and you may be able to get a hold of him through the Mach3 yahoo group. He's no longer making the boards, and I don't think he'd give up the schematics.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  6. #6
    Join Date
    Mar 2007
    Posts
    574
    thank you gerry,
    in fact the solution of tom hubbin work and it's cheap the only problem it's my mediocrity in electronic i will like to have a supervision from an electronic guru.
    this solution is not new but hard to find schematic.I think that this was due to the price of the encoder with index. The very cheap amt 102/103 baked up by Mariss make this solution very interisting

  7. #7
    Join Date
    Mar 2008
    Posts
    267
    Yassou Rokag3,

    From the exchanges i think You wish to use mach3. Please list the homing sequence You intend to implement.

    In a way of rationalising the question I use EMC2 and the homing sequence during which the software seeks the index at high speed and having found the index it steps back and seeks home index at a slower speed to optimise position accuracy.

  8. #8
    Join Date
    Mar 2007
    Posts
    574
    In a way of rationalising the question I use EMC2 and the homing sequence during which the software seeks the index at high speed and having found the index it steps back and seeks home index at a slower speed to optimise position accuracy.
    efaristo for the yassou
    this is the way to go and i am going to use mach3 but actually i am in the hardware and i want to do it clean it's for a mill lagun ftv2

  9. #9
    Join Date
    Mar 2008
    Posts
    267
    Here is a part of my interface circuit.

    I use the comparator chip with a 120 ohm load for the differential index pulse driver from the linear scales.

    The pulse is condition and earth refferenced by the comparator before it goes to the CMOS timer configured as a pulse stretcher. The signal then goes to the header on the breakout board. the header also supplies +5V to the electronics.

    Hope this is of some use to You..


    EDIT.. you may not need the comparator front end.. depends on the encoder You use. You may have to adjust the duration of the extended pulse to suit your seek speed.
    Attached Thumbnails Attached Thumbnails interface_html_2d79525a.jpg  

  10. #10
    Join Date
    Mar 2007
    Posts
    574
    thank you i am going to look at that carefully
    Lucien

  11. #11
    Join Date
    Mar 2007
    Posts
    574
    hello,
    in red the index signal
    in blue the switch signal
    in green what i want
    in black what i have
    how to configure my 7474 to have the green result ?
    Lucien
    Attached Thumbnails Attached Thumbnails homingt1.jpg  

  12. #12
    Join Date
    Mar 2007
    Posts
    574
    ok i find a solution at least on the simulator
    the first switch top left represent the cheap switch optique fork or mechanical it is monitored on the logic analiser by the first line.
    the second switch represent the encoder index it is the second line on the logic analiser
    the output is represented by the green led NormallyClose
    this simulator is free work with java and very intuitive
    now what ckind of resistances etc.... this is my limit
    Attached Thumbnails Attached Thumbnails ScreenShot002.jpg  

  13. #13
    Join Date
    Mar 2007
    Posts
    574
    this work
    Attached Thumbnails Attached Thumbnails ScreenShot003.jpg  

  14. #14
    Join Date
    Mar 2007
    Posts
    574
    Now what is the corect value for r3 to do not blow the led in 1 week that is my problem but i tested it and it work perfect no need to init as soon as you pass under the index it will initialize perfect (this for rotary encoder) for linear encoder a reset circuit must be design since the index of many linear encoder are only 3 ne on the middle and one on each edges.

    ANY CRITICS ON THE VALUE OF THE RESISTOR AND CAP ARE MOST WELCOMED

  15. #15
    Join Date
    Mar 2007
    Posts
    574
    Here is a part of my interface circuit.

    I use the comparator chip with a 120 ohm load for the differential index pulse driver from the linear scales.

    The pulse is condition and earth refferenced by the comparator before it goes to the CMOS timer configured as a pulse stretcher. The signal then goes to the header on the breakout board. the header also supplies +5V to the electronics.

    Hope this is of some use to You..


    EDIT.. you may not need the comparator front end.. depends on the encoder You use. You may have to adjust the duration of the extended pulse to suit your seek speed.
    Thank you again for your solution, I must admit that its a bit too high level for me.Mine is very primitive but i did some test and it work really fine do you think that my design has a huge drawback that i miss ?
    A lucien not very comfortable in the role of electronic designer (LOL)

  16. #16
    Join Date
    Mar 2008
    Posts
    267
    Licien,

    Good to see you have found what You were looking for.

    The opto coupler is probably one of interrupt kind. A body with a slot in the middle and a vane breaks the optical path inside the slot.

    Typically the led needs to run on about 20mA. The LED ususally has about 1.7 volts across it when a current of 20 MA flows through it.

    IF you are operating from 5V supply then the series resistor which sets the current through the LED is.....

    (5 - 1.7)/ 20e-3= 165 ohmYou have a choice of 150 or 180 ohm in standard E12 series of resistor values or if You can get E24 series of resistor then You might select 160 ohm. May be selecting 180 ohm will give you slightly lower current but then it may depend og LED forward voltage specification a little bit.

    So next thing is setting photo transistor collector resistor.

    If You use collector electrode as output then output will be high when the light beam is interrupted.

    Problem with opto couplers is a low coefficient of coupling between led current and transistor collector current.

    You may need to get an idea of the current trnsfer ratio for the optocupler you use.. and then estimate the resistor value.

    I think You may find that You will probably need at least a 2.2K resistor in the opto transistor collector circuit .

    Dont get too greedy and amke the collector load resistor too high, You may get adverse effects due to CMOS gate input capacitance.

    Good luck.

  17. #17
    Join Date
    Mar 2007
    Posts
    574
    thank you zig,
    i wil make it tomorow

  18. #18
    Join Date
    Mar 2007
    Posts
    574
    hello,

    http://www.farnell.com/datasheets/24728.pdf
    This is the datasheet for the tlp521

    for r3 i must be around 700 ohms
    r2 and r4 will feel better with 1.9 kohms
    r1 will be ok with 220 ohms
    the cap close to 7474 1microF might not hurt
    Lucien

  19. #19
    Join Date
    Nov 2005
    Posts
    93
    Not trying to jack this thread but to have DRO's w/o powered drives would it be possible to T into the encoder outs and run them both to the Viper200's and the encoder board made by Campbell designs?
    YCM-40 converted from anilam to Mach3 and lovin it.

  20. #20
    Join Date
    Mar 2007
    Posts
    574
    Not trying to jack this thread but to have DRO's w/o powered drives would it be possible to T into the encoder outs and run them both to the Viper200's and the encoder board made by Campbell designs?
    absolutely but the ground of the DRO should be put in common with the electronique of the detector.

Page 1 of 2 12

Similar Threads

  1. How to use index pulse for homing purpose
    By Zig in forum LinuxCNC (formerly EMC2)
    Replies: 2
    Last Post: 03-28-2008, 08:16 AM
  2. Looking for cheap encoder with index channel
    By JasonCampbell in forum Servo Motors / Drives
    Replies: 12
    Last Post: 09-13-2007, 03:31 AM
  3. spindle index, encoder, home/limit switch
    By Wm McNett in forum CNC Machine Related Electronics
    Replies: 10
    Last Post: 01-13-2006, 01:39 PM
  4. Optical encoder index - what is it good for?
    By medved in forum CNC Machine Related Electronics
    Replies: 8
    Last Post: 10-03-2005, 11:26 PM
  5. Encoder Mounting Position?
    By Willyb in forum Uncategorised MetalWorking Machines
    Replies: 15
    Last Post: 12-17-2004, 05:51 PM

Tags for this Thread

Posting Permissions

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