RBBB issue with I2C

Questions about the Really Bare Bones Board
mndless
Posts: 17
Joined: Sun Jul 03, 2011 3:24 pm

RBBB issue with I2C

Post by mndless » Sun Jul 03, 2011 4:13 pm

Recently purchased a batch of RBBB... have six (6) of them.

I have a simple test setup for running an I2C bus with the wire library. Simple stuff, telling the slaves to blink.

The master and slave code have been tested and work with various boards I have tried.

I have placed the slave code on each of the six RBBB's. only one will function.

The remaining five, not only do they not blick, but attaching them to the bus prevents the bus from functioning at all... the second attached slave also does not work.

Given that I have tested all with with various boards, I have to believe the issues is assocaited with the 5 IC's themselves or the settings within the 5 IC's.

As they say... picture is worth 0x3E8 words.... ;)

http://www.youtube.com/user/erj145com?feature=mhum
YouTube video of what it is doing...

Any suggestions on how to get to the bottom of this, would be greatly appreciated???

floresta
Posts: 93
Joined: Mon Jul 28, 2008 6:52 pm
Location: Western New York, USA
Contact:

Re: RBBB issue with I2C

Post by floresta » Sun Jul 03, 2011 9:58 pm

Have you swapped the chip from the board that works with the chip from one of the boards that does not work?

Don

paul
Site Admin
Posts: 734
Joined: Mon May 12, 2008 4:19 pm

Re: RBBB issue with I2C

Post by paul » Mon Jul 04, 2011 11:09 am

mndless,

I'm certainly baffled about this since there really isn't anything in between the I2C pins and the hardware.

I second Don's suggestion (as usual) of swapping the chips. If this works fine then that does tend to indicts the chips - or maybe some fuse settings.

We program chips from the boards.txt file with standard duemilanove fuse settings. (Soon to be optiboot / UNO)

Also check your ground / power setups and serial setups. Try powering the RBBB from the Arduino if you are not doing that already.

Paul

mndless
Posts: 17
Joined: Sun Jul 03, 2011 3:24 pm

Re: RBBB issue with I2C

Post by mndless » Mon Jul 04, 2011 3:52 pm

As requested, I placed each chip in the known working board... in that board, they all work... of course.

I then went back through each of the boards with a known working chip.... in each case, nothing.. so, it certainly does appear to be the same issue with all 5 boards.

I have examined each board very closely and dont see anything... solders look good, no solder bridges... the boards appear clean.

What is curious, is that each of these boards function as stand alone.... upload the basic blinker and they work... attach them to an I2C bus and nothing... I say nothing, they each do give me the 3 blinks, I'm awake, on power up, but then nothing happens with the balance of the I2C bus, master and second slave cease to function.... very curious....

I did a quick continuity check, on a couple of the boards, from the pins to the socket... eveything check out... nothing squirrly that I could find...

How do you normally ferrett out stuff like this??? :) Happy to ship 1 or all of these to you if you want to have a look, but I'd rather sort this out on this end...if I can...

Thanks!

Tony

paul
Site Admin
Posts: 734
Joined: Mon May 12, 2008 4:19 pm

Re: RBBB issue with I2C

Post by paul » Mon Jul 04, 2011 7:02 pm

Tony,
I have examined each board very closely and don't see anything... solders look good, no solder bridges... the boards appear clean.

What is curious, is that each of these boards function as stand alone.... upload the basic blinker and they work... attach them to an I2C bus and nothing... I say nothing, they each do give me the 3 blinks, I'm awake, on power up, but then nothing happens with the balance of the I2C bus, master and second slave cease to function.... very curious....

