About Stepper Motors

sarahMCML

Joined May 11, 2019
697
You mean to swap the opamp inputs, right?
(BTW, the 10k pot is still not doing anything important, at least until this point)
I made your 2 corrections:
View attachment 282277
Good, we're getting there.
Have you built the new 555 circuit as I advised in the earlier post? If you do you will have to pass its output through either an inverting gate or a transistor inverter stage, because of the problem with the 4027 reset logic being positive rather than negative. The 555 needs to produce a narrow positive 'low-high-low' going pulse in this case, rather than the narrow negative 'high-low-high' going one that happens now.
You could instead build it as a variable duty cycle oscillator, but then you would have to adjust it for the right frequency, and something like a 20 to 1 negative to positive pulse output. That might be difficult with your scope!

If you get this far you should find that you can drive a unipolar motor reasonably well. I have my doubts though about driving the bipolar ones! But first things first!
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
- I did a mistake with the 5wire motor before, when I tested it. I realized a bit later, actually I remember, that it is using a completely other circuit, other mentality, other logic than this 4wire driver here. And the fact that it is spinning, it is doing it, but is handicapped , bad way of spinning it, and I believe it might have the potential to damage the motor if drived from a 4wire driver. Is my observations and my auto-correction.

...and it should be set to a FIXED frequency of around 15KHz, which is what the datasheet components set it to.
So, I took the time and made these marked labels. I measured everything !!! I have a standalone fv counter that I used.
It was in plan anyway, to make these labels. You give me an impulse, right time and the right place, to do it.
Here they are, the cardboard labels with markings:
Very cool, right?
20221206_045121.jpg20221206_045135.jpg20221206_045212.jpg
This one I used it to measure quartz crystals, remember? It does measure down to 1Hz !!!! ; but no decimals after it, so it might be 1-1.5-2even. The rezolution under 10Hz is very bad, but is doing it, if im rounding the results a bit.
20221206_041910.jpg
Ive also added Letters to these Clocks as A and B for easy recognition.
Back to the real cct. I made all the modifications as instructed and as I draw on my previous skematic.
I can't really say if it is an improvement. It may be. Everything appear to work in the same specs as before these modifications.
Maybe they are too subtle.
The B clock is set at a fixed fv, as you specified, not 15kHz but 11.4kHz. I say is close enough. Right? Haha.
I linked B CLK to the 4027 both SET pins(7 and 9) as an internal CLK for L6506. The A box CLK is only driving the 4017 that in turn is feeding the AND block then the L298.
- I am starting to understand that these NEMA8 motors are VERY weak in terms of torque. At least with 1 coil driving as it is right now using this cct right here. I get some good speed though. But they are soo weak. I hope driving them with 2 coils at once will make them more torque powerful and getting them closer to their original design. I still believe they should work optimal but I simply didnt find or made their proper driving circuit. This one here is not good for them. Is spinning them alright but not powerful.
- As for the other 2 motors, NEMA17 and the scrapped one, they dont give a rat ass, they are powerful and speedy. They are optimal - I believe - even at this 1 coil driving mode we have right now. Which is very cool.
- I learned with this experiment here, it is absolutely GOLD, to have multiple brands of motors to test things. If I was having only 1, hmmmm, I was very limited.
 
Last edited:

Thread Starter

q12x

Joined Sep 25, 2015
2,227
Have you built the new 555 circuit as I advised in the earlier post? If you do you will have to pass its output through either an inverting gate or a transistor inverter stage, because of the problem with the 4027 reset logic being positive rather than negative. The 555 needs to produce a narrow positive 'low-high-low' going pulse in this case, rather than the narrow negative 'high-low-high' going one that happens now.
So... I should add a NOT Gate between my B Clock and the 4027 SET pins. Roger that.
1670297901345.png
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
I mount the NOT gate. Really, no visible effect. That I can see.
- Im using for this experiment NEMA17 motor for test.
- If Im turning to a -certain- limit the POT from A CLK, the speed of the motor increases accordingly until it is reaching a very smooth and very stable spinning level with a nominal amperage consume of 150mA read from the PSU. But If I turn the POT more, the motor destabilize itself and start to tremble or stop, instead of spinning. Well, at this point, it is jumping the amperage to 800mA. The same 800mA are present at the Lowest speed possible, 1Hz per step. Im not sure if these extremes were present in my previous experiments or after these recent modifications.
- Then I pay attention to the 10K POT on the input of the opamps. The motor is set all this time on the lowest speed when the PSU shows 800mA. From 0% to about 5% of POT2 turning, the amperage is below 800mA. I can actually see how is ramping down and up. But after that 5% turning, up to 100%, the amperage on the PSU is 800mA and L298 will heat up.
1670302443697.png
- I changed the 10K POT down to 1k, 500R and 100R. I could not enlarge that narrow band from 0% to about 5% where I can clearly set the amperage. But inverse, it got from 0% to 2% or 3% almost no band at all. It was like jumping from 100mA to 800mA. Then I changed the POT value in the other direction: 10k, 25k, 50k, 100k, 250k. Still no increase of the travel. But inverse, it got from 0% to 2% or 3% almost no band at all. It was like jumping from 100mA to 800mA.
- So in a sense, that 10K POT I got extremely lucky to have that band from 0% to about 5% !!! Very strange.
I really wonder how I can vary the amperage in a wider range than it is right now?
Because this is after all the entire meaning of this entire circuit. No?
To actually vary the current through all the driving circuit + motors.
Thank you.
 
Last edited by a moderator:

sarahMCML

Joined May 11, 2019
697
I mount the NOT gate. Really, no visible effect. That I can see.
- Im using for this experiment NEMA17 motor for test.
- If Im turning to a -certain- limit the POT from A CLK, the speed of the motor increases accordingly until it is reaching a very smooth and very stable spinning level with a nominal amperage consume of 150mA read from the PSU. But If I turn the POT more, the motor destabilize itself and start to tremble or stop, instead of spinning. Well, at this point, it is jumping the amperage to 800mA. The same 800mA are present at the Lowest speed possible, 1Hz per step. Im not sure if these extremes were present in my previous experiments or after these recent modifications.
- Then I pay attention to the 10K POT on the input of the opamps. The motor is set all this time on the lowest speed when the PSU shows 800mA. From 0% to about 5% of POT2 turning, the amperage is below 800mA. I can actually see how is ramping down and up. But after that 5% turning, up to 100%, the amperage on the PSU is 800mA and L298 will heat up.
View attachment 282304
- I changed the 10K POT down to 1k, 500R and 100R. I could not enlarge that narrow band from 0% to about 5% where I can clearly set the amperage. But inverse, it got from 0% to 2% or 3% almost no band at all. It was like jumping from 100mA to 800mA. Then I changed the POT value in the other direction: 10k, 25k, 50k, 100k, 250k. Still no increase of the travel. But inverse, it got from 0% to 2% or 3% almost no band at all. It was like jumping from 100mA to 800mA.
- So in a sense, that 10K POT I got extremely lucky to have that band from 0% to about 5% !!! Very strange.
I really wonder how I can vary the amperage in a wider range than it is right now?
Because this is after all the entire meaning of this entire circuit. No?
To actually vary the current through all the driving circuit + motors.
Thank you.
You really don't need such a wide range of control for your 10K pot! As you have found, it will jump massively with your pot arranged as it is now. You need to limit the range of voltage that the wiper can be adjusted over to something like 1V or so!
Just like mine is limited across a 2.5V regulator, but I only use about 0.5V setting above ground for the wiper of the pot.
I've included a diagram for a modification that will give more precise control of motor current setting, and also something about the how the pulse shape of your clock B should look.

I've also included the circuit for a new phase controller which allows you to input step pulses and direction setting. I drive mine with a function generator, but you could use one of your 555 units. It gives the correct signals for both Unipolar and Bipolar steppers just by changing 3 wires.


Details1.jpg


LS194Controller.jpg


SDS2504X Plus_JPG_2.jpg

Unipolar Drive.

SDS2504X Plus_JPG_3.jpg
Bipolar Drive
 

sarahMCML

Joined May 11, 2019
697
I found a few other Phase Generator circuits on the net which might be easier for you to build if you have alternative parts. Let me know if you get that far.

P.S. Your L298N really does need to have some kind of heatsink added, otherwise you are going to run into trouble with 0.8A going through it!
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
What is your cct doing more exactly?
My guess, it is generating the unipolar and bipolar signal for the steppers? If its that case, then this is the logic side of the cct, replacing my 4017. Right?
 

sarahMCML

Joined May 11, 2019
697
What is your cct doing more exactly?
My guess, it is generating the unipolar and bipolar signal for the steppers? If its that case, then this is the logic side of the cct, replacing my 4017. Right?
Yes, the outputs A, A/, B and B/ connect directly to the In1, In2, In3 and In4 on your circuit, in the order stated for the type of motor being used.
Note though that I have only tested it using the bipolar mode in real life, because I don't have a unipolar motor. But it does produce the correct outputs for unipolar drive according to information available.
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
I was scared I dont have your IC's in the cct.
I stay and made a list with everything I have for some of them. Yes, I can make your cct !

