-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to use 6 steppers. #1133
Comments
Are you using an Arduino or something like a Raspberry PI? |
Arduino. |
here is the hardware config. In this picture, the steppers aren't hooked up, but I assure you they've all been tested and work individually. I've been using J5 with steppers for about a year now and I've never run into anything like this. But I've also never set up more than 3 steppers. Any ideas would be great thanks! |
Firmata (which the J5 implementation for Arduino uses under the hood) supports up to 6 stepper motors simultaneously. However I've never tested with 6 since I've never had that many drivers at one time. The issue could lie in the Firmata firmware or the the firmata.js middle-ware. I'll look over the code for both to see if I see any potential issues. May not get to it until later this weekend. |
Have you tried 5 steppers simultaneously, or the most you can run is 4? |
Also, are you using ConfigurableFirmata, AdvancedFirmata or some other variant? |
I have tried 4 & 5, In one case I was able to get 5 working. We are using advancedFirmata. |
Also, we did change MAX_STEPPERS in the Firmata code, and in steppers.js J5 lib, but that did not help. |
I don't see anything suspect in the code in either AdvancedFirmata or firmata.js. Have you tried attaching the steppers to different pins on the board to see if that makes any difference? This is probably going to require adding Logging into AdvancedFirmata and firmata.js in order to diagnose. Also if you have access to an oscilloscope that may be useful in monitoring power and signals on the motors to see if that is the source. |
Also have you tried controlling the steppers using firmata.js instead of J5? That can help diagnose if the issue could be in J5. |
@soundanalogous thanks for your ideas. We've tried different pins, and haven't had any luck with that. We might want to try a different board, though... Just to be sure. We have swapped out different pins/steppers and can only narrow it down to the number of steppers that are in the mix. And we can get each stepper to function properly individually or in a group of 4... I'll checkout https://www.npmjs.com/package/firmata and see what we can reproduce the same issue. I was not aware of this lib, so it might be something we can also use.
Thanks again! |
This is still an issue, though I haven't had a chance to try with Firmata. We'd like to get this working, but for now we're just using 2 arduino's for our application... |
I considered several work-arounds on this one, but here's what I decided to do. Each stepper is set individually, so I didn't need the timing in manipulation to be super precise, at least not yet. We've got some enhancements that will require this, but for now we just want to get our POC working. We had thought about connecting to the board and then trying to close it, alternating pins each time, but we determined that is not a feature that will be supported anytime soon - #617 We've decided to the command line script looks something like
This will work for now for our application, but it would be nice if we could support 6 steppers per board, particularly for some of our more real-time features. I tested the original script again (https://gist.github.com/drj-io/56db4be7e002e763ff5e0c2a5e256f59) with the latest NPM install and a different computer (OSX -> Arduino) and got the same result. Thanks! Edit: Fork not spawn |
I'm trying to use 3 stepper motors, but am struggling to even get 2 running at the same time. I'm using a Nano with the A4988 driver. var five = require("johnny-five");
var board = new five.Board({repl:false});
board.on("ready", function() {
var stepper1 = new five.Stepper({
type: five.Stepper.TYPE.DRIVER,
stepsPerRev: 200,
pins: [4, 5]
});
var stepper2 = new five.Stepper({
type: five.Stepper.TYPE.DRIVER,
stepsPerRev: 200,
pins: [7, 6]
});
stepper1.rpm(180).ccw().step(200, function(){
console.log("done");
stepper2.rpm(180).ccw().step(200, function() {
console.log("done");
});
});
}); If I comment out the other stepper, they work individual, but never together. I'm using ConfigurableFirmata built from http://firmatabuilder.com/ with StepperFirmata selected. I haven't tried using AdvancedFirmata, but might since 4 have been shown to work with it (although it is now deprecated in favor of ConfigurableFirmata). I also might try using a Teensy so see if it helps, but was checking to see if there are any known issues/gotchas with more than 1 stepper. I saw there were some changes coming to Firmata/J5 but didn't see anything that might fix this. |
Please try using AdvancedFirmata. The stepper code in AdvancedFirmata is equivalent to that in ConfigurableFirmata. I'm wondering if something else in ConfigurableFirmata is causing an issue. Please also report the full list of features you selected when using firmatabuilder. |
Thanks @soundanalogous. I'm also having trouble with a regular dc motor (using the |
@soundanalogous Btw, part of my DC Motor / PWM issue might steam from using pins 9 and 10 and |
That's correct you can't reliably use a motor on pin 9 when the Servo library is included. |
I commented out a reference to a Servo I had overlooked and also switched to |
I would still like to try to figure out why ConfigurableFirmata is not working. Can you create build with firmatabuilder and select only the following features and let me know if that works with 3 stepper motors (I'd test myself but only have 2 stepper motors).
|
Sure. I won't have the hardware back for a few days but I'll try to report On Mon, Nov 14, 2016, 10:58 PM Jeff Hoefs [email protected] wrote:
|
Hi all, I wanted to follow up on this. I haven't tested lately as we're still using the above workaround. Was wondering if anyone had a chance to look at this. I can test next week if needed. |
@dtex great news, I will see what I can do to port over to firmata.js to test. Can you link me to the PRs? |
firmata/ConfigurableFirmata#72 I'm in the middle of changing references from Stepper2Firmata to AccelStepperFirmata. So if you see stepper2 anywhere replace with accelStepperFirmata |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
The new stepper class in Johnny-Five is coming very, very soon so let's remove the stale label and close this properly when the time comes. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Back off Stale Bot, I'm working on it. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
https://gist.github.com/drj-io/56db4be7e002e763ff5e0c2a5e256f59
I'm using Big Easy Drivers (sparkfun). I'm able to run the above code with steppers 1-4 or 3-5... any combo of 4.
If I engage 5 or 6, the steppers never run.
I'm using a 10A 12v power supply, so there should be enough juice.
I'm using an Arduino Mega 2560 with Advanced Firmata.
The text was updated successfully, but these errors were encountered: