Re: [Emc-users] 5I25-7i76 encoder output

2018-10-28 Thread Chris Albertson
On Sun, Oct 28, 2018 at 10:59 AM Peter C. Wallace  wrote:

> On Sun, 28 Oct 2018, Chris Albertson wrote:
>
> > Date: Sun, 28 Oct 2018 10:41:14 -0700
> > From: Chris Albertson 
> > Reply-To: "Enhanced Machine Controller (EMC)"
> > 
> > To: "Enhanced Machine Controller (EMC)"  >
> > Subject: Re: [Emc-users] 5I25-7i76 encoder output
> >
> > On Sun, Oct 28, 2018 at 5:15 AM andy pugh  wrote:
> >
>
> The Mesa Encoder uses both methods combined = delta_counts/delta_time, so
> for
> example if you have 7 counts between servo thread times, the velocity will
> be
> calculated as 7/(time from first to last edge of those 7 counts)
> This is optimum for most uses.
>

Yes, that woud work well.  So many times they effecivly divide by the
sample period and don't actualy measure the actual times of the edges.
This gives them a the kind of  jitter in RPM that was reprted.So how
does it work?   There must be a micro or nano second counter on the FPGA
that gets sampled.



-- 

Chris Albertson
Redondo Beach, California

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] bldc motor drive

2018-10-28 Thread Mark Johnsen
>From Andy:  Though it is hardware-capable of doing +/- 10V, it has the
inputs to measure that, and then the rest is just software.  (And given
that it has a linuxCNC-like HAL layer, it would just be a case of
configuring a different command module)

I was just reading up on the STMBL and I had forgotten it can communicate
via Mesa SmartSerial and there's on example on the following page to
connect it to the 7i77.:
https://github.com/rene-dev/stmbl/blob/master/docs/src/Getting%20Started.adoc

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 5i25 gpio's

2018-10-28 Thread Chris Albertson
On Sat, Oct 27, 2018 at 8:26 PM Gene Heskett  wrote:

> On Saturday 27 October 2018 19:23:58 Chris Albertson wrote:
>
>
> Sorry, I've never knowingly touched an arduino, so I know pretty close to
> zip about them.  The speed specs have never impressed me. OTOH, one per
> axis could probably get the job done.
>


An actual Arduino is almost obsolete.   The $2.25 STM part I linked to can
run circles aroubd it at 1/8th the cost and space.
They are 32 bit instructions and the chip runs at one asembly language
instruction per clock cycle ad this one goes abut abuot 80MHz.  The run the
ARM instruction set.

But as slow asthe Arduino is almost all 3D printer use it as their
controller.  A 3D printer has have 4 axis (x, y, z, and e.  where "e" is
the expruder) and thse little printer move much faster then any mill.  And
there is a Arnuino that reads the g-code and pushed the stepper motors.
 But some are now moving on to STM32 ARM chips.  They are easier to use.

But in any case one can certainly red g-code and do software stepping on 4
axis and make the machine move at 240 inches persecond using this littel
Arduino as a machine controller but I would not recommend it for new designs


>
> The first program I ever wrote, in assembly on an rca cosmac board had a
> machine cycle of 8 cycles of a 1.79 MHz clock.


I remember that chip.  The new systems are dramatically easier to program.
I got into programming fist in IBM mainframe computers like the s/360 and
then last foubd out about micocomputers at about the time the z80 came out
inthe late 1970's

The Arduino IDE wa designed so that non-programers, childrem and artest
could make computer controlled devices.  It is purposly set up to by very
easy to use.  It is a good entry point and works for manythings but you can
do more it you move up the ladder a step and use a development system that
suports a real-time OS.


>
> > But you do get better use of them using  ARM's MBED IDC which is only
> > a baby step above Arduino.
>
> I'm not sure how one would go about synching a rack of arduino's taking
> orders from LCNC, as all the precision is in linuxcnc.


The way they do it is place the PID velocity loop on the micro controller
and then update the commaned speed at what we call the servo rate.  The
micro sends positionand volocuty data back at the sae rate.  The position
pid loop is in a central controller.

-- 

Chris Albertson
Redondo Beach, California

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] bldc motor drive

2018-10-28 Thread andy pugh
On Sun, 28 Oct 2018 at 18:00, Mark Johnsen  wrote:

> There's the venerable STMBL project:  https://github.com/rene-dev/stmbl
> Although, I've read one ic chip/part is hard to find and the developer is
> updating the design.  Also, it doesn't do +-10Vdc input

Though it is hardware-capable of doing +/- 10V, it has the inputs to
measure that, and then the rest is just software.
(And given that it has a linuxCNC-like HAL layer, it would just be a
case of configuring a different command module)

-- 
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


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 5I25-7i76 encoder output

2018-10-28 Thread andy pugh
On Sun, 28 Oct 2018 at 17:43, Chris Albertson  wrote:

> Then perhpas this is the wrong method.

An important point here, that I thought I had addressed, is that it
doesn't really matter.

-- 
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


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] bldc motor drive

2018-10-28 Thread Mark Johnsen
Depends on what you're looking for and experience integrating servos.  Many
(too) options.

Both MESA and PicoSystems have servo amp options.  They've been invaluable
to the LinuxCNC community.
http://www.mesanet.com/motioncardinfo.html
https://pico-systems.com/pwmservo.html

I've heard that DMM is a good option and has been around 'for a while':
http://www.dmm-tech.com/

There's the venerable STMBL project:  https://github.com/rene-dev/stmbl
Although, I've read one ic chip/part is hard to find and the developer is
updating the design.  Also, it doesn't do +-10Vdc input so I'm not entirely
sure how to hook it up, but it is quite the servo amp.  2 thumbs up from me
(not used it, though).

No pun intended, but I stumbled across this once:
http://www.ti.com/tool/TIDM-LPBP-BLDCMOTORDRIVE

This fasttobuy2012 on ebay looks to have an acceptable assortment of
Chinese products:  https://www.ebay.com/itm/122099816143

I was looking for a site called 'goodcnc' that also had Chinese
motors/drives, but couldn't find it.   How can you go wrong w/ 'goodcnc' in
it.

Lastly, Copley or AMD (Advanced Micro Devices) servo amps off ebay could be
a good option as well.  But, you have to make sure you get the right amp
for your motor.  If you're not sure how to do it, maybe stay away from this
option.

The linuxcnc forum would have many examples.

Regards,
Mark

On Sun, Oct 28, 2018 at 9:37 AM theman whosoldtheworld 
wrote:

> somone know a good bldc motor drive connect to a 7i77 like a servo drive
> AC?
>
>
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 5I25-7i76 encoder output

2018-10-28 Thread Peter C. Wallace

On Sun, 28 Oct 2018, Chris Albertson wrote:


Date: Sun, 28 Oct 2018 10:41:14 -0700
From: Chris Albertson 
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] 5I25-7i76 encoder output

On Sun, Oct 28, 2018 at 5:15 AM andy pugh  wrote:


On Sun, 28 Oct 2018 at 07:17, Chris Albertson 
wrote:


Or switch to the other method.   Rather then count "ticks" you count the
microseconds between the ticks.


The Mesa encoder counter already does this.



Then perhpas this is the wrong method.  There are two ways to go and which
to pick depends on the encoder and how fast it spins.   If you are counting
microseconds then just maybe that's the wrong way to go for a high
reasolution sensor that is spinning fast.   For a high resoultion sens toy
can coubtstincks per sample period.You'd like to have at least 100
ticks per period.

Perhaps there are not enough microseconds betwen pulses.   You'd like to
have at least 100 timer counts
--



The Mesa Encoder uses both methods combined = delta_counts/delta_time, so for 
example if you have 7 counts between servo thread times, the velocity will be 
calculated as 7/(time from first to last edge of those 7 counts)

This is optimum for most uses.

Some fancier systems automatically compensate for quadrature phase errors and 
duty cycle variations.






Chris Albertson
Redondo Beach, California

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 5I25-7i76 encoder output

2018-10-28 Thread Chris Albertson
On Sun, Oct 28, 2018 at 5:15 AM andy pugh  wrote:

> On Sun, 28 Oct 2018 at 07:17, Chris Albertson 
> wrote:
>
> > Or switch to the other method.   Rather then count "ticks" you count the
> > microseconds between the ticks.
>
> The Mesa encoder counter already does this.
>

Then perhpas this is the wrong method.  There are two ways to go and which
to pick depends on the encoder and how fast it spins.   If you are counting
microseconds then just maybe that's the wrong way to go for a high
reasolution sensor that is spinning fast.   For a high resoultion sens toy
can coubtstincks per sample period.You'd like to have at least 100
ticks per period.

Perhaps there are not enough microseconds betwen pulses.   You'd like to
have at least 100 timer counts
-- 

Chris Albertson
Redondo Beach, California

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] bldc motor drive

2018-10-28 Thread theman whosoldtheworld
somone know a good bldc motor drive connect to a 7i77 like a servo drive AC?

regards
bkt

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 5i25 gpio's

2018-10-28 Thread Peter C. Wallace

On Sat, 27 Oct 2018, Gene Heskett wrote:


Date: Sat, 27 Oct 2018 03:40:48 -0400
From: Gene Heskett 
To: emc-users@lists.sourceforge.net
Cc: Peter C. Wallace 
Subject: Re: [Emc-users] 5i25 gpio's

On Friday 26 October 2018 23:26:38 Peter C. Wallace wrote:


On Fri, 26 Oct 2018, Gene Heskett wrote:

Date: Fri, 26 Oct 2018 21:17:29 -0400
From: Gene Heskett 
Reply-To: "Enhanced Machine Controller (EMC)"

To: emc-users@lists.sourceforge.net
Subject: [Emc-users] 5i25 gpio's

Greetings all;

I just hooked up a couple cables to the BOB on a 5i25's p2
connector. But gpio 31-32-33-34-35 apparently have no pullup.I
searched thru the hal file looking for gpio.013, which is the pin
all three switches formerly shared and is wired to p3-10.  Those
pins have a pullup, to about 4.85 volts.


All I/O pins on P2 and P3 have 3.3K pullups


Thanks Peter. I think its time I bought/made a bigger box, and moved both
bobs out to where I can access them easier. This ones a mess, with an
ice cube relay on its lid controlling a vacuum cleaner and other
accessories that go with adding a 4th axis.  Those heavy cables from/to
the socket the vac is plugged into make it difficult to pull the lid and
do things.  There is stepdown boards, and charge pump buckets etc in it
that aren't even mounted solid. Time to make a bigger box and put both
bobs in it. Just gotta get my eyes usable again. Or say to hell with the
5i25 and get a lash-up like I wound up with the on the Sheldon, a 7i90HD
and 3 7i42TA's. The 7i42TA's make that a very convenient lash-up to wire
up.


You might consider something newer like a 7I76E (this has 5 Axis of 10 MHZ 
capable step/dir, and spindle encoder, 0 to 10V analog spindle control

and 48 12/24V digital I/O: 16 outputs and 32 inputs)



That brings up the question: Is the motherboard parport fast enough to
talk to the 7i90HD with the parport firmware or do I need to get a
faster epp parport card too? Its a bigger Dell, dual core intel cpu.



Motherboard EPP ports are usually fine


The spi port on the pi is faster, but I've not found an spi card for x86
machinery yet. Not to mention that cable from the pi to the 7i90 is only
an inch long. Writes at 42 megabaud, reads at 25 megabaud, in 32 bit
packets. The 26 pin cables in this build are now 4 feet long, likely not
too good for error free data, although I haven't noted a problem from
that, yet. But either the bigger "bobs only" box, or the 7i90->3 7i42's
would cut that cable down to about 18", which can't hurt, and any gpio
on the 7i90HD can be input or output, something that greatly simplifies
the programming when one isn't limited to 5 inputs per bob.


The EPP interface is much slower than the SPI and less noise suceptable
but nowdays Ethernet is probably a better option




I don't recall ever having to make a std parport pin an input an
input, but somethings out of whack. I'll take the box apart again
tomorrow to make sure that BOB is powered. I'm also considering
making a new, bigger box, and moving both bobs to it, this machine's
bob wiring has about exceeded the real estate dedicated to the bob
interface.  Needs more playroom.

In the meantime, if this rings a bell, with 5i25b users, speak up.

Thank you all.

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 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



nks
--
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 



Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 5I25-7i76 encoder output

2018-10-28 Thread Peter C. Wallace

On Sat, 27 Oct 2018, Alan Condit wrote:


Date: Sat, 27 Oct 2018 18:46:59 -0700
From: Alan Condit 
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Emc-users@lists.sourceforge.net" 
Subject: [Emc-users] 5I25-7i76 encoder output

I have a homemade encoder on my lathe spindle. I am feeding the encoder 
outputs into the encoder spindle inputs on the 7I76. The reported rpm seems 
to be fluctuating wildly. I want to look at the signals to see if the width 
of the signals is about the same for the index on time and for channel A and 
B on and off times. Is it possible to look at the encoder signals with hal 
scope? Or do I need to drag my oscilloscope out to the shop. I don??t see 
the pins in the hal file.

Am I even thinking about this correctly?


Duty cycle (deviation from 50 %) and quadrature errors (deviations from 90 
degree phase difference between A and B) on low resolution encoders will add 
considerable noise to encoder velocity estimation.


