Hello Guest it is March 29, 2024, 04:08:26 AM

Author Topic: pulse frequency (motors slow and jerky)  (Read 12899 times)

0 Members and 1 Guest are viewing this topic.

pulse frequency (motors slow and jerky)
« on: February 24, 2011, 10:28:12 PM »
Hi all,

Very new to the world of cnc. In the process of building a small machine and Im up to the stage where Im ready to start putting it all together. I've done plenty of research and whilst there is no 64 bit support for Mach3, it does seem a very popular and reccomended package so I have downloaded the demo version for now and hopefully I can get things working.

My problem is, I cant get the motor to turn at anything faster than a few RPM, it is very grindy and misses about 10% of a revolution for each revolution (it is that slow it can easily be seen jumping)

At the moment things are still under development, and once everything is working I do plan to build a larger machine. My basic setup so far consists of the following:

Ebay purchased partial cnc kit, consisting of frame, bearings, lead screws - pretty much all the mechanical side which is all fine.

3 x bipolar nema 23's, 2.8A 260 oz-in/19kgf-cm

Driver modules for the motors are pacific scientific (pacsci) 5210's. I originally started with L297/298 drivers but had immediate problems with speed and came accross the 5210's on ebay for cheap so I am using those for nowl I appreciate they dont offer the microstepping that some more advanced modules do but for the time being the performance I get from them will be fine to get me up and running. Once I am operational, I will be able to see what needs changing when I build the larger one, I suspect the driver modules will be one of them.

Power supply is temporary, a 32C 1.5A supply that I happened to have. I know this isnt sufficient to power all 3 motors but is fine for testing a single motor.

I have a motor runnig fine from a small circuit with a 555 timer IC with the aforementioned power supply, and a small 5V supply so I know the motor and driver units are operating. I can get in excess of 1700 RPM with no load (guestimated with a diy rev counter but wont be far off). I suspect I could get more but I think that is more than enough, and since Im not on the power supply I will finally use I  havent spent time tweaking this. I can get dont to a snails pace too so I am confident that the motor and driver side of things are ok and my problem lies elsewhere.

 in order to test Mach3 with my system I have on the bench a direct connection to my driver module, basically the parallel port is replacing my timer circuit. I have a cable from the PP on the pc to a temporary breakout, all that is connected is gnd, and pins 2 and 3 which are configured in Mach3 as step and dir. I have a 5V supply and my 32V supply for the motors also connected, gnd's are commoned and the output & dir pins set up in Mach3.

The Mach3 driver test runs, the waveform is all over the place and fluctuates from about 400 to 1900 pulses.  The pulse rating goes from too slow, to excellent, to to fast. I suspect this may be the key to my problem.

When I fire up Mach3 and try to configure my motor as per the video tutorial I can get it to turn but as I mentioned at the start of my post it is horribly slow and rough. I roughly calculated the motor steps etc, and also tried values ranging from 200 to 1000's to try and get it to run somewhat better but I wasnt able to. I also varied the step pulse. I was getting nowhere so I read through the forum and I think the problem is that when I switch to the diagnostic screen I am getting a pulse frequency which fluctuates from about 1580 to 1900. From what I have read, I bellieve this ought to be somewhere near the kernel speed? This is currently at the default of 25000 and according to the documentation the demo version is locked at this although the other options appear to be available in the program. I have tried the sherline 1/2 pulse mode, and also 1/2 and full step on my drivers.

My main pc is a decent spec machine but is running windows 7 64 bit so unfortunately I cant use this one which I know would be more than powerful enough and would get the pc spec out of the equation.
The  basic spec of the machine it is running on is and AMD sempron (yes, I know - its all I have available!) 3000+ which runs at 2 ghz, 1 gig ram with a clean install of XP pro SP3 32bit. Nothing installed apart from drivers and Mach3. Ive read the optimisation guide and apart from installing as a standard pc its pretty much done. I work in IT and am happy that the machine is running pretty much as bare as it can with the recent XP install.

With only Mach3 open, and idle, cpu usage is 0%, available memory about 700. With Mach3 running the roadrunner gcode it takes about 2% cpu and 50 meg of ram so it doesnt appear to be a great load on the system.

