Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Controlling a single (for now) stepper motor with XLights?

  1. #11
    Join Date
    Dec 2011
    Location
    Key West, FL
    Posts
    3,633
    Post Thanks / Like

    Default Re: Controlling a single (for now) stepper motor with XLights?

    Quote Originally Posted by Macboy View Post
    I'm sure I'm not the only one that's run across this but in all the searching done by myself and a friend of mine we're not coming up with anything definitive. All I want to do is control the rotation of a stepper motor (NEMA 17/23) through XLights as part of my display. What do I need in order to make this happen? I'm running Ron's Holiday Lights 4 universe controllers and ESP Wifi sticks.

    Do I need to connect the DMX outputs on the controller to a DMX specific controller and if so - what is this controller? I've seen lots of arduino references - do I need to build up an Arduino to act as a controller?

    I've watched and rewatched the Canispater Christmas moving head light but he's using a Falcon F16v3 controller which may have capability my controller does not?
    I offer you the following suggestion.

    First question - You stated that you want to drive a stepper based on data Vixen is transmitting. Have you thought of what data you are going to send and how to use it?

    Your Ron's controller - you mentioned DMX - does it have a DMX output capability?

    If so - DMX is just a RS485 communication line which you could connect to your Arduino's UART.

    That would enable you to uses one or more channels within the DMX packet to convey stepper motor direction and number of steps data.

    I suggest you use a simple stepper breakout board - look at https://www.pololu.com/product/2971 as an example. One pin determine which direction the stepper turns and the stepper then "steps" for each toggle of the drive pin.

    Your Arduino can receive the DMX channels and then all you need to decide is what data to put in the channels and how to use that data to drive your stepper.

    The implementation stated can easily drive from 1 to more than 8 steppers -- you just need two pins for each motor on the Arduino.

    The only thing you need to do is write Arduino code -- all the other hardware is just connecting boards together.

    My 2 cents.

    Hope it helps.

    Joe
    Link to my DownLoad Site: [B][COLOR=#ff0000][URL]http://www.joehinkle.com/HLS[/URL]

    [/COLOR][/B][IMG]http://joehinkle.com/HLS/HLS%20Logo%20Small.jpg[/IMG]

  2. #12
    Join Date
    Dec 2011
    Location
    UK S80 postcode
    Posts
    1,417
    Post Thanks / Like

    Default Re: Controlling a single (for now) stepper motor with XLights?

    Hi, to follow up on Joes comments/suggestions. Firstly I agree with all of them, the most pertinent is
    Have you thought of what data you are going to send and how to use it?
    Bulbs and LEDs are very different to stepper motors or servos, ‘light based’ items achieve their desired value almost instantly whereas ‘motor based’ items require a time period to achieve their desired value (position). Most controllers are designed that they send regular data updates which overrides any previous data and with ‘light based’ items there are very few consequences as the required value has been achieved. ‘Motor based’ controllers (i.e. a 3D printer) send data and wait until the required position has been reached before implementing the next set of data.

    I suppose what I am trying to say in a long winded way is to be able to help we need to know what it is you want to achieve.

  3. #13
    Join Date
    Oct 2012
    Location
    Orange Park, FL
    Posts
    34
    Post Thanks / Like

    Default Re: Controlling a single (for now) stepper motor with XLights?

    Glad I ran across this thread. I have been working on the same idea. I have it all working on my bench on a breadboard, still tweaking the software.
    Hardware: Arduino Nano, RS-485 to TTL adapter board, Stepper motor driver board.
    Software: DMX and Stepper motor libraries for Arduino.
    The Arduino responds to a single hard-coded DMX address. The value sent is treated as a signed char, with zero being stopped, +1 to +128 controls the speed in one direction, -1 to -127 controls the speed in the other direction. I have it programmed to keep spinning (if non-zero) and the value controls the speed. However, it would also be simple to have the value have the motor advance that many steps then stop when it receives a non-zero value.
    I'm debating producing a batch of them to sell on Tindie, Facebook, and the forums (just need a way for the user to set the address).
    Wizlights.com

  4. #14
    Join Date
    Dec 2011
    Posts
    6,016
    Post Thanks / Like

    Default Re: Controlling a single (for now) stepper motor with XLights?

    Quote Originally Posted by Barnabybear View Post
    Hi, to follow up on Joes comments/suggestions. Firstly I agree with all of them, the most pertinent is

    Bulbs and LEDs are very different to stepper motors or servos, ‘light based’ items achieve their desired value almost instantly whereas ‘motor based’ items require a time period to achieve their desired value (position). Most controllers are designed that they send regular data updates which overrides any previous data and with ‘light based’ items there are very few consequences as the required value has been achieved. ‘Motor based’ controllers (i.e. a 3D printer) send data and wait until the required position has been reached before implementing the next set of data.

    I suppose what I am trying to say in a long winded way is to be able to help we need to know what it is you want to achieve.
    Actually consequences are completely removed in the method I am using .
    1) the stepper will only energize and move while data is high and as long as there is sequence data the stepper will continue to move .
    Once data ceases the stepper is idle and no need for delay or busy in code . With this simple 2 channel control on a pixel channel in sequencer it is impossible to send both channels at the same using 2 of the 3 colors r,g, or be .
    The real plus is the stepper never gets warm .
    I haven"t noticed a single issue yet with steppers . Servos is an entirely different entity .

    I do agree with motor control specific boards also

    But if running steppers as part of a sequence and ease of control is required , this can't be easier in mho .
    The real beauty is it can be incorporated easily in espixelstick firmware and work perfectly .

  5. #15
    Join Date
    Dec 2011
    Location
    Key West, FL
    Posts
    3,633
    Post Thanks / Like

    Default Re: Controlling a single (for now) stepper motor with XLights?

    Quote Originally Posted by DrWizard View Post
    Glad I ran across this thread. I have been working on the same idea. I have it all working on my bench on a breadboard, still tweaking the software.
    Hardware: Arduino Nano, RS-485 to TTL adapter board, Stepper motor driver board.
    Software: DMX and Stepper motor libraries for Arduino.
    The Arduino responds to a single hard-coded DMX address. The value sent is treated as a signed char, with zero being stopped, +1 to +128 controls the speed in one direction, -1 to -127 controls the speed in the other direction. I have it programmed to keep spinning (if non-zero) and the value controls the speed. However, it would also be simple to have the value have the motor advance that many steps then stop when it receives a non-zero value.
    I'm debating producing a batch of them to sell on Tindie, Facebook, and the forums (just need a way for the user to set the address).
    You might want to consider adding some limit switches to sense end of run. If your driving a motor there has got to be an end where things don't move any more -- best to sense for that and shut the motor down before the end is hit. Look at 3D printer or CNC machines - they all use limit switches so nothings burns or bends.
    Link to my DownLoad Site: [B][COLOR=#ff0000][URL]http://www.joehinkle.com/HLS[/URL]

    [/COLOR][/B][IMG]http://joehinkle.com/HLS/HLS%20Logo%20Small.jpg[/IMG]

  6. #16
    Join Date
    Oct 2012
    Location
    Orange Park, FL
    Posts
    34
    Post Thanks / Like

    Default Re: Controlling a single (for now) stepper motor with XLights?

    consider adding some limit switches
    In my application I am turning a wheel so there are no limits, I just want to control direction and speed. And a great trick I learned is that stepper motors are self-braking so (within the limits of the inertia) you can spin a stepper motor very quickly and then stop it on a dime. I've done this to great effect with a fast spinning mirror ball and when it suddenly stops everyone in the room loses their balance! I once custom built a device for a night club which I called "The Sickelobe" (like the beer) with a large mirror ball mounted in 3 gimbals driven by stepper motors and surrounded by different colored lights so you could make the dots go around the room in any direction at any speed and any color. The DJ would have great fun making it suddenly change directions and everyone on the dance floor would fall over!

    For something with a limited range of motion, you could just count the number of steps, but limit switches are indeed a good fail-safe.
    Wizlights.com

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •