Hardware Timer for accurate pulsout?

gtslabs

Member
I am trying to send a stepper motor step signal with a range of 0.1 steps per second to 2000 steps per second. I need less than 1% error. I have not been able to get accurate frequencies measured on my scope using the pause command. Using the Pulsout I get an accurate pulse but the rest of the loop adds error. I also tried looping just 2 pulsout statements with a dummy pin not used but I still had some error.
<code><pre><font size=2 face='Courier'>
top:
pulsout 4,5000 ' step signal
pulsout 5,5000 'nothing connected
goto top:
</font></pre></code>

I just ordered some 28x1 and 40x1 chips but waiting for those to arrive.

Could I use the hardware timer and a crystal oscillator to get accurate square waves at this range? Can PWMout go this low?

Or is there a better way to get the signal at this range? I would like to have 16bit resolution on the range.
 

moxhamj

New Member
Errors may still be &gt;1% with a picaxe. 2000 steps per second is way more than I have ever managed to drive a stepper, but maybe you are using special ones. You can get absolutely accurate stepper control with an xtal, divider, counter and AND/NAND logic gates. It will end up being 6+ chips though. What is the application?
 

gtslabs

Member
Dr. Acula, thanks for your comments. I am building one of these <A href='http://www.soiltest.com/pdf/Soil/triaxial.pdf' Target=_Blank>External Web Link</a> for my own inhouse use. I dont need mine to that slow. I also have a need for 2000 steps per second or faster for a particular test we perform.

Mid band resistance may be a problem that fast so I am considing adding Viscous Inertial Dampers if needed. I may have to add a manual gear changer to get the speeds higher but then I would need a bigger stepper.

Do you know of any example crcuits using the components you suggested?

Thanks
Steve
 

moxhamj

New Member
Building it with discrete components means the speed can't be varied very easily, though 'divide by n' counters can be used. I suspect machine code on a pic would be the most practical option. Have you built these sorts of things before?
 

gtslabs

Member
Not the circuit but I already have a proyotype working. I am using a surplus controller/driver frmo slo-syn <A href='http://www.electrosales.com/warner/Warpdrive/SS2000.html' Target=_Blank>External Web Link</a> but I am not getting accurate rates. This was a surplus item so I started with it. It costs over $1K so I wont be using it.

I used Liberty Basic to generate the interface to that controller. <A href='http://www.gts-labs.com/motor_control_picture.JPG' Target=_Blank>External Web Link</a>

My actual rate was 1/2 the desired rate at this slow speed. It was better when I ran it faster but not where I need it to be. Since I did not plan on using that controller anyway I did not investigate why.

I really dont want it controlled by a computer anyway. A keypad and LCD interface is what I am working on.

Why can the PWMout command work on a lower frequency? Could a picaxe with a very low Hz oscillator bring it into the range I need?
 

gtslabs

Member
I wanted to share what I found that should work.
I belive this chip should work for my application<A href='http://www.analog.com/en/prod/0,,770_843_AD9834,00.html' Target=_Blank>External Web Link</a> This is a AD9834 chip.

An application:<A href='http://www.myplace.nu/avr/minidds/index.htm' Target=_Blank>External Web Link</a>

Steve
 

premelec

Senior Member
That chip certainly will put out - I have a 0-20MHz digital oscillator using this - [www.norcalqrp.org FCC-1&amp;2]- perhaps a bit overkill? A ring counter with weighted resistors can put out a nice stepped waveform easy to filter... p328 of my CMOS Cookbook shows this approach - also the famous 8038 function gnerator might be made to work... Whatever... good luck with it!
 
Top