Notifications
Clear all

controlling stepper motors with shift registers & Arduino

103 Posts
5 Users
20 Likes
12.1 K Views
Dryden
(@dryden)
Member
Joined: 3 years ago
Posts: 77
Topic starter  
Posted by: @robotbuilder

Power is measured in watts. Power(watt) = Current(amp) x Force(volt)

I think I knew that but obviously wasn't thinking. Thank you.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@dryden

You can beef up the power delivered and or amp/hour capacity without changing the voltage by connecting the batteries in parallel.

 


   
Dryden reacted
ReplyQuote
Dryden
(@dryden)
Member
Joined: 3 years ago
Posts: 77
Topic starter  

@robotbuilder 

I should have known that, I've had dual batteries in trucks before. 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@dryden 

Feeling a bit burnt out on this project so I will have to give it a rest.

Found this that uses the same stepper motors and controllers.
https://www.thinker-talk.com/post/how-to-control-multiple-bipolar-stepper-motors-in-parallel-using-an-arduino-nano
It suggests if you need even more pins you can try using a shift register chip (e.g. the 595).
You can find the source code at GitHub here: https://github.com/nenovmy/arduino

Another example
https://www.thinker-talk.com/post/how-to-extend-the-number-of-digital-pins-of-an-arduino-or-nodemcu-using-shift-registers
https://github.com/nenovmy/arduino/tree/master/control_stepper_motors_with_shift_registers

 

 


   
Dryden reacted
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@dryden

Do keep us up to date if you continue developing a robotic arm.  I have just ordered two more stepper motors for another project which will need the stepper motors to move independently but also simultaneously.  Although I will not be using shift registers it should be easy replace any direct pin output solution to a shift output.

 


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@dryden

Have you abandoned this project or just decided to leave it alone for a while ?

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Dryden
(@dryden)
Member
Joined: 3 years ago
Posts: 77
Topic starter  

@robotbuilder 

@will

Thanks I will do! I had a few life matters come up so I had to take a break, things are looking up again so I am back at it, I just ordered a Arduino Mega off amazon, should make life a lot easier, and it was only $20 Cad so I figured why not. Im sure there has to be a way to do this with shift registers, I look at it like its just like lighting up led's in a sequence and being able to call up that sequence and run it in reverse if necessary. I dont have the knowledge in coding to be able to figure it out, so Im just going to use this easier approach with the Mega, It should be here by Saturday, so Ill let you know how it goes. 


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@dryden 

Good, nice to see you back 🙂

Anything seems possible when you don't know what you're talking about.


   
Dryden reacted
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@dryden 

I'm curious about why you gave up on the steppers via shift registers. I thought you had a working sketch that drove two steppers that way, what convinced you that six at a time wouldn't work ?

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Dryden
(@dryden)
Member
Joined: 3 years ago
Posts: 77
Topic starter  

@will 

Trying to figure out how to run 3 shift registers in series. I couldn't figure out how to send the bytes to separate shift registers. The sketch robot builder put together for me worked great for the first shift register, but I couldn't get it to go for the other two unless I wired them in parallels, which defeats the purpose of saving room on the Arduino. I bought the mega and can control the dc motors and the stepper motors with simple Arduino libraries, however I am struggling to write functions and use serial communications from the esp32 cam to call functions. Ill reply over on the project with my test code (that is not working) maybe someone can tell me where I am going wrong


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@dryden 

OK, so it seems that the shift registers were the problem again.

Thanks for satisfying my curiosity 🙂

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@happy-technician)
Member
Joined: 2 years ago
Posts: 1
 

@dryden Have you thought of using GRBL 1.1 on Github. You can also GIT UGS (Universal G-Code Sender) there.  Apply the GRBL to your libraries, wire up your steppers according to the Diagram's and configure your motors through the UGS... There are several YT vid's on it, including breadboarding the stepper drivers with a 12VDC power supply, and creating G-code for robotic arms CNC laser, CNC routers..... 


   
ReplyQuote
(@maxli)
Member
Joined: 3 years ago
Posts: 36
 

@happy-technician

I have encountered a similar problem recently, and I am trying to solve it.

Thanks for your useful advice. I think I'll try it


   
ReplyQuote
Page 7 / 7