Why won't my linear stepper motor work?

Alec_t

Joined Sep 17, 2013
15,121
Nice. That's an excellent first attempt. Give yourself a pat on the back. Modelling the driver IC, rather than simply using a pulse voltage source, is pretty ambitious.
You could model the Arduino outputs as pulse voltage sources.
When it comes to running the sim you will find that the generic FETs don't work well, so right-click on them and select 'proper' FETs. The generic NPNs, PNPs and diodes work ok for most non-critical sims.
Those 'A' devices default to 0/1 Volt logic levels, so will need their 'values' set to something else.
As for power connections, give labels (e.g. +V, -V) to the nodes of power source(s) and apply the labels where needed to other nodes in the schematic. It's also helpful to label nodes such as 'in' and 'out', so that plotted traces are easily interpreted.
 
Last edited:

Thread Starter

Ben Varvil

Joined Apr 30, 2018
197
Nice. That's an excellent first attempt. Give yourself a pat on the back. Modelling the driver IC, rather than simply using a pulse voltage source, is pretty ambitious.
Thanks! I didn't realize there was an easy way out... so I can't take credit for being ambitious. I thought the benefit of the simulation was to be able to analyze the components to see if they are going to "let the smoke out" before physically building it. Replacing the IC with a pulse voltage source feels like it would defeat that purpose. Then again, I'm new to this process.

You could model the Arduino outputs as pulse voltage sources.
Done! I selected 0 to 5 volts at 0.001 to simulate the ~1khz pwm output. I left the other options blank and it didn't give me any errors...

When it comes to running the sim you will find that the generic FETs don't work well, so right-click on them and select 'proper' FETs. The generic NPNs, PNPs and diodes work ok for most non-critical sims.
Well, after searching for "proper" as one of the options, I realize I'm taking you too literally. I'm assuming you mean I should select the MOSFET that most closely represents what I'm using. IRL540 isn't listed in LTspice, so I'm going to have to dig deeper to figure out and find the "Vds[V], Ron[mohm], Gate Chg[nC]" values of the IRL540 so that I can find something similar from LTspice's selection. Is that the correct process?

Those 'A' devices default to 0/1 Volt logic levels, so will need their 'values' set to something else.
Oh man, those "A devices"... I literally just went through all the components on LTspice and picked the picture that was closest to what I saw on the driver chip schematic. I need to figure out what those things even are before I tackle trying to figure out what "Values" are best suited. I've got work to do.

As for power connections, give labels (e.g. +V, -V) to the nodes of power source(s) and apply the labels where needed to other nodes in the schematic. It's also helpful to label nodes such as 'in' and 'out', so that plotted traces are easily interpreted.
Got it. Helpful. Thanks. Cleaned up my drawing a lot.
I'll do some work and post an updated drawing.

final thought: The benefit of sketching by hand in my notebook is that I see how to wire the physical components. Is there a way to do that on LTspice? Otherwise I'm still sketching before building.
 

shortbus

Joined Sep 30, 2009
10,050
Energizing the coils 1, 2, 3, 4, 1, 2, 3, 4 moves the stick one way, energizing them 4, 3, 2, 1, 4, 3, 2, 1 moves it the other direction... in theory.
I do hope to upgrade to an H-bridge eventually to utilize pushing as well as pulling, but not until I get this first system working.
Like I said much earlier, that only works in a round, normal stepper motor. Because of the way the winding's are arranged. The only "linear" type steppers that I'm aware of are the round type that have a 'nut' for the normal shaft. And the linear movement comes from the 'nut' rotating and moving the 'shaft screw' through it.
 

cmartinez

Joined Jan 17, 2007
8,768
Like I said much earlier, that only works in a round, normal stepper motor. Because of the way the winding's are arranged. The only "linear" type steppers that I'm aware of are the round type that have a 'nut' for the normal shaft. And the linear movement comes from the 'nut' rotating and moving the 'shaft screw' through it.
There really are genuine linear steppers out there, shortbus. But they're rather expensive and their applications are confined to a specific niche.

 
Last edited:

Alec_t

