Motor shield v2 logic jumper question

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
leo3linbeck
 
Posts: 17
Joined: Sun Aug 10, 2014 3:51 pm

Motor shield v2 logic jumper question

Post by leo3linbeck »

I think I have a problem, but I'm not sure.

After cutting the 5V jumper and soldering a blob to connect the 3.3V pad to the center pad, I used an ohmmeter to test. If I put a probe on the center pad and the 3.3V pad, I get 0 ohms, as expected. However, if I put the probe on the center pad and the 5V pad, I get a resistance of about 8.25k ohms (rather than infinite, which is what I expected).

Is there supposed to be a residual resistance between the center and 5V pad after cutting the jumper, or did I screw something up? History would suggest the latter ;-), but I thought I'd check.

Thx,
L3

PS - photo of my hatchet work attached.
IMG_0732.jpg
IMG_0732.jpg (601.03 KiB) Viewed 380 times

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

Re: Motor shield v2 logic jumper question

Post by adafruit_support_mike »

The resistance should be infinite, but sometimes it can take effort to make 'should' and 'is' line up.

Let's start by reducing the number of variables: are you measuring the resistance with the shield plugged into the Arduino or on its own?

User avatar
leo3linbeck
 
Posts: 17
Joined: Sun Aug 10, 2014 3:51 pm

Re: Motor shield v2 logic jumper question

Post by leo3linbeck »

It's plugged into an arduino wifi shield which is plugged into an arduino uno R3. L3

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

Re: Motor shield v2 logic jumper question

Post by adafruit_support_bill »

Try measuring it un-plugged. That will isolate the shield from any interconnections that might exist on the other boards in the stack.

User avatar
leo3linbeck
 
Posts: 17
Joined: Sun Aug 10, 2014 3:51 pm

Re: Motor shield v2 logic jumper question

Post by leo3linbeck »

Disconnected the shield. Here's what I found:

1. The center-3V3 resistance is a quick and solid zero. Good.
2. The center-5V resistance starts at about 500K ohm, slowly drifts upward, getting above 2M ohm after about 30 seconds.

Any suggestion where to go from here? I've tried cleaning up the pads, but that doesn't seem to help. Any help would be appreciated. Cheers,

L3

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

Re: Motor shield v2 logic jumper question

Post by adafruit_support_bill »

The center-5V resistance starts at about 500K ohm, slowly drifts upward, getting above 2M ohm after about 30 seconds.
Sounds like you are just charging up the decoupling capacitors. Both 5v and VCC have caps to ground. I think your shield is fine.

User avatar
leo3linbeck
 
Posts: 17
Joined: Sun Aug 10, 2014 3:51 pm

Re: Motor shield v2 logic jumper question

Post by leo3linbeck »

Excellent. Thanks.

I now have another question (your punishment for answering my first one ;-);

The shield is working for taking sensor readings, but is not driving the motor and solenoid on my device. When I put an oscilloscope on the SCL and SDA channels, and I'm worried about the voltage levels. I've attached an picture of the scope output. The top channel is SDA, the bottom is SCL. They're very different; SDA is about 0-500mV, but SCL is about 0-3.5V.

The logic of the shield is working at 3V3.

Should I be worried about this? If so, any suggestions?

Cheers,
L3

EDIT: oops! Forgot the attachment.
IMG_0733.jpg
IMG_0733.jpg (860.26 KiB) Viewed 331 times

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

Re: Motor shield v2 logic jumper question

Post by adafruit_support_bill »

Both SDA and SCL should be pulled up to 3.3v when not driven low. A 500mV signal level is not going to work. There should be pullup resistors on the shield. With the shield un-stacked and powered with just 3.3v & GND, are both SDA and SCL pins pulled high?

User avatar
leo3linbeck
 
Posts: 17
Joined: Sun Aug 10, 2014 3:51 pm

Re: Motor shield v2 logic jumper question

Post by leo3linbeck »

SCL is pulled high (~3v). SDA is about 300mV.

I guess my attempt to multiplex SDA is screwing up the bus. Here's what I tried to do:

I have two sensors with the same address (TCS34725s). I connect both SCLs straight from the sensor to the SCL pin on the Uno. Each SDA line feeds into the collector of a transistor (BC547). The base is connected to an Arduino pin (separate for each), and the emitters both connect to the SDA pin. The idea was to use the transistors as switches for the SDA lines, switching back and forth between the sensors.

I'm supposing now that this approach won't work (although it seemed to work when I breadboarded it - go figure). But could it? Am I missing something? Any ideas?

Much appreciated. Cheers,

L3

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

Re: Motor shield v2 logic jumper question

Post by adafruit_support_bill »

That doesn't sound like it will work. I2c is a bi-directional bus, so SDA has to alternate between being an input pin and an output pin. There are devices from Ti and NXP that support bus multiplexing. There is also a softi2c library that allows you to set up a but on another pair of pins.

User avatar
leo3linbeck
 
Posts: 17
Joined: Sun Aug 10, 2014 3:51 pm

Re: Motor shield v2 logic jumper question

Post by leo3linbeck »

Cool. I've been avoiding it, but it looks like a softI2C is the solution. A couple of questions:

1. It appears that the place to find that is as part of greiman's DigitalIO library (SoftI2CMaster). Is that correct?

2. It also appears that the SoftI2CMaster library runs on regular Arduino pins. But on the Uno, those pins run at 5V, while my sensors run at 3V3. Is that going to be a problem? If so, how do I deal with it?

Thanks again for all the help and counsel. Cheers,

L3

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

Re: Motor shield v2 logic jumper question

Post by adafruit_support_bill »

There are a couple different implementations out there. But Greiman's should be a good one.

The way i2c works, the bus voltage is determined by the pullup resistors. Since there are no pullups on the Arduino by default, the bus voltage will be set by the pullups on your sensor.

User avatar
leo3linbeck
 
Posts: 17
Joined: Sun Aug 10, 2014 3:51 pm

Re: Motor shield v2 logic jumper question

Post by leo3linbeck »

Excellent. Thanks. One more question:

It appears that the SoftI2C library substitutes for the Wire library. Does that mean that I should go into the TCS34725 library and change that code to use the SoftI2C read, write, stop, start, etc. routines rather than the Wire library? Just want to make sure I've got this right conceptually before I dive in.

Cheers,
L3

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

Re: Motor shield v2 logic jumper question

Post by adafruit_support_bill »

Yes. That should do it.

It looks like it was written as a superset of the Wire library. If you declare a bus with no pins specified, it will default to the hardware i2c.

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

Return to “Arduino Shields from Adafruit”