One thing I thought about is the I2C pullups. Are you just using the built-in pullups on the chips? If so put some stiffer (~5K or even 2.7K) pullups on the bus and see if that solves the problem. Those resistors can vary a bit from chip to chip and I think I remember something about the resistors getting wimpier (if that's a word) recently.
I did a quick continuity check, on a couple of the boards, from the pins to the socket... everything check out... nothing squirrly that I could find...

How do you normally ferret out stuff like this??? :)
The same way you're doing it (a lot of trial and error, swapping things, trying to isolate the problem etc). A scope helps if you have one. Plus trying to remember everything that ever went wrong in past. (Maybe skip the parts where you were abused for using wire coat hangers. - sorry - it was a great movie.)

Maybe try some more extensive continuity and resistance checks on the "bad" boards - to see if you can find anything unusual. I've had a handful of bad boards from my board house over the years. Somehow I think it's very unlikely (but not impossible) that you have five in one place. Try lighting up some LED's with the "bad" boards I2C pins and see if that works OK.

Try the I2C pullup I idea I mentioned above - just put the resistors between positive and the I2C bus - if you have a longish bus - put them at the farthest end from the master microcontroller. Also check some voltages at various places. If all the hardware seems to check out fine then maybe have another look at the code.

The big mystery is that there is absolutely nothing (except maybe some minor league parasitic capacitance between the I2C pins on the chip and the I2C pins on the board. If you have the RBBB's in a breadboard, there is more capacitance from the breadboard clips - but somehow I doubt this is a factor on I2C circuits which are usually fairly slow - but is an issue on other faster circuits sometimes. There are some circuits where a breadboard won't work at all - but mostly this is radio frequency stuff.

It could also be bad breadboards - try jiggling some wires while testing or switching wires.

Good luck,

Paul

mndless
Posts: 17
Joined: Sun Jul 03, 2011 3:24 pm

Re: RBBB issue with I2C

Post by mndless » Mon Jul 04, 2011 7:26 pm

Thanks Paul... obviously, I am new to all of this and it has been a great learning experience... rather adictive, actually... who would have thought a middle aged structural engineer could get emerced in microcontrollers? :)

Putting the bus together, I followed a great tutuorial posted by Nick Gammon http://www.gammon.com.au/forum/?id=10896

Near the end of his posting, he experiments with several different values of pull-ups..... I am using a 4.7k on each of the two lines... so, I think the external pull-ups are good...

The length of the I2C bus is limited by capacitance, I think the I2C standard lists 400pF as the limit... with my set up, as you see in the video, the wires are all within 6 inches of the central "hub"... while I have not measured the capacitance, I do not believe that is the issue... unless somehow I have done something with the 'bad' boards that effects the capacitance.... can't fathom... but I'm 0-2 in my opinions on these issues so far......

Will be ordering another batch to screw up soon... :)

Thanks for the help!!

Tony

paul
Site Admin
Posts: 734
Joined: Mon May 12, 2008 4:19 pm

Re: RBBB issue with I2C

Post by paul » Mon Jul 04, 2011 10:32 pm

Tony,

It's worth pulling the RBBB's off the breadboards and connecting the I2C bus wires to some female headers, in the "grasping at straws" category, to bypass the breadboard capacitance.

Also reheat all the joints on the "problematic" RBBB boards.
Also in this category - clean your boards with 91% isopropyl and a toothbrush - rinse well with more isopropyl, and dry.

None of this is guaranteed to do a thing but each has worked on particular projects. Reheating the solder joints is a standard "cure-all" that has fixed many many projects.

Paul

mndless
Posts: 17
Joined: Sun Jul 03, 2011 3:24 pm

Re: RBBB issue with I2C

Post by mndless » Tue Jul 05, 2011 7:59 am

Will do Paul... Thanks again...

Will report back

Tony

mndless
Posts: 17
Joined: Sun Jul 03, 2011 3:24 pm

Re: RBBB issue with I2C

Post by mndless » Sun Jul 10, 2011 5:08 pm

Update, after a short recap...

Have six RBBB's all purchased around the same time... 5 of the 6 experienced an issue with I2C... see video above.

Pulled the chips out of each of the boards and verified that each chip does work in the single cooperating board...

As noted above, I have reheated each pin, and cleaned them again....

Have looked at each board very thoroughly, all solders look good, nothing close to a bridge.. continuity checks... just cant find anything to point to...

The new I2C test removed the breadboards, reduced the wire length to a minimum, same external pull ups

As before, all 6 chips work in the same cooperating board and no joy with the same 5 boards...

Any other checks and tests I can do? Can set up a stand alone analog test for A4 and A5... but, can't imagine, the chips check out and that is a straight shot....

floresta
Posts: 93
Joined: Mon Jul 28, 2008 6:52 pm
Location: Western New York, USA
Contact:

Re: RBBB issue with I2C

Post by floresta » Sun Jul 10, 2011 8:49 pm

While we are grasping at straws.... Maybe there's some issue with the power supply that affects the boards differently. Try powering your slave via a wall wart, 9v battery, or from the Arduino and see if there's any difference.

Don

paul
Site Admin
Posts: 734
Joined: Mon May 12, 2008 4:19 pm

Re: RBBB issue with I2C

Post by paul » Mon Jul 11, 2011 12:06 pm

mndless,

Also test the offending boards without chips in them to see if there is any continuity from the I2C pins to anything else other than the pins in question.
You can check A4 -> pin 27 on the Atmega A5 -> pin 28. Check the pins for low resistance with your meter - then check the rest of the board for no connections. The easiest way to do this is with a meter that beeps with continuity. Put one probe on the pin in question and "swipe" all the other pins, listening for any hint of beeping.

Check the power supplies for 5 volts at appropriate places. If the pilot lights are on, you've probably done this.

This one is a big mystery - you've increased the level of suspense now.

Paul

mndless
Posts: 17
Joined: Sun Jul 03, 2011 3:24 pm

Re: RBBB issue with I2C

Post by mndless » Mon Jul 11, 2011 6:51 pm

Think I have found something obvious and different... care to guess at the cooporating board?

I pulled the chip out of all 6 and plugged in a 9V battery... using my multi-meter, I put the pos lead into the center ground plug in the IC dip socket. Then, with the neg. lead, I started checking voltages along this right hand, or anolog pin side... below is a table of the voltages I get at the dip socket locations

Board....A5....A4.... A3.... A2.... A1.... A0.... D13.... D12.... D11.... D10.... D9

Brd 1... 4.8.... 4.9.... 4.3.... 2.3.... .05.... 3.3.... .07.... .12.... .16.... .18.... .18

Brd 2... 4.5.... 4.5.... 4.4.... 4.2.... 2.3.... .60.... .03.... .03.... .03.... .04.... .4

Brd 3... 4.5.... 4.8.... 4.33.... 4.1.... 4.3.... 4.4.... .85.... .51.... .5.... .5.... .3

Brd 4... 4.5.... 4.5.... .33.... 4.5.... 3.6.... 1.45.... .23.... .15.... .2.... .2.... .2

Brd 5... 4.7.... 0....... 0...... 4.1.... 0.5.... .5...... 0....... 0...... .1..... .13.... .5

Brd 6... .11.... .01.... .01.... .01.... 0...... .01.... .04.... .03.... .02.... .02.... .02

What is interested, is the largest voltage is the furtherest away from the center ground lead.... with some pins being zero in between two reading nearly 5 volts.... very peculiar...

So... I got stray voltages all over the place... like a stink'n electron party going on all over my boards! And... I think I know what the cause is, but I'll let you experts take a guess before I spill all the beans....

floresta
Posts: 93
Joined: Mon Jul 28, 2008 6:52 pm
Location: Western New York, USA
Contact:

Re: RBBB issue with I2C

Post by floresta » Mon Jul 11, 2011 8:04 pm

I'd say it was spurious oscillations from the voltage regulator.

Don

mndless
Posts: 17
Joined: Sun Jul 03, 2011 3:24 pm

