Hey,
I am interested in finding out more about the project, could we talk via email [email protected]
Thanks
Tom
ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- unknowndomain
- Posts: 1
- Joined: Mon Jun 09, 2014 5:35 pm
- sonicalflair
- Posts: 10
- Joined: Thu May 01, 2014 10:51 pm
Re: ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
Update: I received the scope today and probed the SCL1 line. I see the clock waveform for a few seconds, and then one of two things will happen
1.) The stepper motor will stop spinning and i'll continue seeing a clock signal
2.) The stepper motor will stop spinning and the don't see the clock waveform, it just stays "high"
Pressing the reset of the Due when '1.)' then causes the clock waveform to stay "high".
The waveforms themselves look good, they arn't "saw-tooth"
So something is happening that's causing the clock to stop, any ideas?
1.) The stepper motor will stop spinning and i'll continue seeing a clock signal
2.) The stepper motor will stop spinning and the don't see the clock waveform, it just stays "high"
Pressing the reset of the Due when '1.)' then causes the clock waveform to stay "high".
The waveforms themselves look good, they arn't "saw-tooth"
So something is happening that's causing the clock to stop, any ideas?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
Can you compare this behavior with the way it happens on the Mega?
- sonicalflair
- Posts: 10
- Joined: Thu May 01, 2014 10:51 pm
Re: ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
The SCL waveform on the Mega was less square, similar to the '100Khz 4.7KOhm resistor' in the link below:
http://dsscircuits.com/index.php/articl ... -resistors
However, I haven't experienced any issues running 1 or 8 Motorshield V2 boards with the Mega.
Are you using pull-up resistors when you use the board with the Due's SCL1/SDA1 connectors?
http://dsscircuits.com/index.php/articl ... -resistors
However, I haven't experienced any issues running 1 or 8 Motorshield V2 boards with the Mega.
Are you using pull-up resistors when you use the board with the Due's SCL1/SDA1 connectors?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
The motorshield has 10k pullups on the I2C lines. I don't think there are any pullups on the Due.
Do you see behavior 1) with the Mega, or just behavior 2)?
What are the clock rates on the Mega and Due? 100kHz? Are they both the same?
Do you see behavior 1) with the Mega, or just behavior 2)?
What are the clock rates on the Mega and Due? 100kHz? Are they both the same?
- sonicalflair
- Posts: 10
- Joined: Thu May 01, 2014 10:51 pm
Re: ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
I'm not seeing any issues with the Mega, it communicates to 8 Motorshields without problems.
The clockrate for the Mega is at 400kHz, I updated that value in the twi.h file. I've used 100KHz-800KHz with no issues.
The clockrate for the Due is at 100kHz, I've verified that by looking at '\hardware\arduino\sam\libraries\Wire\Wire.h`
I've also updated Adafruit Motorshield library to force the Due to use SCL/SDA, and ran the same tests as SCL1/SDA1. The results were the same as SCL1/SDA1; I'd see the clock signal for a few seconds, and '1.)' or '2.)' will happen.
Since I'm using an identical set up for my Mega tests, besides adding the Motorshield 3.3V jumper and making sure the 3.3V and GND from the Due go to the MotorShield, i'm running out of ideas.
Somehow connecting 4 Megas together seems like a better solution at this point...
The clockrate for the Mega is at 400kHz, I updated that value in the twi.h file. I've used 100KHz-800KHz with no issues.
The clockrate for the Due is at 100kHz, I've verified that by looking at '\hardware\arduino\sam\libraries\Wire\Wire.h`
I've also updated Adafruit Motorshield library to force the Due to use SCL/SDA, and ran the same tests as SCL1/SDA1. The results were the same as SCL1/SDA1; I'd see the clock signal for a few seconds, and '1.)' or '2.)' will happen.
Since I'm using an identical set up for my Mega tests, besides adding the Motorshield 3.3V jumper and making sure the 3.3V and GND from the Due go to the MotorShield, i'm running out of ideas.
Somehow connecting 4 Megas together seems like a better solution at this point...
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
Seems like it must be a bug in the Due wire library. I have no other explanation.
Have you tried probing this over at the Arduino forums?
Have you tried probing this over at the Arduino forums?
- integrate
- Posts: 14
- Joined: Thu Feb 06, 2014 12:36 am
Re: ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
Can anyone look into the following posts... Is this related? I implemented the code change to wire.cpp as described by the third link, but it didn't work with the latest adafruit motor/pwm/servo libraries that have the due fixes.
https://code.google.com/p/arduino/issues/detail?id=28
http://forum.arduino.cc/index.php?PHPSE ... =146802.30
https://github.com/arduino/Arduino/pull/1994
Help!
https://code.google.com/p/arduino/issues/detail?id=28
http://forum.arduino.cc/index.php?PHPSE ... =146802.30
https://github.com/arduino/Arduino/pull/1994
Help!
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
@integrate - what was the original problem you were having?
- integrate
- Posts: 14
- Joined: Thu Feb 06, 2014 12:36 am
Re: ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
Simultaneous control of 4 servos using one pwm shield stutters and struggles to catch up when moving large distances. Small slow movements are fine if you go very slow. Worked fine on uno and BANNED. External 6v 10a power supply. Don't know for sure but really does look like an i2c communication issue.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
It certainly seems that way. Can you report this over on the Arduino forums? Hopefully, they can fix it for the next release.
- integrate
- Posts: 14
- Joined: Thu Feb 06, 2014 12:36 am
Re: ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
This is a well known bug with a fix:
http://forum.arduino.cc/index.php?PHPSE ... =146802.30
But the fix appears to break the recently fixed adafruit pwm shield library, and presumably the motor shield as well. Can you take a look at this?
http://forum.arduino.cc/index.php?PHPSE ... =146802.30
But the fix appears to break the recently fixed adafruit pwm shield library, and presumably the motor shield as well. Can you take a look at this?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
I'm not seeing any problems. In what way are you seeing the library broken?
- integrate
- Posts: 14
- Joined: Thu Feb 06, 2014 12:36 am
Re: ARDUINO DUE + ADAFRUIT MOTORSHIELD V2
Nevermind. Figured out it was a combination of not enough juice (8 servos with 2.5A max stall) and an issue where I was sending a float instead of an int to setPWM().
thanks anyway
thanks anyway
Please be positive and constructive with your questions and comments.