This is because with a low resolution encoder you will typically have 0 to 1 
counts occuring per servo thread. Velocity estimation is done by dividing the
counts per servo thread by the time between the counts, so any duty cycle 
or quadrature error will cause a large error in the measured time between 
pulses if you only have 1 count.


This is not a serious problem on high resolution encoders since they will 
typically have many counts per servo thread period (and any individual 
quadrature cycle timing errors get divided by the number of counts)




Because of this, its usually neccesary to low pass filter the velocity signals 
from low resolution encoders



You can monitor the A,B signals with halscope but only at fairly low speeds
due to the low sample rate of the inputs


The signals to look at are:


hm2_.0.encoder.NN.input-a
hm2_.0.encoder.NN.input-b
hm2_.0.encoder.NN.input-index

Where  is teh FOGA card name and NN is the encoder number

Peter Wallace
Mesa Electronics
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 5I25-7i76 encoder output

2018-10-28 Thread andy pugh
On Sun, 28 Oct 2018 at 07:17, Chris Albertson  wrote:

> Or switch to the other method.   Rather then count "ticks" you count the
> microseconds between the ticks.

The Mesa encoder counter already does this.

It may be that the home-made encoder does actually have some angular
noise, so the measured speed does change.
Typically this doesn't matter for spindle-synch moves, which track the
measured position, not the velocity.
So just lowpass the spindle speed before displaying it, and forget about it.

-- 
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


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Help with small mill setup

2018-10-28 Thread andy pugh
On Sun, 28 Oct 2018 at 03:02, craig  wrote:

> 3 of the 4 pin connectors go to KL23H276-30-4A stepper motors on the
> mill; the 4^th is not connected. On the KL-5056 micro-stepping and
> current are set with 8 switches. (3 controlling peak current, one
> reducing current at standstill and 4 controlling micro-stepping) Now
> only switches 6 and 7 are set on, which I think translates to lowest
> peak current (1.4A), reduced standstill current and 1/10 stepping.

This sounds like a fairly simple configuration to set up with
Stepconf, which I would guess you have already tried to run, which is
why you are asking about the accel and velocity.

It is probably best to work that out in the Stepconf axis-test screen,
keep increasing both until you get a stall then reduce by a factor to
allow for some margin.
(And if it stalls with your first guess, make the numbers half the size).
You will probably find that you can get higher peak speeds with lower
acceleration, but for intricate shapes like it sounds as though you
intend to work on you might find that acceleration is more important
than top speed.

Stepconf has built-in timing data for the Keling drives.

As a starting point, looking in the Sherline sample configs, in inch
units, velocity is 0.36 and accel is 2. Your machine looks a bit
bigger, and so can probably go a bit faster.

-- 
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


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 5I25-7i76 encoder output

2018-10-28 Thread Chris Albertson
> ,
> that I was able to run the P-Gain from 3 on up to the 20-40 area.
> Spindle speed control is so accurate that until the chirp of the current
> limit of the pwm-servo I'm driving that motor to around the 2 hp mark
> with, I have no clue that its working that hard. So I would highly
> recommend a higher resolution encoder.
>

Or switch to the other method.   Rather then count "ticks" you count the
microseconds between the ticks.  What you do is sample a counter with the
"tick"  Doing it this way you can measure the RPM of a one line enconder on
slow shaft.

>
> --

Chris Albertson
Redondo Beach, California

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 5I25-7i76 encoder output

2018-10-28 Thread Chris Albertson
I've seen this too.  non-constant RPM when you know the rotating mass has
enough inertia that the RPM can change so fast.

What I found is that the resolution of measuring the encoder is low and
what I see is quantization noise.This means I'm not sampling with
enough bits.  You are sampling to fast and getting killed by the statistics
of small numbers.

There are two ways to read and encoder:
1) each "tick" samples a fast running clock and you measure the period and
2) each tick increments a counter and periodically sample the count.

If you use the wrong method you get the variable RPM problem   You want to
get at least 100 counts per sample using whatever method.


On Sat, Oct 27, 2018 at 6:47 PM Alan Condit  wrote:

> I have a homemade encoder on my lathe spindle. I am feeding the encoder
> outputs into the encoder spindle inputs on the 7I76. The reported rpm seems
> to be fluctuating wildly. I want to look at the signals to see if the width
> of the signals is about the same for the index on time and for channel A
> and B on and off times. Is it possible to look at the encoder signals with
> hal scope? Or do I need to drag my oscilloscope out to the shop. I don’t
> see the pins in the hal file.
>
> Am I even thinking about this correctly?
>
> Alan
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


-- 

Chris Albertson
Redondo Beach, California

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users