My opinion of PRUs is that I just don't want to invest in writing PRU code
because that chip is likely is disappear soon.  When the platform vanishes
the code will need complete re-write.

I like to code to SOFTWARE APIs  Arduino is a software API, you can change
out one flavor of Arduino for another an the code still runs evan with the
new Ardunios that don't us Atlam chips and have switched to ARM.   That
said no I would never suggest Arduino for this use case.  Just using it as
an example of a software interface.

I'd pick a platform that has a long life expectancy.  There are several and
most cost less then 1/2 the price of a Beagle or Pi3.

My experience with the low end of the ARM range, that is the M0 and M4 I
can keep up with four optical encoders each one with 64 edges per
revolution and each one spinning at 10,000 RPM.   This works out to 43,000
interrupts per second.   The M4 still had time to rise four PID loops and
keep up communications with a high speed serial line and to run a couple
housekeeping tasks in the background.   This is one a M4 with a clock of
about 100 MHz.  It might handle a lot more but I was using poured geared
motors.

If you are only doing two motors then you can use the STM32 ARM's hardware
quadrature system.  These will track encoders with some arraignment of
hardware counters and can track encoders up to about 1MHz or so with zero
CPU overhead.

One of the other things you get with ARM CotexM is hardware PWM.  You can
generate pulses with zero CPU overhead as they have hardware PWM where you
only need to load registers with the frequency and duty cycle.  No need to
use software pulse generation so the PWM is very stable as it is clocked in
hardware.

Could you do hardware three phase?  Yes.  Mostly in hardware.  The low
level pulse generation is in hardware but setting it up is complex and
you'd ned to read their reference design document.

The ARM M is quite a bit more powerful them a PRU but what makes it better
is that the ARM CPU core is surrounded by quite a lot of general purpose
hardware counters and timers and D/A and A/D so you can offload work to
external hardware

Also there is a good RTOS for ARM M.  So multitasking is easy and you need
not write to the level of the bare hardware - your code is portable with
just a recompile to a different chip. (well mostly portable)

The platform is like to stay around a while.  ARM-M is the dominat player
now and we are still in the exponential growth phase

All that said.  I think the way the motional control world is headed to
smart motors with integrated controllers and you set up some parameters to
control maximum acceleration and speed and so on and then you command them
over a serial link.   So you run data and power to each motor.   If I were
designing now from scratch. I'd emulate this and place one M0 processor
near each motor.   This would scale well too as each motor brings with it
local processing power.


On Tue, Oct 17, 2017 at 1:14 PM, Pauluzs <[email protected]> wrote:

> Hi all,
>
> Currently i'm looking into driving 3 phase (steppers) motors on 3 axis
> with encoders the Beaglebone.
> This because i got several 3 phase pm bldc motors, some small 48v ac
> servo's and 2 large 220v ac servo's i would like to drive.
> While looking into the 3 phase bldc steppers the idea came it would
> potentially also being able to support ac servo's.
>
> After making a pinmux layout it would be possible to connect:
>    3 encoders eqep A/B/INDEX (or 3 hall sensors on the same inputs)
>    6 PRU 0 signals U/V/W phase hi and low
>  12 PRU 1 signals U/V/W phase hi and low
>
> This would mean each phase could have a hi and low pru capable pin driving
> it.
> Using discrete power components it would be cheap and simple to build a
> drive.
> Or power driver IC such as the International Rectifier [IRAMS]
> <https://ec.irf.com/v6/en/US/adirect/ir?cmd=eneNavigation&N=0+4294841618> 
> (according
> to http://wiki.linuxcnc.org/cgi-bin/wiki.pl?BLDC)
>
> There are some questions i run into:
>  Can the beaglebone/machinekit even keep up with this amount of pwm pins?
>  Should i use the pru stepgen code? (stepgen does not seem to support 3
> phase)
>  Should i use the pru pwm code?
>  Use the bldc component with standard writes?
>  Or use the bldc component with pru_pwm?
>
> Usefull thoughts or comments are most welcome,
>
> Thanks,
>
> Paul
>
> --
> website: http://www.machinekit.io blog: http://blog.machinekit.io github:
> https://github.com/machinekit
> ---
> You received this message because you are subscribed to the Google Groups
> "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> Visit this group at https://groups.google.com/group/machinekit.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Chris Albertson
Redondo Beach, California

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to