Power shifting problem

Hello, with no calculations whatsoever I have bought teensy 4.1 and xbee3. Now i am facing problem with voltages. While teensy works with 3.3 V , xbee on the other hand works with 5 V. I solved the supply problem, but the problem is xbee's rx tx comes out with 5 voltage. So my concern is that, when I connect xbees rx tx to Teensy , Teensy would break.
How do I solve this issue? i have read somewhere that you put resistors between the 2 modules. Can you help me solve this isssue?

The easiest, safest and most reliable approach is to use a bidirectional logic level shifter, like this one. It is good that you recognize the issue of voltage mismatch. A lot of posts on this forum come from people who have no idea why that might be a problem, and wonder why their setups don't work.

On the other hand, there are plenty of 3.3V radio modules with outstanding performance. Adafruit has a great collection of MCU + radio modules that are very easy to use and work out of the box. Check out the Feather series.

1 Like

Just do a search for Bi-directional Logic Level Shifter in your favorite marketplace.

Not a resistor but two in a configuration known as a potential (or voltage) divider. Here is a typical diagram for that.

In this specific diagram the Arduino output is the 5V system and the Raspberry Pi GPIO pin is your 3V3 system.

+1. These are not bidirectional lines, so you don't need a bidirectional translator. You just need the resistor divider when going from 5V Tx to 3.3V Rx. The 3.3V Tx to 5V Rx doesn't need anything because the 3.3V signal will be read as high by the 5V device.

Not strictly true. If you look at the specifications you will see that it is strictly not high enough to guarantee detection. But most of the time you can get away with it.

I understand, but I have never seen it fail, and I see Adafruit modules that depend on that working, and they don't fail either.

I made a project some years ago and part of it was reading a sd card, that is 3.3v and the Arduino was 5 v so I used the attached circuit, maybe you can try with those values for R1 and R2, for instance 13-SCK was the Arduino output and went to the 3.3v sd card clk pin, while data-out came from the sd card to the Arduino directly.
sd-card_thumb

You might not, but that is only because you have not tested it enough. For example did you test it at the full temperature range, or did you just use in an a "living room" environment?

Also you would need to test quite a few examples not just one, maybe up to 100 in a proper test chamber for at least six months. Did you control the voltage you were testing it at to cover the full range of values?

The internet if full of incorrect statements like this, especially with respect to voltage tolerance.

The bottom line is that the manufacturers of a device know what they are doing, and if the specifications are not followed to the letter then all bets are off. The data sheet is a sort of contract between the parts manufacturer's and the user. Suppose an industry user is taking a million of these devices a year and the failure rate is high, say 10% the industry user is entitled to sue the manufacturer of the device for compensation. One of the biggest defenses to a case like this is if the device manufacturers can point to a use that falls outside the conditions stated in the data sheet.

I know you are not a big user, nor is Adafruit who might only use a few hundred devices a year, if that. But remember you, and I (now) are only hobby users, who ride, like a flee on the back of a giant.

Why?
The circuit will work with any values who's ratio is correct. The only thing about using values with high absolute values, is that it could slow down the signal passing through it. That is why I suggested the values I used.

So it depends exactly on how fast the Arduino is sending signals to the SD card.

1 Like

Where did you read that.
Almost all modern modules are 3.3volt-logic, or less.
See this, page 26.
Leo..

Just to give OP a starting point to test, and because sometimes total consumption matters, Actually that was not the case for my SD card project so maybe I should try lower values :slight_smile:

So for serial 3.3V Tx to 5v Rx, you could use the SN74LV1T34 powered at 5V. But for the SD card MISO line, it would be the tristate SN74LV1T125 powered at 5V, with the card's CS line driving the OE pin.

1 Like

Xbee 3. I tested its voltage and it was 5 v

Supply voltage or logic voltage.
Leo..

What Xbee part number do you have?
It should operate between 2.1 to 3.6 V.

How did you measure the 5V on tx?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.