Where are all the samd21 chips

Hi to Everyone
Im new to TTN and LoRaWan.
I am a hobbyist and since last week I have only owned a one canal lora SCPF with a few custom nodes with atmega328’s connected to my own server.
I’m not a programmer, but somehow I solve my problems with Arduino.
Finaly this week i brought my brand new mikrotik Gateway online on TTN v3, but i didnt find a LoRaWan library that fits on my old atmega nodes.
So yesterday i decided to switch to the SAMD21 and fortunatly i had some SAMD21 mini clone boards around for playing around, but then i discovered that there are no ATSAMD21G18A or similars on the large electronicstores available!!!
My Question now, where to go!
In future i wat to go beyond Arduino and i know there is a steep learning curve. On the SAMD21 the arduino world offers great documentations and great easy to use librarys but if i cant find the chips for making my custom pcb’s.
I suspect that I have to change manufacturer.
Can please somebody recommend me alternative mcu’s with a good arduino and TTN integration?
Or maybe somebody has a better idea

Hi @andonoc ,

Look around on the forum and search for topics you’re interested in.

Mmm, your’e new to TTN and LoRaWAN and then want to start building your own PCB’s?
I would suggest to start at the beginning and start with a board that works where you only need to concentrate on the software side.

If you’re not a programmer then stick with Arduino until you’re absolutely sure that you need something else and why (if you may ever need it).

That’s not limited to SAMD21.

Try to grasp some basic LoRaWAN and TTN knowledge first and from there make a list of requirements for yourself.

2 Likes

Hi blueJedi,
Thanks for your reply

Blockquote Mmm, your’e new to TTN and LoRaWAN and then want to start building your own PCB’s?
I would suggest to start at the beginning and start with a board that works where you only need to concentrate on the software side.

That was my idea too.
i have already bought a dragino uno shield, so i learned that atmega328’s are not suitable.
I would like to avoid to buy a lot of useless equipment.
My plan is to get a working board of a brand and learn there.
I asked not to make the same mistake again.

Maybe the STM32L’s are the way to go, i read many posts about them but I cannot judge whether they are the right ones without trying.

They are still relatively new. They may be a good choice but also not. I also don’t expect that there will be Arduino support for it soon and if there would you would still need LoRaWAN library support for the SX1262 which in Arduino land is still very limited. As you said you are not a programmer STM32L currently would probably not be a good choice for you.

All really depends on what your requirements and goals are.
If your goal is to learn about LoRaWAN and TTN then start with something simple that just works. Spend $15 to $25 on a board that just works but is not perfect, is popular in the community so you can get some support, doesn’t cost too much and when you outgrow it and are more aware of your needs then you can make a more weighted decision for your next step(s).

Have a look at the Big ESP32, CubeCell, Big STM32 and T-Beam topics on the forum to get some impressions. Adafruit has a Feather M0 LoRa board which is SAMD21 based, but you won’t find much info about it on the forum. (A disadvantage of the Adafruit is that it does not have an antenna connector and only allows to solder a piece of wire as antenna.)

The more clear your requirements and questions are, the better others may help point you in the right direction.

My advice is to pick a LoRaWAN development board that is either supported by LMIC-node (because LMIC-node supports most of the popular LoRaWAN development boards that can be used with the Arduino framework and the LMIC LoRaWAN library) or get a CubeCell board.

Pick at least a 32-bit board and not one of the older 8-bit (ATmega328 or ATmega32u4) boards Some 8-bit boards are supported by LMIC-node but should not be used for new development because of their limited RAM and flash memory (but you are already aware of that).

(CubeCell is not supported by LMIC-node because the LMIC library does currently not support the SX1262 LoRa radio.)

2 Likes

If your into DIY then there is the ATMega1284P, 4 times the Flash and 8 times the RAM of the ATmega328P. 8 More IO pins too, including a second hardware serial port.

The device is even available in a 40pin DIP package for easy breadboarding or use on stripboard…

1 Like

Why still choose an 8-bit architecture when the world has moved to 32-bit?

Or the ATmega4808 - enough flash & memory for LMiC and available in a hand-solderable SSOP size.

1 Like

More bits isn’t necessarily better and most 32bit MCU’s have too many pins for easy DIY.

1 Like

Why move on if you dont have to ?

Myself I dont see a problem using a well supported device that has plenty of memory and is very easy to DIY.

Thank you for your Help!

Great info, Thank you.I have some TTGOs lying around so i will make some tests this weekend.

I think after the “Chip crisis” i will switch to the SAMD21

Thank you, this is what im searching for!
Is the lmic library running out of the box on these chips ?

If there is an Arduino core that supports boards with these MCU’s then LMIC should be able to work with it.

Depending on what DIY board you want to build you may have to create your own Board Support Package for that Arduino core.

Hi,
I found this core for the 1284 and the 4809 is the 5V arduino every development board.
I have to investigate but it should work

Thats the one.

More clock choices than the Standard UNO core.

It supports a couple of different pinout maps, I use the Bobuino one, closest to the pin numbering of a UNO\ProMini.

1 Like

I’ve done some experiments with the TinyLoRa library (GitHub - adafruit/TinyLoRa: LoRaWAN Library) on attiny85’s in the past. The attiny85 only has 8 kB of flash. The atmega328p of the UNO has 32 kB.

I’d encourage you to give the atmega328p (UNO) another chance! Benefits: Cheap, robust (no problems with 5 V), a lot less complicated than the SAMD21.

I’ve invested a lot of time getting to grips with the SAMD21. Lower level stuff you’d read in the datasheets is lot easier on the AVR chips (atmega328p) than on the SAMD21.

You do need to use logic level shifters, or a shiled that has them, for the LoRa devices.

Makes a lot more sense to use 3.3V Arduinos these days.

I used his minicore extensively, MCUdude did a great work!

Oooh, that would be my favorite, but what would you do when TTN v2 shut off this year. Thats my major issue.

TinyLora is NoGo on V3.
This has been discussed on the Forum already.

Bad advice. RAM and Flash memory on ATmega328 and ATmega32u4 is just too limited for LoRaWAN compliant stacks if you want to use them with SPI LoRa modules. And as already said you will need level shifters for almost everything (LoRa module and most sensors are 3.3V nowadays). You should not use these MCU’s for new LoRaWAN development in combination with SPI LoRa modules where the LoRaWAN stack has to run on the MCU.

1 Like

I have used logic level shifters, of the bought off eBay type, to connect a LoRa device to a 5V Arduino. On a scope the logic signals looked very marginal, so long term reliability could be doubtful.

I stand corrected. I was unaware about V3 and that it only seems to work with the LMIC library.

About ATmega328p robustness I have to clarify that my point was, that unlike most 3.3 V MCUs, 5 V won’t be critical to it.

I guess flash size wise the ATmega4809 might then be a suitable alternative. I don’t have experience with it. You can try to run the dev boards at 3.3 V or lower. Depending on the frequency the ATMega’s operate between 1.8 V and 5.5 V. It also comes in a DIP package.

Why not check this out:
http://www.marvellconsultants.co.uk/LoRaNode/index.html

2 Likes