CAD CAM EDM DRO - Yahoo Group Archive

RE: [CAD_CAM_EDM_DRO] Re: Axis Stall Problems

Posted by Paul Kelly
on 2005-11-13 18:31:27 UTC
The 16F628 has comparators. User a timer to turn on a transistor every
1/20kHz seconds and a comparator interrupt to turn it off. You have a
programmable internal voltage reference to use too..
Note though that you need to ignore the switching transient. It was very
clear in the posted scope traces that a large current spike occurs when you
switch, if your comparator trips off this, then you aint gonna get that
motor to turn...

Best check how fast those comparators are first though.. Just checked.
400nS. That should be fast enough..
Then there's the interrupt code. Say 10 instructions @Fosc=20MHz.. that's
only a max interrupt rate of 400KHz assuming the micro is doing nothing
else... Not an unfair assumption, as soon as you start moving at any speed
and get busy handling step interrupts you'll stop PWMing.. That gives you a
best case of about 20 current levels at 20kHz chop frequency. Not bad but
not great either...

Alternativley Futurlec carry L297's for US$3.80 Qty 1

:-)

PK

-----Original Message-----
From: CAD_CAM_EDM_DRO@yahoogroups.com
[mailto:CAD_CAM_EDM_DRO@yahoogroups.com] On Behalf Of Wayne C. Gramlich
Sent: Monday, 14 November 2005 10:14 AM
To: CAD_CAM_EDM_DRO@yahoogroups.com
Subject: [CAD_CAM_EDM_DRO] Re: Axis Stall Problems

