Your projects are a very good example on the versatility of PWM devices for signal generation and motor control.
I had not given it a lot of thought before, but your series has made me more aware of just how useful they can be.
Another great project.
Stepper Motor Advantages
1.The rotation angle of the motor is proportional to the input pulse.
2.The motor has full torque at standstill (if the windings are energized).
3.Precise positioning and repeatability of movement since good stepper motors have an accuracy of 3 to 5% of a step and this error is non-cumulative from one step to the next.
4.Excellent response to starting/stopping/reversing.
5.Very reliable since there are no contact brushes in the motor. Therefore the life of the step motor is simply dependant on the life of the bearing.
6.The stepper motors response to digital input pulses provides open-loop control, making the motor simpler and less costly to control.
7.It is possible to achieve very low speed synchronous rotation with a load that is directly coupled to the shaft.
8.A wide range of rotational speeds can be realized as the speed is proportional to the frequency of the input pulses.
I dont know if you have planned some examples of filter design with psoc 4. It will be interesting.
I'm going through Project #045 Stepper Motor Controller and am correlating project code, PSoC 4 schematic, and ArduinoMotorShield Schematic and I noticed that Dir_Out_A doesn't go to the correct pin in the project.
The project states PSoC 4 chip pin P3 which goes to J3.3, but on the Arduino, this is not connected to anything. The pin for DirA on the Adruino should try to PSoC 4 chip pin P3 going to J3.5.
Also, Dir_Input on J2.16 physically doesn't connect to anything.
The code I'm using is from the "First 50 Projects" zip and not from this blog page. I'm not sure if they are different.
Does any of this sound right?
Having a quick look at the "Project Images.zip", at the bottom of the first post, - the "Pin Selection.png" picture shows that DIR_OUT_A does go to P3.
I would suggest you look at the files in this posting, and see if they tie up with your hardware. Looks like the other setup from the "First 50 Projects" has the wrong revision of "code".
Hope you find the correct source for your project.
Good call, the project zip photos didn't match the corrects pins. I updated just that one and the thing runs way smoother, but still not like what is shown. I'm guessing that there is some other stuff that is different as well.
I would say, "First 50 Projects" definitely does not have the same code. Next would be to load from this posting and give it another go.
I am trying to get this project into my PSOC4 ...
Not sure what I am doing wrong . I loaded folder into creator examples area but get an error .
"arm-none-eabi-gcc.exe: error: ..\..\..\..\psoc\content\cycomponentlibrary\CyComponentLibrary.cylib\CortexM0\ARM_GCC_473\Debug\CyComponentLibrary.a: No such file or directory
The command 'arm-none-eabi-gcc.exe' failed with exit code '1'. "
Somecomponent library missing ? ...
PS. The project #45 is the stepper motor PSOC 4 .
This Arduino stepper motor board doesn't look to be available anymore. Is anyone aware of a replacement board that would still be compatible with this project?
Shaka, what Arduino stepper motor board do you refer to ?
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 of any
2 of 2 people found this helpful
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 been presented in this article: Dual stepper intelligent motor controller - part #1 Hardware As you can see, the provided microcontroller board is a PSoC 4 but exactly the same circuit and schematics (and obviously the same PCB) can be used on Arduino. This circuit IMHO has the interesting feature that instead of using four PWM signals to control the motor, it is sufficient just two signals. The fact that with the stepper motors the opposite direction of the PWM signals on the phases invert the step direction, this is automatically enabled by a PN2222 transistor so are sufficient two PWM pins to control the stepper motor.
The PCB design will be ready in few days but as you can see in the article it has been designed to host a PSoC4 microcontroller. The circuit without the PSoC soldered on board can be anyway used with Arduino or a reasonable number of other microcotrollers. As I have these first set of PCB ready and assembled I will make another one based on the Arduino Shield form-factor, just to simplify the installation of the controller over the Arduino uno boards, but to be honest this is not my highest priority.
As mentioned above there is also another project that will be available very soon where a single L293D half bridge can be used (in the same configuration of the board above) to control two DC motors instead of a single stepper. So the board will be used to control two stepper motors or four DC motors just modifying the software.
I was able to order one of the current motor shield boards from present stock.
Enrico, thank you for the additional options. I'll check them out as well.
this is more usefull project thanks really it helps me alot . i have one quesition could you please tell me the psoc 4 code of solar panel i am designing psoc solar tracker by using stepper motor .
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:
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
Hello, how about this one:
SainSmart L293D Motor Drive Shield
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.
However, maybe this one
Adafruit Motor/Stepper/Servo Shield for Arduino v2.3 Kit
1 of 1 people found this helpful
Here is the link to the page that says the Arduino Shield is no longer available:
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.
Hi, i just started experimenting with the psoc5, i have a few question regarding the motor code example:
1- is the code writen in the example for psoc 4 will work on psoc 5.
2- if so, i am using a different driver (tb6612) but i think it shouldnt matter, can you please explain the connections between the psoc and the driver. i dont fully understand the outputes from the psoc to the driver.
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.
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
The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:
- Control Register
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.
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:
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.
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.
Test Your Project:
Program your project and power up the Motor Shield using an external power supply.
I hope this example can help you in your design.