atmega328p small (SMD) alternative with more memory?
-
More and more, I come across that atmega328p loaded with mysensors, signing, encryption and a few sensors and libraries gives me this:
Sketch uses 31924 bytes (103%) of program storage space. Maximum is 30720 bytes. Global variables use 2076 bytes (101%) of dynamic memory, leaving -28 bytes for local variables. Maximum is 2048 bytes. Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it. Error
Whereas I do have Moteino Mega, which is an excellent form factor, but a but a bit too large when it comes to a small node. Anyone can recommend a tiny form factor node like Sensebender Micro but with considerably more memory please?
-
@alexsh1 at some point I belive a SAMD based SenseBender might arrive.
-
@alexsh1 said in atmega328p small (SMD) alternative with more memory?:
Anyone can recommend a tiny form factor node like Sensebender Micro but with considerably more memory please?
Well, the nRF52 series has more memory and is better in almost every way. And you can program it through the familiar Arduino IDE. Time to join the band wagon.
-
@neverdie are you sure they always come with a bootloader, and one that's compatible with Arduino? Afaik you need a debugger. Not that it's a problem, but it isn't exactly plug and play either.
-
@anticimex said in atmega328p small (SMD) alternative with more memory?:
everdie are you sure they always come with a bootloader,
You just need a programmer. I use JTAG, but many here have reported success with the super cheap STM v2.
-
@neverdie I know, but it is still a detail worth mentioning. It is not a drop in replacement unless you happen to sit on compatible debuggers or programmers already. And even then, I am unsure if the arduino IDE can be used to program a suitable bootloader in a user friendly way.
That said, I agree that nrf52 is the future. Closely followed by SAMD.
-
There doesn't exist a drop in replacement.
-
@neverdie a SenseBender mk2 based on samd would be a drop in replacement for SenseBender.
-
@anticimex it would be good, right Thomas @tbowmo? :)))
Given my experience, I'd rather go for SAMD - at least I do not have to start from zero.
-
Are there any similar size wise alternatives to SenseBender mk2 (SAMD), which are available right now?
-
@NeverDie Check out this one nRF52. Its not cheap though
https://www.tindie.com/products/onehorse/nrf52-add-on-for-butterfly-and-teensy/?pt=ac_prod_search
-
Alternatively, this is a good size for a node - https://www.sparkfun.com/products/13664
-
@alexsh1 said in atmega328p small (SMD) alternative with more memory?:
@NeverDie Check out this one nRF52. Its not cheap though
https://www.tindie.com/products/onehorse/nrf52-add-on-for-butterfly-and-teensy/?pt=ac_prod_search
Yes, I would agree that's interesting. He uses it as a BLE device, albeit purely as a UART channel, which so far isn't something that we've managed to do here with the nRF52. @GertSanders might want to take notice, as he has been doing something similar for logging purposes, but with a different bluetooth.
-
@anticimex said in atmega328p small (SMD) alternative with more memory?:
SenseBender mk2
If that's how you define drop-in replacement, I'll concede the point.
Actually, I suppose if you had a fast enough ARM, it could emulate an atmega328p (well, at least its software behavior), and thereby indirectly offer up additional memory. I actually own a board which, IIRC, does that, and it can run code even faster than the atmega328. Just don't expect low power performance out of it.
-
@neverdie I perhaps misread the thread title... I did not interpret the quest as something that should be binary identical to atmega328p.
-
@anticimex Yeah, the title was ambiguous. Looking back, your interpretation is probably closer than mine as to what he meant though.
-
@anticimex you are absolutely correct. It does not have to be binary identical to atmega328p. However, size wise, it has to be small enough.
For now atmega1284p is a direct replacement for atmega328p as code is almost identical. I do not need much more processing power just memory. However, I did struggle to find a very small footprint.
-
Hmm.. perhaps I should pick up on the SenseBender MK2 again.. I lost focus as I had a lot of other projects running at the same time..
If I remember right, it had problems in it's bootup sequence when I left it alone last..
-
In terms of BOM cost, it would be cheaper to add a second atmega328p (or even multiple) than to use a 1284. Maybe worth considering if memory of just one is insufficient.
-
You will then waste memory with "intercom" between the devices. As they have to speak together in some way..
-
@neverdie Did you see any small devices with two atmega328p?
Unfortunately, atmega1284p is more pricey (Moteino Mega is $15.95 on sale right now) and size wise it is much larger than atmega328p-au projects.
-
@alexsh1 said in atmega328p small (SMD) alternative with more memory?:
Unfortunately, atmega1284p is more pricey (Moteino Mega is $15.95 on sale right now) and size wise it is much larger than atmega328p-au projects.
Yes, that's what I was trying to say.
-
On the other hand, if you go with the cheapest source, the 1284p is not too bad. Here's the cheapest I could find:
https://www.aliexpress.com/item/ATMEGA1284P-AU-ATMEGA1284P-ATMEGA1284-TQFP44/32864539405.html?spm=2114.search0104.3.1.2efd4b5asFo5Vr&ws_ab_test=searchweb0_0,searchweb201602_5_10152_10065_10151_10344_10068_10130_10324_10342_5722912_10547_10325_10343_10546_10340_10341_10548_5722612_10698_10545_10697_10696_5722812_10084_10083_10618_5722712_10307_5711215_10059_10534_308_100031_10103_441_10624_10623_10622_5711315_10621_5723012_10620_5722512,searchweb201603_1,ppcSwitch_5&algo_expid=2d7e9a21-bc2a-4ce1-bfa8-6246a79e84df-0&algo_pvid=2d7e9a21-bc2a-4ce1-bfa8-6246a79e84df&priceBeautifyAB=0
-
@neverdie said in atmega328p small (SMD) alternative with more memory?:
I paid around £3.5 (about $5) and thought it was the cheapest. WOW!
-
My new toy (atmega1284p) - Mightyduino
However, I have to think about connecting radio as this is just a bare board.
Size wise it is quite small
-
@alexsh1 Wouldn"t a teensy 3.sth fill all the requirements ? Or an ESP8266 if you don't need ADC mux. ESP32 is you do.
-
@tochinet
If you don't need a lot of them use a Mega it has lots more memory. They're much cheaper than they used to be. Of course an ESP8266 will also work if you don't need all the pins.
-
You might want to consider the STM32F103 -- they're programmable over serial in much the same way that traditional ATMEGA chips are, are arduino-compatible, can be found for roughly the same price as the 1284p, are a ton faster, and most versions have a ton more memory and flash.
You can see the full lineup of chips here: http://www.st.com/en/microcontrollers/stm32f103.html?querycriteria=productId=LN1565 -- I've personally used the STM32F103CB and STM32F103RE in a handful of projects lately.
-
@tochinet esp8266 and esp32 are hardly smaller than mega. Teensy is a good option. There is even an adapter to hook it up to Rfm69
-
@coddingtonbear interesting! Did you have any experience with STM32L0 (more suitable for battery power)? Do they have anything small enough?
-
@coddingtonbear said in atmega328p small (SMD) alternative with more memory?:
STM32F103
Does it have any advantages over the ARM used in the nRF52832? The nRF52832 SoC is built around a 32-bit ARM Cortex-M4F CPU with 512kB + 64kB RAM. Not sure about other features, but I believe the nRF52832 wins on flash and RAM size.
-
@neverdie stm32 supports up to 51 i/o pins, compared to 32 for the nrf52. But very few projects need that many pins.
-
There are some small stm32 boards that pack a lot of io though. I like the double row approah. Not breadboard friendly, but very compact. Are there similar nrf5 boards?
-
@alexsh1 I'm afraid I've only used STM32F103 variants. Although the Arduino core I've used (https://github.com/rogerclarkmelbourne/Arduino_STM32) is STM32F103 specific, it does look like the official core has support for that chip, though: https://github.com/stm32duino/Arduino_Core_STM32. Just keep in mind that different chips have differing capabilities as far as programming is concerned; I do think the STM32F103 is the most limited of them, though -- you can find details about the bootloader version for each chip here: http://www.st.com/content/ccc/resource/technical/document/application_note/b9/9b/16/3a/12/1e/40/0c/CD00167594.pdf/files/CD00167594.pdf/jcr:content/translations/en.CD00167594.pdf .
-
@neverdie Not sure -- I do know that the STM32 lineup goes as high as a whole megabyte of flash and 96k of ram -- just a little north of the numbers you've quoted for the nRF52832. I have to say that I haven't looked into that specific chip in much depth, though, given that my recent projects have needed low power consumption and lots of pins more than they do onboard BLE. I have used the ESP32 on a few projects in that category though!
-
@alexsh1 You didn't say which direction is too big. But another smaller alternative is also panstamp NRG. a bit pricey but it comes with its own RF component. I was actually thinking of asking about its support in another thread...
-
@tochinet I am just looking for something really small like some atmega328p boards, but more memory.
Like this - http://mklec.com/project-kits/kd-circuits/328-board-ATMEGA328P-microcontroller-board
or
https://www.openhardware.io/view/76/Stamp-size-MySensor-node
with (1) signing (2) encryption plus a few libs one can quickly run out of memory.