Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread R C


On 7/10/20 8:26 PM, Ken Strauss wrote:

"You need more gearing with the DC motor." Correct and this could be
considered an advantage since a very small DC motor + gearing (multiple
planetary stages) would have sufficient torque to move the scope. I have no
idea if a RPI can keep up with 3 quadrature encoders and control 3 motors
and manage a UI. However, you could make a compact unit at low cost
containing a microprocessor that takes step/dir, tracks encoder position and
generates PWM to run the motor. Rather like a low power, low RPM, high
torque version of a Clearpath servo.



Well   the shafts are not rotating "that" fast  if an RPI can easily do  
2000rpm, with a 100ppr encoder it can do 3 400 ppr encoders at 1 or 2 or 
3 rpm easily


These RPIs are pretty fast little things; with a 400 PPR encoder,  with 
3 there would be 1000-2000 pulses in a minute... that is easy to do





-Original Message-
From: Chris Albertson [mailto:albertson.ch...@gmail.com]
Sent: Friday, July 10, 2020 10:14 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] off topic: pwm with a stepper driver/motor

Stepper motors are good for this.   A stepper has the most torque at zero
RPM and the torque falls as speed increases while a DC brushed motor has
very little power when moving slowly.  You need more gearing with the DC
motor.

The problem is you need to generate precise pulses.  If the pulse spacing
is not accurate then you are asking a large telescope to accelerate and
decelerate instantly. So to generat pulses need either
1) a hardware solution like a microcontroller or FPGA or pulse generator.
2) A real time kernel on the Linux system or
3) A PID loop to supervise a non-real-time software pulse generator

When I build stuff, my preference is the microcontroller.  I design it so
the microcontroller can work independent of a larger Linux computer or

take

commands from a large Linux computer.  I want some basic functionality
when
power is applied then adding the Linux PC adds more functionality.

Linux CNC uses a slightly different idea they either go with Real-Time
Linux or use a very simple pulse generator running in an FPGA.

Reading up to three quadrature encoders with just a Raspberry Pi might
work, or not.  I don't know.  A lot depends on the speed of the encoders.

On Fri, Jul 10, 2020 at 6:45 PM R C  wrote:


I don't think anyone did,  but I know that's how most do it...

But that's just too easy  :)I would just like to see if I can do it,
killing time


On 7/10/20 7:39 PM, Ken Strauss wrote:

I haven't been following this closely but has anyone suggested that

you

use a

DC motor with an encoder? With a PID loop and PWM power to the motor

you

could

run the motor continuously. DC motors with integrated encoder and

planetary

gearbox are readily available for a few dollars. Just a thought.




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


___
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




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



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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread R C
right that is how most people use it...   BUT it would still be hard to 
calibrate the movement to the earths rotation.



and also  ..   I just want to do it with steppers   :)    I am weird

On 7/10/20 8:14 PM, Ken Strauss wrote:

You could use the DC motor + PID exactly the same as using steppers. With the
encoders you would always know the exact angle though which the motor had
rotated. The advantage would be the lack of any jerks in motion which are
inherent with a stepper. Have you considered using the Clearpath units? See
https://www.teknic.com/



-Original Message-
From: R C [mailto:cjv...@gmail.com]
Sent: Friday, July 10, 2020 10:05 PM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] off topic: pwm with a stepper driver/motor

yep..  true..  but it is also knd of what I do for a living...


I think it can be done,  to build an equatorial platform, and really
control it's speed/angle over time.


On 7/10/20 7:52 PM, Ken Strauss wrote:

I also waste a lot of time exploring different ways of doing things but
frequently end up doing it the traditional way. One should never just
accept
"how it is done" but for many (most?) things there are good reasons for
traditional ways.


-Original Message-
From: R C [mailto:cjv...@gmail.com]
Sent: Friday, July 10, 2020 9:43 PM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] off topic: pwm with a stepper driver/motor

I don't think anyone did,  but I know that's how most do it...

But that's just too easy  :)I would just like to see if I can do it,
killing time


On 7/10/20 7:39 PM, Ken Strauss wrote:

I haven't been following this closely but has anyone suggested that you
use a
DC motor with an encoder? With a PID loop and PWM power to the

motor

you could

run the motor continuously. DC motors with integrated encoder and

planetary

gearbox are readily available for a few dollars. Just a thought.




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

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



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


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




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



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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread R C


On 7/10/20 8:13 PM, Chris Albertson wrote:

Stepper motors are good for this.   A stepper has the most torque at zero
RPM and the torque falls as speed increases while a DC brushed motor has
very little power when moving slowly.  You need more gearing with the DC
motor.


that is exactly right, that is why I wanted to try going that route


The problem is you need to generate precise pulses.  If the pulse spacing
is not accurate then you are asking a large telescope to accelerate and
decelerate instantly. So to generat pulses need either
1) a hardware solution like a microcontroller or FPGA or pulse generator.
2) A real time kernel on the Linux system or
3) A PID loop to supervise a non-real-time software pulse generator


yes I agree on the first part..   :)   BUT   this is not a high speed 
thing and changes at high speed are more "disruptive"  then changes at 
something that goes rather slow


the 3 solutions you mention work if you really want to be on top.  The 
thing is..   it is not really that bad if you're a fraction of a second 
off, with an amature telescope.


(but perfect is cool  :)   )



When I build stuff, my preference is the microcontroller.  I design it so
the microcontroller can work independent of a larger Linux computer or take
commands from a large Linux computer.  I want some basic functionality when
power is applied then adding the Linux PC adds more functionality.


Yes definitely... a micro controller would be something "small" that 
works predictable   BUT it is hard to interact with and make adjustments.


I worked with micro controllers,  they are great for repetitive stuff 
that don't need interaction/correction




Linux CNC uses a slightly different idea they either go with Real-Time
Linux or use a very simple pulse generator running in an FPGA.


right.  I use linux cnc and really like it for my mill and lathe. 
Actually, if you abstract it..  a telescope is sort of a machine that 
points at "something" similar like a mill does.


the degrees of freedom are different, but not that different. I think a 
telescope can be sort of "defined"  with 4 degrees of freedom,  however, 
2 of them (orbit and rotation of the earth) are constrained.  If you 
look at it,  it would be like a 4 or 5 axis mill  running a program 
doing nothing except pointing at some star, which is the same 
functionality as it milling some "object"


That is not why I posed the question here though.   I did because I  
knew that Linux CNC knows how to work with drivers and steppers,  and I 
am trying to do something similar with the hardware that I use in my 
little mill and lathe and mill, running linux cnc





Reading up to three quadrature encoders with just a Raspberry Pi might
work, or not.  I don't know.  A lot depends on the speed of the encoders.


well   the speed of rotation is not that high, so one is not as much 
measuring speed,  but more position...   so  that would be a few hundred 
pulses per revolution


I tried a few scenarios...  it doesn't seem to be a real problem to get 
a few hundred pulses in a few seconds at all.





On Fri, Jul 10, 2020 at 6:45 PM R C  wrote:


I don't think anyone did,  but I know that's how most do it...

But that's just too easy  :)I would just like to see if I can do it,
killing time


On 7/10/20 7:39 PM, Ken Strauss wrote:

I haven't been following this closely but has anyone suggested that you

use a

DC motor with an encoder? With a PID loop and PWM power to the motor you

could

run the motor continuously. DC motors with integrated encoder and

planetary

gearbox are readily available for a few dollars. Just a thought.




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


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






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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread Gene Heskett
On Friday 10 July 2020 22:26:12 Ken Strauss wrote:

> "You need more gearing with the DC motor." Correct and this could be
> considered an advantage since a very small DC motor + gearing
> (multiple planetary stages) would have sufficient torque to move the
> scope. I have no idea if a RPI can keep up with 3 quadrature encoders
> and control 3 motors and manage a UI. However, you could make a
> compact unit at low cost containing a microprocessor that takes
> step/dir, tracks encoder position and generates PWM to run the motor.
> Rather like a low power, low RPM, high torque version of a Clearpath
> servo.

The rpi4 w/2gigs, and a mesa 7i90HD controller would be an expensive 
overkill, but consider that it could not only run the telescope but the 
rest of the building its in. One of the firmwares that can be loaded 
into the 7i90 gives 4 stepgens, 4 encoders and 4 pwmgens.  And still 
leaves you about 60 other gpio pins to keep track of the whole 
environment, like a motorized sliding roof, or even the whole building 
over the scope that could take protective action based on wind velocity 
exceeding a set limit value, or sensing rain, parking the scope, 
bringing the roof or building back over it and even starting a small 
heater and vent fan to dry it out until the humidity is safe.

My hal files have quite a bit of "gingerbread" that runs in a 200 hz 
thread doing lots of stuff, like tracking the z position and running the 
x in and out to correct for several thousandths of bed wear. The jog 
dials that replace the hand cranks all work in this slower thread. It 
also tracks the distance it overtravels at spindle reversal due to the 
mass of a 40 lb chuck, sending back to the driver gcode if you want to 
use it, to shorten a rigid tap stroke after the first hit on the hole, 
giving me the ability to set the depth of a hole to be tapped, but 
reducing the stroke to prevent the overtravel from hitting the bottom of 
the hole and breaking the tap.

Even with all that, I still have around 40 gpio pins that are not 
committed.  Two of those gpio's control the AC power via 40 amp ssr's so 
that when motion is disabled, the only power left on is the raspi's and 
monitor. Thats about 15 watts, so its on 24/7. My ability to do stuff 
around that lathe is limited only by my imagination, which I have a 
reputation for allowing out to play without a chaperon. :-)

