I'm trying here is to let the real-time units of the BeagleBone generate the signals for a stepper motor.
In this post: assign BB peripherals and wire up the stepper motor driver.
The has a number of pins that need to be entertained by the BB.
(for the wiring of motor and power supply, please check this post).
The controller requires a SPI connection, in order to set it in the desired operation mode. These SPI pins are connect to BB SPI0.
Two signals are required to control steps, speed and direction. These are coming from the BB PRU.
Two more pins are required to reset the controller and put it to sleep.
I haven't implemented the feedback pins that the driver uses to indicate it's in an error state.
|stepper motor driver DRV8711||beaglebone|
image source: element14
image source: edited from Embedded Basics: BeagleBone Black: Enabling SPI0
All of the pins that control the stepper motor are wired up.
I haven't connected the Stall and Fault error signals. Maybe later ...
|BB MUX||BB P9||Patch wire||Driver function||Driver pin||LA|
All but the GPIO and power pins have to be multiplexed in some way. I've written specific posts on muxing PRU and SPI pins.
This is also a good time to switch from oscilloscope to logic analyser.
By now I know that the signals can be generated (easy to check on the oscilloscope) and I can focus on order of signals, data sent and protocols (easier on a logic analyser).
The top four channels show the SPI communication. The lower four are the GPIO and PRU signals going to the stepper motor driver.
With this setup, I'm ready to start developing a working example that actually rotates the stepper motor. It's about time ...
|BeagleBone Control Stepper Motors with PRU - Part 1: Intentions|
|BeagleBone Control Stepper Motors with PRU - Part 2: Test Driving Outputs|
|BeagleBone: Enable SPI with Overlay and from Command Line|
|BeagleBone Control Stepper Motors with PRU - Part 3: Hardware Provisioning and Wiring|
|BeagleBone Control Stepper Motors with PRU - Part 4: SPI Setup|
|BeagleBone Control Stepper Motors with PRU - Part 5: It Works|