Multiple AVRs, multiple power rails and I2C

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I've not seen any official figures for clamping diodes on AVR pins, but have seen a post on this forum from someone saying Atmel told them 0.5V, 1mA.

I'm working on a test rig where several ATmega48 boards need to be placed on an I2C bus (each board is an I2C slave). The problem is, each board has its own power supply which can be anything from 1.8V to 5V.

If my I2C master device pulls SDA/SCL up to +3.3 via 2K2 resistors, does anyone think I'm likely to encounter problems?

Are external clamping diodes likely to be of any use?

Matt.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The I²C-bus is bi-directional, so it's not enough to just lower the voltage leve from IC x to IC y. When IC y talks back to IC x the voltage level has to be raised.
Use level translators on the I²C-bus instead. There's several manufactureres of level translators suited for the I²C bus, like NXP (the inventor of I²C), TI, Maxim etc.

NXP I²C voltage level translators: http://www.nxp.com/#/homepage/cb...|pp=[t=pfp,i=43683]
TI I²C voltage level translators: http://focus.ti.com/paramsearch/...

Read these application notes:
NXP AN10441 - Level shifting techniques in I²C-bus design http://www.nxp.com/acrobat_downl...
Maxim AN1159 - Level Translators For SPI™ and I²C Bus Signals http://www.maxim-ic.com/appnotes...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My thinking was, as long as all the chips see SCL and SDA as high when they're pulled up to +3.3V and see SCL/SDA as low when any of the chips pull them down GND, there should be no need for level shifters.

I have now realised though that the clamping diodes on the AVR with the lowest supply will potentially pull the whole bus down to VDD+0.5 so the scheme will not work. I guess I will have to go with level shifters, something I was hoping to avoid.

Cheers,
Matt.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Matt,

I guess it goes without saying, but...

Any chance you can just make ALL of the boards run at 5V, and level shift your individual sensors? This is at least worth thinking about. The bus then becomes straight forward.

There is a lot to be said for having a bunch of identical, swapable boards. It simplifies building them, inventory, replacement, power supply, etc.

You would lay out the interface circuitry needed for all of the various sensors on the board, and then only populate that sensor which you were using on that specific board, leaving the other sensors' pads open.

Just a thought.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The problem is that the slave boards interface to circuitry with differing supply voltages. Seeing as the AVRs have a suitable wide operating voltage range, I am looking to deal with the level shifting on the SDA/SCL lines only instead of having to deal with all the parallel I/O between the slave boards and hardware on test.

The problem with the level shifting arrangement as linked to by Anders is that one side of the translators must be higher than the other. In my application one side is always at +3V3 (the master side) whilst the slaves can be anything between +1V8 and +5V (i.e. higher or lower than the master side).

I'm currently considering whether SPI might be a better choice for controlling the slave devices as I would not have to deal with the bi-directional nature of the SCL/SDA lines.

You'd think something like this would be easy in this day and age!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
one side of the translators must be higher than the other.
What do you mean? The voltage translators have been designed exactly for the kind of system you are building, IIRC the worst case voltage drop is about 0.5V so everything should work fine.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MattBucknall wrote:
The problem with the level shifting arrangement as linked to by Anders is that one side of the translators must be higher than the other. In my application one side is always at +3V3 (the master side) whilst the slaves can be anything between +1V8 and +5V (i.e. higher or lower than the master side).

Just turn the level translators one way on the 1.8V salves and turn them the other eway on the 5V slaves. Then you can use them both for 5V to 3.3V translation and 1.8V to 3.3V translation.
Or are you saying the voltage for a the same slave is varying all the way between 1.8V and 5V and if so why?
If this is the case can't you just make the master run at 5V so you never have to deal with higher voltgages on the slaves but only the same voltage or lower.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just found this new I²C voltage translator from Fairchild, unlike the others mentioned earlier from NXP, TI and Maxim, this one does not care what side has the high voltage and what side has the low voltage. It works mboth way and it doesn't matter which side is powered up first either. It works in the entire voltage range from 1.8V to 5.5V on both sides.

FXM2IC102
Dual Supply 2-bit I²C Interface voltage Translator
Press release: http://www.fairchildsemi.com/new...
Datasheet: http://www.fairchildsemi.com/pf/...

In stock at both Mouser and Digikey:
http://search.digikey.com/script...
http://www.mouser.com/Search/Pro...

ON Semiconductor has a similar translator that doesn't care what side the high voltage is on either.
But this one has internal 10 kΩ pull-up resistors on both sides:
NLSX4373: 2-Bit Configurable Dual-Supply Bidirectional Auto Sensing Translator
http://www.onsemi.com/PowerSolut...

