Shop OBEX P1 Docs P2 Docs Learn Events
3 Motors simultaneous positioning with SX? — Parallax Forums

3 Motors simultaneous positioning with SX?

ArchiverArchiver Posts: 46,084
edited 2003-01-18 07:53 in General Discussion
Hi,
I would like to run 3 DC Motors in the same speed,
independent of the load. (max 3000 r/min)
AND to stop them after a given number of revolution
Forward and back
I would like to fix an encoder on each motor
Depending on the reading of the encoder, I thought,
to give each motor (with H-Bridge) a Low or a High
I would get an PWM depending on the reading of the encoder ?

Is the Stamp SX quick enough to read, calculate, and to change outputs
for the 3 motors??
I have no idea how to calculate the needed time?
I may could count the revolution of each motor, compare them and
switch the output of each motor on or off, depending of the
result of the calculation.
This needs a long time

I may could fix two encoder on each motor and check
If each motor runs synchronous on the same encoder,
or if one motor is already on the next encoder.

I have read Tracy Allen "Finite State Machines"
And a two-bit quadrature encoder could do it ??
Or is a grey code wheel to encode it, in an code, to use
for the PWM of each motor ?

An acceleration of the motor speed would be not bad
but not urged necessary.
Also an safety switch,
and an referent switch to read would be not bad too.

Can the sx do it quick enough for the 3 motors?

Who has experience or samples or ideas what the best way is?

Tracy,
do You have a "math way" to read the encoder inputs
And control the motor outputs quickly ??

