New STM32 + LoRa SoC

Hi jpnorair

Sounds like you are really deep into this stuff.

And I’m beginning to get back into it too.

In the past I’ve used HopeRF modules…even though they looked a bit dodgy. They use Semtech chips that don’t even say Semtech on the outside. And their datasheets basically are a clone of the Semtech ones, with all referrals to Semtech removed.

Most of the HopeRF modules I bought in the past were from Anarduino dot com. They currently list a FCC certified RFM95CW-915S2 915Mhz LoRa Module for $6.50. I don’t know if this is the older SX1270 or newer SX1260 family.

Anyway…I want to the newer SX1262 at 915Hhz…and I want to find an alternative manufacturer than HopeRF.

Yes, I’ve been watching the Murata modules…specifically the one still under development that will house the SX1262. It’s model number is “LBAA0QB1SJ-295”…10x8mm. I haven’t seen any data on it yet.

Murata is pricey…but I’m sure the Japanese quality is a step up…

Yes, I’ve looked also at the two older Murata parts which are 12.5x11.6mm in size:

CMWX1ZZABZ-104 is UART driven…
I don’t like that…
I don’t want a UART command line interface.
I want SPI to talk to the bare-metal registers.

CMWX1ZZABZ has all the interfaces UART, I2c, SPI, and USB.
This second one is better.

But I’m not thrilled with having the solder pads on the bottom.
I want either castellated mounting holes along the sides (like HopeRF), or bottom pads that wrap a short way up the sides.
Either of those are solderable with a conventional soldering iron.

And the CPU chips under the covers of the Murata Modules are,STM32L072 or STM32L082. Both are Cortex-0+, and pretty old in the tooth. I need even less horsepower than these chips…but way more energy efficiency.

Finally, I did find what looks like a nice sx1262 RF module, and at a very reasonable price. Go out to Tindie dot com and search for “DRF1262T”. You will see and number of modules…but select the one with TCXO Resonator…price is currently discounted to $4.98 from $5.53. It also shows an FCC Approval Number on the outside

When you order it, select the 915Mhz module to run in the US. The TCXO gives you -148dBm of sensitivity….vs. 137dBm for their lower end module running on an ordinary crystal. The size is 14x15.7mm…bigger than Murata…but a tad smaller than the 16x16 HopeRF.

They look pretty sweet to me.

If any of you out there have some experience with Dorji as a brand,…please chime in.

I don’t have a ton of experience with Chinese modules. Most are grey-market (HopeRF included). The relationship between HopeRF and Semtech is a weird one, and it’s an old one. The legality of selling HopeRF into markets that honor IP rights is … also grey. For hobbyists and small volume users, the Chinese modules are absolutely fine. Murata’s modules are useful for medium volume users selling a product into markets with IP rights.

I intend to produce a module that will replace Murata’s module, optimized as much as possible for cost and distributor availability of components, with copyleft OSHW if it’s possible for me to do so. You can do whatever you want with the module. My networking FW will have certain features and limitations, but you will have no requirement to use it. I’ve escaped the BGA (most of it) onto a (relatively) low-cost 4-layer PCB, so it will be easy and cheap to mount it on the Murata-compatible footprint or a castellated footprint similar to HopeRF.

The only point I will make regarding your comments is the efficiency of the Cortex M0+ vs. the M4. The M4/M4F is actually more efficient for most IoT networking FW workloads. The M4 does the job in fewer instructions, and the instructions themselves tend to run faster. IoT networking stacks are a lot more code intensive than your typical, event-driven MCU applications. If you think you can use something like an EFM8 and get good energy efficiency for a non-trivial radio application, you may be right, but I advise caution.

1 Like

Wow…that’s way cool!!!
Be sure to post your progress!!!

I’m curious on what trace widths you need to work with in order to break out from under one of these BGA chips? To do it in 4 layers must certainly be a challenge…

I’m very wary of a hobbyist trying to mount a module with completely hidden pads. How do you do it? Using a heat gun? A heat gun works great on a conventional chip with pads below. But these modules are chock full of tiny discrete soldered components. I envision the 0201 passives blown off the board with the hot air flow. And if you decrease the air volume, you may cook the top, and the heat won’t get through to the bottom.

And I don’t know if a module with an external protection shield is any better with a hot air gun. The metal on top may radiate the heat, and tend to keep the heat high. Or I can imagine it becoming a miniature oven on the top surface, overheating, and destroying the smaller passives within.

A hot plate presents its own issues…a “hit or miss” proposition of heat control.

So, that leaves some type of oven…either one specifically made for the fabrication of boards…or a toaster oven with mods to give excellent temperature control.

But, for 95% of the hobbyists, I vote for a castellated option that’s easily hand soldered.

Yes, a castellated module consisting of CPU, LoRa, and antenna passives would be awesome!!!

Your project is way cool…whereas mine is rather…(ahem)…pedestrian…

To give you a better idea about the design I’m working on, it’s essentially a GPS Location Tracker running off a couple of AAA Batteries. Intermittently a GPS position will be read, then the Long/Latitude/Date/Time Record will be transmitted over a LoRa Radio.

80% to 90% of the time the CPU, GPS module, and LoRa module will be sleeping. The CPU doesn’t totally shut down, as I do need the RTC clock to be active. Then after the proper delay, everything can be brought back up for the next reading and transmission.

There’s no requirement that the components wake up fast. And, other than talking to the two modules, there is no heavy processing required of the CPU. The CPU doesn’t even have to be run at full speed…I’m looking at perhaps 8Mhz. The fastest digital I/O will be a SPI bus running at possibly 4Mhz. Finally, I’ll be running about 8 LED indicator lights off 8 Digital I/0 pins. And 99% of the time all of these LED lights will be off.

So, that’s it.
Pretty boring, I guess.
The prime directive here is…BATTERY LIFE!!!

This is why energy efficiency is the overriding requirement in my CPU choice.

I wasn’t intimately familiar with the specs of the EFM8 chip you mentioned as maybe being energy efficient. But I do seem to remember that Jay Carlson talked about it a couple of years ago in his $1 Microcontroller Blog…so I started digging.

I went back to the Carlson Shootout Article, and yeah…the EFM8 is pretty neat.

Mr. Carlson dealt specifically with the “Lazer Bee” which is a fast 72Mhz part. But I choose to look at a different family member…the “Sleepy Bee” which is the lowest power one.

I found a Lazy Bee version that spec’d out at 25Mhz… 32-pin TQFP… 24 pin I/O… 64K Flash… 4352 bytes of RAM.

But, in my other searches I think I found an even better chip.
It’s a very low-power Arm Cortex-M23. It’s the Microchip SAM L10…32Mhz… 32-pin TQFP… 27 pin I/O…64K-Flash… 16K-RAM… 2K-EEPROM.

So now it’s time for a datasheet shootout.
I want to know the power consumption in both chips in the “Active Mode” and the “Sleep Mode”.

Here are the Active Mode power consumption numbers:
S. Bee at 25 Mhz… 4.1mA.
S. Bee at 20 Mhz… 3.5mA (I think that is as slow as it will run).
Sam L10 at 8Mhz… 0.562 mA.
Sam L10 at 32Mhz… 2.64 mA.

WOW…that was unexpected!!!
I never expected a 32 bit chip to use less power than an 8-bit chip in Active Mode.
In active mode the Sam L10 chip crushes!

OK…Here are the Sleep Mode stats, with the RTC running and the bottom 4K of RAM retention in both chips.
Slepy Bee…0.85 uA.
Sam L10… 1.1 uA.
The Sleepy Bee wins by a whisker…it’s approximately 20% more efficient in sleep mode.

Here’s the Digikey price on the chips:
Sleepy Bee…EFM8SB20F64G-B-QFP32,$1.39…1000 chips
Sam L10……ATSAML10E16A-AUT……$1.89…2000 chips.

The Overall Winner is the Sam L10:
It’s a 32-bit chip.
I dominated in the Active Mode power consumption faceoff.
It has 12K more RAM, and additionally it has 2K of EEPROM.

I’m using PCBWay’s tightest tolerances that are NOT in their Advanced PCB section. That is, their best “Basic” PCB. No HDI, no blind or buried vias, no via in pad. It’s still quite cheap, so I can scale it up to a castellated module without taking a big cost hit.

  • 0.4mm / 4 Layer
  • 0.0762 mm space / trace
  • 0.15 mm drill

With 0201 components, the RF Front-ends are still a bit of a challenge, and I’d like to avoid the 01005 components for manufacturability reasons. I’m designing the front-ends using off the shelf multi-element filters, which requires a bit of design work because there’s nothing specifically designed for the SX126x.

Reflowing the module onto a PCB isn’t an issue. Often I use a temperature controlled reflow hot plate. If using hot-air (also I love hot air), it’s important to use a wide nozzle and a low pressure, or to use a lower-temperature solder on the PCB (e.g. lead solder).

There are quite a few products like this already, as far as I know. I have a pile of such PCBs on my desk right now. Here’s one (below) that’s 48x40mm with GNSS and LoRa. This PCB is being antenna tuned. The GNSS antenna is concealed by the ferrite. There’s a murata module to the left for size comparison.

The radio and especially the GNSS activity are going to dominate your power profile so much that the MCU won’t be a major factor.

Atmel has a habit of declaring current loading figures of MCUs before the DC-DC buck converter. So just be aware of that. ST tends to declare current after the DC-DC. For low power MCU’s, ST and Nordic are generally the best right now. There’s also a little company called Apollo that is using sub-threshold technology, but as far as I’ve been told they have some errata.

You’re down to exactly 3mil. traces and spacing.
Man that’s small!!!

Part of the reason I picked the chip I did is because of the benchmarks they posted.

https://www.eembc.org/ulpmark/scores.php

If you do a sort on the first column of the table…Core Profile(3v)…you will notice that the ATSAML 11/10, fall right behind the Ambiq (Apolo) chips that you mentioned.
The ATSAML 11 has a few more security features than the ATSAML 10.
Otherwise the chips are identical.

These two chips are also among the top of the class when it comes to columns 3 and 4 in the table.
And both chips have a checkmark in the Cert. column, which means (I think) that the benchmark guys ran their own tests to confirm the vendor’s test numbers.

I know there are GPS boards out there, but unfortunately, there is nothing in the way of a LORA/GPS combo off the shelf board that meets my needs. I want a lot of LED indicator lights.

In past radios I’ve just attached a plain 1/4 wave length wire as an antenna. But they’re too fragile. I want something that’s not hanging out. I was thinking of those PCB Trace antennas…but they are not very efficient. I settled on an antenna from Linx. It’s not really a chip antenna…but a bit different:
https://www.digikey.com/product-detail/en/linx-technologies-inc/ANT-916-SP/ANT-916-SP-ND/340129

The GPS was another Easter egg hunt. I wanted an all in one castellated module with the GPS antenna bundled on top. So I found this nice small one:
https://www.embeddedworks.net/satl214/
The castellated sides make layout a breese.

http://www.acsip.com.tw/index.php?action=products-detail&fid1=19&fid2=&fid3=&id=41

From your link, the STM32L412 outperforms both. This is the core the STM32WL is based-on, IIRC. It’s important to measure after the DC-DC buck converter, which is indicated in the 1.8V column. For RF applications in particular, you need to be very cautious with SMPS, because it can create enough harmonic noise to affect sensitive radios.

Super…
I’ll check out the module you linked to…

I finished the design of the Murata-compatible (well, mostly compatible) module using ST SoC. I suppose I’ll send it out this week. In the end, I needed to use blind via-in-pad in order to be confident with the RF performance and EMI. However, it’s still 4 layer so the cost difference between through-hole via and microvia is almost nothing. Seriously, it adds $4 per 1000 boards (i.e. $0.004 per board).