Joined Sep 17, 2013
15,121
I thought the benefit of the simulation was to be able to analyze the components to see if they are going to "let the smoke out" before physically building it.
That's true, but if the driver function you are interested in is just providing a periodic high-current-capable voltage pulse then a normal voltage source can do that. Anything more elaborate than that (e.g. propagation delays, transients) then yes, modelling the driver in detail is informative.
find something similar from LTspice's selection. Is that the correct process?
That's usually good enough. It's also possible to import third-party models into LTspice (but I suggest leave that until you've got a bit more experience under your belt).
 

Thread Starter

Ben Varvil

Joined Apr 30, 2018
197
Like I said much earlier, that only works in a round, normal stepper motor. Because of the way the winding's are arranged. The only "linear" type steppers that I'm aware of are the round type that have a 'nut' for the normal shaft. And the linear movement comes from the 'nut' rotating and moving the 'shaft screw' through it.
I'm definitely being stubborn about it and will have to prove myself wrong and you and be80be right. I'm almost done building the test setup with all the circuit updates you all suggested. Hopefully will have video of next try tomorrow.

I want to add that when I tested a giant coil and a fist full of magnets a few fails back, I observed that the magnet clump snapped to the center of the coil (after some overshooting). This motivated the design idea to have multiple coils and to pass the magnets from one to the next.
 

Thread Starter

Ben Varvil

Joined Apr 30, 2018
197
Here is the latest setup. I'll draw up the exact schematic (then post) as I work through the system to figure out what is wrong.

IMG_1705.JPG
DNA Robotics: I really appreciate the lamp and the fuse suggestion. I'm clearly doing something wrong, but feel like I haven't ruined the test figuring that out. I also followed your picture when hooking up my mosfets. Thank you.

Here's what happened when I powered it up:

What I expected to happen:
1. I close the circuit: the lamp is OFF, the Arduino fires up.
2. After a second or so of warm up time, the Arduino runs code activating each of the the 4 outputs, sequentially, for 200ms each.
3. As each coil fires, current is drawn from the battery, through the lamp, lighting the lamp for exactly of 0.8 seconds
4. I expect the disc magnet embedded in the black tube to be attracted to each activated coil, moving the tube to the right 1", in jerky .25" steps.

Clearly the circuit has a leak that draws current through the lamp (and the MOSFETs). I suspect the 10V voltage regulator (powering the driver chips and the Arduino) to be the leak.
 

Alec_t

Joined Sep 17, 2013
15,121
Since the bulb is in series with the common connection to all 4 coils it will light when any one of the coils is switched on. However, if the bulb resistance is higher than the resistance of a coil then most of the voltage will be across the bulb and not the coil. The coil current is limited by the bulb's (and coil's) resistance and is presumably not enough to cause the magnet to move.
 

Thread Starter

Ben Varvil

Joined Apr 30, 2018
197
Those 2 center heat sinks look very close to each other. You don't want them to touch.
That is an easy thing to fix when I get back to the shop. Will do. However...

This is a good point to clarify an assumption I was making:
The heat sinks each shipped with a thin, grey sheet of a flexible, insulation-like material. I assumed they were to keep the MOSFETs electronically isolated from, yet thermally connected to, the heat sink. (There was a little plastic doughnut to isolate the screw as well.)

I used those things, so If my assumption is correct, wouldn't the touching heat sinks not matter?

Also, let's say the heat sinks were in fact an extension of the drain... why would them touching allow current to flow when all the MOSFETs were off (or whatever term is used to describe MOSFETs not connecting the drain/source)?

Thanks again for looking at my project.
 

Thread Starter

Ben Varvil

Joined Apr 30, 2018
197
Since the bulb is in series with the common connection to all 4 coils it will light when any one of the coils is switched on. However, if the bulb resistance is higher than the resistance of a coil then most of the voltage will be across the bulb and not the coil. The coil current is limited by the bulb's (and coil's) resistance and is presumably not enough to cause the magnet to move.
I agree that the lamp should light when any of the coils is switched on. I don't understand why it turned on when the coils were NOT activated...

I recognize you're not a fan of sketches, but here is a quick sketch anyway as I stumble through replicating my circuit in LTspice.
IMG_1715.JPG
 

jpanhalt

Joined Jan 18, 2008
11,087
While you need individual gate resistors, you only need one turn-off (i.e., gate to source) resistor. That will simplify your design a little. See correction post #157.
Also, the 12V lamp may be limiting the current too much. Think of a typical 12V solenoid and look at how much wire they have to limit current.
 
Last edited:

Thread Starter

Ben Varvil

Joined Apr 30, 2018
197
While you need individual gate resistors, you only need one turn-off (i.e., gate to source) resistor. That will simplify your design a little.
Also, the 12V lamp may be limiting the current too much. Think of a typical 12V solenoid and look at how much wire they have to limit current.
Thank you for having a look.

I believe you about the turn-off resistor. However, conceptually, I do not understand how a turn-off resistor from one gate will do its job for other gates as well. Coils 1 and 4 are connected through 2 driver chips and an Arduino.

The lamp circuit should be seeing zero current at the start. I'm less concerned with how much current is being limited and more concerned with why there is current flowing at all. Do you see any way for current to pass when the arduino is not sending outputs to the driver chips?

Thanks again
 

jpanhalt

Joined Jan 18, 2008
11,087
RE: Turn-off resistor
Ignore that suggestion about a single resistor. Brain lapse. I was thinking parallel mosfets in which you have individual gate resistors but a single turn-off resistor. Obviously, your gate drives are intended to be isolated so that won't work. I apologize for that error.

RE: On when it should be off
Here are two links that discuss failure modes. One failure mode is in the on state. As is pointed out, that state may be short lived as it often results in excessive current and destruction of the device to make it open circuit. Since your current is limited, maybe one or more of your mosfets has failed but not self-destructed.
https://www.4qd.co.uk/docs/mosfet-failure-mechanisms/
http://www.ti.com/lit/an/slyt502/slyt502.pdf
Have you tested the drain-source resistance (positive lead on the drain) with the gate grounded? If your meter has a diode test function, that should show conduction source to drain from the body diode but not reversed.
 

be80be

Joined Jul 5, 2008
2,395
What the TS has there is not going to work no way first off the coils you have are so low ohm I bet that 50 amps each would be needed next
there to close for what you said the spacing is of your magnet.

Then Think long about this last one if the magnet poles are backward the coil what do you think will happen?

Nothing lol the thing will not move.

You need to start as I showed you one coil make it move to see if you need to change the magnet around add second magnet make it move more.



You have way to big of wire I even showed a video of how one coil could move both ways I only have 2 magnets Im dig up about 30 this weekend and make one that moves 3 ot 4 inches.

Have a long look here and tell me what you see
Is your coil made like this no it's not you have 4 coils you need 2 coils with center tap what that lets you do is move the magnet by changing which side of the coil is powered
 

Alec_t

Joined Sep 17, 2013
15,121
Back-EMF protection diodes across the coils are conspicuous by their absence, so it's possible the FETS have failed short-circuit. That would account for the bulb lighting up regardless of your attempts to switch the coils on/off. Test the FETs, as jpanhalt suggested.
 

be80be

Joined Jul 5, 2008
2,395
These are not the same maybe you can see the problem here
Screenshot from 2018-06-02 08-55-26.png
The above only lets you move one way and if you just happen to pull in on a magnet you will not be moving at all

Where as this let's you move both ways. If top side it high you move up if bottom high you move down
Screenshot from 2018-06-02 09-01-26.png

If you pull high low high low it moves
1,0,0,0
0,1,0,0
0,0,1,0
0,0,0,1

you will move down
 
Last edited:

Thread Starter

Ben Varvil

Joined Apr 30, 2018
197
Back-EMF protection diodes across the coils are conspicuous by their absence, so it's possible the FETS have failed short-circuit. That would account for the bulb lighting up regardless of your attempts to switch the coils on/off. Test the FETs, as jpanhalt suggested.
The coil inputs/outputs are epoxied on opposite sides of the coil. I didn't see an elegant way to connect flyback diodes... so I left them out. From what I"m hearing, they are a nice-to-have, not a must-have. ("low coil inductance")

Next version will have the coil inputs and outputs passing through a perf board, where I can easily connect Flyback diodes.

I think the light went on because the 10V regulator was drawing power through the lamp.

IMG_1716.JPG
 

Thread Starter

Ben Varvil

Joined Apr 30, 2018
197
What the TS has there is not going to work no way first off the coils you have are so low ohm I bet that 50 amps each would be needed next
be80be, I love your candor. I'm still processing your posts. In the short term, I think you're right about the 50 amps. When I saw a clear and violent response earlier, I shorted the battery over the coils. That would definitely have pulled over 50 amps. The rig I have here is fused at 10 amps. I shouldn't expect that big, violent response. (unless I can find a way to handle 50+ amps?)

Also, after watching the video more closely, I see the black tube DOES move ever so slightly. Super hard to see. This small response also supports the idea that when I do get the current flowing as expected, I have little to look forward to.

We'll see
 
Top