Advices are welcome
Thankfully Heinz

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-01-16 14:31
    This is a lot like a problem I'm having. See my post from a few days
    ago on running motors while doing other things. There is a chip made
    by national semiconductor (LMD18200 -- pull the datasheet from
    digikey) that has a built in H-Bridge and is set by PWM. It looks
    like you could feed back a tachometer to either the 18200 or the
    BS2SX to set the speed. As for speed of the SX, at 3000 rpm, the
    motor is spinning 50 times a second. You can run a lot of
    instructions in 20 ms.

    My problem is that I need to be able to finely adjust the position of
    something controlled by a DC motor. So I need to send PWM to the
    controler while watching for a switch to close. You can't do
    anything else while running a PWM command.

    I am curious about your application. If the motors need to go the
    same speed, why not just use one motor and connect the loads
    mechanicly? There may also be some kind of electrical trick you
    could do with a phase locked loop, but I was never very good with
    analog circuits.

    Please tell me if you have any success.

    -selket

    --- In basicstamps@yahoogroups.com, "HSchwenk_GMX" <hschwenk@g...>
    wrote:
    > Hi,
    > I would like to run 3 DC Motors in the same speed,
    > independent of the load. (max 3000 r/min)
    > AND to stop them after a given number of revolution
    > Forward and back
    > I would like to fix an encoder on each motor
    > Depending on the reading of the encoder, I thought,
    > to give each motor (with H-Bridge) a Low or a High
    > I would get an PWM depending on the reading of the encoder ?
    >
    > Is the Stamp SX quick enough to read, calculate, and to change
    outputs
    > for the 3 motors??
    > I have no idea how to calculate the needed time?
    >
    > I may could count the revolution of each motor, compare them and
    > switch the output of each motor on or off, depending of the
    > result of the calculation.
    > This needs a long time
    >
    > I may could fix two encoder on each motor and check
    > If each motor runs synchronous on the same encoder,
    > or if one motor is already on the next encoder.
    >
    > I have read Tracy Allen "Finite State Machines"
    > And a two-bit quadrature encoder could do it ??
    > Or is a grey code wheel to encode it, in an code, to use
    > for the PWM of each motor ?
    >
    > An acceleration of the motor speed would be not bad
    > but not urged necessary.
    > Also an safety switch,
    > and an referent switch to read would be not bad too.
    >
    > Can the sx do it quick enough for the 3 motors?
    >
    > Who has experience or samples or ideas what the best way is?
    >
    > Tracy,
    > do You have a "math way" to read the encoder inputs
    > And control the motor outputs quickly ??
    >
    > Advices are welcome
    > Thankfully Heinz
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-16 15:15
    Hi Heinz,

    your project has a few targets.

    counting revolutions and stopping at an exact point is easy. a
    reflective dot on a shaft and a counter will offer total number of
    dots or shaft turns.

    speed control of each motor at constant speed regardless of load is
    much more complex.

    how accurate do you need this to be? if you have some acceptable
    range just the same dot, but counting speed would offer a simple rpm
    monitoring loop. As a rule of thumb, you would want your sensor to
    be 4 times more accurate than the thing you want to measure.

    speed for the sensor is easy. 3,000 RPM, times 3 units, times 4 for
    accuracy would offer 36,000 per minute or 600 hz.

    the hard thing would be to figure program time. if you need very
    exact speed control, you may need some sort of PID loop and that will
    use lots of processing power. That may require one processor per
    motor for speed control and one more for counting.

    Dave







    --- In basicstamps@yahoogroups.com, "HSchwenk_GMX" <hschwenk@g...>
    wrote:
    > Hi,
    > I would like to run 3 DC Motors in the same speed,
    > independent of the load. (max 3000 r/min)
    > AND to stop them after a given number of revolution
    > Forward and back
    > I would like to fix an encoder on each motor
    > Depending on the reading of the encoder, I thought,
    > to give each motor (with H-Bridge) a Low or a High
    > I would get an PWM depending on the reading of the encoder ?
    >
    > Is the Stamp SX quick enough to read, calculate, and to change
    outputs
    > for the 3 motors??
    > I have no idea how to calculate the needed time?
    >
    > I may could count the revolution of each motor, compare them and
    > switch the output of each motor on or off, depending of the
    > result of the calculation.
    > This needs a long time
    >
    > I may could fix two encoder on each motor and check
    > If each motor runs synchronous on the same encoder,
    > or if one motor is already on the next encoder.
    >
    > I have read Tracy Allen "Finite State Machines"
    > And a two-bit quadrature encoder could do it ??
    > Or is a grey code wheel to encode it, in an code, to use
    > for the PWM of each motor ?
    >
    > An acceleration of the motor speed would be not bad
    > but not urged necessary.
    > Also an safety switch,
    > and an referent switch to read would be not bad too.
    >
    > Can the sx do it quick enough for the 3 motors?
    >
    > Who has experience or samples or ideas what the best way is?
    >
    > Tracy,
    > do You have a "math way" to read the encoder inputs
    > And control the motor outputs quickly ??
    >
    > Advices are welcome
    > Thankfully Heinz
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-16 15:42
    > This is a lot like a problem I'm having. See my post from a few days
    > ago on running motors while doing other things. There is a chip made
    > by national semiconductor (LMD18200 -- pull the datasheet from
    > digikey) that has a built in H-Bridge and is set by PWM. It looks
    > like you could feed back a tachometer to either the 18200 or the
    > BS2SX to set the speed. As for speed of the SX, at 3000 rpm, the
    > motor is spinning 50 times a second. You can run a lot of
    > instructions in 20 ms.
    >
    > My problem is that I need to be able to finely adjust the position of
    > something controlled by a DC motor. So I need to send PWM to the
    > controler while watching for a switch to close. You can't do
    > anything else while running a PWM command.
    >
    > I am curious about your application. If the motors need to go the
    > same speed, why not just use one motor and connect the loads
    > mechanicly? There may also be some kind of electrical trick you

    *************************************************
    In a big shelf I have to position
    12 m and 6 m long wood

    I need 3 motors to go up and down
    and 3 motors to move in and out.
    I thought to do it in two different processes.

    For the 12 m wood I use motor1 motor2 and motor3
    For the left 6m I use the motor1 +2
    For the right 6m I use motor2+3

    Yes I thought about mechanical solution
    But it would be a big heavy complicated stuff
    Including coupling--clutches
    The 3 motor-solution is more flexible and easier to build

    About PWM:
    I did not think to use PWM-command,
    I thought to make the motor pins high or low
    between the reading of the encoder.
    This would be like PW-control----?
    I don't need a big accuracy in synchronism.

    But I am not sure yet how to do.
    Still I am not sure about the best solution---?

    Selket thanks for replay Heinz

    *********************************************************

    > could do with a phase locked loop, but I was never very good with
    > analog circuits.
    >
    > Please tell me if you have any success.
    >
    > -selket
    >
    > --- In basicstamps@yahoogroups.com, "HSchwenk_GMX" <hschwenk@g...>
    > wrote:
    > > Hi,
    > > I would like to run 3 DC Motors in the same speed,
    > > independent of the load. (max 3000 r/min)
    > > AND to stop them after a given number of revolution
    > > Forward and back
    > > I would like to fix an encoder on each motor
    > > Depending on the reading of the encoder, I thought,
    > > to give each motor (with H-Bridge) a Low or a High
    > > I would get an PWM depending on the reading of the encoder ?
    > >
    > > Is the Stamp SX quick enough to read, calculate, and to change
    > outputs
    > > for the 3 motors??
    > > I have no idea how to calculate the needed time?
    > >
    > > I may could count the revolution of each motor, compare them and
    > > switch the output of each motor on or off, depending of the
    > > result of the calculation.
    > > This needs a long time
    > >
    > > I may could fix two encoder on each motor and check
    > > If each motor runs synchronous on the same encoder,
    > > or if one motor is already on the next encoder.
    > >
    > > I have read Tracy Allen "Finite State Machines"
    > > And a two-bit quadrature encoder could do it ??
    > > Or is a grey code wheel to encode it, in an code, to use
    > > for the PWM of each motor ?
    > >
    > > An acceleration of the motor speed would be not bad
    > > but not urged necessary.
    > > Also an safety switch,
    > > and an referent switch to read would be not bad too.
    > >
    > > Can the sx do it quick enough for the 3 motors?
    > >
    > > Who has experience or samples or ideas what the best way is?
    > >
    > > Tracy,
    > > do You have a "math way" to read the encoder inputs
    > > And control the motor outputs quickly ??
    > >
    > > Advices are welcome
    > > Thankfully Heinz
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-16 15:50
    > Hi Heinz,
    >
    > your project has a few targets.
    >
    > counting revolutions and stopping at an exact point is easy. a
    > reflective dot on a shaft and a counter will offer total number of
    > dots or shaft turns.
    >
    > speed control of each motor at constant speed regardless of load is
    > much more complex.
    >
    > how accurate do you need this to be? if you have some acceptable
    > range just the same dot, but counting speed would offer a simple rpm
    > monitoring loop. As a rule of thumb, you would want your sensor to
    > be 4 times more accurate than the thing you want to measure.
    >
    > speed for the sensor is easy. 3,000 RPM, times 3 units, times 4 for
    > accuracy would offer 36,000 per minute or 600 hz.
    >
    > the hard thing would be to figure program time. if you need very
    > exact speed control,

    ***********************************
    The motors have gearbox and transport the long wood slowly.
    So I need not an very exact speed control,
    But the position in the shelf should be a bit more exactly

    Thanks for replay Heinz
    **********************************


    you may need some sort of PID loop and that will
    > use lots of processing power. That may require one processor per
    > motor for speed control and one more for counting.
    >
    > Dave
    >
    >
    >
    >
    >
    >
    >
    > --- In basicstamps@yahoogroups.com, "HSchwenk_GMX" <hschwenk@g...>
    > wrote:
    > > Hi,
    > > I would like to run 3 DC Motors in the same speed,
    > > independent of the load. (max 3000 r/min)
    > > AND to stop them after a given number of revolution
    > > Forward and back
    > > I would like to fix an encoder on each motor
    > > Depending on the reading of the encoder, I thought,
    > > to give each motor (with H-Bridge) a Low or a High
    > > I would get an PWM depending on the reading of the encoder ?
    > >
    > > Is the Stamp SX quick enough to read, calculate, and to change
    > outputs
    > > for the 3 motors??
    > > I have no idea how to calculate the needed time?
    > >
    > > I may could count the revolution of each motor, compare them and
    > > switch the output of each motor on or off, depending of the
    > > result of the calculation.
    > > This needs a long time
    > >
    > > I may could fix two encoder on each motor and check
    > > If each motor runs synchronous on the same encoder,
    > > or if one motor is already on the next encoder.
    > >
    > > I have read Tracy Allen "Finite State Machines"
    > > And a two-bit quadrature encoder could do it ??
    > > Or is a grey code wheel to encode it, in an code, to use
    > > for the PWM of each motor ?
    > >
    > > An acceleration of the motor speed would be not bad
    > > but not urged necessary.
    > > Also an safety switch,
    > > and an referent switch to read would be not bad too.
    > >
    > > Can the sx do it quick enough for the 3 motors?
    > >
    > > Who has experience or samples or ideas what the best way is?
    > >
    > > Tracy,
    > > do You have a "math way" to read the encoder inputs
    > > And control the motor outputs quickly ??
    > >
    > > Advices are welcome
    > > Thankfully Heinz
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-17 11:54
    Same speed? Need to vary the speed? If not think about AC syncro
    motors. Speed is controled by the sine wave freq of the AC. You can
    usually find them in surplus houses with gear heads on them. Add a
    triac and go. (now thats if single speed is OK)

    --- In basicstamps@yahoogroups.com, "HSchwenk_GMX" <hschwenk@g...>
    wrote:
    >
    >
    > > This is a lot like a problem I'm having. See my post from a few
    days
    > > ago on running motors while doing other things. There is a chip
    made
    > > by national semiconductor (LMD18200 -- pull the datasheet from
    > > digikey) that has a built in H-Bridge and is set by PWM. It looks
    > > like you could feed back a tachometer to either the 18200 or the
    > > BS2SX to set the speed. As for speed of the SX, at 3000 rpm, the
    > > motor is spinning 50 times a second. You can run a lot of
    > > instructions in 20 ms.
    > >
    > > My problem is that I need to be able to finely adjust the
    position of
    > > something controlled by a DC motor. So I need to send PWM to the
    > > controler while watching for a switch to close. You can't do
    > > anything else while running a PWM command.
    > >
    > > I am curious about your application. If the motors need to go the
    > > same speed, why not just use one motor and connect the loads
    > > mechanicly? There may also be some kind of electrical trick you
    >
    > *************************************************
    > In a big shelf I have to position
    > 12 m and 6 m long wood
    >
    > I need 3 motors to go up and down
    > and 3 motors to move in and out.
    > I thought to do it in two different processes.
    >
    > For the 12 m wood I use motor1 motor2 and motor3
    > For the left 6m I use the motor1 +2
    > For the right 6m I use motor2+3
    >
    > Yes I thought about mechanical solution
    > But it would be a big heavy complicated stuff
    > Including coupling--clutches
    > The 3 motor-solution is more flexible and easier to build
    >
    > About PWM:
    > I did not think to use PWM-command,
    > I thought to make the motor pins high or low
    > between the reading of the encoder.
    > This would be like PW-control----?
    > I don't need a big accuracy in synchronism.
    >
    > But I am not sure yet how to do.
    > Still I am not sure about the best solution---?
    >
    > Selket thanks for replay Heinz
    >
    > *********************************************************
    >
    > > could do with a phase locked loop, but I was never very good with
    > > analog circuits.
    > >
    > > Please tell me if you have any success.
    > >
    > > -selket
    > >
    > > --- In basicstamps@yahoogroups.com, "HSchwenk_GMX" <hschwenk@g...>
    > > wrote:
    > > > Hi,
    > > > I would like to run 3 DC Motors in the same speed,
    > > > independent of the load. (max 3000 r/min)
    > > > AND to stop them after a given number of revolution
    > > > Forward and back
    > > > I would like to fix an encoder on each motor
    > > > Depending on the reading of the encoder, I thought,
    > > > to give each motor (with H-Bridge) a Low or a High
    > > > I would get an PWM depending on the reading of the encoder ?
    > > >
    > > > Is the Stamp SX quick enough to read, calculate, and to change
    > > outputs
    > > > for the 3 motors??
    > > > I have no idea how to calculate the needed time?
    > > >
    > > > I may could count the revolution of each motor, compare them and
    > > > switch the output of each motor on or off, depending of the
    > > > result of the calculation.
    > > > This needs a long time
    > > >
    > > > I may could fix two encoder on each motor and check
    > > > If each motor runs synchronous on the same encoder,
    > > > or if one motor is already on the next encoder.
    > > >
    > > > I have read Tracy Allen "Finite State Machines"
    > > > And a two-bit quadrature encoder could do it ??
    > > > Or is a grey code wheel to encode it, in an code, to use
    > > > for the PWM of each motor ?
    > > >
    > > > An acceleration of the motor speed would be not bad
    > > > but not urged necessary.
    > > > Also an safety switch,
    > > > and an referent switch to read would be not bad too.
    > > >
    > > > Can the sx do it quick enough for the 3 motors?
    > > >
    > > > Who has experience or samples or ideas what the best way is?
    > > >
    > > > Tracy,
    > > > do You have a "math way" to read the encoder inputs
    > > > And control the motor outputs quickly ??
    > > >
    > > > Advices are welcome
    > > > Thankfully Heinz
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-17 12:29
    I would use a http://www.al-williams.com/pak5.htm PAK 5 PWM coprocessor and
    use it to control up to 8 motors simultaneously.
    You control the PAK5 from your BAsic Stamp.
    Works great too.

    The Basicstamp controls the PAK5 which controls the motor controllers for
    you. Then if you need positioan or RPM feedback use encoders and use a
    http://www.al-williams.com/pak7.htm PAK7 pulse input coprocessor to get the
    info back into the BasicStamp where you can deal with it.




    Original Message
    From: anode505 <anode505@y...> [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=6jnGGWFbsAMNGl5tmTsdZ-Z-EuQBkGNmUtuubI_jH3_BsT6rTcckxwXl8fzT9aslN9bAGzhDpXY]anode505@y...[/url
    Sent: Friday, January 17, 2003 5:54 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: 3 Motors simultaneous positioning with SX?


    Same speed? Need to vary the speed? If not think about AC syncro
    motors. Speed is controled by the sine wave freq of the AC. You can
    usually find them in surplus houses with gear heads on them. Add a
    triac and go. (now thats if single speed is OK)

    --- In basicstamps@yahoogroups.com, "HSchwenk_GMX" <hschwenk@g...>
    wrote:
    >
    >
    > > This is a lot like a problem I'm having. See my post from a few
    days
    > > ago on running motors while doing other things. There is a chip
    made
    > > by national semiconductor (LMD18200 -- pull the datasheet from
    > > digikey) that has a built in H-Bridge and is set by PWM. It looks
    > > like you could feed back a tachometer to either the 18200 or the
    > > BS2SX to set the speed. As for speed of the SX, at 3000 rpm, the
    > > motor is spinning 50 times a second. You can run a lot of
    > > instructions in 20 ms.
    > >
    > > My problem is that I need to be able to finely adjust the
    position of
    > > something controlled by a DC motor. So I need to send PWM to the
    > > controler while watching for a switch to close. You can't do
    > > anything else while running a PWM command.
    > >
    > > I am curious about your application. If the motors need to go the
    > > same speed, why not just use one motor and connect the loads
    > > mechanicly? There may also be some kind of electrical trick you
    >
    > *************************************************
    > In a big shelf I have to position
    > 12 m and 6 m long wood
    >
    > I need 3 motors to go up and down
    > and 3 motors to move in and out.
    > I thought to do it in two different processes.
    >
    > For the 12 m wood I use motor1 motor2 and motor3
    > For the left 6m I use the motor1 +2
    > For the right 6m I use motor2+3
    >
    > Yes I thought about mechanical solution
    > But it would be a big heavy complicated stuff
    > Including coupling--clutches
    > The 3 motor-solution is more flexible and easier to build
    >
    > About PWM:
    > I did not think to use PWM-command,
    > I thought to make the motor pins high or low
    > between the reading of the encoder.
    > This would be like PW-control----?
    > I don't need a big accuracy in synchronism.
    >
    > But I am not sure yet how to do.
    > Still I am not sure about the best solution---?
    >
    > Selket thanks for replay Heinz
    >
    > *********************************************************
    >
    > > could do with a phase locked loop, but I was never very good with
    > > analog circuits.
    > >
    > > Please tell me if you have any success.
    > >
    > > -selket
    > >
    > > --- In basicstamps@yahoogroups.com, "HSchwenk_GMX" <hschwenk@g...>
    > > wrote:
    > > > Hi,
    > > > I would like to run 3 DC Motors in the same speed,
    > > > independent of the load. (max 3000 r/min)
    > > > AND to stop them after a given number of revolution
    > > > Forward and back
    > > > I would like to fix an encoder on each motor
    > > > Depending on the reading of the encoder, I thought,
    > > > to give each motor (with H-Bridge) a Low or a High
    > > > I would get an PWM depending on the reading of the encoder ?
    > > >
    > > > Is the Stamp SX quick enough to read, calculate, and to change
    > > outputs
    > > > for the 3 motors??
    > > > I have no idea how to calculate the needed time?
    > > >
    > > > I may could count the revolution of each motor, compare them and
    > > > switch the output of each motor on or off, depending of the
    > > > result of the calculation.
    > > > This needs a long time
    > > >
    > > > I may could fix two encoder on each motor and check
    > > > If each motor runs synchronous on the same encoder,
    > > > or if one motor is already on the next encoder.
    > > >
    > > > I have read Tracy Allen "Finite State Machines"
    > > > And a two-bit quadrature encoder could do it ??
    > > > Or is a grey code wheel to encode it, in an code, to use
    > > > for the PWM of each motor ?
    > > >
    > > > An acceleration of the motor speed would be not bad
    > > > but not urged necessary.
    > > > Also an safety switch,
    > > > and an referent switch to read would be not bad too.
    > > >
    > > > Can the sx do it quick enough for the 3 motors?
    > > >
    > > > Who has experience or samples or ideas what the best way is?
    > > >
    > > > Tracy,
    > > > do You have a "math way" to read the encoder inputs
    > > > And control the motor outputs quickly ??
    > > >
    > > > Advices are welcome
    > > > Thankfully Heinz
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
    > >


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-18 07:53
    The 3 motor-solution is more flexible and easier to build is to fix a mico
    encouder WITH a tyer"wheel" with any diameter rolling fool on the moving part(
    determin the desplacement for 1 motor of 3 motors)up and down, and same for
    others 3 motors in and out.

    this way you calculat any distance( longeur) exactly with out garding the RPM
    of motors,you have only used 2 encouders to control, and the h-bridge has
    electrical break. i made that for a paking machine

    LANA

    wenk_GMX <hschwenk@g...> wrote:


    > This is a lot like a problem I'm having. See my post from a few days
    > ago on running motors while doing other things. There is a chip made
    > by national semiconductor (LMD18200 -- pull the datasheet from
    > digikey) that has a built in H-Bridge and is set by PWM. It looks
    > like you could feed back a tachometer to either the 18200 or the
    > BS2SX to set the speed. As for speed of the SX, at 3000 rpm, the
    > motor is spinning 50 times a second. You can run a lot of
    > instructions in 20 ms.
    >
    > My problem is that I need to be able to finely adjust the position of
    > something controlled by a DC motor. So I need to send PWM to the
    > controler while watching for a switch to close. You can't do
    > anything else while running a PWM command.
    >
    > I am curious about your application. If the motors need to go the
    > same speed, why not just use one motor and connect the loads
    > mechanicly? There may also be some kind of electrical trick you

    *************************************************
    In a big shelf I have to position
    12 m and 6 m long wood

    I need 3 motors to go up and down
    and 3 motors to move in and out.
    I thought to do it in two different processes.

    For the 12 m wood I use motor1 motor2 and motor3
    For the left 6m I use the motor1 +2
    For the right 6m I use motor2+3

    Yes I thought about mechanical solution
    But it would be a big heavy complicated stuff
    Including coupling--clutches
    The 3 motor-solution is more flexible and easier to build

    About PWM:
    I did not think to use PWM-command,
    I thought to make the motor pins high or low
    between the reading of the encoder.
    This would be like PW-control----?
    I don't need a big accuracy in synchronism.

    But I am not sure yet how to do.
    Still I am not sure about the best solution---?

    Selket thanks for replay Heinz

    *********************************************************

    > could do with a phase locked loop, but I was never very good with
    > analog circuits.
    >
    > Please tell me if you have any success.
    >
    > -selket
    >
    > --- In basicstamps@yahoogroups.com, "HSchwenk_GMX"
    > wrote:
    > > Hi,
    > > I would like to run 3 DC Motors in the same speed,
    > > independent of the load. (max 3000 r/min)
    > > AND to stop them after a given number of revolution
    > > Forward and back
    > > I would like to fix an encoder on each motor
    > > Depending on the reading of the encoder, I thought,
    > > to give each motor (with H-Bridge) a Low or a High
    > > I would get an PWM depending on the reading of the encoder ?
    > >
    > > Is the Stamp SX quick enough to read, calculate, and to change
    > outputs
    > > for the 3 motors??
    > > I have no idea how to calculate the needed time?
    > >
    > > I may could count the revolution of each motor, compare them and
    > > switch the output of each motor on or off, depending of the
    > > result of the calculation.
    > > This needs a long time
    > >
    > > I may could fix two encoder on each motor and check
    > > If each motor runs synchronous on the same encoder,
    > > or if one motor is already on the next encoder.
    > >
    > > I have read Tracy Allen "Finite State Machines"
    > > And a two-bit quadrature encoder could do it ??
    > > Or is a grey code wheel to encode it, in an code, to use
    > > for the PWM of each motor ?
    > >
    > > An acceleration of the motor speed would be not bad
    > > but not urged necessary.
    > > Also an safety switch,
    > > and an referent switch to read would be not bad too.
    > >
    > > Can the sx do it quick enough for the 3 motors?
    > >
    > > Who has experience or samples or ideas what the best way is?
    > >
    > > Tracy,
    > > do You have a "math way" to read the encoder inputs
    > > And control the motor outputs quickly ??
    > >
    > > Advices are welcome
    > > Thankfully Heinz
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and Body of
    the message will be ignored.


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




    Do you Yahoo!?
    Yahoo! Mail Plus - Powerful. Affordable. Sign up now

    [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.