Author Topic: Power supply for Nema 23 Stepper ?  (Read 3582 times)

Online mc

  • Jr. Member
  • **
  • Posts: 70
Re: Power supply for Nema 23 Stepper ?
« Reply #25 on: November 30, 2018, 03:41:04 PM »
Back to basics. Think of each control input to the driver as a little light bulb (they are actually an LED, just a fully enclosed one), that need both a positive and negative to light up.
The ENA, is your Enable. You need to apply power to this so the driver starts outputting power to the motor. The basic test for this, is with the main power connected to the driver, and the ENA powered, the motor should lock and remain stationary.
The DIR, is Direction. As the name says, it controls what direction your motor turns. Unpowered, the motor goes one direction, powered the motor should go the opposite direction.
The PUL, is Pulse, or more commonly referred to as Step. Each time this input gets switched on, the driver moves the motor one micro step (this depends on how the jumpers on the driver are set. On the driver you have, this could be 1 full motor step (1.8deg) down to 1/32 step (theoretically 0.5625deg or 3.375seconds).

To have your motor continually locked, you need to power the Enable. How you achieve this will depend on how you can get a continuous 5V. If you power up the control board you have without switching it on, is there 5V available at any of the terminals?
Looking at the photo, it's using a bog standard 5V regulator, so you should be able to use the input ground wire as the 0V, then probe the rest of the unknown terminals to see if any have continuous 5V. If there is no 5V, check again with the board switched on. It won't help you, but it'll at least establish what the unmarked terminals do.

I would hazard a guess, the two terminals marked in chinese are a 0V and a 5V connection.

If the board only outputs 5V when switched on, then I'll suggest other options.


And for those mentioning switching positives/negatives (other than the obvious diagram error of the main supply wires from the PSU to the driver being wrong - if you had done this, the driver would be a paperweight as soon as you powered it up) , and it making a difference, for the purpose of what you're trying to achieve here, it'll make no difference. Pulse timing and switching polarity does make a difference in CNC, however here you simply want to get the motor to lock/spin, so step/dir timing/polarity can be ignored.

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #26 on: November 30, 2018, 04:36:24 PM »
Ok so just to clarify the diagram above for the controller is THE WRONG ONE ! it was just something I started with.

The unit im using is the One in this picture...

It has the following connections None of which I have any idea what they do or how they work !

EN>>>>DIR>>>>>CLK>>>>Chinese writing>>>>>>>>Chinese Writing.

I have wired as Follows  and it works perfectly !!! Only issue is that I would like IT to LOCK WHEN NOT BEING USED.

EN>ENA-

DIR>DIR-

CLK>PUL-

Last Chinese writing>DIR+5V Which has a link to pul+5V and a link to ENA+5v

excuse my lack of knowledge in this Im surprised it hasn't gone up in smoke yet ! I know nothing about this wiring i just wanted the motor to turn and lock in two directions with a decent amount of torque. As i say if you see the video it works just doesn't lock up when not used or off. Which will be helpful as i intend to use on a mill. Many thanks the item is of aliexpress and ebay.

This is what the mnf says.... thanks for all the help maybe this isn't possible ?

5613
Stepper Motor Driver Controller PWM Pulse Signal Generator Speed Control 12V-24V

Description :
1 this module is a pulse generation module, supply the control signal to stepper driver.
To control the stepper motor, it must be equipped with a drive.
2 this simple controller + stepper motor + stepper motor + DC power supply can be composed of a simple set of control platform.
3 the controller has high 5.4k-160khz, middle 540-16.6khz, low 80-2.4khz total of 3 kinds of low frequency signal can be used to select the jumper.
4 can produce pulse signal, can also produce PWM signal, can choose the jumper.
5 the frequency of measurement: PUL and common cathode end.

Different stepper driver may mark different name

EN=ENA=FREE       Enable
PUL=PULS=CLK     Pulse
DIR=CW=CWW      Direction

 
Common anode Connection method (B)

EN+  PUL+   DIR+ connect together to com+。
EN- connect  EN
PUL- connect  CLK
DIR- connect  DIR

Common cathode Connection method (B)
EN-  PUL-   DIR- connect together to com-。
EN+  connect   EN
PUL+ connect   CLK
DIR+ connect   DIR
If you don't succeed ...try try try again...you can't fail trying.

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #27 on: November 30, 2018, 04:47:59 PM »
Back to basics. Think of each control input to the driver as a little light bulb (they are actually an LED, just a fully enclosed one), that need both a positive and negative to light up.
The ENA, is your Enable. You need to apply power to this so the driver starts outputting power to the motor. The basic test for this, is with the main power connected to the driver, and the ENA powered, the motor should lock and remain stationary.
The DIR, is Direction. As the name says, it controls what direction your motor turns. Unpowered, the motor goes one direction, powered the motor should go the opposite direction.
The PUL, is Pulse, or more commonly referred to as Step. Each time this input gets switched on, the driver moves the motor one micro step (this depends on how the jumpers on the driver are set. On the driver you have, this could be 1 full motor step (1.8deg) down to 1/32 step (theoretically 0.5625deg or 3.375seconds).

To have your motor continually locked, you need to power the Enable. How you achieve this will depend on how you can get a continuous 5V. If you power up the control board you have without switching it on, is there 5V available at any of the terminals?
Looking at the photo, it's using a bog standard 5V regulator, so you should be able to use the input ground wire as the 0V, then probe the rest of the unknown terminals to see if any have continuous 5V. If there is no 5V, check again with the board switched on. It won't help you, but it'll at least establish what the unmarked terminals do.

I would hazard a guess, the two terminals marked in chinese are a 0V and a 5V connection.

If the board only outputs 5V when switched on, then I'll suggest other options.


And for those mentioning switching positives/negatives (other than the obvious diagram error of the main supply wires from the PSU to the driver being wrong - if you had done this, the driver would be a paperweight as soon as you powered it up) , and it making a difference, for the purpose of what you're trying to achieve here, it'll make no difference. Pulse timing and switching polarity does make a difference in CNC, however here you simply want to get the motor to lock/spin, so step/dir timing/polarity can be ignored.


This is a good start thank you ..Ok so with the controller off...but power and it lite up the last output has a permanent 5v its the one im using that goes to ..DIR+5v that links to  ENA + 5V and also goes to Pul+..
Now what ?
If you don't succeed ...try try try again...you can't fail trying.

Online mc

  • Jr. Member
  • **
  • Posts: 70
Re: Power supply for Nema 23 Stepper ?
« Reply #28 on: November 30, 2018, 05:00:25 PM »

This is a good start thank you ..Ok so with the controller off...but power and it lite up the last output has a permanent 5v its the one im using that goes to ..DIR+5v that links to  ENA + 5V and also goes to Pul+..
Now what ?

I've just realised the controller has a ENA output, which you are using, but don't want to be as it'll be getting controlled by the on/off switch.
In which case, moving the wire you have connected to the ENA output over to a 0V terminal (I'd guess the other mystery Chinese terminal will be 0V, but best check first), should mean the driver is enabled and the motor locked with everything powered up, but the controller switched off.

Switching on the controller should then allow you to control the motor, then switching off lock the motor again.

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #29 on: November 30, 2018, 05:13:22 PM »
Checked 0 volts on the terminal next to it so just shift the wire to that terminal and leave the other end at the driver thats has connections on ENA+ DIR+ AND PUL +?
If you don't succeed ...try try try again...you can't fail trying.

Online mc

  • Jr. Member
  • **
  • Posts: 70
Re: Power supply for Nema 23 Stepper ?
« Reply #30 on: November 30, 2018, 05:15:30 PM »
Checked 0 volts on the terminal next to it so just shift the wire to that terminal and leave the other end at the driver thats has connections on ENA+ DIR+ AND PUL +?

Yes. That way the ENA on the driver should have a permanent connection to 0V and 5V.

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #31 on: November 30, 2018, 05:25:30 PM »
Nothing Now !
If you don't succeed ...try try try again...you can't fail trying.

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #32 on: November 30, 2018, 05:27:17 PM »
locks up with power ON and Off but no movement
If you don't succeed ...try try try again...you can't fail trying.

Online mc

  • Jr. Member
  • **
  • Posts: 70
Re: Power supply for Nema 23 Stepper ?
« Reply #33 on: November 30, 2018, 05:32:49 PM »
Just need to clarify this.

Did you move the wire that was connected to the ENA terminal on the controller, or a different wire?

Your + terminals on the driver, should still be connected to the outer Chinese writing terminal (this being your common 5V supply).
You then want to connect the ENA- wire from the driver to the inner Chinese writing terminal (which should be your common 0V/Gnd connection)

I suspect we've got out wires crossed, and you've moved the + terminals to 0V and is why you're now getting nothing.

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #34 on: November 30, 2018, 05:36:33 PM »
Your prob correct ! The ENA- at the moment goes to another terminal in the controller marked EN....IM guessing I dont need this one !
If you don't succeed ...try try try again...you can't fail trying.

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #35 on: November 30, 2018, 05:48:11 PM »
No doesn't want to Work for me
If you don't succeed ...try try try again...you can't fail trying.

Online mc

  • Jr. Member
  • **
  • Posts: 70
Re: Power supply for Nema 23 Stepper ?
« Reply #36 on: November 30, 2018, 06:06:42 PM »
Your prob correct ! The ENA- at the moment goes to another terminal in the controller marked EN....IM guessing I dont need this one !

That is the wire you need to connect to 0V.

With power connected (and the controller still switched off), measuring across the ENA + and - terminals on the driver, you should get 5V.

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #37 on: November 30, 2018, 06:28:34 PM »
On the driver if i Measure ENA _ AND ENA+ i get 3.45v  IF I measure ground on the driver and the ENA + i get 5 volts.

This is what i have and this is what I tried
If you don't succeed ...try try try again...you can't fail trying.

Online mc

  • Jr. Member
  • **
  • Posts: 70
Re: Power supply for Nema 23 Stepper ?
« Reply #38 on: November 30, 2018, 06:35:27 PM »
That must not be a 0V terminal on the controller then, and it must be floating up under load for some reason. The driver inputs must need nearer to 5v to activate properly.

Try wiring the ENA- terminal directly to the Gnd/0V at the power supply (you could try bridging it across to the main supply Gnd at the driver, but that could potentially cause problems, and I wouldn't recommend it other than for a quick test).

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #39 on: November 30, 2018, 06:48:57 PM »
Thought It was too good to be true... Simple controller power supply etc...Looks like I will need a bigger pair of vice grips now !
If you don't succeed ...try try try again...you can't fail trying.

Offline John Swift

  • Sr. Member
  • ****
  • Posts: 344
  • Country: england
Re: Power supply for Nema 23 Stepper ?
« Reply #40 on: November 30, 2018, 07:31:32 PM »

most stepper drivers enable input is a negative logic input

  no input = drive enabled so the drive workes with no connection to the enable or
both the - enable & + enable terminals at the same potential so no current passes through the opto-isolators LED

connecting a 5V supply across the - enable & + enable terminals will disable the drive !!!

in contrast the step input is a positive logic input and the motor will step on the positive going transition
of the step input

with many Chinese TB6560 or TB6064 stepper driver boards have a simple current reduction circuit that is intended to reduce the motor current when the drive is idle
at best the circuit only works correctly  if the step pulse is positive going
(active high with the negative pulse input connected to input common GND
due to a design error on some TB6560 boards the current reduction only works with some of the micro step settings)

 
    John

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #41 on: December 01, 2018, 05:39:18 AM »
Buell

can you post a link to the instructions for the pulse / direction board ?

I expect the two terminals labled in Chinese are +5V out from the regulator IC
 and the common 0v to the pulse , direction & enable outputs


for your initial test just connect the stepper driver  -pulse to the negative supply terminal
and + pulse to the pulse board pulse output


PS
 do you have a multimeter ?

with the meter set to ohms
you should be able to test for continuity between the negative supply terminal and the two terminals labeled in Chinese
to find out which is the 0V and which is the +5V out

So I have taken It all apart and decided to start again just for my own sanity ! it looked messy and didn't feel I had given this a Fair chance . so results this morning,,,

with the Power from the power supply Now being Turned on and just the supply to the driver and the controller i have the Following as You stated..

24v to the controller....the EN on the controller with nothing attached in The OFF POSITION IS 5v however when the controller button is switched ON is 0v

DIR ON THE controller is 0v both on and off

CLK IS 2.2v on or off

Chinese writing is 0V on or off

and the Last terminal chinese writing is constant 5v on or off

so with just those connections when the power switch is on/off the motor is locked

Have I missed something ? will go back to your drawing and see if i can get this to work ! Wont give up yet....or am i flogging this horse !

If you don't succeed ...try try try again...you can't fail trying.

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #42 on: December 01, 2018, 08:45:11 AM »
In my heath robinson way I cut a simple toggle switch in on the wire marked ENA +5v on the driver to the other terminal DIR+5v... outcome is that it locks the motor which is great. However when the On/Off switch is activated ON the motor doesn't run in either direction and the lock is OFF Thus rendering the controller switch useless.  However  the toggle switch activates the lock in the Off position and activates the Motor in the other ! Is this where the saying " Forward one step back 2 steps comes from "  I feel Im close but as they say " A miss is as good as a mile "

Still I haven't blown it up yet !
If you don't succeed ...try try try again...you can't fail trying.

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #43 on: December 01, 2018, 09:41:29 AM »
This is as Good as it gets ...The controller has a CLK that was going to PUL- I put an Inline Switch there and It WORKS... When I did it before I assumed it was wrong because the light on the Board was Off and thought It was back to front..Theres a Chap who goes by the way Of NSA on youtube he kindly answered the question and Advised and Seems ok. Think i will put a different type of switch now i know it works . Thanks to all that helped finally got there.
If you don't succeed ...try try try again...you can't fail trying.

Offline John Swift

  • Sr. Member
  • ****
  • Posts: 344
  • Country: england
Re: Power supply for Nema 23 Stepper ?
« Reply #44 on: December 01, 2018, 11:10:58 AM »
without reverse engineering the pulse generator board I expect the DIR & EN terminals
are connected to on/off switches that either leave the terminals open circuit or connect them to
the negative supply

assuming the step terminal goes to the output pin of a NE555 IC
the pulse output is switching between 0V & +5V

If I am correct
this should work



Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #45 on: December 01, 2018, 12:39:05 PM »
This is what I have ended up with and it works Hope the loop over cables is evident !! Did my best!

If you don't succeed ...try try try again...you can't fail trying.

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #46 on: December 01, 2018, 12:42:55 PM »
With regards to cable sizes when I wire this for good can i just use standard .75 cable ? nema 23 motors.
If you don't succeed ...try try try again...you can't fail trying.

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6991
  • Country: gb
  • East Sussex, UK
Re: Power supply for Nema 23 Stepper ?
« Reply #47 on: December 01, 2018, 02:02:17 PM »
0.75 CSA copper cable is supposedly good for 14 amps
Andrew Mawson
East Sussex

Offline John Swift

  • Sr. Member
  • ****
  • Posts: 344
  • Country: england
Re: Power supply for Nema 23 Stepper ?
« Reply #48 on: December 03, 2018, 01:05:42 PM »
Hi  Buell

on the pulse generator board
I have now found out that the clock , direction & enable outputs have a 100ohm resistance in series

the enable and direction switches do switch between 0V & +5V

a NE555 IC is connected in its astable mode to run as an oscillator
the output pin 3 is conncted to the CLK terminal via a 100 ohm resistor

I have added the details to your diagram

the effect of these 100 ohm resistors is , depending on the current limiting resistors inside of the stepper driver

the pulse generator output will switch between +0.75V and + 4.25V or +1V and +4V
not the 0V to +5V I initially expected in an earlier post

inside various stepper drivers
the manuals indicate the input  opto-isolators have a resistor between 200 & 300 ohms to limit the LED current to a safe value with a 5V input

        John

diagram re saved after correcting typo
« Last Edit: December 03, 2018, 02:57:19 PM by John Swift »

Offline Buell

  • Jr. Member
  • **
  • Posts: 77
  • Country: gb
Re: Power supply for Nema 23 Stepper ?
« Reply #49 on: December 04, 2018, 04:32:28 PM »
Hi  Buell

on the pulse generator board
I have now found out that the clock , direction & enable outputs have a 100ohm resistance in series

the enable and direction switches do switch between 0V & +5V

a NE555 IC is connected in its astable mode to run as an oscillator
the output pin 3 is conncted to the CLK terminal via a 100 ohm resistor





I have added the details to your diagram

the effect of these 100 ohm resistors is , depending on the current limiting resistors inside of the stepper driver

the pulse generator output will switch between +0.75V and + 4.25V or +1V and +4V
not the 0V to +5V I initially expected in an earlier post

inside various stepper drivers
the manuals indicate the input  opto-isolators have a resistor between 200 & 300 ohms to limit the LED current to a safe value with a 5V input

        John

diagram re saved after correcting typo

THANKS VERY MUCH FOR THIS ....BUT WHAT DOES IT MEAN TO SOMEONE THAT DOESNT SPEAK A WORD OF ELECTRONICENGLISH !

or just layman terms. You will have to forgive me...looking at that reminded me of so many lessons at school where I couldn't understand what the hell the teacher was talking about ! But i do appreciate the effort you made to find out the details so thank you again.
If you don't succeed ...try try try again...you can't fail trying.