Go Down

Topic: LoRa with Nano? (Read 1 time) previous topic - next topic

leech

Hello,

I have 2 LoRa SX1278 Ra-02 modules connected to Nano 328P boards. I wasn't expecting any of them to work because of the Nano not being able to provide enough current to the LoRa modules, however somehow the transmitter works correctly (the receiver instead doesn't).

Questions:

1) What's the smallest board I can use "as is" with the LoRa (e.g. without providing external 3.3V power to the LoRa) as I would use it with the UNO? For instance, I don't understand if I can use the mini pro (8Mhz, 3.3V) or not.

2) can I use a level shifter to shift the 5V to 3.3V from the Nano or do they provide the same power (therefore it would make no difference)?

Basically I'm trying to keep circuitry at minimum and as small as possible.

Sorry I'm not very good with electronics and I struggle to understand schematics I've seen around.

Thank you!

L.

jgromes

#1
Jul 23, 2019, 09:35 pm Last Edit: Jul 23, 2019, 09:39 pm by jgromes
I've used SX1278 LoRa modules with Pro Mini without any issues, your problem with receiver not working is probably not due to power issues. Though it's hard to guess without schematic and code.

As per 2: you might be confusing power voltage level and logic levels. Most SX1278 modules don't have built-in level shifters, so I highly recommend using those if you want to use board with 5V voltage. No need for level shifting with 3.3V with Pro Mini though.
https://github.com/jgromes

noiasca

#2
Jul 24, 2019, 08:15 am Last Edit: Jul 24, 2019, 08:21 am by noiasca
if you are looking for a small footprint, (nearly) ready to go solution, consider the TTGO LoRa32 http://s.click.aliexpress.com/e/c8lG1lyy - which brings MCU, LoRa and a Oled on board. Add two wires, connect power, upload sketch - works.
how to react on postings:
- post helped: provide your final sketch, say thank you & give karma.
- post not understood: Ask as long as you understand the post
- post is off topic (or you think it is): Stay to your topic. Ask again.
- else: Ask again.

srnet

I have 2 LoRa SX1278 Ra-02 modules connected to Nano 328P boards. I wasn't expecting any of them to work because of the Nano not being able to provide enough current to the LoRa modules, however somehow the transmitter works correctly (the receiver instead doesn't).

Questions:

1) What's the smallest board I can use "as is" with the LoRa (e.g. without providing external 3.3V power to the LoRa) as I would use it with the UNO? For instance, I don't understand if I can use the mini pro (8Mhz, 3.3V) or not.

A 3.3V Pro Mini will drive a SX1278 SPI LoRa module just fine.

How do you know the transmitter is working and the receiver is not working ?


leech

Hi all, thanks for the replies!

if you are looking for a small footprint, (nearly) ready to go solution, consider the TTGO LoRa32 http://s.click.aliexpress.com/e/c8lG1lyy - which brings MCU, LoRa and a Oled on board. Add two wires, connect power, upload sketch - works.
Thanks I've seen a few of these boards but they're expensive and I don't really need any of the extras they have.

I've used SX1278 LoRa modules with Pro Mini without any issues, your problem with receiver not working is probably not due to power issues. Though it's hard to guess without schematic and code.
Wait a minute..I am currently trying with a Nano board (and wasn't expecting it to work at all, but the transmitter does work and I don't know why). Check my reply to @srnet below. Using standard sender/receiver code from LoRa examples and connections from here

As per 2: you might be confusing power voltage level and logic levels. Most SX1278 modules don't have built-in level shifters, so I highly recommend using those if you want to use board with 5V voltage. No need for level shifting with 3.3V with Pro Mini though.
That's what I was saying :) If I use a level shifter to shift Nano's 5V to 3.3V and use that to pwoer the LoRa module, would it work? Basically the Nano (if I remember correctly) outputs around 50mA on the 3.3V pin..but what about the 5V pin? Does it output the same mA?

A 3.3V Pro Mini will drive a SX1278 SPI LoRa module just fine.
Ok thank you. I was also checking the Pro Micro because it has the built in usb which would make it easier for me to manage. However it has 32U4 chip and I can't find the output power for the 3.3V pin in the schematics (it says Max current output 500mA). Do you think this board would work too with the LoRa module?

How do you know the transmitter is working and the receiver is not working ?
So, I've tried the following combinations:

Nano 328P (TRANS) -> UNO (REC) = it seems to be working fine with the exception that messages are printed twice in the received (as if they were received twice) and haven't four out why (yet)

Nano 328P (TRANS) -> Nano 328P (REC) = no errors on either side but receiver will only print out the first few messages after pressing reset button (assuming a delay(10) in the transmitter's code).

therefore I assumed the transmitter is working fine (since I haven't had any issues with it) and the receiver was not (since it only works with the UNO).


However I was just trying (knowing that Nano boards don't work). So after all my question now is only if the Micro Pro would work or if I should just go with the Pro Mini (but then I'd need the USB cabling too)

Thanks! :)

L.

srnet

I would suggest that your problems could well be realted to the required logic level shifting between the 5V Nano and UNO and the 3.3V levels required for the LoRa modules. 

jgromes

#6
Jul 24, 2019, 08:20 pm Last Edit: Jul 24, 2019, 08:23 pm by jgromes
I agree with srnet, the article you linked to as the source of your wiring doesn't use Ra-02 modules, instead, it's using Adafruit SX1278 breakout. The Adafruit breakout board has built-in level shifter, Ra-02 doesn't. Add the level shifter and you should be good to go with Nano (assuming the SX1278 wasn't damaged already).

The reason I mentioned Pro Mini is that the power output is even lower than on Nano iirc, and it already has 3.3 V logic, so you don't need the level shifter there.

EDIT - Oops, didn't notice the article is using Ra-02 IRL and only using the Adafruit breakout in the Fritzing diagram. In that case, whoever wrote it has very little idea what he's doing.
https://github.com/jgromes

leech

I agree with srnet, the article you linked to as the source of your wiring doesn't use Ra-02 modules, instead, it's using Adafruit SX1278 breakout. The Adafruit breakout board has built-in level shifter, Ra-02 doesn't. Add the level shifter and you should be good to go with Nano (assuming the SX1278 wasn't damaged already).

The reason I mentioned Pro Mini is that the power output is even lower than on Nano iirc, and it already has 3.3 V logic, so you don't need the level shifter there.

EDIT - Oops, didn't notice the article is using Ra-02 IRL and only using the Adafruit breakout in the Fritzing diagram. In that case, whoever wrote it has very little idea what he's doing.
wait a second..now I'm confused.
I didn't think about it. I am using the breakout board (like this one), not the chip only. I was powering it from the Nano's 3.3V pin.

jgromes

Just to clarify then: the module you're using is Ra-02 - it doesn't have logic level shifter. Adafruit breakout boards (like this one, which is what the article showed) do have logic level shifter.

Since you want to use Ra-02 with Nano (a board with 5 V logic), it's not enough to just power the module from 3.3 V source - you also have to change the signals going from Nano to the board from 5 V logic to 3.3 V logic, using something a level shifter. You have to do this at least for SCK, MOSI and NSS.
https://github.com/jgromes

leech

Hey thank you for the clarification. I wonder how come the transmitter (with Nano) was working fine even without any level shifter the pins..

BTW I'm using a couple of Pro Mini 3.3V/8Mhz now and everything works wonderfully :)

Thanks again!
L.

Dr_Bundolo

I'm late to this thread, but thought I'd offer my input.  I prototyped a project using  RA-02 and an arduino UNO (with help from members of this board).  I got it running well.  Transmitting ultrasonic data.  I went ahead and designed the PCB's and ordered them.  Today populated the board and it wouldn't work!  I traced and double checked every trace.  Still got message RA-02  not initiated.  Finally I tried a different Arduino.  This one a newer Nano   Nano V3.0 ATmega168 16M 5V Mini-controller CH340G) and it worked just fine.   
Jeff

srnet

I'm late to this thread, but thought I'd offer my input.
Not very helpful input really.

The LoRa devices are 3.3V logic, and whilst you might eventually get them working with a 5V logic Arduino such as a UNO, its the precise details of the circuits\components you used to make the two incompatible devices work together that is important.

And then you mention a Nano, so also a 5V logic device and also incompatible with a 3.3V logic LoRa devices, without the use of logic level conversion circuitry.   

Go Up