Forum

StepMotor

hey,

today i play around with a stepmotor:

stepmotor (Trinamic QMOT Motor)
ardion (Duemilanove)
motorshild (Adafruit Arduino Motor/Stepper/Servo-Shield Bausatz)

to controll the motor i use a basic processing sketch and it woorks fine
with this hardware-software-combination

now my question, is it possible the controll this device via vvvv
(for example via the arduino module)

has anyone experience with this combination

find enclosed the afmotor-libary, maybe a help

thanks for your help
jens

AFMotor.zip (5.9 kB)

Hi envoy , yes i have use a few diferent steppe motors controlled with vvvv , if i,m right you are using a motor with 4 cables , have a look at this tutorial http://vvvv.org/tiki-download_file.php?fileId=1144%22 , it is very old so you can optimise it . basicly you have 2 ways once all connections are made . sending continuosly data via serial port , you have exat control but it can not be too fast , the other is let arduino run its own app to control it so you mainly send the direction and speed rate . well if it confusing contact me on skype sometime , Hope iot helps , bests ;D

hey colorsound

" …the other is let arduino run its own app to control it so you mainly send the direction and speed rate … "

this is what i like to do … the missing link for me is between the arduino app and the arduino.v4p communication patch

how i can send controll commands like direction and speed rate

thanks
jens

arduino+firmata.zip (7.1 kB)

hey, im stuck at the same point as envoy 3 years ago ^^
anyone can push me in the right direction ?

“the missing link for me is between the arduino app and the arduino.v4p communication patch”

I have the same problem. For me it is still the big question how to use multiplexers with arduino and vvvv. For this you also would need the arduino to run the multiplexer control and vvvv to communicate through the newly generated additional ports.

But for driving stepper motors, the firmata plugin has a special mode for this.
You can select ‘stepper motor’ in the drop down menu for the pins. It worked realy good for me!

hey everyone! i am having a happy face at the moment. @tekcor: how did you get this working? did i accidently implement stepper support? or are you using “SERVO” as pinmode? the firmata spec itself does describe a STEPPER mode afaik.

the firmata code posted above is way old, but if it works, that should be fine. the current arduino module uses the current Firmata version 2.2 and above. nevertheless, i don’t think, the issue is solely in there. maybe some more background might help solving the problem – my 2ct so to speak. using steppers with the arduino the following link is, despite is breavity, a good resource: http://arduino.cc/en/Reference/Stepper you should definitely follow to Tom Igoe’s website. It explains the two different types and how this all works.
steppers through the Arduino module are kind of not implemented, actually. if you want to drive them with it you should follow @colorsounds suggestion and use a custom arduino sketch in conjuction with some simple bytes to designate the different actions or take a look at the firmata protocol (in arduino) and use it as data transfer (e.g. digitial pin messages as direction, step, halfstep, etc.) for which it is really nice to use. i suggest this, because as soon as you want to tell the stepper(s) from vvvv to say, “do 200 steps clockwise”, a handful of bytes, don’t do the job. the real, actual timing must be done on the micorcontroller itself! any data line adds to much latency and thus does not give you decent to crappy results on the steps. i painly had to experience it myself… so there is actually no way around to tweaking some Arduino code. Unfortunatly.

what drivers are you guys using?

this would be a great opportunity to do a simple stepper firmata for the adafruit motor shield! i am happy to contribute.

i used colorsound’s tutorial files with new firmata 2.3 on arduino board and firmata node. working fine with 29.2

2.3 firmata arduino_STEPPERMOTOR.v4p (125.5 kB)

Hey Jens! :)

You might be aware of using the TI TLC5940 as a PWM multiplexer in conjunction with Arduinos (and, hopefully, Wiring boards, too); note that the TLC5940 is daisychainable, still you will likely need to create a solution for the current driving side in order to meet the specs of your steppers/motors/LEDs etc. The Arduino side of the code and basic usage is documented on the Arduino Playground.
Been working on the electrical side of TLC5940+Arduino so far, I can’t exactly say anything for the vvvv implementation so far. Fellow user @karistouf)) made a demonstrator using Arduino+TLC5940 and his ((/contribution/art-net-set-for-arduino. It would be übercool if the vvvv side of using this team would be enabled/implemented in a future version of the Arduino (and Wiring, wink-nudge*) node(s), albeit I don’t know stante pede what it should look like (spreadable PWM Output with the option to specify daisychained TLCs, I guess).

hey patrick!

yes, that is a very good question, when such “problems” point out the single type boundary of spreads. actually as far as i am concerned with this design issue at the moment, there seems to be no way around different special (formatting) task nodes, e.g. PWM, SERVO, STEPPER (as soon as some common message construction could be found on this one on the Firmata turf and the stepper message leaves its state of proposal…), etc.

Shift registers in common are daisychainable, so as soon as the buffer overflows, the data hits the next in the row. For simple shifters a simple integer value is sufficient enough or can easily be constructed from a spread of booleans, but again, yes, as you pointed out correctly, with PWM shifters this will not work that seamless…

Another issue of declaring one pin as SHIFT are the two accompanying pins for clock and latch. This could easily be solved as taking the two follow ups. But still, not something that makes me too happy.

I totally agree, that shifters and i2c will leverage the Arduino use with vvvv to a new height, so there will be a solution :)

helo… i need some help … i got arduino mega,ramps 1.4 and A4988 … and i can not make it work …can you please help me !!

hey,

i`ve the same problem. I try to connect VVVV with stepper moter via
Adafruit Motor Shield

I try it via RS232:

but it doesnt work, maybe the library (StepperTest.ino) isnt compatible,
and it is necessary to adjust the library.

AFMotor.zip (13.7 KB)

Any idea`s

or is there another better way?