The diagnostic page as I mentioned shows a pulse frequency of about 1580 to 1900 and the "time in int" from about 3.5 to 4.5. When running the roadrunner the pulse frequency initially starts off at about 8000 then repidly drops and varies from about 2500to 2800. What I also noticed is that if I do anything at all on the pc, i.e. launch task manager, then the pulse frequency will rise to about 16000 for a second or so.
As I have nothing else on the pc, I ran calculator in scientific mode and did a 423432432 (random large number) n! which is an old trick to hog the cpu. During the time it is trying to calculate, the cpu usage goes to 99% for calc but the pulse frequency on Mach3 steadies out at exactly 40605. When I stop the calculation then it drops back down to what it was.

Hopefully I have provided enough info without boring everyone to sleep ! and hopefully someone can point me in the right direction.

Thanks











Re: pulse frequency (motors slow and jerky)
« Reply #1 on: February 24, 2011, 10:44:48 PM »
Have you tried the Mach special driver?  I've never had to use it, but I think it's supposed to fix issues like this.  You could also try removing mach and the driver and reinstalling.

You should be seeing around a 25K pulse frequency on the diagnostics page. It will fluctuate a little, but if you're seeing numbers less than 2000, that's why it's running slow.
 

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: pulse frequency (motors slow and jerky)
« Reply #2 on: February 25, 2011, 03:31:18 AM »
I have never used a 5210 driver but you are bound to get some jerky motion as the best it can handle is half stepping (there was a huge hike in stepper control when microstepping became common practice a few years back and the difference between full step or even half step and eight step or greater is really enormous).
Having said this, you should still be able to achieve good stepper motion and if anything I would suspect your PC.
It may be worth checking that the supply to the driver  is actually a full 5 Volts.

Tweakie.
PEACE

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: pulse frequency (motors slow and jerky)
« Reply #3 on: February 25, 2011, 03:32:49 AM »
Do you have onboard graphics?
Have you tried the optimisation steps outlined on the downloads page?
Hood
Re: pulse frequency (motors slow and jerky)
« Reply #4 on: February 26, 2011, 11:10:39 AM »
Thanks for the replies.  I had been through the optimisation guide but it didnt work. No onboard graphics. The special driver gave 0 pulses. I got fed up after hours and hours and ended up reformatting again, doing nothing at all different but it worked right away ! The driver test gives 28086-28088 constant, starts a bit higher for a few seconds then is steady at that.
The diagnostic screen in Mach3 is now sort of constant - it changes between 27486 and 78/79 about every 1/2 a second. The time in int goes from 7.9 to 8.5.  I did a a few tests and the motor ran ok and all other i/o ports seem to be recognised. Couldnt resist attaching a motor to my machine, the axis moved quite smoothly with more than enough torque and I imagine plenty of speed so when I'm using a better power supply and have tweaked the motor setting I think it is going to work.
Im just now making a new breakout & driver boards as the setup at the moment is going to get too messy with wires all over the place. I then hope to look at limit switches etc on the bench.

Quote
I have never used a 5210 driver but you are bound to get some jerky motion as the best it can handle is half stepping (there was a huge hike in stepper control when microstepping became common practice a few years back and the difference between full step or even half step and eight step or greater is really enormous).

The motor I found to be smooth enough, that said, I have never seen an 8 step motor in action so have nothing to comare it to. Once this machine is working and I look towards a slightly larger one I will also be looking at other driver options.

Thanks again

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: pulse frequency (motors slow and jerky)
« Reply #5 on: February 26, 2011, 11:18:02 AM »
Did you disable ACPI in the bios before re-installing windows? That's usually the culprit.
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: pulse frequency (motors slow and jerky)
« Reply #6 on: March 04, 2011, 06:12:21 AM »
Hi,

ACPI is disabled, Im not sure when during the process I did this earlier during my initial troubleshooting. Im not sure exactly what rectified the problem, possibly a combination of things. Its up and running now though and whilst it was annoying, its good in a way because if everything went to plan then I would have learned less.

Thanks

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: pulse frequency (motors slow and jerky)
« Reply #7 on: March 04, 2011, 06:28:19 AM »
Good to hear its running, shame you are not sure what fixed it but as long as it keeps going thats all that matters :)
Hood