Re: [Emc-users] Making a steper pulse generator, would like comments

2018-04-04 Thread Gene Heskett
On Wednesday 04 April 2018 12:33:26 Jon Elson wrote:

> On 04/03/2018 11:50 PM, Chris Albertson wrote:
> > Yes the faster you go the bigger the jumps.   With my 1MHz clock I
> > can only make pulses with periods that are a whole number of
> > microseconds.
> >
> > So I ask again:  What is the fastest step rate you actually use with
> > a real machine?
>
> It TOTALLY depends!  There are guys running delta 3D
> printers with NEMA 17 motors that probably go to insane
> RPMs, and thus really high step rates with microstepping
> drives.
>
> > What is needed?  Do people run motors at 100,000 steps per second?
>
> 100K (micro) steps/sec is 10K full steps/sec with a Gecko
> driver. 10K full steps/sec with a standard 1.8 degree motor
> is 50 RPS or 3000 RPM, so that is quite possible with a good
> driver and NEMA 17 motor.
>
And I have made 3300 revs on a nema 23, 45 volts into a 2m542 driver. No 
usable torque, but it ran. I don't recall the step divisor ATM but it 
was not less than a /8.

> > What I'm guessing is that it is rare to run as high as 10K steps per
> > second.I could be wrong, so I'm wanting to hear from people who
> > are running real machines.
>
> 10K (micro) steps/second would be 5 RPM or 600 RPM, VERY
> normal speeds even with much larger motors.  If you
> direct-drive a 5 TPI screw at 600 RPM, you get 120 IPM,
> which is quite normal.

Absolutely.

> So, 10K steps/sec is NOT at all rare when using
> microstepping drives.
>
> > To say this using  MK or LinixCNC terminology what is the fastest
> > usable "base rate"?I am using a 1 uS (or 1MHz) base rate.   Is
> > that fast enough?

IMO, no. Mesa's cards use a higher frequency, in some cases I think 50 
MHZ, (or is that only for encoder sampling) so the timing jitters even 
when its doing a semi-random step to generate an in between pulse train, 
the timeing errors are under 1%.

> With Machinekit on the Beagle Bone, the PRU can generate
> steps a lot faster than X86 software stepping, and there is
> no base thread.  I don't know the max rate you can get, but
> you can certainly get step rates well into the 10's of KHz,
> while doing other stuff, too.
>
> Jon

-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Making a steper pulse generator, would like comments

2018-04-03 Thread Chris Albertson
Yes the faster you go the bigger the jumps.   With my 1MHz clock I can
only make pulses with periods that are a whole number of microseconds.

So I ask again:  What is the fastest step rate you actually use with a
real machine?

What is needed?  Do people run motors at 100,000 steps per second?
What I'm guessing is that it is rare to run as high as 10K steps per
second.I could be wrong, so I'm wanting to hear from people who
are running real machines.

To say this using  MK or LinixCNC terminology what is the fastest
usable "base rate"?I am using a 1 uS (or 1MHz) base rate.   Is
that fast enough?

I looked at the data sheet that comes with the lead shine drivers and
they all seem to require a pulse be high for at least 2.5 uS and then
low for another 2.5 uS.   This means the fastest possible period is 5
uS or 200KHz.

What I'm finding is that if I use a uP like an ARM-M i'm limited to
bout 1MHz base rate to go much faster I'll have to go with an FPGA and
then 10MHz is reasonable.

One more thing:  That 10% velocity jump represents a worst case rate
error of 5% but the average rate error  (I think?) be only 2.5% or 1/4
of the step size.

On Tue, Apr 3, 2018 at 7:46 PM, Jon Elson  wrote:
> On 04/02/2018 09:36 PM, Chris Albertson wrote:
>>
>>
>> How to generate pulses with 50nS jitter?  Use hardware, not software.
>> The uP has 10 hardware counter/compare timers built in and you can
>> program them to divide down the a 1MHz clock.
>
> If you have a 1 MHz clock, then you can't have any pulses with finer
> resolution than 1 us.
> So, a 100 KHz step pulse train will have an ~10% velocity jump to go to the
> next faster or slower velocity.
>
> My Universal Stepper Controller has a 10 MHz clock to the step generators,
> so that has 100 ns resolution.
> I recommend a 300 KHz maximum step rate with it, so the next higher or lower
> velocity is about a 3% jump.
>
> Jon
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



-- 

Chris Albertson
Redondo Beach, California

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Making a steper pulse generator, would like comments

2018-04-03 Thread Jon Elson

On 04/02/2018 09:36 PM, Chris Albertson wrote:


How to generate pulses with 50nS jitter?  Use hardware, 
not software.
The uP has 10 hardware counter/compare timers built in and 
you can

program them to divide down the a 1MHz clock.
If you have a 1 MHz clock, then you can't have any pulses 
with finer resolution than 1 us.
So, a 100 KHz step pulse train will have an ~10% velocity 
jump to go to the next faster or slower velocity.


My Universal Stepper Controller has a 10 MHz clock to the 
step generators, so that has 100 ns resolution.
I recommend a 300 KHz maximum step rate with it, so the next 
higher or lower velocity is about a 3% jump.


Jon

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Making a steper pulse generator, would like comments

2018-04-02 Thread Chris Albertson
Some results...

I have pulses coming out of seven different pins.  The fastest is
100KHz (that is a 10 uS period).  All of them seem to have periods
that stay within 0.05 uS of the desired period.  That is 50 nS of
jitter.  I'm measuring with my digital 'scope so I don't 100% trust
the measurement.  Will use logic analyzer a few days.   This is a
proof of concept, no interface to higher level control yet and these
output pins are only 3.3 volts   But it looks like Accurate timing in
a non-issue.   I need to add a high level interface.   Likely just
plain old serial so it can connect to a PC but SPI or I2C as well so
that it is easier to connect to a Pi3.  I will add a queue with flow
control to totally remove any need to realtime software in the PC/Pi3

How to generate pulses with 50nS jitter?  Use hardware, not software.
The uP has 10 hardware counter/compare timers built in and you can
program them to divide down the a 1MHz clock.  The timing pluses are
routed to hardware pins directly and not seen by software.  These ARM
M4 chips were designed for real time control of things like motors.
The lowest priced one that has 10 timers is the STM32F446RE  But it is
otherwise total gross overkill for this purpose.Cost so far is
about $13.





-- 

Chris Albertson
Redondo Beach, California

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Making a steper pulse generator, would like comments

2018-03-31 Thread Gene Heskett
On Saturday 31 March 2018 11:52:01 Chris Albertson wrote:

> On Fri, Mar 30, 2018 at 8:20 PM, Gene Heskett  
wrote:
> > On Friday 30 March 2018 20:34:52 Chris Albertson wrote:
> >
> >
> > Just one question? Can you build this for less than you can buy it
> > from Mesa?  Or Pico? If you time is worth a buck an hour, its a slim
> > chance of yes. Very slim. Otherwise get it from a supplier that
> > supports us.
>
> The arm is not going to use MK or LCNC.   I'm using that on the
> machine tools
> but this arm needs more flexibility than offered by any of the machine
> tool controllers.   This is the high level control software I'll use
> if you are interested:
> https://moveit.ros.org/documentation/concepts/
> This pulse generator will be part of the blue box called "robot
> controllers"
>
> The trouble with Mesa in this case is that I'd have to write a whole
> bunch of FPGA code to make it into what they call a "joint trajectory
> action server"
>
> I thought about using G-code for the robots but they need to do things
> like notice you have set a beer can on the table then plan motion
> around the can. This has to happen in real time, you can't code the
> motion in advance
>
> There is not much to build.  A need to buy an ARM-M based board and
> than add a buffer chip to convert 3.3 volts to 5 volt TTL.  Cot should
> be <$20 total but if one of these works I can build it for under $5
> .ebay.com/itm/STM32F103C8T6
> opment-Board-Module-For-Arduino/162247218933?epid=532038167=item25
>c6b016f5:g:ZXMAAOSwA3dYCJJd>
>
>
> Back to steps per second.   If the carriage moves at 90ipm, that is 38
> mm/sec, with a 5mm screw that means 8 turns per second.   or  1600
> full steps per second but perhaps you are doing 1/4 steps so it is
> 6400 steps/second.   Your machine with software steps is doing about
> 8X slower? with no more then 800 steps/second.   It looks like there
> is no need for more than 10K steps per second and half that might
> work.

I think its running 1/8 step. But my hand isn't anywhere near the good 
book on that.  That machine also threw a drive fault, so got rebooted 
when amanda screamed about a read-only drive this morning. I've a 60GB 
SSD to put in it if its not the cable, which IIRC is red=trouble after 
some time, copper and that bright red insulation dye do not tolerate 
each other at all well. If the data cable is red, and a tail on the log 
blows up when its touched, that dye has struck again.  Its beat me to a 
pulp for the last 40 years starting with the J.A.Pan Co 2 way radio 
microphone cables back in the early 70's. Use any other color but red 
for a sata data cable.

> About jitter, if 3% of the period reduces torque and the fastest rate
> is 10KHz then only 3 uSec of jitter can be tolerated.
>
Since it regularly tolerates more than that with the speed limits 
configured, I should have emphasized "bleeding edge" speeds. 10 ipm 
isn't bleeding edge by any definition. 70+, maybe but its out of torque 
from low motor voltage long before it gets up to that speed. I also have 
homemade dampers on the rear shaft which on that machine helps a lot. 
Right now, running latency-histogram on that machine, with a 25 us base 
thread, the max deviation in about a ten minute run is -8.0 us to 
+8.5us, but those wide times were maybe once in that 10 minutes. It 
might exceed 3 us once a minute.
 
> > How  many motors in your arm? The 7i90HD at less than $70, + 3 
> > 7i42TA's at about 45$ ea, about $200, can handle 8 steppers.  And
> > have plenty of gpio left to do lots of other things. Limited only by
> > your imagination.
> >
> > --
> > Cheers, Gene Heskett
> > --
> > "There are four boxes to be used in defense of liberty:
> >  soap, ballot, jury, and ammo. Please use in that order."
> > -Ed Howdershelt (Author)
> > Genes Web page 
>
> --
>
>
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users



-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Making a steper pulse generator, would like comments

2018-03-31 Thread Chris Albertson
OK so here is what is required.  The "joint action server" gets messages
for up to 6 axis.  The messages contain the velocities for each joint.
Realistically it will not get more than abut 20 of these per second.
Other types of messages are per joint acceleration limits and
transformation matrixes.   But this pulse generator lives at the "far end"
of the chain and will only see the velocity commands.   If there are more
than 6-axis then two controlers are used.

Yes, it does seem like if I used an Ethernet based Mesa card I could just
send the right data down the cable.   I assume the protocol is documented.
I will download the user manual tonight.

I like the idea of using commodity hardware, things like develoment boards
because they are made in huge quantities and sell for under about $15.
Arduino clones, ARM boards and even these:
STM32F103C8T6-ARM-STM32


The higher level planning is done on much more powerful machine.  I'm using
an 18-core Intel Xeon.

As a separate issue the server sends back the state of the joints.  It can
do this any way it likes including open loop, that is just sending back
where it "thinks" the stepper is based on counting steps.  Or there could
be sensors in the joints or even accelerometers and gyros.

On Sat, Mar 31, 2018 at 9:06 AM, andy pugh  wrote:

> On 31 March 2018 at 16:52, Chris Albertson 
> wrote:
>
> > The trouble with Mesa in this case is that I'd have to write a whole
> bunch
> > of FPGA code to make it into what they call a "joint trajectory action
> > server"
> >
> > I thought about using G-code for the robots but they need to do things
> like
> > notice you have set a beer can on the table then plan motion around the
> can.
> > This has to happen in real time, you can't code the motion in advance
>
> Motion commands do not have to come from G-code. You can send
> canonical motion commands independently from motion, or you can simply
> set the step-generator input pin to the required position (in
> engineering units)
> The Mesa step-generators have built-in acceleration and velocity limits.
> halcmd setp hm2_5i25.0.stepgen.00.position 123.456
> But you don't even need to use LinuxCNC at all, you can just write the
> required positions directly to PCI registers or transfer them down an
> ethernet cable.
>
> And then there is Mesa's own motion controller.
> http://store.mesanet.com/index.php?route=product/
> product=65_id=163
> Free with any FPGA card (according to that page)
>
> This was just posted to the forums, might be relevant:
> https://forum.linuxcnc.org/49-basic-configuration/34295-
> rdl2-arduino-command-line-stepper-testing-utility#108162
>
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1916
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>



-- 

Chris Albertson
Redondo Beach, California
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Making a steper pulse generator, would like comments (jitter)

2018-03-31 Thread Nicklas SB Karlsson
I did something similar two years ago. 32 bit value with 16 bits for encoder 
style pulse counter and 16 bits for decimal is what I should chose. Position 
values.

