New 1W DIY variant: Xiao nRF52840 + Ebyte E22-900M30S

Wanted to share a new variant I have been working on for the last several weeks. It pairs the Xiao nRF52840 with an Ebyte E22-900M30S. For me this was sort of a holy grail as it combines the Ebyte’s 30 dBm Tx power with an idle power draw that’s not terribly far off from that of a RAK 4631, and is also pretty compact.

Looks like my PR was just merged (thanks @thebentern!) so the variant can be found here. Included there is a short how-to doc (README.md) which details the steps needed to get it running. I also drafted up a basic PCB for this setup which is here. It’s pretty easy to wire up on a protoboard too; the pics below are of an early build on an Adafruit “small tin” perma-proto, which is a near-perfect size.


11 Likes

I’m considering this very configuration. Are you planning to develop a carrier PCB with onboard power and charging circuits?

1 Like

Yes indeed. I have a first attempt that integrates the MiniBoost and JST/switch circuits into the schematic (instead of using the breakouts) but even better would be to include a solar charge controller of some kind – maybe even your LTO setup? Though I know that’s still a work in progress. In any case, I’d be psyched to collaborate on something to that effect!

2 Likes

I’ll reach out on Discord. 3 of us are actively working on something like this. If we use the CN3791 battery IC it could handle charging from USB and from solar (li-ion only). The TPS61023 IC looks like a good choice to integrate on the board.

2 Likes

I’ll give one of these boards a try, thank you. I have some IP2312 units coming, which are also rated to run at 2A, but I just ordered a couple C3791 based boards to try as well. TY.
CN3791 Datasheet
Looking at Figure 1, it would be nice if any manufacturer placed a jumper or switch between R1 and D3/D4 - the ability to turn off the indicator lights, without using a soldering iron, is a must-have.

1 Like

Agreed. Most of the time these boards are installed in an enclosure and the charging light is unnecessary and wastes power.

I’m currently building a solar charger module using the CN3795 and I won’t include a charging LED.

1 Like

@amoroz Hi Amoroz, I’ve been designing a board with a similar component choice to what you have done and I wanted to get your thoughts. the main thing that I think is different is that I wanted to run the E22-900M30s at 3.3 volts and not use 5V at all.

I tried to use the same pinout as you to save trying to maintain two firmware versions.


Nice, looks good! The only potential issue I see is that, from what I can glean from Seeed’s docs, the 3.3V pin is tied directly to the nRF52840’s 3.3 V regulator, which can source a maximum of only 25mA – per the third post in this thread: nRF52840 & 20V USB Power Delivery? - Nordic Q&A - Nordic DevZone - Nordic DevZone

Since the E22 will need much more than 25mA, I would probably power it directly off the BAT+ and BAT- pins, in parallel with the XIAO. That configuration works fine for me: it provides ~3-4 dB less TX power (depending on battery SOC), but also a proportional gain in power efficiency, since you are cutting out the boost controller losses and pulling less current overall – 650mA instantaneous Tx current @ 3.7V, vs around 1A @ 3.7V with boost.

I might change a couple other things in the schematic too:

  • The signal you have labeled LORA_DIO2 is actually BUSY. It’s connected to the XIAO nRF correctly, so it will work as-is – but probably good to update its name to e.g. SX126X_BUSY in order to avoid confusion.
  • On the E22, the TXEN pin is connected to DIO2, but also to a signal labelled ‘SX126X_TXEN’ which does not need to exist when running the E22 in ‘automatic Tx/Rx switching’ mode. (I don’t see that it’s connected anywhere on the XIAO side, so as above, more of a schematic clarity thing than a practical issue.)
2 Likes

Thank you for the feedback, I will work on a revision 2 and I might upload the design to GitHub for collaboration.

Would you suggest having txen go to D6? I think it’s the last GPIO I have available. Will this be needed if it is in auto transmit mode?

I will rename the LORA_DIO2 to BUSY. I think that makes more sense.

I will definitely look at the power and change how it works, 25mA is quite a limitation. So your suggestion for powering form Bat+/- is a good one.

I’m interested on getting an update on your build and how it has been running?

So the E22 presents two options for control of Tx/Rx switching:

  • “Manual” mode: in this configuration, both the E22’s TXEN and its RXEN pins are connected to the MCU, and the MCU controls Tx/Rx switching. The E22’s DIO2 pin is unconnected.

  • “Automatic” mode: in this configuration, the E22’s TXEN and DIO2 pins are connected to each other, and nothing else; the E22 controls them itself. However, the firmware must still define SX126X_RXEN, and the E22’s RXEN pin must still be connected to that MCU pin.

There are probably use cases for manual Tx/Rx switching, but in my experience the two modes perform identically. Since the XIAO has such limited GPIO to begin with, I have been using automatic mode exclusively.

Your schematic is essentially correct for that setup, except that you do not need the SX126X_TXEN signal coming off the E22’s TXEN and DIO2 pins on the right – that can be omitted, since neither pin will be connected to the XIAO.

My builds of this setup have for the most part all worked very well. The XIAO’s built-in charger is too slow (100 mA max) to be practical given the battery sizes you will probably want to use (500+ mAh), so adding an external charger is a good idea. I like this one from Adafruit since it’s small and cheap, and it includes a JST for the battery and two pins which can be used to add a physical on/off switch.

In order to build the firmware, one small change is needed in light of recent updates to the repo – variants/xiao_ble/variant.h should have the following line added:

#define BATTERY_SENSE_RESOLUTION_BITS 10

Without this change, the build will fail with an error like this:

src/Power.cpp:192:79: error: 'BATTERY_SENSE_RESOLUTION_BITS' was not declared in this scope

(One of these days I will get around to PRing this :slightly_smiling_face:)

Good luck with the project, and let us know how it goes!

3 Likes

Greetings. I have not been able to build the firmware, as I am really not familiar with platformIO. I am very familiar with the Arduino IDE, but never used platformIO till today. Could you please post a copy of the compiled firmware here for us to download? I would really appreciate it. I just got two Ebyte modules in the mail today. I already had the Xiao board waiting for a cool project, and this is a pretty cool project!

Sure! Here’s a uf2.

Re: PlatformIO, not sure what error(s) you’re seeing, but there are a couple extra steps needed to prepare the environment. These are all wrapped up in xiao_ble.sh, so if you haven’t yet, I would try running that. (Note that if you’re running Windows, you’ll have to translate that script into something like PowerShell, or just run the commands manually at the command line.)

firmware.uf2 (1.2 MB)

That was fast thank you! Im running Linux Mint. I did run that .sh file but it did not work, but I did put the files in the directories where they belong. I am getting an error in platformIO, “(project configuration file): ‘No section: ‘nrf52840_base’’”

@bamorph The components are stating to trickle in and I am looking at using a board like yours. Do you have this on github?? or maybe share the gerber files?? Thanks…

1 Like

Hi, I’m happy to send over the Gerber files but my design is untested and is likely to be not ideal as I am only supplying 3.3v to the E22 900M33S rather than the typical 5v.

Hi,
I have decided to use the TPS61023 boost board from Adafruit and a separate charging board for the solar panel. The first prototype will most likely be a wire nest. If you are willing to share the kicad files that would give me a starting point to design a board with the extra components.
Does anybody know of a board that incorporates all these components??

Hi @amoroz, I used the firmware.uf2 file from your post, and was successful in getting the boards to boot, and it works ok as long as the power is connected on the UCB-C port, but if I power the boards from a 18650 then the nrf52840 board keeps rebooting every time I send a message out. Have you faced this kind of issue? would really appreciate some help & guidance since I have no idea at all on what needs fixing (noob here). TIA

Hmm can you post the schematic you are using? If I had to guess, sounds like maybe the radio module is not getting power when the XIAO is running on battery.

I’m using the same schematic that you’ve posted in Gihub, the table within " Example wiring for “E22 automatic Tx/Rx switching” mode".

But I guess you’re right, the board is not getting enough power on battery. So I just tried connecting two 18650’s in parallel, to check if it was an issue with current, but it still rebooted on msg send. So I guess it has to be a voltage issue, but I am not sure if I should increase the voltage to the battery terminals.

@amoroz Hi. I’m now powering the E22 by connecting a boost converter to the battery directly. Now it’s not rebooting, so one problem solved :grinning: and now on to the next problem - GPS. Is it possible to use the neo-6m in this setup (since the UART RX pin is already being used by the E22 board)?