element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
BeagleBoard
  • Products
  • Dev Tools
  • Single-Board Computers
  • BeagleBoard
  • More
  • Cancel
BeagleBoard
Blog BeagleBone Control Stepper Motors with PRU - Part 3: Hardware Provisioning and Wiring
  • Blog
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
BeagleBoard requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
Author: Jan Cumps
Date Created: 28 Jul 2019 7:15 PM
Views: 211
Likes: 6
Comments: 1
  • stepper_motor
  • drv8711
  • BeagleBone
Related
Recommended

BeagleBone Control Stepper Motors with PRU - Part 3: Hardware Provisioning and Wiring

Jan Cumps
Jan Cumps
28 Jul 2019

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 DRV8711 stepper motor controllerDRV8711 stepper motor controller 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 DRV8711beaglebone

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 MUXBB P9Patch wireDriver functionDriver pinLA
GPIO_3011orangenSleepJ1.65
GPIO_3113whiteResetJ1.84
StallJ2.2
FaultJ2.3

SPI_CS

17whiteSCSJ2.100
SPI_D1 (MOSI)18blueSDIJ2.62
SPI_DO(MISO)21greenSDOJ2.73
SPI_SCLK22orangeSCLKJ1.71
PRU_GPO031blueDIR/AIN2J1.106
PRU_GPO129greenSTEP/AIN1J1.97
VDD_3V31red3.3VJ1.1
DGND45blackGNDJ2.1

 

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 ...

 

 

Related blog:
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
Anonymous

Top Comments

  • balearicdynamics
    balearicdynamics over 2 years ago +2

    I am very interested in the real-time applications with the BB

  • balearicdynamics
    balearicdynamics over 2 years ago

    I am very interested in the real-time applications with the BB

    • Cancel
    • Up +2 Down
    • Reply
    • More
    • Cancel
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube