DC Stepper Motor IO pins from Raspberry PI 3

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Mdplastic
 
Posts: 3
Joined: Fri Apr 13, 2018 1:18 pm

DC Stepper Motor IO pins from Raspberry PI 3

Post by Mdplastic »

We want to run a 24V DC 2.8A Stepper motor using a Oriental Driver CVD245BR-K using the PI. Has anyone been successful running a higher voltage motor and a dedicated driver? Also, what IO's on the PI are used to communicate the PWM code to the driver?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: DC Stepper Motor IO pins from Raspberry PI 3

Post by adafruit_support_mike »

I'm afraid we don't know anything about that driver. Your best bet will be to contact the manufacturer and see if they have any suggestions about running it from a 3.3V control source.

The RasPi doesn't do PWM very well because of the way Linux handles multitasking. You get better results handing the PWM generation off to a separate device like a PCA9685:

https://www.adafruit.com/product/2327

User avatar
tech_tach_toe
 
Posts: 1
Joined: Tue May 29, 2018 5:06 am

Re: DC Stepper Motor IO pins from Raspberry PI 3

Post by tech_tach_toe »

Hello.

I have the same Problem wanting to control a CVD245BR-K by Raspberry Pi.
The manual says that only a pulse (NOT PWM) with 5V is needed to control the Driver.
So if my Stepper Motor has 200 steps for 1 complete rotation and I want to have 500 rpm i would need to produce a singal with 1.667 pulses / second.

Does anybody have an idea how to generate such a signal dirctly via Raspberry PI?

Andy suggestions?

I already found the Pulse Train HAT pthat.com but unfortunately it is not available at the moment.

Best regards


tech_tach_toe

User avatar
adafruit_support_bill
 
Posts: 88138
Joined: Sat Feb 07, 2009 10:11 am

Re: DC Stepper Motor IO pins from Raspberry PI 3

Post by adafruit_support_bill »

So if my Stepper Motor has 200 steps for 1 complete rotation and I want to have 500 rpm i would need to produce a singal with 1.667 pulses / second.
A few decimal places off there: 500 RPM with a 200 step motor is 500 * 200 / 60 = 1666.67 pulses / second

A couple issues : The Pi is a 3.3v processor, so the GPIO signal level is also 3.3v. However there are level shifters that can be used to increase the signal voltage. https://www.adafruit.com/product/1875

The other issue is the nature of Linux multitasking as Mike mentioned above. Without getting into kernel-level coding, it is not possible to guarantee sub-millisecond level pulse timing precision as is needed here.

There are a couple of options: One is to use something like a PCA9685 to generate your pulses. This would be OK for continuous rotation, but you would not have control over the exact step count.

A better option would be to offload the pulse generation to a microcontroller better suited to time-critical tasks. The Itsy Bitsy 5v would be a good choice: https://www.adafruit.com/product/3677

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”