Hi
I purchased vma03 motor shield gor use with arduino, plus a couple of stepper motors.
Where can i see some tutorial with examples about using the vma03 with arduino one with steppers ?
There’s no info about how to connect stepper motors to vma03 motor shield !
How to connect this kind of motors ?
I have the manual but it simply show a simple basic connection diagram.
It does not tell me how to connect a unipolar or bipolar stepper.
it only shows 1 & 2 for A & B bipolar stepper motor and nothing more
Can you explain a litle bit how to connect that motors or where to find info about how to.
I want to know which cable i need to connect where ? i dont know whats the cable number 1 & 2 for A & B ??
1&2 of A go to 1&2 of SK5
1&2 of B go to 4&3 of SK6
But from the motor, How to know what is the cable 1 & 2 and 3 & 4 ???
I cannot just take one and put, yes ? i need to know whats the cable you write #1 and so on, HOW ?
You will need to get the data sheet for the motor and find out which wires go to which windings.
Here is the datasheet, can you tell me what is what cable ?
http://home.roboticlab.eu/_media/kit/datasheets/actuators/stepper_motorst35.pdf
Hi Goodyes (and others)
I recently did a school project, where I had to use a VMA03 for a stepper-motor. I too found it a bit difficult to get of a good start, but we managed to get it working at the end. So since I found this post, when I searched for a solution, I thought I would share my founds and creations.
First off, the pairing of your stepper is really easy (which wire belong to which). If you have a LED, try holding two of the wires (if it’s a bipolar stepper) on the LED’s leads. While the wires are connected, try twisting your stepper motor. If the LED starts to light up, you got a pair of wires. These will go into A or B ports on the VMA03. If it dosen’t light up, try another combination.
If you don’t have an LED, there is other ways of determining, which wires are paired. RepRap’s wiki has a good explenation , you can find it here.
For our project, we had to code our own driver for the stepper motor. We figured out how to flow the current through the coils (We used this illustration as a framework for our code ), in order to make the motor turn. The code is not too flexible, it only works with 4 steps at a time (can be a bit much on smaller steppers), but none the less, our code worked on the three different bipolar-steppers that we tested it on.
You can find the snippet of the code here.
I hope this will help people getting their steppers to work on the VMA03 shield.
Do you have the arduino code to test the steppenmotor?
I appriciate hints, comments etc. to improve the library …
@michael.hoefeler: I tried your code with following Stepper Motor.
Connection was done A(orange/blue), B(red,yellow) with extern power (12V/3A)
Every time I try to move the motor it only vibrates without turning… Any idea?
regards, Manuel
Never mind… just noticed that pins for PWMB and DIRB were switched…
Thanks a lot for your library… helped a lot!
Vibrating can be caused by several reasons:
1st one is to adjust 2 values used by the library
speed
= delay between each half-step measured in microseconds, higher values means less speed!
and
speedOffset
= minimum speed to prevent the motor from turning to the next half step without having the last done
if speed is less than speedOffset it will be set to speedOffset
2nd one
The Library was tested with Stepper motor - NEMA-17 size - 200 steps/rev, 12V 350mA, Adafruit PRODUCT ID: 324
“… to connect to our shield, put the wires in this order: Red, Yellow, skip ground, Green, Brown (or Gray) …”
So it is at least for this type: Red - M1, Yellow - M2, Green - M4, Brown(or gray) - M3
@darktooth: Yep - if we are not patient to look at the board we will switch the the polarity of the second coil as you did - and of cause me too
Looking at the data sheet of the motor helps to identify whiche colors belong to the same coil and which polarity is needed to be used to hook up your motor. It is always a mess to identify the right colors to hook up your wires
one more hint to identify on how to hook up the wires (it is not a test of the right polarity! You have to switch your wiring if the polarity is still wrong):
-
connect 2 cables out of your choice --> if the cables belong to the same coil it should be at least harder or impossible to turn the motor shaft manually by hand
-
connect 2 cables out of your choice --> if the cables belong to the same coil and are connected to the vma03 at M1/M2 or M3/M4 the LED on the board should be flickering when you manually turn the motor shaft as your motor performs like a small power plant
and got this error.
Arduino: 1.6.6 (Windows 8.1), Board: “Arduino/Genuino Uno”
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware “C:\Program Files (x86)\Arduino\hardware” -tools “C:\Program Files (x86)\Arduino\tools-builder” -tools “C:\Program Files (x86)\Arduino\hardware\tools\avr” -built-in-libraries “C:\Program Files (x86)\Arduino\libraries” -libraries “D:\first fruits\Software\ardunio\libraries” -fqbn=arduino:avr:uno -ide-version=10606 -build-path “C:\Users\pj\AppData\Local\Temp\buildb6f7075b299af7b32373a5e37522a5b9.tmp” -warnings=none -prefs=build.warn_data_percentage=75 -verbose “D:\first fruits\cnc\VMA03-master\StepperTest\StepperTest.ino”
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware “C:\Program Files (x86)\Arduino\hardware” -tools “C:\Program Files (x86)\Arduino\tools-builder” -tools “C:\Program Files (x86)\Arduino\hardware\tools\avr” -built-in-libraries “C:\Program Files (x86)\Arduino\libraries” -libraries “D:\first fruits\Software\ardunio\libraries” -fqbn=arduino:avr:uno -ide-version=10606 -build-path “C:\Users\pj\AppData\Local\Temp\buildb6f7075b299af7b32373a5e37522a5b9.tmp” -warnings=none -prefs=build.warn_data_percentage=75 -verbose “D:\first fruits\cnc\VMA03-master\StepperTest\StepperTest.ino”
“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Users\pj\AppData\Local\Temp\buildb6f7075b299af7b32373a5e37522a5b9.tmp\sketch\StepperTest.ino.cpp”
“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-ID:\first fruits\Software\ardunio\libraries\VMA03-master” “C:\Users\pj\AppData\Local\Temp\buildb6f7075b299af7b32373a5e37522a5b9.tmp\sketch\StepperTest.ino.cpp”
“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-ID:\first fruits\Software\ardunio\libraries\VMA03-master” “C:\Users\pj\AppData\Local\Temp\buildb6f7075b299af7b32373a5e37522a5b9.tmp\sketch\StepperTest.ino.cpp”
“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-ID:\first fruits\Software\ardunio\libraries\VMA03-master” “C:\Users\pj\AppData\Local\Temp\buildb6f7075b299af7b32373a5e37522a5b9.tmp\sketch\StepperTest.ino.cpp”
“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-ID:\first fruits\Software\ardunio\libraries\VMA03-master” “D:\first fruits\Software\ardunio\libraries\VMA03-master\vma03Stepper.cpp”
“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-ID:\first fruits\Software\ardunio\libraries\VMA03-master” “C:\Users\pj\AppData\Local\Temp\buildb6f7075b299af7b32373a5e37522a5b9.tmp\sketch\StepperTest.ino.cpp”
“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-ID:\first fruits\Software\ardunio\libraries\VMA03-master” “C:\Users\pj\AppData\Local\Temp\buildb6f7075b299af7b32373a5e37522a5b9.tmp\sketch\vma03Stepper.cpp”
“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-ID:\first fruits\Software\ardunio\libraries\VMA03-master” “C:\Users\pj\AppData\Local\Temp\buildb6f7075b299af7b32373a5e37522a5b9.tmp\sketch\StepperTest.ino.cpp”
“C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino2/ctags” -u --language-force=c++ -f - --c+±kinds=svpf --fields=KSTtzns “C:\Users\pj\AppData\Local\Temp\buildb6f7075b299af7b32373a5e37522a5b9.tmp\preproc\ctags_target.cpp”
“C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino2/ctags” -u --language-force=c++ -f - --c+±kinds=svpf --fields=KSTtzns “C:\Users\pj\AppData\Local\Temp\buildb6f7075b299af7b32373a5e37522a5b9.tmp\preproc\ctags_target.cpp”
“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-ID:\first fruits\Software\ardunio\libraries\VMA03-master” “C:\Users\pj\AppData\Local\Temp\buildb6f7075b299af7b32373a5e37522a5b9.tmp\sketch\StepperTest.ino.cpp” -o “C:\Users\pj\AppData\Local\Temp\buildb6f7075b299af7b32373a5e37522a5b9.tmp\sketch\StepperTest.ino.cpp.o”
In file included from D:\first fruits\cnc\VMA03-master\StepperTest\StepperTest.ino:12:0:
D:\first fruits\Software\ardunio\libraries\VMA03-master/VMA03Stepper.h:3:7: error: redefinition of ‘class vma03Stepper’
class vma03Stepper
^
In file included from D:\first fruits\cnc\VMA03-master\StepperTest\StepperTest.ino:1:0:
D:\first fruits\Software\ardunio\libraries\VMA03-master/VMA03Stepper.h:3:7: error: previous definition of ‘class vma03Stepper’
class vma03Stepper
^
Using library VMA03-master in folder: D:\first fruits\Software\ardunio\libraries\VMA03-master (legacy)
exit status 1
Error compiling.
Very confusing error message. any help?
I blew up my cheap TB6560 cnc controller and want to run out and get a couple of VMA03’s to get my DIY laser cutter running tonight.
I have 5 single axis tb6560s and a breakout board on order but it will be several weeks before I see them.
I need to cut my lettuce floats asap as the seedlings will be ready to transplant soon.
Here I am cutting one on a regular cnc but it is too slow and too small to do 40 of them. I built a 4’ x 8’ cnc table with two steppers controller a pan and tilt for the 1.5 watt laser (I needed to cut tappered square holes).
never mind I out a copy of the ccp and header files in the sketch folder. works now