With encoder style I think of an encoder timer which usually overflow and then 
number of overflows is counted for longer motion. This will allow for an 
arbitrary long motion but put a limit on how often value is checked.

Decimal point is needed to avoid jitter which will happen even at constant 
speed then number of pulses per second is close to update frequency. For 
example will an update frequency of 1kHz and a pulse frequency around 1.5kHz 
produce a lot of jitter but decimal point to place signal within period will 
remove this. I should have the formula to remove this jitter if you want it?

I also implemented averaging of receive time which will allow high jitter on 
received times with low jitter on pulses if number of receive times i high for 
the average.

It would be possible to use receive FIFO to allow more than one period jitter 
or sending several positions each time provided positions is known before hand 
so any feedback would be delayed in this case.


I used Micro controller with DMA feeding comparator register. More than one 
timer period between each pulse require some special handling. By this method 
flanks will be placed with micro controller clock so it should be both cheap 
and good method but might be a little bit tricky to avoid errors, there are 
"hard" real time demands on some updates but but Micro controller usually have 
good support for this.


Regards Nicklas Karlsson



On Fri, 30 Mar 2018 17:34:52 -0700
Chris Albertson  wrote:

> I'm making a stepper motor pulse generator for my own use but others
> might find it useful.  To help make sure it is useful to others I'm
> asking what specs it would need to have  to make in "interesting" to
> you.
> 
> Here is what it does...   You send it via a serial link a point in 6
> or 7 axis (x,y,z,a,b,c) and a time.  The pulse generator will step all
> the motors such that they all get to the given point at the specified
> time and the movement is along a straight line (in joint space).   The
> units are "steps".  Also you can send it one point and then while the
> motors are moving you send it the next point and it will go from one
> to the next without stopping.  This way the serial link timing need
> not be perfect.  As long as the next point is sent in time, the timing
> is near perfect.
> 
> In my use case all of the move commands are sent at a given rate.  say
> maybe 50 points per second.   The output pulses are "standard TTL"
> five volts and maybe about 20 ma source/sink
> 
> Whatever sends the commands does all the inverse kinematics, real
> world to joint space transform, acceleration control and so on.All
> this thing does is handle the real-time pulse generation so no hard
> real time work must be done by the sender.my target cost is "dirt
> cheap".
> 
> Now for the survey questions:
> 
> 1) what is the fastest pulse rate you would reasonably use.  The
> DM542T driver I'm using for testing is spec'd to 200KHz but I can't
> imagine anyone actually getting close to that.  What's a real number?
> 
> 2) How much jitter in the pulse timing is acceptable?  Yes i know it
> depends on the speed.
> 
> 3) Are people using balanced signals on the step and direction pins.
> I kind of doubt it but want to be sure.
> 
> 
> I don't know if something like this could be used with MK, if so t
> could offload all of the hard real-time requirements.I need this
> for a robot arm
> 
> -- 
> 
> Chris Albertson
> Redondo Beach, California
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Making a steper pulse generator, would like comments

2018-03-31 Thread andy pugh
On 31 March 2018 at 16:52, Chris Albertson  wrote:

> The trouble with Mesa in this case is that I'd have to write a whole bunch
> of FPGA code to make it into what they call a "joint trajectory action
> server"
>
> I thought about using G-code for the robots but they need to do things like
> notice you have set a beer can on the table then plan motion around the can.
> This has to happen in real time, you can't code the motion in advance

Motion commands do not have to come from G-code. You can send
canonical motion commands independently from motion, or you can simply
set the step-generator input pin to the required position (in
engineering units)
The Mesa step-generators have built-in acceleration and velocity limits.
halcmd setp hm2_5i25.0.stepgen.00.position 123.456
But you don't even need to use LinuxCNC at all, you can just write the
required positions directly to PCI registers or transfer them down an
ethernet cable.

And then there is Mesa's own motion controller.
http://store.mesanet.com/index.php?route=product/product=65_id=163
Free with any FPGA card (according to that page)

This was just posted to the forums, might be relevant:
https://forum.linuxcnc.org/49-basic-configuration/34295-rdl2-arduino-command-line-stepper-testing-utility#108162

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Making a steper pulse generator, would like comments

2018-03-31 Thread Chris Albertson
On Fri, Mar 30, 2018 at 8:20 PM, Gene Heskett  wrote:
> On Friday 30 March 2018 20:34:52 Chris Albertson wrote:
>

