Why won't my linear stepper motor work?

Discussion in 'The Projects Forum' started by Ben Varvil, Apr 30, 2018.

  1. Ben Varvil

    Thread Starter Member

    Apr 30, 2018
    197
    58
    I'm using 4, TIP31C transistors to sequentially 4 coils... which should advance the disc magnet embedded in the black tube. This is a very simple concept, but I'm failing. I can only check for shorts and redo the mental wiring gymnastics so many times before I have to ask for another set of eyes. Please help!!

    The LEDs are connected from Arduino outputs, through the base/emitter of the transistor. The collector and emitter are connected to the large 12V battery.



    IMG_1614.JPG

    IMG_1613.JPG

    IMG_1617.JPG
     
  2. ericgibbs

    Moderator

    Jan 29, 2010
    5,720
    1,063
    hi Ben.
    Welcome to AAC.
    I would suggest the following test, determine the current flowing in a single coil.
    The winding wire looks pretty thick, so I would say the resistance is very low.
    Looking at the TIP's Base input, say 5V via a series resistor and LED will be far too low to switch On a TIP into saturation.

    Measure the coil resistance, let us know the value.
    E
     
    -live wire- likes this.
  3. DickCappels

    Moderator

    Aug 21, 2008
    4,925
    1,497
    How is this linear stepper going to be used? I don't see any mechanical coupling to the outside world.
     
    -live wire- likes this.
  4. shortbus

    AAC Fanatic!

    Sep 30, 2009
    5,570
    3,182
    It may not even be the drive part that is failing , since the LEDs are blinking. Explain more about the motor. Are there permanent magnets in the shaft? Are they, if present, situated correctly pole wise, and of the correct pitch to cause movement with the switching of the coils?
     
    -live wire- likes this.
  5. Ben Varvil

    Thread Starter Member

    Apr 30, 2018
    197
    58
    Hi Dick,
    Thank you for considering my project.

    This is the shooting mechanism for an autonomous pool playing robotic system that is my long time hobby project. The shaft of a pool cue threads onto the end of the tube. My hope is to be able to vary shot strength from "break strength" to "super soft shot" using clever pulse durations and perhaps analogWrite commands. At this testing level, I'm only using the digital outputs and one disc magnet. Eventually, I'll have 15 or so disc magnets spaced through the tube so that as one magnet exits the coils, another enters.

    Thanks Shortbus!

    Off camera, I shorted the negative side of the battery to the output side of one coil (bypassing the arduino/LED/Resistor part of the circuit) and the system jumped violently. This is encouraging and for potential strength of the motor and also indicative of what I should see if the "drive part" is working correctly. Zero movement supports my thinking that I'm not getting current through the coils.

    Thanks Ericgibbs!

    Interesting. I'll be able to make those measurements and report later today, but yes, the resistance should be low. My hope was to maximize current flow to maximize magnetic field strength. In the meantime I'll dig deeper into transistor reading to understand more about saturation vs base input.

    The resistance in each coil is 0.5ohm. If V still equals IR, then a 12V battery should pump 24 Amps through a 0.5 ohms resistance coil. This doesn't seem realistic, safe or doable, but that's the math as I see it.

    Side note: I removed the 220ohm resistor and LED from the Arduino-base-emitter circuit and just connected the Arduino output directly to the base of the transistor with no change in performance.

    Thanks again for any suggestions or help.
     
    Last edited by a moderator: Apr 30, 2018
  6. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    8,657
    1,975
    Hopefully that didn't fry the Arduino output? It's not advisable to exceed the rated maximum current per output.
     
    -live wire- likes this.
  7. Ben Varvil

    Thread Starter Member

    Apr 30, 2018
    197
    58
    Good looking out Alec_t. Thanks.
    I reconnected as is shown in the video and it still works.
     
  8. ericgibbs

    Moderator

    Jan 29, 2010
    5,720
    1,063
    hi Ben,
    A TIP31C is rated at 5Amps max for a pulse, gain abut 15.
    Even if the pulse was 5A that means a Base current of 5/15= 330mA, which is not possible with an Arduino pin.

    Rewind the coils using a thinner wire to give approx 8 Ohms [ 3A pulse] Base current 3A/20 = 150mA, so an intermediate transistor driver is required.

    You could consider a Power N MOSFET, with low Vgs voltage as a coil driver.
    E
     
  9. BobaMosfet

    Senior Member

    Jul 1, 2009
    372
    81
    You can call it a 'linear stepper motor' but what you've really got is a solenoid. Have you calculated the amount of time it takes to actually build the magnetic field in a given coil to the point it can move whatever mass you're attempting to move (either the core, or itself)?
     
  10. Ben Varvil

    Thread Starter Member

    Apr 30, 2018
    197
    58
    Oh man. What a bummer. Re-wrapping means scrap and start over. That's what hobbies are for, I guess.

    Before I do, perhaps I could gain clarity:
    The rated output current for an Arduino pin is 40 mA... let's say I'm sending that through the transistor. If the transistor has gain of 15, shouldn't I see 0.6A through the coil? That should be enough to move or twitch the magnet/tube... I would think. But, it isn't so I'm still scratching my head.
     
  11. Ben Varvil

    Thread Starter Member

    Apr 30, 2018
    197
    58
    Hi BobaMosfet, (nice handle)

    I believe a solenoid to be a single coil and a single magnet. I'm sequentially activating four coils to move a series of spaced magnets... so I feel valid in sticking with the title "linear stepper motor." I'm not ringing doorbells with this, but hoping to have controlled motion. Here is a video of the inspiration:

    Speaking of controlling motion with this thing, NO, I definitely have not calculated the time necessary to generate the magnetic field. My basic understanding of electricity told me that the magnetic field instantly appeared once the current dumped. Based on your comment, this is not the case. Uh oh.

    Here are my back of the envelope calcs as of now:
    The mass I am hoping to move is 8x that of a cue ball, or 1.28KG.
    Pros can break at speeds of 25MPH (~11 m/s). Let's aim for that.
    Initial velocity = 0 m/s
    Ideal striking velocity = 11 m/s + 20% for losses during impact = ~13m/s
    Distance (full back-swing to strike point): 0.4m

    a= (v2 - v1)vav /d
    a = (13-0)6.5/.4
    a = 5m/s^2

    F = ma
    F = 1.28Kg*5m/2^2 = 6.4N
    (assuming constant acceleration)

    Soooo, how do I generate 6.4N of force between the coils and the permanent magnets...? I'm off to do reading but happy for any guideposts you may have.
     
  12. be80be

    AAC Fanatic!

    Jul 5, 2008
    1,689
    332
    That 40mA is for one pin on a port not 4 pins on the same port.

    This is the max for the chip
    There are 28 pins That would mean the above should say 1128 mA

    the 40 mA is on one pin not to exceed 200mA for the total of all the pins
    If you like your uno don't be thinking you can sink 40 mA each pin
    You really can only use maybe 3 pins at 40mA max

    The atmega it not a lover of over current for sure

     
  13. Ben Varvil

    Thread Starter Member

    Apr 30, 2018
    197
    58
    Hi Be80be,

    I'm not sure I follow the 1128mA part, but I'm hearing the warning about not pulling more than 200mA at a given time loud and clear. Thanks for that. Since I'm sequentially activating the coils, all four pins should never be on at the same time.

    However, in the future, I'd like to be able to reverse the current flow in coils (through an H-bridge?) so that I can both attract and repel the magnets effectively doubling the force created in the motor. That would require more pins activated, which pushes me closer to the danger zone. Perhaps I need to use a intermediate transistors like ericgibbs suggested after all. The project gets much more complicated, but I'm not frying Arduinos.
     
  14. shortbus

    AAC Fanatic!

    Sep 30, 2009
    5,570
    3,182
    Again I'd like to see a sketch at least of the inter working of the moving part. Don't know what else to call it? I don't think this can be done with the electro coils wound close together like it is now. But am hoping to be proven wrong. A stepper like many types of electronically commuted motors works on the principle of "salient poles", poles that are spaced apart equally in a given distance, whether in a circle or in a linear manner.
    https://en.wikipedia.org/wiki/Linear_motor
     
  15. be80be

    AAC Fanatic!

    Jul 5, 2008
    1,689
    332
    Well your missing something first off. I would say then the coil comes on it's holding the black rod.
    To move it has to pull then cut off then push cutoff it moves push it more or just use a long pull stroke.
    which would be good for pool.

    I think your just holding it.

    shortbus is about right I think so too the coil is made wrong it's holding there no room for a pull then push stroke.
     
    shortbus likes this.
  16. Ben Varvil

    Thread Starter Member

    Apr 30, 2018
    197
    58

    Hi Shortbus:
    No problem, here is a sketch of the inner workings of the black tube, which slides easily through the coils. It is literally a hollow carbon fiber tube filled with neodymium disc magnets and plastic spacers.
    judith sketch.jpg

    The coils are .25 inches apart, center to center. So, for me to go through a full pool stroke (~15 inches) is only 60 steps... By varying the time delay between the steps it feels like I should be able to accelerate the tube and magnets as I please. I recognize the concern of simply bringing the tube to a halt at each step, but am hoping to address that with good timing, microstepping and analogWrite commands.

    I feel out of my league selecting a "Power N MOSFET, with low Vgs voltage" as ericgibbs suggested for this application... especially after my epic fail choosing the TIP32C after lots of reading. Any specific suggestions of one of these to try?
     
  17. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    8,657
    1,975
    If the axial length of a coil is greater than the thickness of a disc magnet then I think the closeness of the two magnetic poles of the disc will mean that the coil's magnetic field will be pushing one pole but pulling the other pole, effectively (almost) cancelling the force. This would be similar to using a non-magnetised steel disc instead of a permanent magnet.
     
  18. shortbus

    AAC Fanatic!

    Sep 30, 2009
    5,570
    3,182
    Hi, next question, how are the poles of the PM(permanent magnets) oriented? By that I mean the N and S poles, PMs are made in many different pole orientations. Some are radial, 1/2 of the diameter N one S. Some are linear one of the flat sides N the other S.

    Have you taken a stepper motor apart to see how it is made? If so, you would see that there are both PM "ribs" or poles and also electromagnet(EM) poles involved. Now let me say this up front, I've never made a linear motor, but have seen them, but never have taken one apart. But that said I don't think just having EM coils wrapped around a tube will get you the movement you are after. You are just creating a magnetic field around the tube. You need, like in a stepper or even a BLDC individual or 'salient' poles, to concentrate the EM force. This will allow the opposite EM pole to pull the PM pole forward. And by reversing the EM pole of the rear side of the PM to be the same polarity to push the PM.

    There is also a geometrical problem with the current arrangement you have and also will come up if you make a new outer coil, using pole pieces. That is the width of the PM pole to the distance between EM poles. There are some thesis papers out there online that can explain it to you better than I can if you Google using the word thesis in the question.

    A couple of more thoughts on what you're trying to do.

    One that may help, you can't just use a micro to decide when to switch your coils on and off. You need to know where the PMs are in regards to the EMs. Doing it works in a regular stepper because it is basically in a circle, it is always self contained movement. The linear is always trying to get away from is self so it need some form of sensing to know where it is.

    Second is that in the end I don't think this is going to do what you think/want it to. I'm assuming this is for a school challenge? Think about how a pool que is moved during a shot. It starts out from a stopped position and accelerates during the stroke, not in one 'sudden' move but in a controlled fashion. This I think will be an either full on or full off stroke, like from a standard solenoid. May be wrong here but don't think so.
     
    Bernard likes this.
  19. RichardO

    Late Member

    May 4, 2013
    2,274
    889
    Just for reference, the linear steppers I have seen are not a variation of a solenoid. They are more or less, a standard rotating stepper motor driving an internal "nut". A "screw" is pushed in and out of the stepper by the rotating nut. (The "screw" has a slot along its length and a key pin to keep it from rotating).
     
  20. shortbus

    AAC Fanatic!

    Sep 30, 2009
    5,570
    3,182
    I have suggested those for other people here over time, and you're correct they are a regular stepper with a "nut" in place of the shaft. For fairly short movements they are a good fit, the nut and thread are almost as accurate as a ball screw, almost not quite.

    But he is talking about a linear motor, that he was calling a stepper. One of the conveyor belt machine they had at work used them in stead of a sprocket and motor to drive it. The precision of the movement between stations on the machine was much better than the other machines that use a sprocket and motor. This machine was used to laser weld the wires on a wire harness for oxygen sensors, so pretty good alignment was required to get the position of the laser and wire correct.
     
    RichardO and cmartinez like this.
Loading...