Big LoRa32u4 boards topic

LoRaWAN and LMiC are complicated enough of necessity, that the first question in choosing a platform generally needs to be “is someone already actively supporting this device for this use?”

Based on that I would strongly discourage someone who doesn’t want to get deep into LMiC internal logic from trying to use an Arduino-based LMiC on an ESP32 as the architecture of timing is just too much of a mess by the time it filters through the Arduino layer’s pretending to be a very different sort of system than it is and gets down to the LMiC code. Unless a repo is explicitly claiming good support and capability, the fact that the code can build and transmit doesn’t mean it’s going to reliably catch downlinks.

In constrast, past posts here suggest that the native ESP32 port might make things clean enough to be reasonable and get the timing right. Given the native port would be exclusive to the ESP32 anyway, it is unique challenges are presumably not going to be shortchanged there.

At any rate, there’s a lot of complexity there that there isn’t with the ESP8266 (and the more extreme ESP8266 pin shortages are with the smaller modules - better modules expose a reasonable number of pins, especially as most IoT sensors are bussed devices anyway) . The ESP32 is not the “better ESP8266” that many first assume, it’s actually a quite different part with a quite complex software stack.

There is no simple answer to what would be good alternatives for LoRa32u4 because that depends on one’s use case(s) and requirements.

A good choice would be the hardware whoever maintains the LMiC branch one wants to use, is focusing on for their own development and testing. For example, for MCCI’s LMiC that would be the (ARM based) Adafruit Feather and their own (Murata module) STM32L0 board, and to a lesser extent the ESP8266. In comparison the ATmega32u4 gets little if any attention there, presumably because it’s short enough on resources to not be worth investing effort in (though as a mature Arduino port that works the way Arduino code expects a platform to, presumably it does work to the degree that it fits)

1 Like

For many applications (battery powered low-power applications included) the number of GPIO pins on ANY ESP8266 (e.g. ESP-12F module) is just too limited for any serious applications (when using a SPI LoRa module).
For example, a battery powered weather station with some I2C based sensors:

  • Use SPI for the LoRa module.
  • Use shared I2C bus for sensors, FRAM (or whatever that can be connected via I2C).
  • Use ADC pin for battery voltage monitoring.
  • Use one GPIO for switching peripheral power (e.g. enable/disable battery monitor voltage divider).
  • Use deep sleep with auto wake-up from internal timer (requires a dedicated GPIO pin).

This just doesn’t fit on an ESP8266 because it has too little GPIO’s available (and some of the GPIO’s have strict pull-up/pull-down limitations which limits their usability).

Due to limited number of usable GPIO ports the ESP8266 when used in combination with a SPI LoRa module, will be unsuitable for many/most LoRaWAN applications.

If you know a pin mapping for ESP8266 where the SPI LoRa module (with DIO0 and DIO1) and the I2C bus (e.g. using a simple I2C sensor) are both working successfully I would be delighted to know it.

Do you have any references / links to articles where timing issues with ESP32 Arduino Core are confirmed and where that is further explained?

Yet those discussion are very interesting, we are starting to get of topic :wink:

I would emphasize that perhaps the one major LoRa32u4 drawback is its too little memory.
This is something to think about when choosing a devboard.

1 Like

Yes we are indeed, let’s go back on track and stay on topic.

Hello Guys,

I need help disconnecting the LDO by grounding the EN pin in order to conserve more power in deep sleep state.
Story: I’m using a lipo 800mah. And i’m reading my sensors every 2min. I get 1 week of life.
The sensor is always on sucking on 3.3volt rail.
My basic understanding: I though on using a mosfet P Chanel and drive one of the board digital pin high to wake the sensors. Read them and go back to Sleep connecting EN to ground through the mosfet. Can you help. I’m software developer, don’t have much experience with mosfets.

With the EN pin on the regulator low, the 3V3 supply to the processor is off as well. So how is the board going to wake up again ?

Ty for the help @LoRaTracker . Did not think of it. I don’t have resources or time to invest in a external more eficient voltage regulator for now.
So as a stop gap i should cut the power to the sensors only. You have any recomendation on the most eficient mosfet (i think N channel this time). And a wiring diagram if it is not asking too much :slight_smile: I don’t know how to work with this 3.3v

P channel, high side switching is best, IRLML6402 is a P MOSFET that works well for 3.3V devices.

PMOSFET as Switch


Thanks Again @LoRaTracker. I asked a friend and sourced localy AO3413 which he said is equivalent. I’m building that circuit.
But don’t i need the oposite logic for my application? Ex: R2 as Pull Down? 47k Resistor to Ground instead of VCCIN? I need it disconnected when a sleep.

The P-Channel MOSFET in this circuit will only open (‘let through’) when control input is pulled low. To prevent uncontrolled switching/‘oscillating’ when no high or low input signal is present R2 is used pullup the gate to VCCIN.

You cannot make R2 a pulldown instead of a pullup because then VCCOUT would always be on if no high or low input signal is provided.

Well, if you want to turn that MOSFET on with a logic high, then you need a transistor inverter in front of the VCC_CONTROL pin, but whats so difficult about using a logic low to turn it on ?

The pullup to VCC is there for a couple of reasons, one of them to keep the devices your switching off as default when the the microcontroller restarts.

The 32u4 will preserve pin logic states when it’s asleep, so the external devices stay on or off depending on how you leave them.

1 Like

Remember that for typical technologies you must not apply any I/O voltages to the sensors when you de-power them. At best you’ll have power leak as the I/Os try to re-power the sensors, at worst you can get them in an inconsistent state or in theory even damage them.

So you need to take any I/Os that run to the sensors low before you remove power. And if you have any pull-up resistors, you need to disable those, too.

1 Like

Thank you for the schematic again, it works with the AO mosfet too. Pins stay high during deepsleep. But i’m still far from big gains. Just doubled from one week battery to 2 weeks on 800mah.
Soon i’ll reproduce the fet board and reduce the caps to 330nf and try to reduce the 150ms sleep in my schematic to 80ms after deep sleep. Can’t this BSFrance last longer? Are there better alternative boards? I just need lora + lipo batery + 2 analog pins to read 2 sensors.

I’m just reading with analog pins. Do i need to put them in output and low before deep sleep?

I am new to using loRa cards. I currently have two lora32u4 cards (V1.2 and v1.3). When I test my programs to read my sensors (BME280, SHTxx) in I2C, using the same program it works on the V1.2 card but not on V1.3. is this normal?

The boards are not identical and each requires different preparation/configuration.

  1. Read the start topic for differences between these boards.
  2. Have you configured the software correctly for each board?
  3. Have you wired the board(s) correctly (if needed - check start topic)?
  4. What software are you using?
  5. What exactly does not work?
  6. Provide details and don’t make others having to guess.

Hi, I’ve been trying to get my LoRa32u4 ii v1.2 board uploaded with standard blink sketch (“the hello world” of arduino). Im having major issues with getting anything uploaded. This is the error i consisstently get:

avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = ""; type = 
    Software Version = .; Hardware Version = .
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader

Ive checked/tried the following:

  • the same usb cable works with other arduinos
  • ive tried the adafruit board
  • ive tried the bsfrance board
  • port is properly selected

Another detail, the LED on my board keeps pulsating regardless if im uploading or not. Ive tried reseting and uploading and double clicking reset and long pressing reset. nothing seems to work

Any help much would be much appreciated.

forgot to mention, ive never seen anything getting outputted to the serial monitor. Ive been doing aloot of arduino over the years and no newbie…this is the first board i have not been able to get working

What IDE (Arduino, PlatformIO, other) are you using and which version?
What board have you selected in the IDE and which Arduino Core are you using (in Arduino IDE check with Boards Manager)?

Which LED, the orange power or the white user LED?

Which board exactly?
Selected as board in the IDE or did you use a real Adafruit board (and if so what was the result)?
Have you succesfully flashed any ATmega32u4 before or is this your first 32u4 experience?

  • ive tried both arduino ide and platform io (both latest version)
  • im on osx 10.15.1
  • white user LED
  • ada feather 32u4
  • my first 32u4 experience that i can remember

im starting to think my bootloader is missing or corrupt somehow. Whats the best way to load a new boatloader for the LoRa32u4 ii (bsfrance)?