Show Posts
Pages: [1] 2 3 ... 8
1  Products / Arduino Due / Re: Due I2C not working on: May 27, 2014, 07:36:01 am
projectgus ,

All True...  Except for if you produce a design based to operate just under the maximum allowed specifications, then you are making a product that has inherently reduced reliability and longevity (for no good reason).  Stay well away from the max specs for catastrophic electrical failure, and you'll be much, much happier.

Presumably, the DUE was designed for experimenter's and novices, using 'typical' (common) interfaces.  While pushing the speed boundaries of the I2C bus is a possibility, anyone serious about it would most likely use an I2C buffer with rise/fall time acceleration (and not rely on a uC's raw dio pin for drive capability).  Considering the intended audience, the DUE design should error on the safer-side of electrical failure.

I truly believe that the pull-up resistor choice on the DUE was a mistake, and it would have been done differently if they had the chance to do it all over again.  These things do happen.

Also, remember, the installed pull-up resistors are 1000 ohms, not 1500 (as shown in the prints).  Two DUE's connected together puts the I2C dio pins right near max spec.

Regards,

Chris
2  Products / Arduino Due / Re: Due hanging/freezing/locking on: April 30, 2014, 07:12:36 am
vanduino,

As for the connection issues you see, I'm not so sure.  I've had typical issues with long (cheap) usb cables.  Also, the Com-USB port translation often gets scrambled on my HPZ620 desktop (Win7).  However, I see that with all embedded devices that I toy around with (not just Arduino).

Lowest in frequency, but  more distressing, is when the Due locks up during an interrupt event. I have only one interrupt, on a pushbutton, but if the button is repeatedly pushed too quickly, the program freezes. If I push the reset button, the Due reboots but the I2C bus fails (cannot find devices), so all I can do is unplug/replug the USB connection and start over.

Now, the above could be a classic hardware-to-interrupt issue.  If the switch connected to your DUE interrupt pin is not properly debounced, then the ringing caused by a switch can send the processor into la-la land.  I've seen this several times when attempting to connect a mechanical switch to a hardware interrupt pin, but not specifically with the DUE.

If you haven't done so already, clean up the switch signal (either a hardware debouncer, or clean pulse source), and try again.  Because it's an interrupt, debouncing in software will not help.

Good luck,

Chris
3  Products / Arduino Due / Re: Anyone had success with I2C on the Due? on: April 25, 2014, 10:30:54 am
vanduino,

About a year ago I made a system that involved many I2C nodes on a single bus.  The chips included:
  • PCA9539
  • LTC2489
  • LTC2655
  • PCA9541
  • plus LCD displays

This was an I2C multiplexed system with up to 16 multiplexers controlling I2C traffic to sub-branches (each sub-branch with many I2C devices).

I used only the first I2C bus, and the Ethernet shield interface.

I got it all to work, but I had to write a bunch of code because the Wire library is essentially broken for all but the most basic i2c transfers (and I believe that it still is).

It's not a matter of "compatible chips".  It's a matter of the interaction of the Wire library and the SAM chip hardware (the interface by Arduino was never completed).

Do some searching to find out what I2C modes are not supported (my user name may help, since I'm pretty good at crabbing about it).

Also, the I2C pins are FRAGILE.  I cooked my fair share of DUE's by abusing the I2C pins.  (Is your DUE running HOT?)

I also recommend this:
http://www.pctestinstruments.com/
There are others (many cheaper) too.

An overall schematic is attached.  Do not trust it & confirm everything.

Good luck,

Chris
4  Products / Arduino Due / Re: Bill Of Materials (BOM) required for Arduino DUE on: April 18, 2014, 07:36:31 am
The attached was generated from the default import of:
http://forum.arduino.cc/index.php?topic=146574.0

No guaranty of accuracy.  None at all.

Maybe somebody else has a validated list...

-Chris
5  Products / Arduino Due / Re: Using Analog Reference on: April 18, 2014, 07:26:15 am
Hi Ryan,

I have never played around with this.  However, when I was working on this:

http://forum.arduino.cc/index.php?topic=146574.0

I added the notes in the attached picture Capture.png.

Component highlighed in Capture1.png.

Why would they do this?:  It makes the board easier to use (consider the market).  Also, Vref can only get smaller than this current value.  By fixing it on the board, I suspect that they hoped to reduce failures due to folks applying 5V, and the like.

Regards,

-Chris
6  Products / Arduino Due / Re: impossible to use I2c display on: April 10, 2014, 07:52:01 am
motodaddo,

Please provide a schematic that accurately represents all of your circuit (relay too).

In particular, there are surge suppression tricks when switching relays on/off that could cause some problems.

-Chris
7  Products / Arduino Due / Re: Arduino DUE Connect to PC & COM Ports on: April 09, 2014, 03:06:43 pm
Dennis,

In short: yes.

However, look at this if you need to manage more...
http://forum.arduino.cc/index.php?topic=187831.0

-Chris
8  Products / Arduino Due / Re: i2c + DUE don't talk!! on: March 17, 2014, 12:08:24 pm
I2C works with me , unless you need to use the error returns form Wire.endTransmission(), But the main part works .
Yes... If I remember correctly, anything that relies on a NACK detection will fail.  NACK is not only used by the I2C spec as a means to detect an address that is not responding, but it is also used for certain protocols (like repeated starts..).  This is not as unusual as it sounds (many ADC's and DAC's use this type of protocol).  One simply must check the datasheets carefully to see what's required by your I2C device.

So, we're currently in a situation where some I2C devices work on most other flavors of Arduino's, but perhaps not on the DUE.  This is where much of the confusion over I2C with the DUE comes from.

So, simply saying that the wire library works, or doesn't, isn't enough.  The I2C protocol is just not fully supported with the current default library for the DUE.  This is not necessarily an awful thing.  However, it can be disappointing (and a little warning would have been nice).

-Chris
9  Products / Arduino Due / Re: i2c + DUE don't talk!! on: March 17, 2014, 10:24:41 am
That is why I indicated in my last post that Wire is broken on DUE.  It is possible other folks are not running into the same issues.     

If I can chime in here... I2C on the DUE is not exactly broken... It's just not complete.  The way that the SAM chip handles the I2C registers (at the hardware level) is different than the other Arduino's.  This breaks some of the default functionality of the Wire library.

I suspect that it became too much work (with too little time) to make the entire default library work, so they hobbled it, to make it function at a very basic level (with no warnings about its short-comings).

The end-result: one needs to dig a bit to determine if the I2C hardware that they wish to use will work with the lame default wire library.  Some will work, some will not.  These limitations have been listed, discussed, and fixed by members of/in the forum.

However, I believe that the default & official wire library has still not been updated.

The ghosts, my friends, are in the details.

Regards,

Chris
10  Products / Arduino Due / Re: i2c + DUE don't talk!! on: March 10, 2014, 01:33:22 pm
psycho82,

I2CScanner does not work with the DUE.  Search this forum for alternatives.

Also, there's a big warning about the GY-521 I2C pull-ups.  
http://playground.arduino.cc/Main/MPU-6050#
Be careful with low-valued pull-up resistors and the DUE board, as it's easy to burn up the DIO.  The DUE already has 1k pull-ups on the I2C lines.

Good luck,

Chris
11  Products / Arduino Due / Re: Adafruit SSD1306 128x32 OLED, I2C pull up resistors? on: March 07, 2014, 10:34:04 am
conradelektro,

It looks like the adafruit board has 10k pullups (see attached pic).
Sourced from:
https://github.com/adafruit/Adafruit-128x32-I2C-OLED-Breakout-PCB

It might be easier to remove those instead.

If you don't remove any resistors, the net effect would be a 4mA pulldown current.  This is still in-spec for the SAM chip (source 3mA, sink 6mA).  It's just unnecessarily stressful.

I have never used this board.

-Chris
12  Products / Arduino Due / Re: I2C (Wire) pull up resistors, Arduino Due, 20 (SDA0-3), 21 (SCL0-3) on: March 06, 2014, 01:59:48 pm
My question: Where are these 1 K pull up resistors (RN5D and RN5C) on the Arduino Due board? I might try to remove them.

As you might guess from their designators, RN5D and RN5C are part of a resistor array.  Fortunately, they are the only two resistors used in the array (the rest are not connected), so it's ok to remove the whole thing.

See the attached pic for location.

I always remove them (with hot tweezers).

Regards

Chris
13  Products / Arduino Due / Re: I2C (Wire) pull up resistors, Arduino Due, 20 (SDA0-3), 21 (SCL0-3) on: March 05, 2014, 08:36:01 am
Conrad,
Is it true that I do not need additional pull up resistors if I connect an I2C slave to pins 20 (SDA0-3), 21 (SCL0-3) of the Arduino Due? (On the Arduino Due schematics it is noted as "I2C Voltage Translator".)
Yes.  You do not need to add (nor should you) any additional pull-ups anywhere in this I2C bus.  The resistors on the DUE are very aggressively sized (small).  Adding any additional pull-ups on the I2C bus could destroy these IO pins.  Also, the last time I checked, the print says that they are 1.5k pull-ups.  However, in reality, 1k pullups are installed on the PCB (double check to be sure).

Quote
If I use the Wire-Library the I2C communication is via pins 20 and 21 ?
Yes.

Quote
How do I do (which library) I2C communication via pins 9 (SDA1 = TWD0)  and 10  (SCL1 = TWCK0) ? There are no pull up resistors for pin 9 and 10?
It's the same wire library.  Do a quick search for "wire1" for solutions.  Also, become familiar with the limitations of the current wire library, as many of the lower-level (more advanced) routines still do not work.

In addition, yes, you will need to add external pull-ups for SDA1/SCL1.

Good luck!

-Chris
14  Products / Arduino Due / Re: Arduino Due on: March 04, 2014, 10:46:19 am
TopCat36,

Please consider adding a series resistor to Pin53.  This will add a bit of protection from the 3.3V line if some user inadvertently sets Pin 53 as an output.

A simple series resistor here could save the whole chip (and not affect the operation of your circuit in any way).

-Chris


15  Products / Arduino Due / Re: Due 5V once again on: March 04, 2014, 10:39:21 am
And SCL/SDA directly to Pins 20 and 21 ? I measured the 2 pins from the interface, while powered from 5V and they have 5V each to GND.

You should level shift the voltage levels from the 5V gadget to the DUE's 3V level.

There are chips specifically designed to do this for you.  It is the Right Thing To Do.

There is a possibility of your 5V gadget working fine with the I2C lines operating at 3V.  If you can remove any pull-up resistors on the gadget's I2C lines (I2C lines are supposed to be open-collector), and use only the existing pull-ups on the DUE (which are tied to 3V), then that may be a working, however marginal, solution.  You'll need to read the datasheets very carefully to see if the voltage thresholds are compatible.  There have been numerous discussions on this already on this forum (do some searching).

If your gadget does not have pull-up resistors (and its I2C lines are configured as push-pull), then your gadget has an improperly designed I2C interface, and its designers should be flogged.

Running the DUE with the I2C lines pulled to 5V may work  - for a while.  However, this condition is out-of-spec, and may destroy the IO on the SAM chip.  Then all you'll have is a dead DUE.

Good luck,

Chris
Pages: [1] 2 3 ... 8