> Just one question? Can you build this for less than you can buy it from
> Mesa?  Or Pico? If you time is worth a buck an hour, its a slim chance
> of yes. Very slim. Otherwise get it from a supplier that supports us.

The arm is not going to use MK or LCNC.   I'm using that on the machine
tools
but this arm needs more flexibility than offered by any of the machine tool
controllers.   This is the high level control software I'll use if you are
interested:
https://moveit.ros.org/documentation/concepts/
This pulse generator will be part of the blue box called "robot controllers"

The trouble with Mesa in this case is that I'd have to write a whole bunch
of FPGA code to make it into what they call a "joint trajectory action
server"

I thought about using G-code for the robots but they need to do things like
notice you have set a beer can on the table then plan motion around the can.
This has to happen in real time, you can't code the motion in advance

There is not much to build.  A need to buy an ARM-M based board and than
add a buffer chip to convert 3.3 volts to 5 volt TTL.  Cot should be <$20
total but if one of these works I can build it for under $5
.ebay.com/itm/STM32F103C8T6



Back to steps per second.   If the carriage moves at 90ipm, that is 38
mm/sec, with a 5mm screw that means 8 turns per second.   or  1600 full
steps per second but perhaps you are doing 1/4 steps so it is 6400
steps/second.   Your machine with software steps is doing about 8X slower?
 with no more then 800 steps/second.   It looks like there is no need for
more than 10K steps per second and half that might work.

About jitter, if 3% of the period reduces torque and the fastest rate is
10KHz then only 3 uSec of jitter can be tolerated.





> How  many motors in your arm? The 7i90HD at less than $70, + 3  7i42TA's
> at about 45$ ea, about $200, can handle 8 steppers.  And have plenty of
> gpio left to do lots of other things. Limited only by your imagination.
>
> --
> Cheers, Gene Heskett
> --
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> Genes Web page 
>
>
--
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



-- 

Chris Albertson
Redondo Beach, California
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Making a steper pulse generator, would like comments

2018-03-31 Thread Gene Heskett
On Saturday 31 March 2018 02:16:36 Marcus Bowman wrote:

> On 31 Mar 2018, at 04:20, Gene Heskett wrote:
> > Just one question? Can you build this for less than you can buy it
> > from Mesa?  Or Pico? If you time is worth a buck an hour, its a slim
> > chance of yes. Very slim. Otherwise get it from a supplier that
> > supports us.
>
> +1 for that.
> I'm all for avoiding reinventing the wheel.
>
> Marcus

So am I Marcus, since we do have a really long menu/choice. Pico's 
pwm-servo driver is a heck of a pm-dc spindle motor driver for up to 
around 2 hp motors, does my 1's without a problem. And Mesa has a 
plethora of reasonably priced fpga cards. The only Achilles Heel of 
those is the 3.3 volt innards. The 5i25 can tolerate 5 volt i/o, because 
it needs the std par-port bob to make its outside world connections, but 
the 7i90HD needs the 7i42TA's to protect it from the 5 volt world and 
its noises. They effectively are the circuit protection bobs. However, 
with the 7i42TA's you also get a 10,000% easier wire-up as it has the 
usually green stick the wire in the hole and tighten the screw 
connection strips. That right there makes those aux cards worthwhile. 
All you need to do is smash up some short 50 wire scsi-ii ribbon cables 
to make the interconnections. I think my longest 50 pin cable is 5.5". I 
stack mounted mine so all 4 cards are still pretty compact. With the 26 
pin to the pi needing the pi turned over in order to face pin 1 to pin 
1, and a video card fan under the pi, my 26 pin cable is under an inch 
long.  And I've overclocked the pi from 700 to 800 mhz w/o any 
instability or over heating.

> --
> Check out the vibrant tech community on one of the world's
> most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Making a steper pulse generator, would like comments

2018-03-31 Thread Marcus Bowman

On 31 Mar 2018, at 04:20, Gene Heskett wrote:

> 
> Just one question? Can you build this for less than you can buy it from 
> Mesa?  Or Pico? If you time is worth a buck an hour, its a slim chance 
> of yes. Very slim. Otherwise get it from a supplier that supports us.

+1 for that.
I'm all for avoiding reinventing the wheel.

Marcus

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Making a steper pulse generator, would like comments

