0

I'm designing a PCB based on an ATxmega microcontroller (max. 3.6v tolerant). I plan to connect a range of external 3.3v devices. However, I do have a few 5v devices that I want to connect.

There are many designs and ICs for 3.3v <-> 5v bidirectional level convertors already out there. But here's the caveat: I want to allow both 3.3v and 5v voltages on the same pin. So, if the connected device is 5v, the level convertor will kick in and convert the voltage to 3.3v. If the device is already 3.3v, the level convertor does not convert the voltage.

For example, if a 5v device was connected, the circuit would look like this:

|------------|         |----------------------------|         
| 5v device  | <-----> | 5v <-> 3.3v level convert. | <-----> ATxmega pin
|------------|         |----------------------------|         

If a 3.3v device was connected, the circuit would be connected directly:

|-------------|                  
| 3.3v device | <-----> ATxmega pin
|-------------|                 

What circuit will bypass the level convertor when the voltage is already 3.3v, and convert the voltage when a 5v device is connected?

In other words, can I design an automatic-ranging 3.3v<-->3.3v/5v level convertor (without jumpers)?

mr_schlomo
  • 513
  • 3
  • 8
  • 15

2 Answers2

3

The question is: How will your device know what voltage to use? The attached device will have to tell it some how. Will your device have a sense pin so it can test the attached device's supply voltage?

If so, the answer is easy. There are many voltage translators out there, e.g. the TI SN74LVC8T245. The input power supply will be your Atmel's 3.3v, while the output voltage supply can come straight from your device. This way, you will be able to connect a device with any voltage requirement from 1.65 to 5.5v, and it should just work.

Schematic

Rocketmagnet
  • 26,933
  • 17
  • 92
  • 177
0

Just use a level-converting buffer that can accept a wide input voltage range. There are many companies that make them. The TI SN74ALVC164145EP is one of them, but there are hundreds more with different speeds, capabilities, voltage ranges, and number of bits.