![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General Electronics Discussion Discuss basic electronics, power supplies and anything else electronic related here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
So I built an ISA expansion card with a LS7566 IC quadrature endcoder counter. My MILL has rotary encoders on the ends of the motors. I made my own software to read the counter IC and convert the counts into inches. The X and the Y axis are accurate, and function 100%. But the Z axis is only accurate in one direction, but in the other direction the count seems to be double. I connected the Z encoder to the X or Y inputs on my PC board, with the same results. And connected the X encoder to the Z on the PC board, and it worked 100%. This should eliminate a defect on the Z wiring on my board or a typo in the programming being the problem. I took the cover off the encoder and ensured 100% that I am using the correct wires. The encoder has +5, -common, M+, M-, A+, A-, B+, B-. I am using A, B and common. I'm suspecting that I blew something inside the encoder a while ago when I was trying to get them to work with a different setup. Is this a common failure mode? When I open up the encoder what should I be looking for? Thanks |
|
#2
| ||||
| ||||
| Have you tried using the other two /A & /B? They are essentially the same but complement signal. A double beam 'scope is best to see what is going on, but you can use a meter if you turn very slowly and try and observe the same amount of pulses per same amount of turn, but this may prove more difficult over the scope method. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#3
| |||
| |||
| Al, I did us the /A & /B inputs with the same results. Using a meter I can see that A and B switch from 0 to +5v as I turn it, so they are both "working". I took the encoder into work, so hopefully I can hook it up to one of the scopes here. I am guessing I am getting a situation were both are working, but one is bleeding over onto the other, causing some overlap in the signal or something like that. I did accidentally apply +5v to the outputs, so I'm guessing that damaged something. The double scope should show that. There's not much inside the encoder, two line drivers and two comparators, so I think I'll just change them out and see what happens. |
|
#4
| ||||
| ||||
| A scope should help, BTW did you try swapping the A & B over with each other? Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#6
| |||
| |||
| I put it on the scope. I'm not to savvy with o-scopes, but can use them enough. The one I used is a 4 channel, I set to 2 channels. It was very hard to get a good reading moving the encoder by hand, if I could have spun it with a constant low speed motor I'm sure I could have gotten perfect little square waves to compare. The best I could do was spin the encoder VERY small amounts and watch each beam on the O-scope go from high to low. I offset their position slightly so I could see which was which. I had to take the cover off of the encoder and turn the outer edge of the wheel slightly to get it slow enough, but it worked. I could clearly see the step of each on going from high to low. It looked like it did it in correct order in both directions. This is going very slowly tho, who knows what would happen and any real speed. I ordered the IC chips, and will just replace them and see if that cures it up. I'll post back with the results. |
|
#7
| ||||
| ||||
|
??? The difference should have been obvious as there should have been a 90° (quadrature) difference between the two, if they co-inside it almost sounds like you have a A & /A? If you were getting 90°, then the other thing to look for is a spurious pulse on one of the A or /A. Incidentally did you check A against /A? Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#8
| |||
| |||
| Had the same thing happen to me. I had the marker pulse hooked up on the not A of the differential inputs. Make sure that it is hooked up correctly as connecting the marker pulse up to the A or B differential inputs will cause this problem. |
|
#9
| |||
| |||
| Al, I don't think I was clear. I couldn't spin the encoder by hand steady enough to see a clear enough square wave that was consistent enough speed to do any comparison. All I could get the scope to do for comparison purposes was to set it so it was just flat lines, that would go up or down on the screen whether it was on or off. So as I turned it super slow I saw 'A' line go higher, followed by 'B', then 'A' dropped, then 'B' dropped, etc. Amtekinc- I'm gonna get it back on the machine before I start swapping IC chips. You may be right. Originally my 'A' wire had a break in it somewhere. So inside the motor cover I moved the 'M' wire to the 'A' terminal, but looking at it now, it was the /M that I moved, and I think I used the M wire at the computer. I thought I metered it to make sure I had the right wire, but maybe I didn't..... won't get back to the machine till Sunday, I'll update on Monday. |
|
#10
| |||
| |||
| I was able to hook it up yesterday. I ensured that I connected the proper wires and it worked! I must have had the wrong wire hooked up. So now it works 100% on all axes, but when I enable the motor drive board and the transformers and everything turn on, the encoder numbers are jumping all over!!! I'm getting noise. I have two possible solutions I think- 1) use both the A and /A (and B /B) to go into the board, and into a chip to turn that into a clean pulse. I'm assuming this would take care of any noise. or 2) Use a 'pull-down' resistor at the A and B inputs of my Counter chip. I think this would work. I'm going to try this tonite. Any other thoughts are appreciated. (I am using the original shield twisted pair wiring from the encoders to the PC.) |
| Sponsored Links |
|
#11
| ||||
| ||||
| I always use the differential pair if they are available, there are several RS422 drivers or receivers 8 pin or 16. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#12
| |||
| |||
| I did a quick search, found a chip LTC488, looks like it will do exactly what I need. I'm gonna try a pull down resistor for tonite, I just want to see this thing work. I'll order that chip next time we do a digikey order at work, and wire that in. |
![]() |
| 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 |
| Need Help!- Only Y works correct X don't work Z works one direction only | jdgbadenhorst | Hobbycnc (Products) | 1 | 05-20-2012 06:26 PM |
| Mach newbie changing axis direction and lowering encoder count | toadjammer | Mach Software (ArtSoft software) | 2 | 12-29-2010 03:45 PM |
| Need a little help in the right direction | Utopia | General Metal Working Machines | 2 | 03-12-2010 10:10 PM |
| G320/G340 'Required Direction Setup' and 'Required Direction Hold' times? | margni74 | Gecko Drives | 2 | 12-05-2008 08:10 PM |
| Need some direction... | mredican | CNC Tooling | 3 | 03-09-2008 08:39 PM |