adpi
Posts: 8
Joined: Mon Feb 24, 2020 9:14 pm

2 x Stepper Motor control for Rpi

Thu Aug 20, 2020 1:01 pm

Dears,

I need to control 2 stepper motors using Rpi. Both are ~ 1.5A max, plan to use L298, and external motor power.
At this moment there is no need for both steppers to be active at the same time, so M1 for 'X' or M2 for 'Y' .
Can I just switch between 'enable A' or enable 'B' for the X & Y work using a 5v/0v from GPIO? (see L298 board pic attached)
The picture shows 'permanent' bridge between the selection (yellow arrows) I would like to have some confirmation/restrictions/advise please.

Eventually, I need both X & Y working at the same time, and that seems to be a challenge . I see ll kinds or great - older- articles but its still
a bit blur for me. I'm after the best story, or have there been recent developments for single HAT's for multiple steppers?

Many thanks!!
Adpi
Attachments
L298.JPG
L298.JPG (64.49 KiB) Viewed 122 times

pcmanbob
Posts: 9612
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: 2 x Stepper Motor control for Rpi

Thu Aug 20, 2020 1:45 pm

For a start a L298N can only drive one stepper motor and if its the correct type , that being the 4-lead bipolar.

So to drive 2 such stepper motors you will need two L298N motor driver boards.

example.

https://www.youtube.com/watch?v=-qupzr_XL_U
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

adpi
Posts: 8
Joined: Mon Feb 24, 2020 9:14 pm

Re: 2 x Stepper Motor control for Rpi

Fri Aug 21, 2020 2:36 am

Thank you pcmanbob!

The video was good help, starting with the diagram of the setup: indeed only 1 stepper motor!
So, I need 2 x L298N motor driver boards for sure.

To run 2 motors from 1 GPIO, just find 4 more free GPIO's for the 2nd one, or maybe add some external logic (i.e. 5v TTL ports) to switch the 4 GPIO wires? There is no need to run them both at the same time anyway.

Cheers,
Adpi

Return to “Interfacing (DSI, CSI, I2C, etc.)”