Inverter: Sarah have 74LS14
7414-74HC14 x 10 Hex Inverters with Schmitt-Trigger Inputs as your 74LS14 (whats the difference between your LS and my HC ?

Buffer: Sarah have 74LS125
4069-LC4069 x1 CMOS hex inverter buffer (5V-0)
ULN2003 x1 High-Voltage, High-Current Darlington Transistor Arrays (relay,hammer,lamp,display,line drivers & logic buffers) Input=30V@500mA
ULN2004 x3 High-Voltage, High-Current Darlington Transistor Arrays (relay,hammer,lamp,display,line drivers & logic buffers) Input=30V@500mA
5623IRZ =EL5623 Multi-Channel Buffer 16PINS SMD
BF06703 =BUF06703 Multi-Channel LCD Gamma Correction Buffer 16PINS SMD

(Can ULN2003/4 used as a buffer? I think it might...I never ever used one as a buffer, also I never ever used any buffer in my life)

Shift Register: Sarah have 74LS194
4015-CD4015 x1 Dual 4-Bit Static Shift Register
74194-74LS194 x1 4 Bit Bidirectional Universal Shift Register ----bingo, fix as yours
74HCT14094D = 74HC4094 x1 8-stage shift & store bus register 14PINS SMD
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
I do not have 10 turn potentiometer 1670374928405.png
I only have (all scrapped) multiturn trimmers: 1670374914535.png
10 turn potentiometer, for ME, is a very exotic component. This is the first time Im hearing and seeing one. Really. I also checked on ebay and is 3$ per 1pcs. Ohohohoooaaa. Too much, too expensive. But is an interesting component, I give you that.
I'll most probably use a trimmer but they are hard to turn since the screwdriver escape very easy from the very small head screw. Hmm, I'll probably have to make something about it, make it more certain and easy to turn. Ill have to (manual) 3d print something for it. We'll see.
 
Last edited:

Thread Starter

q12x

Joined Sep 25, 2015
2,227
I was contemplating this L6506 internal cct. Is it really a variable current driver?
My question:
- Can't it be simplified ? Much more simplified than it is now?
- Can anyone make a good description of how this cct is actually working? What's it's logic? real purpose?
From what I see and understand: - It's 2 opams are linked to the same current sensing resistors that are used for the L298. This means the L298 actually limits the current, not the L6506. Ok? So the only role of this L6506, is to SET a fixed value for those current sensing resistors. That can be achieved with only 2 resistors. This is how I see it. Please illuminate me why is better with it rather without it. I still dont completely get it.

Screenshot_3.jpg
 
Last edited:

sarahMCML

Joined May 11, 2019
697
I do not have 10 turn potentiometer View attachment 282424
I only have (all scrapped) multiturn trimmers: View attachment 282423
10 turn potentiometer, for ME, is a very exotic component. This is the first time Im hearing and seeing one. Really. I also checked on ebay and is 3$ per 1pcs. Ohohohoooaaa. Too much, too expensive. But is an interesting component, I give you that.
I'll most probably use a trimmer but they are hard to turn since the screwdriver escape very easy from the very small head screw. Hmm, I'll probably have to make something about it, make it more certain and easy to turn. Ill have to (manual) 3d print something for it. We'll see.
I used a 10 turn trimmer pot in my build because it only needs to be adjusted once or twice until you find the right setting for your motor current, so use one, along with the 2 diode circuit.

As for your previous post, the 74HC14 is a CMOS version of the LS14. If you don't have the LS125, we can probably find an alternative circuit.
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
You said you have an alternative cct already. And dont ask me. Just put everything you got here.
That list I made is all I got in my arsenal. Make an effort to believe it.
If you don't have the LS125
I think it will work with any of those buffers IC's I have already. A buffer is not that critical.
Alternatively, I believe darlington transistors are a good equivalent for a buffer gate. I do have a lot of them brand new.
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
I used a 10 turn trimmer pot in my build because it only needs to be adjusted once or twice until you find the right setting for your motor current, so use one, along with the 2 diode circuit.
I do not posses any such component called 10 turn trimmer ! I never heard of it until you tell me. It is a completly new componet for me. Im hearing about it for the first time now. Ok?
I will find other methods.
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
I find the solution.
I used (a scrapped) 22k multiturn trimmer.
I realized I can use any value I want really, since it is only operating at the very limit of the POT.
1670381202801.png
And even with this, it is still too sensitive. But is a bit better than with a 1turn POT I used before.
I have another problem now.
-How do I decide which current value is the best?
If I leave it to 800mA nothing works and the L298 will start to warm up. Sign that is the maximum limit.
The minimum limit is 150mA and the motor will not spin.
The motor starts spinning only from 300mA up.
I have already my opinion but I want to hear your opinion first. Thanks.
 

sarahMCML

Joined May 11, 2019
697
I was contemplating this L6506 internal cct. Is it really a variable current driver?
My question:
- Can't it be simplified ? Much more simplified than it is now?
- Can anyone make a good description of how this cct is actually working? What's it's logic? real purpose?
From what I see and understand: - It's 2 opams are linked to the same current sensing resistors that are used for the L298. This means the L298 actually limits the current, not the L6506. Ok? So the only role of this L6506, is to SET a fixed value for those current sensing resistors. That can be achieved with only 2 resistors. This is how I see it. Please illuminate me why is better with it rather without it. I still dont completely get it.

View attachment 282425
No, it's not a variable current driver, it's a constant current driver, but it works by pulse modulation of current. The circuit is about as simple as it gets. It works as follows (This for unipolar mode!):

Imagine this as the start condition.
1) You're about to get an input high on one of the lines, In1 to In4, as a result of a step pulse.
2) The Chopper 555 has just pulsed both flip flop presets low, which sets both Q's high, putting a high on one input of each of the 4 AND gates.
3) The input high comes in, on for example, In1.
4) Therefore, that AND gate has both inputs high and outputs a high to the motor drive channel it's connected to, switching it on.
5) Current starts to flow through the driver transistor (or mosfet) and through the sense resistor, and a corresponding voltage builds up across it.
6) When the voltage fractionally exceeds the voltage set on the wiper of the trimmer pot, the comparators switch from high to low.
7) This low pulse to the flip flop's Clear inputs sets their Q outputs low again, turning off the AND gate, and thereby shutting off the current to the motor.
8) Then on the next pulse from the Chopper 555, the whole cycle starts again.

