element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
  • Settings
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum PSoC 4 Pioneer Kit Community Project#045 – Stepper Motor Example
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 22 replies
  • Subscribers 33 subscribers
  • Views 6588 views
  • Users 0 members are here
  • 100projects
Related

PSoC 4 Pioneer Kit Community Project#045 – Stepper Motor Example

cy.wbz
cy.wbz over 12 years ago

Hello!

 

In today’s example we will be showcasing a very simple stepper motor example project. In this example we show you how to spin a stepper motor using the PSoC 4 Pioneer kit and the Arduino Motor Shield.

 

image

 

Forum Post Attachments:

 

At the bottom of this post we are including the following items:

  • Example Project Zip File
  • Zip File of Images
    • Project Schematic
    • Component Configurations

 

Components Used:

 

The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:

  • PWM
  • Control Register
  • CyClock
  • CyPin

 

The components are configured by right clicking on the component in your Top Design schematic view and selecting Configure. Please enable the following selections in the Configuration windows for the listed components above.

 

Firmware Description:

 

The main.c firmware is included in the example project. Please review the commented sections for more details.

 

In this example we are giving users an example on how to control a Stepper Motor. In this example we have included a number of motor control source files that will provide you simple APIs to control the motor. These files are:

  • genSine.c/h
  • inputScan.c/h
  • Move.c/h
  • PhaseControl.c/h
  • systemInit.c/h

 

The firmware is designed to drive the stepper motor is various directions and different speeds and different lengths of time. There are a number of if/else statements that progress through the demonstration. Please take a few moments to review the included source files to get a feel for the firmware controls for the motor.

 

Hardware Connections:

 

Connect the Arduino Motor Shield to the PSoC 4 Pioneer Board. Then connect wires from the stepper motor to the Arduino Motor Shield and power the motor.

 

image

 

Test Your Project:

 

Program your project and power up the Motor Shield using an external power supply.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

I hope this example can help you in your design.

 

Best,

Matt

Attachments:
6175.Project Images.zip
StepMotor_PSoC4200_demo.cyprj.Archive01.zip
  • Sign in to reply
  • Cancel

Top Replies

  • Former Member
    Former Member over 9 years ago in reply to balearicdynamics +1
    Enrico, I'm referring to the one linked in the project above: A000079 - ARDUINO - ADD-ON CARD, MOTOR SHIELD R3, L298P | Newark element14 I'd be happy to use another one that is compatible, if you know…
  • balearicdynamics
    balearicdynamics over 9 years ago in reply to Former Member +1
    Hello Shaka, I am providing this At the actual date I have already developed a couple of prototypes: The first project is in the state of waiting for the PCB ready and the principle and schematics has…
  • lindulajj
    lindulajj over 8 years ago +1
    Hello, the link to the Adriuno Motor shield shows that it is No Longer Manufactured. Can anyone recommend a motor shield that is compatible with the PSoc4? How about this one from Pololu: https://www.pololu…
Parents
  • lindulajj
    lindulajj over 8 years ago

    Hello, the link to the Adriuno Motor shield shows that it is No Longer Manufactured. Can anyone recommend a motor shield that is compatible with the PSoc4? How about this one from Pololu:

     

    https://www.pololu.com/product/2503

     

    Thanks,

    Joe

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • lindulajj
    lindulajj over 8 years ago

    Hello, the link to the Adriuno Motor shield shows that it is No Longer Manufactured. Can anyone recommend a motor shield that is compatible with the PSoc4? How about this one from Pololu:

     

    https://www.pololu.com/product/2503

     

    Thanks,

    Joe

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Children
  • balearicdynamics
    balearicdynamics over 8 years ago in reply to lindulajj

    Hello,

     

    if you need to control a stepper motor there are many options you can decide and I think that this you mention is ok. As a matter of fact you can connect the PSoC 4 with right pins to any motor control board. No matter what, just check that the signals are compatible. I wrote something about this in past. Here are the posts:

     

    Dual stepper intelligent motor controller - part #1 Hardware  I have some PCB already prepared at home. I had not yet had time to put them on the market.

    PiIoT - The perfect reading place #15 [tech]: Stepper motors and controller testing (5$ Gearbest Stepper controller)

    Infineon DC Motor Shield w/ TLE94112EL for Arduino - Review This is another good motor controller (better for dc motors) that will work for sure with the PSoC4 via the SPI protocol

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • lindulajj
    lindulajj over 8 years ago in reply to balearicdynamics

    Enrico,

     

    Hello, how about this one:

     

    SainSmart L293D Motor Drive Shield

     

    Thanks,

    Joe

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 8 years ago in reply to lindulajj

    Hello Joe, please can you post the link? In theory it works. But better to see what it is exactly

    Anyway my circuit if I am not wrong is just based on this.

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • lindulajj
    lindulajj over 8 years ago in reply to lindulajj

    However, maybe this one

    Adafruit Motor/Stepper/Servo Shield for Arduino v2.3 Kit

     

    is better.

     

    Thanks,

    Joe

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • lindulajj
    lindulajj over 8 years ago in reply to balearicdynamics

    Here is the link to the page that says the Arduino Shield is no longer available:

     

    Arduino Motor Shield

    A000079 - ARDUINO - ADD-ON CARD, MOTOR SHIELD R3, | Newark element14

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 8 years ago in reply to lindulajj

    I was not updated on this change. I started from the Arduino Shield to make the PSoC Stepper motor controller with some improvements. This board (maybe I put the link somewhere above) included also the high power section. Then keeping the same design I made a simplified version of the same without the half bridges. I am studying to put them on the market (Tindie, Amazon) but obviously are open source. Maybe the worth I publish an updated post.

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

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 © 2025 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

  • X
  • Facebook
  • linkedin
  • YouTube