![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
I'm trying to setup a system to test some servo motors with the bldc component in EMC2. My motors have differential quadrature encoders with an index pulse, but I'm currently running them in single ended mode (only one line in each for the A, B and Z signals). I'm running these signals straight into parallel ports. I have three parallel ports in my machine - one port on the motherboard and two more on a pci breakout card. I'm currently having noise issues with the index pulse input. Is it possible to setup EMC2 to use the differential capabilities of the encoder? I have been searching but can't find an example of how to do this. Any help appreciated!
__________________ CNC mill build thread: http://www.cnczone.com/forums/vertical_mill_lathe_project_log/110305-gantry_mill.html |
|
#2
| ||||
| ||||
| If the EMC2 input does not have the feature you could try a RS422 receiver right at the port, there are quite a few such as the DS3486 etc. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#3
| |||
| |||
| You sould look at mesa hardware... With what you are trying to do - you really should use some external hardware.. Pretty inexpensive also.. Gives you very fast encoder counters, step generators , pwm and i/o (and analog +/-10 depending on the options) Mesa FAQ - EMC Support Forum Mesa has a bunch of servo interfaces that are switchable between single ended and differential. (I am using the 7i33 and 7i48 which work great) ask a lot of questions! sam |
|
#4
| ||||
| ||||
| Thanks Al. If it's not possible to do differential input in software and nothing else works, I'll pick up the chip you recommend. I wish I'd asked this last week - I just ordered some parts from Mouser... They're really cheap but then will cost $10 to ship. Thanks for the input, Sam. Yes, I have looked at Mesa hardware. If I can get my current test system working, that's what I will eventually buy (after I design and build the rest of the machine). However as I mentioned I'm currently trying to test the EMC bldc component with my motors (which I already have), and so far it doesn't work. So I currently have zero incentive to buy more hardware that depends on bldc working. That's why I'm trying to use just the parallel port for my test rig since I already have that hardware (really just the computer) and it will work with whatever electronics package I eventually settle on.
__________________ CNC mill build thread: http://www.cnczone.com/forums/vertical_mill_lathe_project_log/110305-gantry_mill.html |
|
#5
| |||
| |||
| what do you mean by - it doesn't work? I saw a video of the servo spinning using the bldc component in open loop.. (showing that the commutation is working...) There are quite a few people using the bldc component now with great success. Andy has done such great work with it. Are you coming up with a circuit that take PWM out of the printer port and converting it to +/-10v to drive your amc drive? As far as the printer port reading your encoder... You are really limited to you base period. To be safe - you can only count about 1/2 of your base settings.. So lets say your base period is 50000ns (I think the default base setup on the sample configs) that would be a freqency of 20khz so you should be able to reliably count at 10khz. On good computer hardware you might be able to go 20000ns or better which would give you a reliable counting freq of 25khz.. technically - if your quadrature signal is exactly 50/50 you can aproch counting at the base period.. (so 20000ns would be 50khz) but I would not count on it. Not that I don't think it is possible - but you have to get a lot of the components working together to do it this way. (I had initially used the printer port to do totally closed loop servo control using pwm amplifiers and counting encoder back to the printer port. It did work but I soon found the limitations of the printer port in pwm speed and encoder counting.) It was a good learning experience. Now as far as noise.. I would make sure all your cables are shielded and the shield grounded only on one end. (I have everything grounded at a bus bar near the computer.) I have had good luck with single ended encoder for short distances.. but longer distances have given me problems. As al says - you can use differential recievers at the computer end. (it isn't a emc2 issue seeing the differential signals.. it is the printer port isn't designed to see differential signals.) as Al said - you can get differential reciever chips that would convert it to single ended at the printer port. (hope that made sense) sam |
| Sponsored Links |
|
#6
| ||||
| ||||
| I've gotten my motors to rotate in free running mode (cfg=H) and in fanuc input Hall output mode (cfg=fTH) and during the process of getting that working Andy found and fixed an error in his code, but I haven't gotten good results using the incremental encoder (cfg=qH or cfg=qiH). In qH it homes the motor correctly according to Andy, but then I can't get the motor to rotate. In qiH it's not homing correctly but I know the index pulse is not being seen correctly so I'm trying to fix that. The modes I really need to be able to use are fqH and qiH. I do have a circuit that converts pwm out of the printer port to analog drive for the AMC drive. Your mention of the counting frequency could actually be a significant part of my problem... I have a 2500ppr encoder, or 10k counts per rev, so that would limit me to 60rpm from the motor, right? I am all about keeping my options open, but maybe if I really want to test this I do need to commit to EMC as my control system, buy some of the Mesa hardware for the input side and just hold off on the motor drives until I get closer to actually needing them... The reason I'm wanting to hold off buying stuff until I have to is because I realistically might not finish this machine for several more years, and I won't really need the electronics until then. I'm just trying to test the motors I've already bought so I can move on to the next part of my design process.
__________________ CNC mill build thread: http://www.cnczone.com/forums/vertical_mill_lathe_project_log/110305-gantry_mill.html |
|
#7
| |||
| |||
| AIO Daughter cards That would give you MHz encoder-counting capability (with differential input) and analogue outputs for the drive. (and a fair bit of GPIO, with more easily added in lumps of 48 for $70 to $110 each) You might well not end up using that for the final build (there will probably be other coool stuff around by then) but some flexible GPIO is something I can see you needing throughout your development process. |
|
#8
| |||
| |||
| I highly recommend sticking with emc. It is incredibly flexible. I started with Mach3, and a G100. After years of waiting for drivers and fixes, I eventually switched to a Smooth Stepper. It too had problems (gantry homing), and again I was forced to wait for fixes that never came. I have just switched my mill to emc (I already had set my lathe up with emc). It had a bug in the gantry configuration. I fixed it myself in 30 minutes. Don't get me wrong - Mach3 is great - I just made bad hardware decisions. |
|
#9
| ||||
| ||||
| To update this, I got my index pulse working after I added a debounce of 1 base thread period. Then with some changes Andy made to bldc, I got the qH and qiH modes working. I still can't run my motors very fast due to limitations of the parallel port, but things generally seem to be working now. Thanks for all the help.
__________________ CNC mill build thread: http://www.cnczone.com/forums/vertical_mill_lathe_project_log/110305-gantry_mill.html |
![]() |
| 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 |
| Parallel port: How to check Step signal? | satanicoo | General Electronics Discussion | 6 | 07-08-2010 04:00 PM |
| Newbie- 1.6V-3.0V random signal voltage parallel signal from output – Any advice? | cjchands | Mach Software (ArtSoft software) | 0 | 11-12-2009 04:36 AM |
| Differential Encoder Signals | eloid | DIY-CNC Router Table Machines | 8 | 01-29-2008 08:05 PM |
| differential encoder signal form | Karl_T | General Electronics Discussion | 1 | 03-19-2007 09:28 AM |
| Interfacing a 24 volt signal to parallel port | macona | General Electronics Discussion | 14 | 01-06-2007 02:55 PM |