Quote:
The NLSX4373 is a 2-Bit configurable dual-supply bidirectional auto sensing translator that does not require a directional control pin. The VCC I/O and VL I/O ports are designed to track two different power supply rails, VCC and VL respectively. The VCC supply rail is configurable from 1.5V to 5.5V while VL supply rail is configurable from 1.5V to 5.5V. This allows voltage logic signals on the VL side to be translated into lower, higher or equal value voltage logic signals on the VCC side and vice-versa. The NLSX4373 translator has open-drain outputs with integrated 10K Ohm pullup resistors on the I/O lines. The integrated pullup resistors are used to pullup the I/O lines to either VL or VCC. The NLSX4373 is an excellent match for open-drain applications such as the I2C communication bus.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Or are you saying the voltage for a the same slave is varying all the way between 1.8V and 5V and if so why?

The voltage each slave board runs at depends on other hardware plugged into it. I want each slave board to be identical. A board's individual supply voltage does not vary, but the boards in the overall system can each be running from a different supply voltage (hope that makes sense).

Thanks for the links Anders, the Fairchild part looks ideal (shame the package is a bit weird, but I'm sure I'll cope).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MattBucknall wrote:
Or are you saying the voltage for a the same slave is varying all the way between 1.8V and 5V and if so why?

The voltage each slave board runs at depends on other hardware plugged into it. I want each slave board to be identical. A board's individual supply voltage does not vary, but the boards in the overall system can each be running from a different supply voltage (hope that makes sense).

Yes that makes sense, you want a "one size fits all" slave board :)

MattBucknall wrote:
Thanks for the links Anders, the Fairchild part looks ideal (shame the package is a bit weird, but I'm sure I'll cope).

Designed for portable devices like cell phones where size is everything.
But more an more devices only come in tiny leadless packages.
But a device like this could even be used for a one-off verobaord or Mini-Mount protoype. Just use it in a "dead bug" configuration then the top is glued to th PCB, then you can solder small copper wires to each pad. It can even be glued upside down on top of a DIP-socket.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Designed for portable devices like cell phones where size is everything.
But more an more devices only come in tiny leadless packages.

Yes indeed. I wouldn't normally mind using a package like that because we usually farm all our assembly work out to a company with all the right equipment and expertise. This current project however is for a one-off piece of in-house test gear and would cost £££ to get built externally.

I should be able to solder the things by hand, its just a bit of a pain.

Matt.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you received some Fairchild ICs yet?

I just read this blog entry: http://errantengineer.blogspot.c...
Here I read about a relatively new company named Hendon Semiconductor: http://hendonsemiconductors.com
Hendon Semiconductors comes from a backgrouns ad part of Philips Semiconductors, who invented I²C.
They specialize in I²C-buffers/level transaltors/expanders and have a dedicated website for it: http://bus-buffer.com
They make the IES5501 I²C-buffers/level transaltor that looks like it would be perfect for your application: http://bus-buffer.com/ies5501-bu...
IES5501 only requires a single VCC supply between 2.7 - 5.5V and the I²C-inputs can be anything from 1.8V and all the way up to 15V even though the supply voltage is much lower.
Input logic low threshold is minimum 0.30*VCC.
So if you use VCC = 3.3V, then the input logic low threshold will be minimum 0.30*3.3V = 0.99V

And it is available in a standard SO8 package that's much eaiser to hand solder.

Last Edited: Mon. Jun 22, 2009 - 08:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The I2C bus was not intended for connections outside a gadget, so different power sources are not considered.
If only a single slave was without power, it pull down the I2C bus over its internal clamping diodes and thus the whole I2C bus was blocked.

In opposition the CAN bus was able to switch off devices on the bus.
This can be done, because the CAN-transceiver goes into high impedance without VCC.
And then the bus was not blocked.

If you want not use CAN, you can also use CAN-transceiver chips with the UART.
It looks similiar to the RS-485 with the difference, that no signal was needed to switch the direction of the transceiver.

Peter

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

danni wrote:
If only a single slave was without power, it pull down the I2C bus over its internal clamping diodes and thus the whole I2C bus was blocked.

Unless the unpowered part of the bus is isolated/disabled using the ENABLE pin on the IES5501 I mentioned above. Then it wont pull down the bus on the other side of IES5501.
By connecting the ENABLE pin to the VCC rail of the unpowered side of IES5501, this side automatically isolate itself from the other side of IES5501 as long as there's no VCC present at this side of IES5501.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

The project is currently on hold whilst I get some other stuff done, so I have not finished designing yet. Thanks for the info.

Matt.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you have a "bus" then you m ust treat it like a "bus" so it runs on the specified voltage and signal levels are specified....

If you need your bus conncted devices to run on different supply voltages you must ensure that teh interface will always be compattible to the bus. If not you WILL run into problems in the future with unforseen problems.

If you stick to that thenin the future you can always easilly expand your system and only have to ensure that the peripherals comply to your bus specification.

Now it is a little more work. In the future it will save you lots of time.