Re: RBBB issue with I2C

Post by mndless » Mon Jul 11, 2011 8:07 pm

floresta wrote:I'd say it was spurious oscillations from the voltage regulator.

Don
2 different voltage regulators...

of the 5 culprits... 3 with the TO-92 and 2 with the To-220....

So... not sure that is it...

mndless
Posts: 17
Joined: Sun Jul 03, 2011 3:24 pm

Re: RBBB issue with I2C

Post by mndless » Mon Jul 11, 2011 8:52 pm

floresta wrote:I'd say it was spurious oscillations from the voltage regulator.

Don

you were making a funny weren't you... and I didn't get it... :)

floresta
Posts: 93
Joined: Mon Jul 28, 2008 6:52 pm
Location: Western New York, USA
Contact:

Re: RBBB issue with I2C

Post by floresta » Mon Jul 11, 2011 9:50 pm

No - I was serious. A bad output side capacitor (too much 'Equivalent Series Resistance') is a related possibility.

What is the value of C2 on your boards?

Don

scott-42
Posts: 12
Joined: Tue May 17, 2011 5:28 pm

Re: RBBB issue with I2C

Post by scott-42 » Mon Jul 11, 2011 11:01 pm

Interesting, since you mentioned using two different types of VRs and two different packages (the kit only comes with one, the L4931 in TO-92), did you put them in backwards or use the wrong kind?

I would guess that either something is backwards like the VR or you substituted parts like the VR and picked one with a different pin out.

Default pin out of L4931 (TO-92):
Pin 1 = Vout
Pin 2 = GND
Pin 3 = Vin

Default pin out of LM2940 (TO-220):
Pin 1 = Vin
Pin 2 = GND
Pin 3 = Vout

And if you tried something like an MCP1702 (TO-92) [don't try this]:
Pin 1 = GND
Pin 2 = Vin
Pin 3 = Vout

mndless
Posts: 17
Joined: Sun Jul 03, 2011 3:24 pm

Re: RBBB issue with I2C

Post by mndless » Tue Jul 12, 2011 8:27 am

What is the value of C2 on your boards?

C1 and C2 are both 47 uF... C2 is neg to the rear, C1 is neg to the front, same on all
I would guess that either something is backwards like the VR or you substituted parts like the VR and picked one with a different pin out.
The Voltage Regs's are installed according to the instructions....

On the TO-92's, the flat side is facing out for pin 1 to the diode

On the TO-220's, the flat metal face is facing out for pin 3 to the diode

without power being applied, I am not registering any shorts between the connections where the voltage is being recorded... you can't really clean underneath the socket, so I thought I had shorted some pins, somehow, but I guess that isn't it...

scott-42
Posts: 12
Joined: Tue May 17, 2011 5:28 pm

Re: RBBB issue with I2C

Post by scott-42 » Tue Jul 12, 2011 10:31 am

Using a multimeter, check the resistance value between:
1. A5 pin and the GND pin right next to it
2. GND and 5V right next to the A5 pin
3. A5 and the 5V one pin over.
Be sure to check with those specific pins and not some other place in the board that is labeled 5V or GND.

Is it possible for you to post pictures of one of the bad boards without the chip, both front and back?

mndless
Posts: 17
Joined: Sun Jul 03, 2011 3:24 pm

Re: RBBB issue with I2C

Post by mndless » Tue Jul 12, 2011 11:18 am

Using a multimeter, check the resistance value between:
1. A5 pin and the GND pin right next to it
2. GND and 5V right next to the A5 pin
3. A5 and the 5V one pin over.
Be sure to check with those specific pins and not some other place in the board that is labeled 5V or GND.
Will do... had to order a new toy first, will be a day or two...
Is it possible for you to post pictures of one of the bad boards without the chip, both front and back?
Will get those posted this evening... we'll see how my camera does on close ups... :)

Post Reply