Shop OBEX P1 Docs P2 Docs Learn Events
Little Step U, changing speed during run? — Parallax Forums

Little Step U, changing speed during run?

J.WeJ.We Posts: 15
edited 2005-08-18 16:43 in BASIC Stamp
Is there anyone who know how to change speed during run, when controlling a step motor with Little Step U?
For example: can I change speed when using command {H}, {J} or {G} during movement? Otherwise I have to stop the motor before changing speed!

What can I do to get around my problem, is there anyone out there who has had the same problem?

Regards // Johan

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-12 14:33
    Johan,

    ·· Aren't you still trying to make the speed change coincide with an input in the IP1 and IP2 pins?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • J.WeJ.We Posts: 15
    edited 2005-08-12 15:09
    Chris,
    The inputs IP1 and IP2 only stops the motor(depending on what command you drive the LSU in, {H}·listen to·IP2, {J} on IP1, {F} on both and so on..). They works like a type of emergency stop. I would be nice to·change speed with the IP pins but my question is if·the LSU is build to be able to change speed during run at all. Is it possible to change·only by upgrading the {A} command?


    I have tried to contact the manufacturer, but they have not responded. This was only an attempt to reach out to other LSU users...
    Maybe my wishes and expressions is confusing, but I hope this will clear things up..

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-12 15:22
    Johan,

    ·· By all means this is definately the place to get feedback from those people who know the product and/or have used it.· I just wanted to confirm your original question, since it slightly changed.· I hadn't realized you found that information out already.· Perhaps someone on here is a Little Step-U guru?· =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • dandreaedandreae Posts: 1,375
    edited 2005-08-12 15:36
    Here is·a code that uses a different command, but it may give you idea on how to accoplish your code.



    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com
  • kelvin jameskelvin james Posts: 531
    edited 2005-08-13 06:12
    I can probably help you out, but i am a little confused on what you are trying to accomplish here. Are you saying you want to increase /decrease the speed as the motor is moving from one position to another? Or do you want to change the speed once a position has been reached? The second option is easy, the first is a problem, but can be done with some creative code. On another note, I use the remote operation, using ip1 and 2, that turns the stepu into a pulsed driver for operations that can't be done by serial commands. Anyway, try and give some more details on the operation.

    kelvin
  • J.WeJ.We Posts: 15
    edited 2005-08-16 13:04
    Ok, I will try to explain my application in more details.
    Your first option is more like it.
    On one side I have my step motor controlled and driven by BSxs and LSU. On the other side I have “a sensor” that checks a signal. In the middle I have another controller that is doing stuff with the signal; this controller uses RS232 to communicate with BSsx. I want to move and control the motor in real time, lets take one example: The motor I running, if the signal is strong I want to speed up my motor, if the signal is week I want to increase the speed, ore if the signal is really bad I want to change direction. I want to ramp it up while running.
    I can probably do this by step a small number of steps at the time with different speeds…
    But that would not be beautiful.
    ·
    Do you recognise my problem? Can you please give me an example on some creative coding, which makes this easier?

    I will look into the remote state in more details, but i dont think it would do the trick.. we will see..

    regards//Johan
  • kelvin jameskelvin james Posts: 531
    edited 2005-08-18 16:43
    Now that i see what you are trying to do, i have some not so good news. Changing motor speed in real time is something a stamp won't do well, single tasking and slow response is the problem with your setup. You can update the speed serially to the stepu from your pc, but the command is slow and will delay the movement a bit. You can use the remote ( direct control from the stamp ), bypassing the serial commands, but still the stamp has to monitor serial input via communication from the controller, to update a speed variable in the loop. And that will also cause a delay in the motor function. I have included a simple program that ramps the motor up to a constant speed using the remote mode, just to give you the basic idea. There are some values you can play around with for control, and some can be changed to variables to update from your controller. The timings here are for a 1.8 degree motor. You will have to change the directives, baud and pins to match your stamp.

    kelvin
Sign In or Register to comment.