Hi all,
Came accross this forum whilst trying to figure out my problem. There are similar posts I have read but Im still confused.
I am building a small CNC router and have most of the parts now. At the moment I am trying to sort out the stepper drivers, Im using an arduino (AVR based micro controller board) at the moment as find this easy for testing purposes and cheaper than blowing up a pc, and I have yet to make my pc interface card. Eventually the idea is that the cnc machine, whilst the software (yet to be decided) will run on the pc, the machine will be at the other side of the room using an arduino and bluetooth or wireless to "connect" to the pc.
The steppers I have are from a well known auction site and are a little over spec for my needs, but the idea was to make a small machine initially then use as many parts as possible to make a larger one once I learned more and figured out what works and what doest.
The motors are bipolar, the specs are :
Step angle, 1.8
Rated current 2.8A
Phase resistance 1.13Ω
Phase inductance 3.6mH
Holding torque 263 oz/in 18.9kgf/cm
I bought a 297/298 component kit which is basically the components to make a circuit very similar to the ones on the 297/298 datasheets. I made a few changes, put pin headers for the various ports on the 297 and also put a potentiometer and resistor accross Vref - I read this whilst doing some research and it seemed a good idea to be able to adjust the vref.
I made a board in eagle -a link to the schematic is here and built it.
I used a very basic test program initially which basically sends a pulse to the clk pin on the l297, the program is as follows but written in C rather than english !
set clk pin low
wait X microseconds
set clk pin high
wait 1 microsecond
the value of X works from about 400/600 for the fastest speed depending on the voltage to the L298.
the above runs constantly in a loop. I fired it up with a standard 12V 3A typical "power supply" like ones that come with pretty much any low voltage home appliance. After a bit of tinkering with the vref (which I initially set to 1V) , various settings on half/full and the control/inhibit thingys, and various settings with the value of the delay in my program I got it to work.
It was slow, and depending on the clock speed and also the vref potentiometer adjustment the motor either ran smoothly, gave a high pitched whine and turned slowly or not at all, or it made a grating sound and moved very roughly.
When it ran smooth it was fine, plenty of torque but slow. The max I could get it to run well with the 12V supply was 120RPM. This was with my X value of 600 microseconds.
After some research, it seemed that I needed more voltage, so I plugged in a 19V laptop power supply. This allowed an X value of 500uS and gave a speed of 145 RPM.
The higher voltage seemed to be working, so I plugged in a 32V / 1.5A supply from an HP printer. Managed to get 225 RPM then POP ! power supply protection kicked in.
Once it had reset, I connected up again but the motor just hummed and wouldnt turn, one of the large 0.5Ω sense resistors was red hot.
I made another board as I had ordered 2 kits, basically the same but added jumpers for the half/full, inhibit/phase etc.
Ran the tests again and got the same results, even (stupidly) ran it with the HP 32V supply which also gave the same result !!!! I am now waiting on some new 298's to come.
I hope the above isnt too much but I thought it best to give as much detail as possible.
So onto my question - where am I going wrong ?! From my tests so far it seems that there are several factors that affect the smooth running and speed:
my program/delay time between steps of course
the vref adjustment seems to make a large difference as I adjust it, it can make the motor stop, humm, buzz, grind or run smoothly.
The control pin that changes the chopper mode makes a seemingly random difference.
The half/full setting also makes a difference but it doesnt seem to do half steps.
Can anyone please offer some initial pointers in the right direction, I "just" need the motor to go faster. I know there are ready made drivers available but I would rather do as much of it myself as I can for the learning side but also for the enjoyment, and satisfaction of having made it myself.
TIA
Calv
Came accross this forum whilst trying to figure out my problem. There are similar posts I have read but Im still confused.
I am building a small CNC router and have most of the parts now. At the moment I am trying to sort out the stepper drivers, Im using an arduino (AVR based micro controller board) at the moment as find this easy for testing purposes and cheaper than blowing up a pc, and I have yet to make my pc interface card. Eventually the idea is that the cnc machine, whilst the software (yet to be decided) will run on the pc, the machine will be at the other side of the room using an arduino and bluetooth or wireless to "connect" to the pc.
The steppers I have are from a well known auction site and are a little over spec for my needs, but the idea was to make a small machine initially then use as many parts as possible to make a larger one once I learned more and figured out what works and what doest.
The motors are bipolar, the specs are :
Step angle, 1.8
Rated current 2.8A
Phase resistance 1.13Ω
Phase inductance 3.6mH
Holding torque 263 oz/in 18.9kgf/cm
I bought a 297/298 component kit which is basically the components to make a circuit very similar to the ones on the 297/298 datasheets. I made a few changes, put pin headers for the various ports on the 297 and also put a potentiometer and resistor accross Vref - I read this whilst doing some research and it seemed a good idea to be able to adjust the vref.
I made a board in eagle -a link to the schematic is here and built it.
I used a very basic test program initially which basically sends a pulse to the clk pin on the l297, the program is as follows but written in C rather than english !
set clk pin low
wait X microseconds
set clk pin high
wait 1 microsecond
the value of X works from about 400/600 for the fastest speed depending on the voltage to the L298.
the above runs constantly in a loop. I fired it up with a standard 12V 3A typical "power supply" like ones that come with pretty much any low voltage home appliance. After a bit of tinkering with the vref (which I initially set to 1V) , various settings on half/full and the control/inhibit thingys, and various settings with the value of the delay in my program I got it to work.
It was slow, and depending on the clock speed and also the vref potentiometer adjustment the motor either ran smoothly, gave a high pitched whine and turned slowly or not at all, or it made a grating sound and moved very roughly.
When it ran smooth it was fine, plenty of torque but slow. The max I could get it to run well with the 12V supply was 120RPM. This was with my X value of 600 microseconds.
After some research, it seemed that I needed more voltage, so I plugged in a 19V laptop power supply. This allowed an X value of 500uS and gave a speed of 145 RPM.
The higher voltage seemed to be working, so I plugged in a 32V / 1.5A supply from an HP printer. Managed to get 225 RPM then POP ! power supply protection kicked in.
Once it had reset, I connected up again but the motor just hummed and wouldnt turn, one of the large 0.5Ω sense resistors was red hot.
I made another board as I had ordered 2 kits, basically the same but added jumpers for the half/full, inhibit/phase etc.
Ran the tests again and got the same results, even (stupidly) ran it with the HP 32V supply which also gave the same result !!!! I am now waiting on some new 298's to come.
I hope the above isnt too much but I thought it best to give as much detail as possible.
So onto my question - where am I going wrong ?! From my tests so far it seems that there are several factors that affect the smooth running and speed:
my program/delay time between steps of course
the vref adjustment seems to make a large difference as I adjust it, it can make the motor stop, humm, buzz, grind or run smoothly.
The control pin that changes the chopper mode makes a seemingly random difference.
The half/full setting also makes a difference but it doesnt seem to do half steps.
Can anyone please offer some initial pointers in the right direction, I "just" need the motor to go faster. I know there are ready made drivers available but I would rather do as much of it myself as I can for the learning side but also for the enjoyment, and satisfaction of having made it myself.
TIA
Calv