Motor Shield V2 on Due - DCMotorTest not working

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
KCS
 
Posts: 11
Joined: Mon Feb 03, 2014 3:00 pm

Motor Shield V2 on Due - DCMotorTest not working

Post by KCS »

I have the adafruit motor shield V2 on a DUE. The Motor shield has been modified for 3.3v logic per instructions (cut trace, solder bridge to 3v). I connected a 9v DC motor up to the M1 terminals and I supplied the shield with 9v from an external supply.

I then compiled and uploaded the DCMotorTest from the adafruit Motor shield V2 software library.

Monitored from the serial monitor I see:

Code: Select all

Adafruit Motorshield v2 - DC Motor test!
Estimated pre-scale: 2.81
Final pre-scale: 3
tickAdafruit Motorshield v2 - DC Motor test!
Estimated pre-scale: 2.81
Final pre-scale: 3
ticktocktechticktocktechticktocktechticktocktechticktocktechtick
The strange thing is that from looking at the DCMotorTest code I would expect a 5 second delay between tick-tock and tock-tech, but its more like 30 seconds. the delay from tech-tick is what I would expect at 1 sec.

The DC motor runs at a constant seed through our all this. My oscilloscope shows a constant pulse modulated waveform with a 50 us on pulse and a pri of about 225 us. It never changes.

It looks to me that from the serial monitor the script is running on the DUE OK, but the Motor shield is not working right?

If I reset the Due, nothing seems to change.

Is this Motor shield broken? Are there know issues with the Due?

KCS
 
Posts: 11
Joined: Mon Feb 03, 2014 3:00 pm

Re: Motor Shield V2 on Due - DCMotorTest not working

Post by KCS »

PS. To eliminate the possibility of motor noise being the problem, I disconnected the motor and reset the Due. There was no change from my original post

KCS
 
Posts: 11
Joined: Mon Feb 03, 2014 3:00 pm

Re: Motor Shield V2 on Due - DCMotorTest not working

Post by KCS »

Update:

I took a look at the Due i2c pins SCL1, SCA1 and the second i2c on pins 20, 21 with my scope while the sketch is running. There appears to be no data traffic.

I need to figure out how to test just the Due's i2c. I hope this is just a software problem.

KCS
 
Posts: 11
Joined: Mon Feb 03, 2014 3:00 pm

Re: Motor Shield V2 on Due - DCMotorTest not working

Post by KCS »

One last bit of information...

I read that the due has 1k pull-up resistors on the i2c ports, yet when I look at them with my scope they're at 0 DC while the DCMotorTest is running.

so I cleared the Due and reset it. Now both pins read 3v.
This leads me to believe that there something wrong with the software (ver 1.5.6-r2 of the IDE and libs, or???)

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Motor Shield V2 on Due - DCMotorTest not working

Post by adafruit_support_mike »

Post a photo of your hardware and we'll see if we can find anything.

Also try running the code on the Due without the shield. Watch the signals at the I2C pins by themselves to see what kind of output you get. I don't know if the Due's pull-ups are enabled by default, so let's confirm that. If the pull-ups are enabled, check their strength by putting 10k resistors between the I2C pins and GND.

In both cases, you should be able to read the voltage at the output pin well enough to get an idea of what's happening inside the chip.

KCS
 
Posts: 11
Joined: Mon Feb 03, 2014 3:00 pm

Re: Motor Shield V2 on Due - DCMotorTest not working

Post by KCS »

Well, the board's a UDOO which is suspose to be exactly a Due. The last test I did with the scope was without the motor shield.

The UDOO shares many gpio pins between the iMX6 processor and the Due, but not the i2c SCL and SCA pins which are only the Due.

I read elsewhere about some basic scripts I can run that just send i2c data. I'll concentrate on investigating the i2c first. I believe I need to focus in on the i2c and determine if its working or not.

I realize that Adafruit may not want to support those of us that have purchased the UDOO, but I appreciate any help that can be given.

Thanks

KCS
 
Posts: 11
Joined: Mon Feb 03, 2014 3:00 pm

Re: Motor Shield V2 on Due - DCMotorTest not working

Post by KCS »

It looks like the Motor Shield V2 uses the Due SCL1 and SDA1 which DO NOT HAVE Pull-up resistors.

See http://forum.arduino.cc/index.php?PHPSE ... c=223513.0

I will get some and add them and report back.

KCS
 
Posts: 11
Joined: Mon Feb 03, 2014 3:00 pm

Re: Motor Shield V2 on Due - DCMotorTest not working

Post by KCS »

Without any shield attached I need pull-ups to look at the UDOO(Due) SCL1 and SDA1. The Motor Shield has built-in 10k pull-up resistors, so they are not needed when the shield is attached.

I had to do a lot of resetting clearing and complete power removal before I got any I2C data to the Motor shield.

#1 With no motor attached I see a constant periodic stream of I2C data to the motor shield. The serial monitor displays: 'tick', 'tock', 'tech', over and over without interuption.

#2 With an external 9v supply, but still no motor attached, I see modulated 9v go from 0%, to 100%, to 0% and then nothing thereafter. This seems to be executing the code before the 'tock', but only the first time through the loop. I was expecting the modulation voltage to reverse, didn't happen.

#3 If I hook up the DC motor everything freezes-up and the motor modulation seems to be left in some fixed random state. This is probaly due to noise for which I could filter out with caps on the motor. However, noise isn't causing the problem above.

It may be related to the wire lib not being complete for Due yet. I look through the code and report if I every get this working...

Has anyone else experienced #2 above?

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

Return to “Arduino Shields from Adafruit”