The point though is that there are many chopper pulses within the period of one step pulse. The current never gets to go higher than that set by the value: V Comp/R Sense
 

sarahMCML

Joined May 11, 2019
697
I find the solution.
I used (a scrapped) 22k multiturn trimmer.
I realized I can use any value I want really, since it is only operating at the very limit of the POT.
View attachment 282429
And even with this, it is still too sensitive. But is a bit better than with a 1turn POT I used before.
I have another problem now.
-How do I decide which current value is the best?
If I leave it to 800mA nothing works and the L298 will start to warm up. Sign that is the maximum limit.
The minimum limit is 150mA and the motor will not spin.
The motor starts spinning only from 300mA up.
I have already my opinion but I want to hear your opinion first. Thanks.
They are what I call 10 turn trimmers. I saw your pic and thought that you had a selection, sorry! 22K will do fine, and it might be worthwhile putting a 0.1uF capacitor from its wiper to ground to remove any noise that may get in.

Does it not turn at 800mA? I'd expect the L298 to get warm, that's why I said to put a good heatsink on it, but that shouldn't stop it working. As far as I understand, there's no thermal shutdown in the IC.

Anyway, I must sleep now, talk again tomorrow, bye.
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
The point though is that there are many chopper pulses within the period of one step pulse. The current never gets to go higher than that set by the value: V Comp/R Sense
This is the actual explanation I was looking for. But is still too simplistic. I guess... this cct will oscillate (chop) the current output pretty much like a 555 will oscilate a voltage on its pin3 output. Correct?
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
Does it not turn at 800mA?
The motor is not turning/spinning at 800mA. But it does spin at 750mA. That 800mA is overflowing the entire cct.
The POT value if is over 5% of turning, and everything that is beyond this value up to 100%, will remain a constant 800mA. I can see this 800mA on my PSU ampmeter. I think this 800mA is already limited from my PSU. If I was to limit it to 2A, that L298 was in flames long time ago.
So this 800mA is the extreme maximum of the POT, but after 5% of its turn, which happens ultra very quick, from its 0 point.
But If Im careful, I can dial up and down in this very small band of 0 to 5% and get different currents.
I believe I should make a jumper module that will set a fixed percentage of the current being used.
Pretty much like the comercial versions have:
1670383875309.png
And not variable with a potentiometer like we have it right now.
I will have to try your limiter and see what really that is doing. If it is really limiting until reaching the 800mA maximum death point.
 
Top