Big LoRa32u4 boards topic

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)?

If the white LED is already blinking then the Blink sketch is already working… :sunglasses:
(just kidding)

That also came to my mind as a possibility.

I have no experience with putting a bootloader on the BSFrance LoRa32u4.
The site is currently not available (nginx bad gateway error) so not possible to look for support there. They also do not have a bootloader available on GitHub.

It’s possible that an Adafruit Feather 32u4 bootloader would work but I’m not sure.
Probably the easiest to get it onto your board is use the Arduino IDE, use the Adafruit AVR Boards Arduino core and select the Adafruit Feather 32u4 board and then use Burn bootloader from the tools menu. This does require a suitable programmer though, e.g. USBasp (uses SPI for firmware upload) to upload the bootloader to the board.

The (Caterina) bootloader hex file is already included in the Arduino core.

k. ill try that. thx!! : )