Interfacing 3v logic (LoRa RFM95 Transceiver) with 5v logic (Arduino Pro Mini)

I've very recently gotten into electronics and have attempted to create a weather station using the Arduino pro mini.

Hooking up my 5V sensors was no problem but I'm baffled as how to connect up the RFM95 lora transceiver which uses 3v.

I understand I can use logic level converts such as this one listed on Adafruit

However, do I need to just shift the VCC connection or all pins that interface between the two devices?

Any help is appreciated

A bidirectional logic level shifter cannot be used for power connections.

3.3V and 5V devices are powered separately, but must share a common ground. The 3.3V output of a 5V Arduino can be used to power 3.3V sensors, but may not provide enough current for radio modules when they are transmitting. Use a 3.3V level shifter in addition to providing 3.3V power.

If the radio does not work properly when powered by the Arduino 3.3V output, you can try adding a 100 uF capacitor from the 3.3V output to ground, or use a separate, higher power 3.3V voltage converter (connecting all the grounds).

Ah I see so I can level shift the logic but not the power connections

Powering 3.3v and 5v devices separately seems impossible with the pro mini. I only have two power connections, RAW takes in my battery power input and VCC outputs 5v. This arduino model seems to have no way to deliver 3.3v power.

Is there any way around this?

Perhaps I will have to purchase the 3.3v model or source a 5v lora chip

You can certainly buy 3.3V step down modules, but using a 3.3V Pro Mini is the way to go.

Okay thanks for your help!

If you really want to interface with 5V, that's not too hard, but a standard bidirectional level shifter will NOT work, for the simple reason that they're too slow for SPI signals. They're designed for use with I2C and similar signals.

To level shift SPI signals you need a buffer like the 74VHC125, which has 5V tolerant inputs so when powered at 3.3V can be used to shift down the SCK, MOSI and SS signals. The MISO signal doesn't need shifting (from 3.3V to 5V) as the Arduino will see 3.3V as high, but you better connect the SS line to the enable of that buffer if you want to use other SPI devices in the same project.

For 5V to 3.3V power I'd just use a linear regulator, e.g. the AMS1117-3.3 (also conveniently available as complete module). A buck converter is overkill for this small step at these low currents.

All in all a 3.3V Pro Mini does make life a lot easier. Add such an AMS1117-3.3 module and you can easily power your project off a common 5V (USB) supply.

wvmarle:
If you really want to interface with 5V, that's not too hard, but a standard bidirectional level shifter will NOT work, for the simple reason that they're too slow for SPI signals. They're designed for use with I2C and similar signals.

The cheap logic level converters that you get on eBay and Aliexpress for instance are as you suggest not fast enough.

I did once check the signals on a scope when driving an RFM9x from a Arduino Mega and they were very marginal, definetly not to be relied on.

SnowTurtle96:
Perhaps I will have to purchase the 3.3v model or source a 5v lora chip

There are some 5V shields for the LoRa devices such as RFM95, they have the logic level conversions as added components.

I am not aware of a module similar to the RFM95 that is 5V compatible, the RF IC on them, SX127x, is of course a 3.3V device.

srnet:
The cheap logic level converters that you get on eBay and Aliexpress for instance are as you suggest not fast enough.

The exact same ones for much higher price at Adafruit et.al. :slight_smile: Doesn't make them faster.

Just out of curiousity I checked the bidirectional logic level converters that I bought before are now selling at half price of a few years ago - just RMB 0.59 for a 4-channel one (based on the BSS138 MOSFET). Incredible, so cheap: PCB, headers, 4x MOSFET, 8x resistor, all soldered and packed in an antistatic bag.

Replacing the resistors with lower values should help making the rise time shorter, but still not something to rely on for SPI level shifting.

The 74VHC125 is going to cost me almost double at RMB 1.07 a piece (SOP-8 package). Much faster, but not bidirectional, making it unsuitable for I2C level conversion. Still inexpensive.