As mentioned, also, it uses only components from distribution, so I can build at small volumes.

I’ll spin a castellated 1mm pitch (or 1.27mm if that’s better), although I’ll need to reduce the amount of signals that get routed out.

The PCB is 12.5 x 11.6 mm, to be on 4-layer FR-4, 0.4mm thickness.


2 Likes

Wow, that’s tiny. Good luck with it!

Very nice!!!
What layout software is do you use?
I’ve never seen curved traces like that…

Diptrace. Most tools can route curves. In this case, I needed to use curves for clearance. You need to be more aware of cross-talk across layers with curves, but there’s a ground plane in this design, so…

That module looks great. I was looking at making a Feather with the STM32WL, and eventually more custom boards. I might be able to save myself a whole lot of effort starting with this module. Do you have more documentation on it? Maybe a pinout?

I haven’t built it yet, but I do have the component pinout that I designed. See attached files – this is from an unfinished schematic of the dev board. Feel free to ask me anything. The only important thing to know is that you can use a single or dual supply. Single supply is generally either 1.8 or 3.3V, and dual supply is 1.8V plus ~3.3V. In dual-supply mode, “Vdd_PABOOST” can be a direct input from a Li-Ion. I’ve integrated an external RF LDO to feed the high-power amplifier, rather than using the on-chip regulator, which can’t exceed 3.6V input.

Oh snap. I’m making a dev/test board for this module right now, although it is based on the arduino zero board form factor. I almost went with the Feather, but for test purposes the Arduino size made more sense: it’s big enough to provide a good-enough ground for screw-on antennas, have enough test points, and have lots of jumpers for selecting test options.

archive.zip (136.4 KB)

Thanks for the schematic. Unfortunately, I think there might be a formatting issue and parts got cut off. I can see the pinout, though. Are you planning to get the module FCC certified?

More room makes a lot of sense for a first dev board. I was hoping to have a drop-in replacement for my Particle Gen3-based hardware until I design my next, smaller boards for LoRa. But, as long as I don’t care about form factor much, jumper wires should work fine. I look forward to seeing it get assembled.

Just a status update: All the R0 PCBs should arrive this week. Once I’ve tested them, I’ll open source everything, and prepare a crowd funding campaign. I’m not really looking for profit, but I do want to have enough of a run that I can sell them at an attractive price.

I don’t have information about the Particle Gen3 form factor, but what I can find easily suggests that it should be no problem to plop the module onto a compatible mainboard. The dev board schematic and layout can be transferred to much smaller sizes. Plus, all you really need is some optional, bulk capacitance on the supply inputs, and voltage regulation if your existing voltage supplies are out of range. The dev board allows you to configure the supply inputs via jumpers. The supplies available on the devboard are: Vusb (5V nom), Vbat (3.7V nom), 3.3V SMPS, 1.8V SMPS.

1 Like

Module PCBs are finally in. Dev boards that this module PCB solders onto also came in, but they are not pictured.

Looks great! Who did you use for the PCBs?

PCBWay. I might try to cost optimize in the future, but I’m very familiar with PCBWay’s process, which makes things easier with RF circuits. I have three circuit paths to impedance match on this board (hi-power TX, low-power TX, RX), and as you can see, that won’t be fun. That’s part of the reason I bought 100!

Looking great! I’m excited to see the progress. I’ve started working on a board based around the Murata module for now. I’m looking forward to subbing in this module.

That makes me happy to hear. Due to the different features and layouts of the chip from the Murata module and the STM32WLE5, I couldn’t make the pinout identical to the Murata module, but RF, ground, and voltage locations are all 1:1. Namely, the programming pins are different, although IMO much neater.

update: including a drawing of the pinout. What you see is the footprint and its connections to the STM32WLE5.

Footprint.pdf (495.7 KB)