2018-03-30 Thread Gene Heskett
On Friday 30 March 2018 20:34:52 Chris Albertson wrote:

> I'm making a stepper motor pulse generator for my own use but others
> might find it useful.  To help make sure it is useful to others I'm
> asking what specs it would need to have  to make in "interesting" to
> you.
>
> Here is what it does...   You send it via a serial link a point in 6
> or 7 axis (x,y,z,a,b,c) and a time.  The pulse generator will step all
> the motors such that they all get to the given point at the specified
> time and the movement is along a straight line (in joint space).   The
> units are "steps".  Also you can send it one point and then while the
> motors are moving you send it the next point and it will go from one
> to the next without stopping.  This way the serial link timing need
> not be perfect.  As long as the next point is sent in time, the timing
> is near perfect.
>
> In my use case all of the move commands are sent at a given rate.  say
> maybe 50 points per second.   The output pulses are "standard TTL"
> five volts and maybe about 20 ma source/sink
>
> Whatever sends the commands does all the inverse kinematics, real
> world to joint space transform, acceleration control and so on.All
> this thing does is handle the real-time pulse generation so no hard
> real time work must be done by the sender.my target cost is "dirt
> cheap".
>
> Now for the survey questions:
>
> 1) what is the fastest pulse rate you would reasonably use.  The
> DM542T driver I'm using for testing is spec'd to 200KHz but I can't
> imagine anyone actually getting close to that.  What's a real number?

i have ran them to 340khz laying on the table with a function generator.

This corresponds to nominally 3000 rpms. Driver voltage was 60 volts, 
higher than a 2m542 can tolerate, and the top speed was extremely 
voltage dependent. I have one machine using 2m542's, on 28 volts and 
software stepping that may stall its xy drives at anything above 11 or 
12 ipm. They are direct drives on some  8mm x whatever pitch is loaded 
with 1/16" bearings. Certainly less than 5mm/turn screws.

The machine on the next table has 38 volts, a 5i25 for much steadier 
stepper generation, a 2/1 gear between the z motor and the carriage (it 
a 7x12 lathe, and can move the carriage with a 16mm x 5mm screw at 90 
ipm. Some of that is the steadier step generation and some of that is 
the higher motor voltage. Regardless, its a huge difference.

> 2) How much jitter in the pulse timing is acceptable?  Yes i know it
> depends on the speed.

Available torque without a stall will drop like a rock when its more 
jitter than about 3 or 4 % of the period when up in the nosebleed 
speeds.

> 3) Are people using balanced signals on the step and direction pins.
> I kind of doubt it but want to be sure.

No. But always feed the logic + to the + terminal on the driver, and the 
step/dir to the - terminal of the driver as most turn on the input opto 
with a logic 0 input. This gives more on drive to the opto.  And its 
plumb amazing the difference the bob can make. cnc4pc did make one 
without any opto's of its own, they aren't needed because all the motor 
drivers have them, and 2 in series will cut your available motor speeds 
noticeably. Not to mention they will totally muck up a pwm spindle speed 
control. My G0704 can go from 25 rpm to 3000 rpm in high gear with a max 
error of just a percent or so, once I got rid of the opto's. Half that 
in low gear.

Recently the only bob w/o the opto's in the output circuit available on 
ebay are the SainSmart bob's. They still have opto's in the 5 inputs, 
and if you have high resolution encoders on the spindle, you may have to 
bypass the ones for the A/B signals from the encoder else you'll lose 
spindle control as it speeds up.  By high resolution, more than 500 per 
spindle rev.  Since I put mine on the motor, and scaled the head gearing 
thru a scale multiplier, I'm over 14,000 edges per spindle rev when in 
backgear.  Overkill yes, but thats the price of experience. The fact 
that the control is unbelievably stiff and stable was a nice side 
effect.

> I don't know if something like this could be used with MK, if so t
> could offload all of the hard real-time requirements.I need this
> for a robot arm

Just one question? Can you build this for less than you can buy it from 
Mesa?  Or Pico? If you time is worth a buck an hour, its a slim chance 
of yes. Very slim. Otherwise get it from a supplier that supports us.  
How  many motors in your arm? The 7i90HD at less than $70, + 3  7i42TA's 
at about 45$ ea, about $200, can handle 8 steppers.  And have plenty of 
gpio left to do lots of other things. Limited only by your imagination.

-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page