--- In CAD_CAM_EDM_DRO@yahoogroups.com, Jon Elson <elson@p...> wrote:
>
> Wayne C. Gramlich wrote:
>
> >--- In CAD_CAM_EDM_DRO@yahoogroups.com, "Paul Kelly" <tech@c...> wrote:
> >
> >
> >>I run my 297+298 driver (circuit pretty much straight from
> >>the datasheet) at 18kHz.
> >>
> >>Thinking about your setup (I've built drives very similar to
> >>this and had similar problems) I reckon 20kHz sample rate is
> >>about a factor of 10 too slow.
> >>
> >>A typical PWM drive starts with a square wave at the PWM
> >>frequency. Turns on the drive transistor for a minimum period
> >>(ie ignores the current spike from switching transients),
> >>then uses a comparator to turn off the drive when the
> >>current reaches a threshold. All this is happening VERY
> >>fast. I can remember having to change an op amp I was using
> >>to amplify a current sense voltage because it wasn't fast
> >>enough.. If you are switching at say 10KHz and sampling at
> >>20kHz then you effectively only have two current settings.
> >>(it's a bit more complex I know..)
> >>
> >>
> >
> >I understand what you are saying, but the measured current
> >does indeed average around 1 Amp.
> >
> But, are the individual pulses all around the same width, or is it
> making a very long average of dozens of narrow and wide pulses
> averaging out to 1 A? I think Paul is on to something here.
> I have several drives that I've worked with that run at about a
> 20 KHz rate, but they are all capable of varying the duty cycle in
> microsecond increments. if you are really only taking one sample
> every 50 us, then the current rise and fall rates might be very rough.
> This may work fine at low speeds, but when the speeds pick up,
> the PIC may not respond to coil current relative to the new coil
> polarity needed in a timely manner. Obviously, when the step rate
> reaches 5000 steps/sec or so, then things will really break down,
> as there are only four sample per step. (Or, maybe, things will
> actually run well there!)

It is clear to me now that I am not sampling the current
sense voltage any where near fast enough. What is happening
is that I am getting is chop waveform that is pretty much
a 10KHz square wave with occasional half width pulse stretches
at either the low portion of the cycle or the high portion.
This is not anywhere near the waveform that the L297
produces, which is a relatively constant frequency of
variable width pulses.

Alas, the PIC16 series of processors is not gifted with
faster A/D's, so I think I will have to abandon hope of
fast rapids with my current hardware design. I top out
at about 200-225 full steps per second with the current
hardware (which is way less than I was hoping for.)
Given that this is just a hobby for me, I'll use it
event with the really slow speeds.

I think it is time to go back to the drawing board.

[snip A3977 stuff]

-Wayne







Addresses:
FAQ: http://www.ktmarketing.com/faq.html
FILES: http://groups.yahoo.com/group/CAD_CAM_EDM_DRO/files/
Post Messages: CAD_CAM_EDM_DRO@yahoogroups.com

Subscribe: CAD_CAM_EDM_DRO-subscribe@yahoogroups.com
Unsubscribe: CAD_CAM_EDM_DRO-unsubscribe@yahoogroups.com
List owner: CAD_CAM_EDM_DRO-owner@yahoogroups.com, wanliker@...,
timg@...
Moderator: pentam@... indigo_red@... davemucha@...
[Moderators]
URL to this group: http://groups.yahoo.com/group/CAD_CAM_EDM_DRO

OFF Topic POSTS: General Machining
If you wish to post on unlimited OT subjects goto:
aol://5863:126/rec.crafts.metalworking or go thru Google.com to reach it if
you have trouble.
http://www.metalworking.com/news_servers.html

http://groups.yahoo.com/group/jobshophomeshop I consider this to be a
sister site to the CCED group, as many of the same members are there, for OT
subjects, that are not allowed on the CCED list.

NOTICE: ALL POSTINGS TO THIS GROUP BECOME PUBLIC DOMAIN BY POSTING THEM.
DON'T POST IF YOU CAN NOT ACCEPT THIS.....NO EXCEPTIONS........
bill
List Mom
List Owner


Yahoo! Groups Links

Discussion Thread

Wayne C. Gramlich 2005-11-12 15:52:42 UTC Axis Stall Problems Paul Kelly 2005-11-12 16:05:38 UTC RE: [CAD_CAM_EDM_DRO] Axis Stall Problems Jon Elson 2005-11-12 16:21:01 UTC Re: [CAD_CAM_EDM_DRO] Axis Stall Problems Wayne C. Gramlich 2005-11-12 16:29:06 UTC Re: Axis Stall Problems KM6VV 2005-11-12 17:05:45 UTC Re: [CAD_CAM_EDM_DRO] Axis Stall Problems Paul Kelly 2005-11-12 17:48:20 UTC RE: [CAD_CAM_EDM_DRO] Re: Axis Stall Problems Wayne C. Gramlich 2005-11-12 23:12:40 UTC Re: Axis Stall Problems Wayne C. Gramlich 2005-11-12 23:28:37 UTC Re: Axis Stall Problems Wayne C. Gramlich 2005-11-12 23:34:11 UTC Re: Axis Stall Problems Paul Kelly 2005-11-13 00:00:14 UTC RE: [CAD_CAM_EDM_DRO] Re: Axis Stall Problems Jon Elson 2005-11-13 10:52:33 UTC Re: [CAD_CAM_EDM_DRO] Re: Axis Stall Problems Irby Jones 2005-11-13 14:38:32 UTC Re: Axis Stall Problems Irby Jones 2005-11-13 14:47:49 UTC Re: Axis Stall Problems Wayne C. Gramlich 2005-11-13 18:14:15 UTC Re: Axis Stall Problems Paul Kelly 2005-11-13 18:31:27 UTC RE: [CAD_CAM_EDM_DRO] Re: Axis Stall Problems Jon Elson 2005-11-13 19:33:34 UTC Re: [CAD_CAM_EDM_DRO] Re: Axis Stall Problems Wayne C. Gramlich 2005-11-13 19:38:32 UTC Re: Axis Stall Problems Jon Elson 2005-11-13 19:46:42 UTC Re: [CAD_CAM_EDM_DRO] Re: Axis Stall Problems Wayne C. Gramlich 2005-11-13 20:53:38 UTC Re: Axis Stall Problems Irby Jones 2005-11-14 07:21:53 UTC Re: Axis Stall Problems Wayne C. Gramlich 2005-11-23 17:15:55 UTC Re: Axis Stall Problems engravingdave 2005-11-24 20:45:31 UTC Re: Axis Stall Problems Wayne C. Gramlich 2005-11-25 11:34:37 UTC Re: Axis Stall Problems