Running an 8" Dob would be a piece of cake.  Might have to teach 
stellarium how to drive a scope thru an spi interface. Serial, very high 
speed.  Installed and ran stellarium but didn't find an interface as it 
seems to need ASCOM drivers, and they give very limited control. I'm 
disappointed. Looks like a new wheel will need to be written.

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread Ken Strauss
"You need more gearing with the DC motor." Correct and this could be
considered an advantage since a very small DC motor + gearing (multiple
planetary stages) would have sufficient torque to move the scope. I have no
idea if a RPI can keep up with 3 quadrature encoders and control 3 motors
and manage a UI. However, you could make a compact unit at low cost
containing a microprocessor that takes step/dir, tracks encoder position and
generates PWM to run the motor. Rather like a low power, low RPM, high
torque version of a Clearpath servo.

> -Original Message-
> From: Chris Albertson [mailto:albertson.ch...@gmail.com]
> Sent: Friday, July 10, 2020 10:14 PM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] off topic: pwm with a stepper driver/motor
>
> Stepper motors are good for this.   A stepper has the most torque at zero
> RPM and the torque falls as speed increases while a DC brushed motor has
> very little power when moving slowly.  You need more gearing with the DC
> motor.
>
> The problem is you need to generate precise pulses.  If the pulse spacing
> is not accurate then you are asking a large telescope to accelerate and
> decelerate instantly. So to generat pulses need either
> 1) a hardware solution like a microcontroller or FPGA or pulse generator.
> 2) A real time kernel on the Linux system or
> 3) A PID loop to supervise a non-real-time software pulse generator
>
> When I build stuff, my preference is the microcontroller.  I design it so
> the microcontroller can work independent of a larger Linux computer or
take
> commands from a large Linux computer.  I want some basic functionality
> when
> power is applied then adding the Linux PC adds more functionality.
>
> Linux CNC uses a slightly different idea they either go with Real-Time
> Linux or use a very simple pulse generator running in an FPGA.
>
> Reading up to three quadrature encoders with just a Raspberry Pi might
> work, or not.  I don't know.  A lot depends on the speed of the encoders.
>
> On Fri, Jul 10, 2020 at 6:45 PM R C  wrote:
>
> > I don't think anyone did,  but I know that's how most do it...
> >
> > But that's just too easy  :)I would just like to see if I can do it,
> > killing time
> >
> >
> > On 7/10/20 7:39 PM, Ken Strauss wrote:
> > > I haven't been following this closely but has anyone suggested that
you
> > use a
> > > DC motor with an encoder? With a PID loop and PWM power to the motor
> you
> > could
> > > run the motor continuously. DC motors with integrated encoder and
> > planetary
> > > gearbox are readily available for a few dollars. Just a thought.
> > >
> > >
> > >
> > >
> > > ___
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> >
> > ___
> > 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




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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread Ken Strauss
You could use the DC motor + PID exactly the same as using steppers. With the 
encoders you would always know the exact angle though which the motor had 
rotated. The advantage would be the lack of any jerks in motion which are 
inherent with a stepper. Have you considered using the Clearpath units? See 
https://www.teknic.com/


> -Original Message-
> From: R C [mailto:cjv...@gmail.com]
> Sent: Friday, July 10, 2020 10:05 PM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] off topic: pwm with a stepper driver/motor
>
> yep..  true..  but it is also knd of what I do for a living...
>
>
> I think it can be done,  to build an equatorial platform, and really
> control it's speed/angle over time.
>
>
> On 7/10/20 7:52 PM, Ken Strauss wrote:
> > I also waste a lot of time exploring different ways of doing things but
> > frequently end up doing it the traditional way. One should never just 
> > accept
> > "how it is done" but for many (most?) things there are good reasons for
> > traditional ways.
> >
> >> -Original Message-
> >> From: R C [mailto:cjv...@gmail.com]
> >> Sent: Friday, July 10, 2020 9:43 PM
> >> To: emc-users@lists.sourceforge.net
> >> Subject: Re: [Emc-users] off topic: pwm with a stepper driver/motor
> >>
> >> I don't think anyone did,  but I know that's how most do it...
> >>
> >> But that's just too easy  :)I would just like to see if I can do it,
> >> killing time
> >>
> >>
> >> On 7/10/20 7:39 PM, Ken Strauss wrote:
> >>> I haven't been following this closely but has anyone suggested that you
> >>> use a
> >>> DC motor with an encoder? With a PID loop and PWM power to the
> motor
> >> you could
> >>> run the motor continuously. DC motors with integrated encoder and
> >> planetary
> >>> gearbox are readily available for a few dollars. Just a thought.
> >>>
> >>>
> >>>
> >>>
> >>> ___
> >>> Emc-users mailing list
> >>> Emc-users@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/emc-users
> >>
> >> ___
> >> Emc-users mailing list
> >> Emc-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users




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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread Chris Albertson
Stepper motors are good for this.   A stepper has the most torque at zero
RPM and the torque falls as speed increases while a DC brushed motor has
very little power when moving slowly.  You need more gearing with the DC
motor.

The problem is you need to generate precise pulses.  If the pulse spacing
is not accurate then you are asking a large telescope to accelerate and
decelerate instantly. So to generat pulses need either
1) a hardware solution like a microcontroller or FPGA or pulse generator.
2) A real time kernel on the Linux system or
3) A PID loop to supervise a non-real-time software pulse generator

When I build stuff, my preference is the microcontroller.  I design it so
the microcontroller can work independent of a larger Linux computer or take
commands from a large Linux computer.  I want some basic functionality when
power is applied then adding the Linux PC adds more functionality.

Linux CNC uses a slightly different idea they either go with Real-Time
Linux or use a very simple pulse generator running in an FPGA.

Reading up to three quadrature encoders with just a Raspberry Pi might
work, or not.  I don't know.  A lot depends on the speed of the encoders.

On Fri, Jul 10, 2020 at 6:45 PM R C  wrote:

> I don't think anyone did,  but I know that's how most do it...
>
> But that's just too easy  :)I would just like to see if I can do it,
> killing time
>
>
> On 7/10/20 7:39 PM, Ken Strauss wrote:
> > I haven't been following this closely but has anyone suggested that you
> use a
> > DC motor with an encoder? With a PID loop and PWM power to the motor you
> could
> > run the motor continuously. DC motors with integrated encoder and
> planetary
> > gearbox are readily available for a few dollars. Just a thought.
> >
> >
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
> ___
> 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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread R C

yep..  true..  but it is also knd of what I do for a living...


I think it can be done,  to build an equatorial platform, and really 
control it's speed/angle over time.



On 7/10/20 7:52 PM, Ken Strauss wrote:

I also waste a lot of time exploring different ways of doing things but
frequently end up doing it the traditional way. One should never just accept
"how it is done" but for many (most?) things there are good reasons for
traditional ways.


-Original Message-
From: R C [mailto:cjv...@gmail.com]
Sent: Friday, July 10, 2020 9:43 PM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] off topic: pwm with a stepper driver/motor

I don't think anyone did,  but I know that's how most do it...

But that's just too easy  :)I would just like to see if I can do it,
killing time


On 7/10/20 7:39 PM, Ken Strauss wrote:

I haven't been following this closely but has anyone suggested that you
use a
DC motor with an encoder? With a PID loop and PWM power to the motor

you could

run the motor continuously. DC motors with integrated encoder and

planetary

gearbox are readily available for a few dollars. Just a thought.




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


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




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



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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread Ken Strauss
I also waste a lot of time exploring different ways of doing things but 
frequently end up doing it the traditional way. One should never just accept 
"how it is done" but for many (most?) things there are good reasons for 
traditional ways.

> -Original Message-
> From: R C [mailto:cjv...@gmail.com]
> Sent: Friday, July 10, 2020 9:43 PM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] off topic: pwm with a stepper driver/motor
>
> I don't think anyone did,  but I know that's how most do it...
>
> But that's just too easy  :)I would just like to see if I can do it,
> killing time
>
>
> On 7/10/20 7:39 PM, Ken Strauss wrote:
> > I haven't been following this closely but has anyone suggested that you 
> > use a
> > DC motor with an encoder? With a PID loop and PWM power to the motor
> you could
> > run the motor continuously. DC motors with integrated encoder and
> planetary
> > gearbox are readily available for a few dollars. Just a thought.
> >
> >
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users




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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread R C

I don't think anyone did,  but I know that's how most do it...

But that's just too easy  :)    I would just like to see if I can do it, 
killing time



On 7/10/20 7:39 PM, Ken Strauss wrote:

I haven't been following this closely but has anyone suggested that you use a
DC motor with an encoder? With a PID loop and PWM power to the motor you could
run the motor continuously. DC motors with integrated encoder and planetary
gearbox are readily available for a few dollars. Just a thought.




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



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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread Ken Strauss
I haven't been following this closely but has anyone suggested that you use a 
DC motor with an encoder? With a PID loop and PWM power to the motor you could 
run the motor continuously. DC motors with integrated encoder and planetary 
gearbox are readily available for a few dollars. Just a thought.




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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread R C
from what I understand,  worm gears work really well  and because of the 
reduction, the motor needs to sping at a decent rpm, it doesn't have 
tospin that slow. I am using steppers, because it is easy to count the 
steps and then calibrate because of how much you're drifting.While with 
a regular DC motor you could only do something like that in a 
Monte-Carlo/binary kinda way. also, adjusting DC motors is not 
necessarilly  linear and since adjusting a stepper is "discrete" it 
would be way easier.


On 7/10/20 1:21 PM, andy pugh wrote:

On Fri, 10 Jul 2020 at 20:14, Chris Albertson  wrote:


You need to move at 1/2 the resolution otherwise you can see the steps.  So
let's say each step would be 1/4 arc-second

I was going with one step per thingy, and then assuming microstepping
to get sub-thingy :-)

I will just mention: https://www.hpcgears.com/pdf_c33/22.0.pdf as an option.
(With a home-made worm. I am assuming that anyone here can cut a module thread)




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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread R C

On 7/10/20 1:12 PM, Chris Albertson wrote:

On Fri, Jul 10, 2020 at 10:33 AM andy pugh  wrote:


Sprockets for T2.5 belts are available with 10 teeth, so that would be
a 2.3m table for the 300:1. Which is also probably too big. I suppose
that the design criterion is that one stepper step should be less than
the angular resolution of the telescope. So what is that, in this
case?

We don't know the size of this 'scope but let's assume about 12" 
diameter.

then it is on the order of 1/2 arc-second


If you're talking about my telescope, it's an 8"



You need to move at 1/2 the resolution otherwise you can see the 
steps.  So

let's say each step would be 1/4 arc-second

Stars move 15 degrees per hour or 15 arc-seconds per second.   So he 
needs

to step at about 60 Hz.


That sounds about right, but I am planning on using a worm gear too..  
so the motor can continuously spin.


(I also heard from people that built those platforms and experimented 
with them, that some "shaft couplers"


reduce vibration quite a bit




Let's assume 1/64th micro steps  these are roughly 100 arc-seconds per
step.  He needs about 400:1 gear reduction.

This is getting unreasonable because the telescope will NEVER achieve the
theoretical resolution because of the atmospheric blurring  Lets say 
we do

1 arc-second steps and 100:1 gears.


Yup, and then there's wind etc too, and telescopes are also good 
detectors for picking up vibrations from the ground.




The traditional professional-level method is to use very nice and very
expensive brass wheels and stainless steel worms and even more expensive
bearings and shafts.   But nowadays with computers, we can place a camera
such that it looks at the image of a highly magnified star then we 
measure
the X,Y location of the image on the CCD sensor and use a PID feedback 
loop
to keep the star image from moving.  So the servo loop tries to keep 
drift

to zero.  They measure drift with units called "mas" for milliarcseconds.

I am actually trying to see if I can build something like that too


But this is a "Dobsonian" scope and the goal of these is to be cheap and
portable, exactly the opposite of a professional level scope. Most of
these use a door hinge as the axis that is roughly aligned by eyeball 
with

"north" and the drive is a hardware store threaded rod turned by a DC
geared DC motor and the operator sets the tracking speed by eye and hand.
These things reduce the drift to what can be tracked with the eye.
I read about barndoor equatorial platforms, those are mostly used for 
cameras. Also wouldn't really work with a dobsonian mount, since the 
telescope would start tipping. The actul equatorial platform runs in a 
"cone", with elliptical  tracks on a bearing. You'd turn one of the axis 
in a bearing and move the whole platform around the center of gravity 
(or close) of the telescope. At least that is what most of the plans say 
to do.


It seems our OP is trying to do better than the common door hinge and
threaded rod tracker but still wants a 'scope that fits in the back of 
his
car and costs less than the car.   So sub-arcsecond pointing is going 
to be

hard.


Yes definitely. A dobsonian telescope has a newtonian tube, also called 
light buckets, they can collect a lot of light, however because of their 
size, having a good stable equatorial mount is difficult, that's why 
they came up with the dobsonian mount. That mount works very well for 
"direct" star gazing,  you just move it when you need to. Looking at 
Saturn is a bit of a challenge that way already though. The equatorial 
platform seems to work really well and one can track something for 
approx. an hour or hour and a half.



The barndoor platform  seems to work well when you  look at stars near 
polaris, or opposite of it, but other directions make it just 
unpractical because of "balancing issues"



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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread andy pugh
On Fri, 10 Jul 2020 at 20:14, Chris Albertson  wrote:

> You need to move at 1/2 the resolution otherwise you can see the steps.  So
> let's say each step would be 1/4 arc-second

I was going with one step per thingy, and then assuming microstepping
to get sub-thingy :-)

I will just mention: https://www.hpcgears.com/pdf_c33/22.0.pdf as an option.
(With a home-made worm. I am assuming that anyone here can cut a module thread)

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


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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread Chris Albertson
On Fri, Jul 10, 2020 at 10:33 AM andy pugh  wrote:

>
> Sprockets for T2.5 belts are available with 10 teeth, so that would be
> a 2.3m table for the 300:1. Which is also probably too big. I suppose
> that the design criterion is that one stepper step should be less than
> the angular resolution of the telescope. So what is that, in this
> case?
>

We don't know the size of this 'scope but let's assume about 12" diameter.
then it is on the order of 1/2 arc-second

You need to move at 1/2 the resolution otherwise you can see the steps.  So
let's say each step would be 1/4 arc-second

