Best motor and shield for Matlab

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
DaveBeane
 
Posts: 4
Joined: Thu Sep 14, 2017 12:13 pm

Best motor and shield for Matlab

Post by DaveBeane »

I have been reading through the forum and have seen multiple posts about using motor shields and Matlab. Some posts were old enough and many were not quite pertinent enough that I decided I had best ask for advise before I make a purchase. So here goes.
I must use Matlab. I need to control 2 steppers and know where they are. I assume this means encoding or limit switches/home position indicator. I prefer the first. I also need to control six servos. Some of the servos are linear actuators and may require a bit more current than is healthy to come from all shields. However, I assume that only the control wire (and ground) need be attached to the board which draws little current.
I assume no single board does that but maybe it does. With an Uno controlling PWM, maybe I don't need a shield for the servos. That leaves me with something to control the steppers. But it must be controlled from Matlab. The only way I can see to control steppers from Matlab is with the "Adafruit\MotorShieldV2" addon. Again feel free to correct me if I am wrong.
So I am asking for advise on the most appropriate hardware to purchase and perhaps a little guidance on how to know the position of the steppers if using encoding. Using encoders is not something I am experienced at. Multiple Arduino boards or multiple shields are acceptable. I need advise on both the shields and the steppers if encoding is the best option since I do not own any steppers with encoding. Maybe the encoding is a separate piece of hardware anyway. I do not have much knowledge about encoders.

Thanks in advance,
Dave

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Best motor and shield for Matlab

Post by adafruit_support_bill »

We are not Matlab users here. But some customers have reported that they are using the V2 motor shield with Matlab.

You could control the 6 servos with spare pins on the Arduino. But with all the i2c and serial communication fr the steppers and Matlab, I'd expect the operation to be a bit jittery.

If you assemble the motor shield with stacking headers, you can further stack a PWM/Servo shield that can drive your servos with a dedicated PWM generator chip.
https://www.adafruit.com/product/1411

User avatar
DaveBeane
 
Posts: 4
Joined: Thu Sep 14, 2017 12:13 pm

Re: Best motor and shield for Matlab

Post by DaveBeane »

Thank You. I have purchased the Adafruit motor controller V2.3 which gives me the ability to control the steppers. Since it uses i2c across the analog pins, all digital pins are available. I need six servos and there are six PWM pins on Uno so I don't even need to upgrade to Mega. So far its going OK except that I would like to take advantage of microstepping. However when I use microstepping, 200 steps still moves it the same distance, just slower. Historically, micro stepping has given me more steps per revolution but I may somehow be configuring it wrong.

Dave

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Best motor and shield for Matlab

Post by adafruit_support_bill »

The primary purpose of microstepping is to smooth out the stepping motion and reduce vibration. Intermediate positions are subject to variations in motor construction and are guaranteed to be that precise. In the library, all calls to "step()" will default to starting on a full-step boundary. If you want to stop on intermediate 'micro' steps, you can use the "onestep()" function. https://learn.adafruit.com/adafruit-mot ... t8-t-style

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”