Teensy 3.2 with Featherwing DC motor board

Status
Not open for further replies.

KBR

Active member
Has anyone managed to get the Featherwing DC motor board to work with the Teensy 3.2?
https://www.adafruit.com/products/2927

I have tried following the instructions here: https://forum.pjrc.com/threads/27413-Adafruit-Motor-Shield-V2-library-edited-for-Teensy-3-1-and-i2c_t3

And here: http://arduino-pi.blogspot.co.nz/2015/01/teensy-31-based-repstrap-control-board.html

I have tried this set up:
Teensy -> Featherwing
3.3v - > BAT (no idea if this is the right way to supply logic power?)
GND -> GND
SCL0 (19/A5) -> SCL
SDA0 (18/A4) -> SDA

Motor connected and has it's own power supply via featherwing terminal. Made sure voltage is within acceptable range for motor driver and motor.

I have also tried a variety of pull up resistors (2.2k, 2.7k, 4.7k) with i2c. Tried both the Wire library and i2c_t3.

For the code I am using the library and code found here: https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/install-software

I realize that it may be more appropriate to ask at the Adafruit forum but the motor driver is designed to work with in the featherwing 'eco system' and I would rather use the Teensy.

Has anyone had any experience with this?

Happy to provide more details if required...
 
Last edited:
Try the example i2c_t3 -> Scanner and post the results

Can you elaborate on not working?
Maybe any code you have tried would be good
 
Which library and code are you actually running to talk to this board? See the "Forum Rule", you must always be specific about this in any question where something isn't working!
 
According to this schematic, Adafruit already put 10K pullup resistors on SDA and SCL, so you do *not* need to add resistors. Just connect wires.

You probably will need to post a photo of how it's all really connected.
 
Thanks Xenoamor. Good idea.

I tried the Scanner example but it doesn’t seem to find anything.

The serial monitor outputs this for about a dozen times while turning LED on then off:

---------------------------------------------------
Starting scan...
---------------------------------------------------

The serial output will eventually stop and the LED stays on.

I will collect code and photos for a better reference. As well as a better description of "not working". Back soon...
 
Apologies, I thought I had covered that by providing a link to the library and code example. In future I will provide the information directly within the post.

The library I used is the Adafruit Motor Shield V2 Library. Then I used the example code that came with the library called DCMotorTest.
I could not get the motor to turn on so I then tried altering the library to use i2c_t3 instead of wire. When altering the library I followed the example here:
http://arduino-pi.blogspot.co.nz/2015/01/teensy-31-based-repstrap-control-board.html

I will gather final code used and a photo for more info.
 
Thanks Paul, good to know about that! Just out of interest, where did you find the schematic? Somewhere obvious no doubt :eek:

Originally I just connected the wires as suggested but then tried pullups out of desperation when I wasn't having any success. Is it possible to damage the board doing this? I hope I haven't fired anything.

Also I was wondering if you knew which pin was the correct pin for supplying logic voltage?

Photo is on it's way...

I must say I am impressed with the fast response on this forum (first post). I posted just before giving in to some sleep (1:30am New Zealand time) thinking I'd be lucky to have one response in the morning. Would have stayed up if I known you'd be so quick. Thanks! :D
 
If the scanner can't find it it is likely to be a hardware issue, not a software issue

Although I do have a few issues with that scanner example on occasion
Can you change the following lines
Code:
pinMode(12,INPUT_PULLUP);       // Control for Test1
pinMode(11,INPUT_PULLUP);       // Control for Test2
To:
Code:
pinMode(12,INPUT);       // Control for Test1
pinMode(11,INPUT);       // Control for Test2
 
This automatically initiates the scan. Is this the intended result?

When I first tried it the LED went solid on and the output was:

---------------------------------------------------
Starting scan...

And stayed that way. However when I tried it again after a few attempts it began flicking on/off as before. At first I thought this was because I tried disconnecting the logic power to the motor driver. But it seems to be intermittent. I am having difficulty reproducing the problem consistently. Either way it still does not find the device.

I believe you are right about the hardware. My biggest assumption is that I don't have logic power hooked up right. Which is why I tried disconnecting it. I'm not even certain it needs a separate power supply for the logic!
 
I also forgot to mention (an important clue) that there is no serial output using the DCMotorTest code even thought there is a Serial.print in the loop. However if I use pullups on the SDA and SCL then the serial output works. But still does not trigger motor driver. It's the other reason I tried a variety of resistors.
 
Photos

As suggested here are the photos of the hardware setup:

Featherwing_DCM_02.jpgHardware_Hookup_02.jpg

Extra wires coming from the encoder on the motor are not used at this time.
 
Last edited:
I sent a request to Adafruit for the schematic for this product. The only ones I've been able to find are for their non-feather versions.

Sorry, I'm stuck for the moment. Hopefully they'll answer soon...
 
Great! Thanks Paul. Looking forward to seeing the schematic. Should shine some light on it.

Of course stacking it on top of one of their Featherwing boards would be an easy fix, but then I wouldn't be able to use the awesomeness of the Teensy!!! :eek:
 
I got a reply from Rick (at Adafruit). He's looking for the schematic.

He did ask "connections look right to me, but I wonder if those jumpers are actually soldered in?"
 
Haha yes they are. But you never know so fair question!

Just to be sure I have checked connections with a multimeter.

Hmm got me a bit worried now. I was hoping I had that wrong so it would be obvious fix :confused:

Featherwing_Solder_Joints_01.jpg
 
Last edited:
Maybe the Bat pin isn't connected on the Featherwing DC motor board. Try the 3.3V pin.


Is 0x61 the correct I2C address? With all jumpers open, the address is 0x60.
 
Thanks HWGuy I'll try the 3.3v pin.

Not sure about the I2C address. I only have a limited understanding of I2C. Seems like a good opportunity to learn more about it. I'll scrub up on it some more. See if I can change it...
 
Last edited:
The I2C address is correct in your code. I somehow didn't see that the code with the 0x61 is marked as comment. Sorry about that.
 
No problem. Any ideas are welcome. I still learnt something and that's always a good thing!
 
Is there someway I can trouble shoot with multimeter or oscilloscope?

If I hooked up an oscilloscope to the SDA or SCLK what should I expect to see? As I mentioned before the program won't even run. The only time it has is when I tried pullups but it still didn't activate the motor.
 
Yeah, you're right. Looks like that poor little motor driver chip is just sitting there not getting VCC power.

Maybe connecting Teensy's 3.3V output to the 3.3V pin will magically make everything work?
 
Status
Not open for further replies.
Back
Top