Stars move 15 degrees per hour or 15 arc-seconds per second.   So he needs
to step at about 60 Hz.

Let's assume 1/64th micro steps  these are roughly 100 arc-seconds per
step.  He needs about 400:1 gear reduction.

This is getting unreasonable because the telescope will NEVER achieve the
theoretical resolution because of the atmospheric blurring  Lets say we do
1 arc-second steps and 100:1 gears.

The traditional professional-level method is to use very nice and very
expensive brass wheels and stainless steel worms and even more expensive
bearings and shafts.   But nowadays with computers, we can place a camera
such that it looks at the image of a highly magnified star then we measure
the X,Y location of the image on the CCD sensor and use a PID feedback loop
to keep the star image from moving.  So the servo loop tries to keep drift
to zero.  They measure drift with units called "mas" for milliarcseconds.

But this is a "Dobsonian" scope and the goal of these is to be cheap and
portable, exactly the opposite of a professional level scope.  Most of
these use a door hinge as the axis that is roughly aligned by eyeball with
"north" and the drive is a hardware store threaded rod turned by a DC
geared DC motor and the operator sets the tracking speed by eye and hand.
These things reduce the drift to what can be tracked with the eye.

It seems our OP is trying to do better than the common door hinge and
threaded rod tracker but still wants a 'scope that fits in the back of his
car and costs less than the car.   So sub-arcsecond pointing is going to be
hard.


-- 

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] off topic: pwm with a stepper driver/motor

2020-07-10 Thread andy pugh
On Fri, 10 Jul 2020 at 17:59, Chris Albertson  wrote:

> There is also a minimum amount number of degrees of contact required with
> the small pulley.  The pulley must be far enough away so the minimum number
> of teeth are engaged.

Or you can use idlers to modify the belt shape. This is done very
frequently on car engine front-end accessory drives, for example.

Sprockets for T2.5 belts are available with 10 teeth, so that would be
a 2.3m table for the 300:1. Which is also probably too big. I suppose
that the design criterion is that one stepper step should be less than
the angular resolution of the telescope. So what is that, in this
case?

But I was coming at this from the opposite direction: If you have to
rotate something that is large and circular (or potentially just a
sector of a circle) how can you rotate it economically?

This is one way. And in this case you probably would want to combine
it with a geared motor to get the required ratio.

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


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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread Chris Albertson
Yes in theory one could design a 300:1 belt reduction in one stage.  But
according to the belt manufacturer, you do need to have a minimum number of
belt teeth engaged.  I think about 11 teeth.  If only 180 degrees of the
small pulley is engaged with the belt then the minim pulley size is 22.
 So to get 300:1 you use a 6600 tooth pulley.   But this is a 6 meter
diameter pulley.   The worm gear works so much better because it is in
effect a "one tooth" gear and so for the same pitch reduces the diameter of
the larger gear by a factor of 22.

There is also a minimum amount number of degrees of contact required with
the small pulley.  The pulley must be far enough away so the minimum number
of teeth are engaged.  Getts 180 degrees of corverage is impossible if one
pulley is larger then the other  So in order to get (say) 120 degrees of
bend around the smaller pulley, it must be pretty darn far away from the 6
meter diameter pulley. But now you need 33 teeth on the small one and the
big one is up to 9 meters diameter.

With pulleys, if the reduction ratio is 100:1 the larger pully must be
literally 100X larger than the smaller pulley and there is always a
minimum size for a small pulley.   So typically high reduction ratio belt
drives use two or three stages. 6:1 is a reasonable reduction, 10:1
gets hard to fit into many spaces.

With these high rations you use worm gears, multiple stages or cycloid
reductions (or silly things like a 1/2 inch pulley paired with a 50-inch
pulley)

On Fri, Jul 10, 2020 at 2:39 AM andy pugh  wrote:

> On Fri, 10 Jul 2020 at 02:00, Chris Albertson 
> wrote:
>
> > Belts can go to about 6:1 at best a double belt reduction only goes to
> 36:1
>
> I don't see why there is any limit to the possible reduction of a belt
> drive, if idlers are added to increase the wrap.
> If I was doing this (and this particular application is something that
> I have considered) I think that I would use a rotary variant of the
> "servobelt" system: Glue a length of T-section beliting to a circular
> component with the teeth pointing out to make a sprocket, and then
> have a close-spaced  pair of rollers to keep the belt wrapped round
> the sprocket except for a short loop that pops out and wraps round the
> stepper pulley.
>
>
> > He is doing only
> > about 10 Hz.
>
> In that case I think that a user-space loop in something like Python
> would be fine, just monitor the time using an accurate RTC (GPS
> module?) and have the loop say "have I made as many pulses as I should
> have for this time of day?" and either make a pulse on a GPIO pin, or
> not, accordingly.
>
> --
> 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, 1912
>
>
> ___
> 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


[Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread Roland Jollivet
I had a friend that had a motorised telescope.
It had a DC motor, with a very high reduction ratio. I think one would see
fluctuations with a stepper motor.

Also, I wouldn't use a belt at all. Drive a smooth roller and use a
friction drive against a large disc. This also allows you to manually turn
by slipping the disc on the roller for an easy setup. Most theodolites use
this arrangement. Teeth will just be too jerky when viewing stars..



On Fri, 10 Jul 2020 at 11:39, andy pugh  wrote:

> On Fri, 10 Jul 2020 at 02:00, Chris Albertson 
> wrote:
>
> > Belts can go to about 6:1 at best a double belt reduction only goes to
> 36:1
>
> I don't see why there is any limit to the possible reduction of a belt
> drive, if idlers are added to increase the wrap.
> If I was doing this (and this particular application is something that
> I have considered) I think that I would use a rotary variant of the
> "servobelt" system: Glue a length of T-section beliting to a circular
> component with the teeth pointing out to make a sprocket, and then
> have a close-spaced  pair of rollers to keep the belt wrapped round
> the sprocket except for a short loop that pops out and wraps round the
> stepper pulley.
>
>
> > He is doing only
> > about 10 Hz.
>
> In that case I think that a user-space loop in something like Python
> would be fine, just monitor the time using an accurate RTC (GPS
> module?) and have the loop say "have I made as many pulses as I should
> have for this time of day?" and either make a pulse on a GPIO pin, or
> not, accordingly.
>
> --
> 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, 1912
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread Gene Heskett
On Friday 10 July 2020 05:34:58 andy pugh wrote:

> On Fri, 10 Jul 2020 at 02:00, Chris Albertson 
 wrote:
> > Belts can go to about 6:1 at best a double belt reduction only goes
> > to 36:1
>
> I don't see why there is any limit to the possible reduction of a belt
> drive, if idlers are added to increase the wrap.
> If I was doing this (and this particular application is something that
> I have considered) I think that I would use a rotary variant of the
> "servobelt" system: Glue a length of T-section beliting to a circular
> component with the teeth pointing out to make a sprocket, and then
> have a close-spaced  pair of rollers to keep the belt wrapped round
> the sprocket except for a short loop that pops out and wraps round the
> stepper pulley.

That could work great even for a 340 degree turn. But I'd have the belt 
teeth pointing inward so the pop-out between the idlers could wrap the 
little pulley by at least 190 degrees.  With the lack of stretch, one 
end could be anchored solidly to the big wheel, while a heavy spring 
maintains the belt tension on the belt on an otherwise smooth pulley. A 
matching belt glued on and teeth facing outward would be optional. With 
full time tension on the belt from a stout spring, only the idlers would 
need flanges. Their flanges could straddle the big wheel. That could 
work for az/el, but the base would need a full turn+ (I think). That 
could be handled by glueing on an endless belt to make the sprocket 
teeth, and using another belt facing inward so there would not be a gap 
at the anchor points. Diameter of the big wheel might need a tweak so 
theres no discontinuity when passing over the inner belts end gap.
Still relatively cheap, no backlash.

> > He is doing only
> > about 10 Hz.
>
> In that case I think that a user-space loop in something like Python
> would be fine, just monitor the time using an accurate RTC (GPS
> module?) and have the loop say "have I made as many pulses as I should
> have for this time of day?" and either make a pulse on a GPIO pin, or
> not, accordingly.

I love playing what if...

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


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


Re: [Emc-users] off topic: pwm with a stepper driver/motor

2020-07-10 Thread andy pugh
On Fri, 10 Jul 2020 at 02:00, Chris Albertson  wrote:

> Belts can go to about 6:1 at best a double belt reduction only goes to 36:1

I don't see why there is any limit to the possible reduction of a belt
drive, if idlers are added to increase the wrap.
If I was doing this (and this particular application is something that
I have considered) I think that I would use a rotary variant of the
"servobelt" system: Glue a length of T-section beliting to a circular
component with the teeth pointing out to make a sprocket, and then
have a close-spaced  pair of rollers to keep the belt wrapped round
the sprocket except for a short loop that pops out and wraps round the
stepper pulley.


> He is doing only
> about 10 Hz.

In that case I think that a user-space loop in something like Python
would be fine, just monitor the time using an accurate RTC (GPS
module?) and have the loop say "have I made as many pulses as I should
have for this time of day?" and either make a pulse on a GPIO pin, or
not, accordingly.

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


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


Re: [Emc-users] Spindle acceleration/decelleration

2020-07-10 Thread andy pugh
On Fri, 10 Jul 2020 at 06:05, John Dammeyer  wrote:
>
> Setting MAX_ACCEL to 30 doesn't change the rate of change from 3000 RPM to 0. 
>  Still goes from 10V to 0V in 80 mS.

I have considered adding spindle accel and decel now that spindles
look more like axes and have their own INI sections.
(and, also, spindle homing)

One serious complication: Spindle-at-speed calculation. With the
current system (and with spindle speed ramping handled in the VFD) it
is easy to use a VFD output pin for at-speed. If the ramp is handles
in LinuxCNC then the spindle is _always_ "at speed" even if it is not
at the final target speed.

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


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


Re: [Emc-users] Spindle acceleration/decelleration

2020-07-10 Thread Gene Heskett
On Friday 10 July 2020 01:13:12 Peter C. Wallace wrote:

> On Thu, 9 Jul 2020, John Dammeyer wrote:
> > Date: Thu, 9 Jul 2020 22:02:31 -0700
> > From: John Dammeyer 
> > Reply-To: "Enhanced Machine Controller (EMC)"
> > 
> > To: "'Enhanced Machine Controller (EMC)'"
> >  Subject: [Emc-users] Spindle
> > acceleration/decelleration
> >
> > My ini file these parameters.
> >
> > MAX_VELOCITY = 50.0
> > MAX_ACCELERATION = 300.0
> >
> > Setting MAX_ACCEL to 30 doesn't change the rate of change from 3000
> > RPM to 0.  Still goes from 10V to 0V in 80 mS.
> >
> > In the HAL file these set up the MESA for speed to RPM.  But I seem
> > to have missed an acceleration.
> >
> > # PWM gen signals/setup
> > # PWM signal pin config
> > setp   hm2_7i92.0.pwmgen.00.output-type  1
> > setp   hm2_7i92.0.pwmgen.00.scale  [SPINDLE_9]PWM_SCALE
> > setp   hm2_7i92.0.pwmgen.pwm_frequency 1000
> >
> > So far I haven't been able to get ramping working although one would
> > think the MESA could do this with a parameter. # load real time a
> > limit2 and a near with names so it is easier to follow loadrt limit2
> > names=spindle-ramp
> > loadrt near names=spindle-at-speed
> > etc...
> >
> > Is there a simple way to ramp a 0-10V and 10V to 0V so acceleration
> > is a bit slower?
>
> Yes, you have a start there, you need to put the limit2 component in
> the spindle speed commmand path and set the limit2 components maxv
> value to the desired RPM per second acceleration value.
>
This will impinge on rigid tapping because of the fixed accel limit.

So I take advantage of the stepper having max torque at zero speeds by 
using a limit3  which can set both max_accel and max_vel and by the 
value choices more closely simulate the sin-squared waveform.

This can make the turnaround times be done quicker but it is a bit 
complex to set up because linuxcnc itself makes no attempt to sequence 
the required reversal.
So my logic assumes a control which is a 4 quadrant controller, and 
sequences the turn around as follows:

on receiving the reversal of direction from motion, it is blocked, but 
the commanded speed is ramped to zero by switching a mux4 to zero the 
speed command by this limit3. A one shot is watching the spindle speed 
with just one of the signal inputs to the encoder, and when a nearly 
stopped condition is achieved by the oneshot timeing out, then the mux4 
is clocked again and the reverse is allowed to be sent on to the 
controller pid by way of this limit3 which now has to start from zero 
speed, ramping it back up to the commanded speed in the other direction.
All this takes place in a bit less than 400 milliseconds on my g0704, 
which may be spinning at 3k revs, but it places the slow accel in the z 
axis within its ability to properly track the reversal.

I also took advantage of the 2 switches tallying the gear shift knob 
position to feed a small drive to the pid when its not solidly in either 
gear, to spin the motor slowly so that the square faced nylon gears in 
the spindle can mesh without crashing as the spindle speed is reduced to 
about 20 rpms long before the gears have diss-engaged by turning the 
knob, and full speed is not restored, thru this limit3, until the other 
tally switch has closed indicating the gear is fully engaged.  So I can 
reach up and change speeds with no excitement/drama at 3k revs.

Spindle stopped, I must grab the spindle and turn it by hand to mesh the 
gears.  That has safety considerations to ones hand I'd druther not have 
to deal with.

This is done on just two of my 4 machines and abuses the motor but in 
several years it has not complained. My junk box parts motor psu can hit 
that 1 horse rated motor to around 2 hp, as its a 90 volt, 9.7 amp rated 
brushed pmdc motor, but the power supply can do around 20 amps at 125 
volts. I have one of Jon's pwm-servo amps being used as the spindle 
controller and its set to currant limit at around 17 amps. On a reverse 
it feeds the motor back into the supply to stop it, banging that 125 
supply up to about 160 volts, then uses that overcharge to accel the 
motor in the other direction.  Listening carefully, one can pick out the 
iron chirp as that current limit kicks in.

I am doing a similar sequence to reverse the motor on the sheldon, but 
theres no pid's there, the vfd itself is pretty stiff. But with a 40 lb 
chuck mounted, and clamped, the reversal is slower.

> > Thanks
> > John
> >
> >
> >
> >
> > ___
> > 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


Cheers, Gene Heskett
-- 
"There are four