ts-7000
[Top] [All Lists]

[ts-7000] Re: high resolution timers and real time

To:
Subject: [ts-7000] Re: high resolution timers and real time
From: "jesseoff" <>
Date: Tue, 10 Apr 2012 18:54:34 -0000



--- In  Jim Ham <> wrote:
>
> I wonder if different people have different ideas of what motor control 
> really is. If you have one PWM connected to a drive that is feeding 
> current to a motor, I'll bet a real-time Linux kernel could work fine. 
> If, however, you have several PWMs connected directly to FETs that are 
> feeding current to the motor (no external drive), it will be a real 
> stretch to use Linux directly. These are two completely different 
> topologies.

Using Linux like a microcontroller is really not its strength and a $1.00 4Mhz 
PIC a lot of times ends up easier to program, debug, and has better and more 
consistent realtime behavior.  Bit-banging PWM using a general purpose CPU like 
an ARM9 running a general purpose OS like Linux one has to be very careful to 
design around all the latencies.  Not to mention theres always a chance, for 
example, somebody did something stupid programming the ethernet driver that 
completely screws up your worst case latency.

The paper below has measured Linux's IRQ latency with a completely tricked out 
realtime Linux running a 520Mhz ARM processor at 70uS.  70uS is a heck of a 
long time compared to even a 8Mhz micro.   The article also mentions under load 
the IRQ dispatch latency varies by up to another 80uS.  This randomness has to 
be taken into account to calculate just what precision a software bit-bang PWM 
algorithm has in its target duty-cycle.  For example, if you wanted a honest 
12-bit precision duty cycle PWM output (your jitter should be less than 1LSB), 
so you could only reliably do a max PWM frequency of 3Hz in realtime Linux on a 
520Mhz ARM.  Most raw motor control (excluding servos) prefers PWM >10Khz to 
keep the motor and power electronics inaudible.

http://www.linuxfordevices.com/files/article081/Bauer.pdf

We wrote a general purpose PWM Verilog core last year that can do 7 PWMs with 
250LUTs (approx 5% of the TS7500 Lattice XP2 FPGA size).  It can also serve as 
a 3-phase VFD (1-120Hz) with 12-bit precision PWM at 12Khz with programmable 
deadtimes and its only ~470 lines of verilog. More documentation is in the 
comment block at the top of the source code I'm linking below: 

http://dl.dropbox.com/u/52796058/wb_pwm.v

This source is free to use and modify by anybody using it on a TS product.  

//Jesse Off



> 
> The PIC processors I referred to earlier have multi-output PMW modules 
> built in that handle dead time and other issues associated with driving 
> motor bridges. Other manufacturers then Microchip have other solutions, 
> I'm just more familiar with the PIC line.
> 
> Jim
> 
> jesseoff wrote:
> >
> >
> > --- In  Jim Ham<jimham@>  wrote:
> >
> >> Of course, if Techologic offers a motor control core that works out of
> >> the box the whole cost equation changes...  This is a big IF.
> >>
> >
> > We have several we have implemented for customers, regular brushless DC 
> > motor control core with quadrature feedback, stepper controllers with 
> > auto-acceleration/deceleration, and even 3-phase sinusoidal PWM (or 
> > quasi-sinusoidal) variable frequency drive controllers for AC induction or 
> > permanent magnet types.
> >
> > The main thing the prevents creating a general purpose product is always 
> > how the customer wants the motors connections terminated or which power 
> > FETs to use or how many to control on one board.  Every product is unique.
> >
> > //Jesse Off
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> > -----
> > No virus found in this message.
> > Checked by AVG - www.avg.com
> > Version: 2012.0.1913 / Virus Database: 2411/4925 - Release Date: 04/09/12
> >
> >
> 
> -- 
> Porcine Associates LLC
> 244 O'Connor St.
> Menlo Park, CA 94025
> USA
> +1(650)326-2669 fax +1(650)326-1071
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU