Author Topic: What's after arduino  (Read 2608 times)

0 Members and 1 Guest are viewing this topic.

Offline CyberGeekTopic starter

  • Newbie
  • Posts: 4
  • Country: us
What's after arduino
« on: January 07, 2022, 06:33:33 pm »
I've been working with arduino a while and want tap into the wisdom of the folks here on the next MC I should pursue subsequent to Arduino.  Below are some criteria that to narrow down the candidates.

 1.  An established MC that has:
      a.  A proven toolset
      b.  Wide community support
      c.  The MC and subsequent iterations will be in the market for the foreseeable future

 2.  The cost per board (think Arduino) is  sub-$15US give or take

 3.  The programming language is C or Python (I'm not opposed to learning a new language if the benefit outweighs the cost.)

 4.  The processor speed and memory are increased as compared to Arduino to facilitate projects of higher complexity.

 5. Peripheral devices are available with a significant quantity of libraries are available.  (I'm not opposed to programming libraries, but don't want to do that exercise as my first learning experience. )

 6. Will expand my knowledge of electronics and practical application of MCs.

I've been in IT for over 25 years with experience as a developer, server and storage engineer, architect and now cybersecurity.  My electronics experience is from analog repair back in the 90s.  My attraction to electronics was rekindled about 2 years ago.  So I've had to take refresher courses to clear the cobwebs.    Hopefully, this information provides some insight on my skill level. I'm not afraid of a challenge or digging for answers..

Appreciate the feedback.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: What's after arduino
« Reply #1 on: January 07, 2022, 07:27:57 pm »
Is this for commercial products or for hobby use and learning purposes?
For the latter, there are of course tons of options, but I can suggest the RP2040 from RPi - it appears to tick all your boxes while being cheaper than typical Arduino stuff. There's of course the official Pi Pico board (if you're looking for a dev. board rather than just the chip), but now quite a few other boards have appeared using this MCU - from Sparkfun, Adafruit, and others. Most are sub $15, the Pi Pico is about $4. Both C and CircuitPython are supported, and even if it's still a modest MCU, it's infinitely (well almost :-DD ) more powerful than anything ATMEGA-based.
 
The following users thanked this post: lucazader

Offline artag

  • Super Contributor
  • ***
  • Posts: 1075
  • Country: gb
Re: What's after arduino
« Reply #2 on: January 07, 2022, 07:37:23 pm »
There are quite a few devices in the Arduino family, and more that are supported by the same toolchain but not produced by the Arduino organisation. They have the advantage of using familiar libraries and being able to use many of the generic extensions whilst providing a lot more rom, ram or peripherals than the common AVR arduinos.

I would particularly suggest Teensy (more expensive but extremely good support from the vendor, PJRC) and ESP 8266 or ESP32 (very cheap, built-in wifi).

 
 

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 3479
  • Country: us
Re: What's after arduino
« Reply #3 on: January 07, 2022, 08:50:39 pm »
PIC's from Microchip have a lot of peripherals compared to Atmega.  Same manufacturer.
 

Offline CyberGeekTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: What's after arduino
« Reply #4 on: January 07, 2022, 10:11:53 pm »
Hobbie use and possibly small scale commercial mostly to feed my electronics addiction.
« Last Edit: January 07, 2022, 10:15:36 pm by CyberGeek »
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6203
  • Country: ro
Re: What's after arduino
« Reply #5 on: January 07, 2022, 10:55:50 pm »
Anything with an ARM core maybe, or an ESP32 with Wi-Fi and a camera, random examples:

From Freescale/NXP:
https://www.nxp.com/design/development-boards/freedom-development-boards/mcu-boards/freedom-development-platform-for-kinetis-kl14-kl15-kl24-kl25-mcus:FRDM-KL25Z
Has USB OTG, DMA, 16 bits ADC, 14 bit DACs, Free Real Time OS, etc.

From Texas Instruments:
https://www.electrokit.com/en/product/tiva-c-series-tm4c123g-launchpad-development-board/
Has extensive YouTube classes teaching ARM programming with the above board:
Code: [Select]
https://www.youtube.com/watch?v=3V9eqvkMzHA&list=PLPW8O6W-1chwyTzI3BHwBLbGQoPFxPAPM&index=42
From Espressif
Some more recent MCU boards with Wi-Fi and micropython, some with embedded cameras, etc:
https://en.wikipedia.org/wiki/ESP32

From Raspberry PI
Slightly bigger, a SBC (Single Board Computer), most can run Linux or other OS (Operating System), but they also have some very small RPi Zero, or maybe Pico:
https://www.raspberrypi.com/products/
« Last Edit: January 07, 2022, 11:04:42 pm by RoGeorge »
 
The following users thanked this post: MK14

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: What's after arduino
« Reply #6 on: January 07, 2022, 11:37:50 pm »
There are microcontroller and microcontrollers, starting at 6 pinners like the PIC10F series for example, starting with 256 words of flash & 16 bytes of RAM.

IME, the biggest drawback of relying on vendor peripheral libraries and frameworks is that they have a life span similar to that of a mayfly. It's almost as bad as developing cloud-based apps. They rarely provide backwards compatibility when a new rewrite comes along. Because of their lack of longevity, it's notoriously difficult to maintain legacy code.

The following particularly applies to lower end devices, but it does extrapolate.

While you say you're not interested in developing your own libraries, you're going to learn and understand a whole lot more by doing so, and your code will have a lot longer lifetime: for example I still use the same boilerplate I2C libraries that I wrote very many years ago as the basis for new projects, tweaked here and there as necessary. In the same timeframe there've been at least four vendor attempts.

Furthermore, vendor libraries and particularly frameworks tend to be highly inefficient: they're either kitchen sink implementations, or they lack features... or both. But they're never efficient.

Professional microcontroller development is about managing scarce resources: eg, cycle counting where necessary and concerning yourself about power budgets. Frameworks, peripheral libraries and Python won't help you much with those things when it comes to squeezing out the most from a microcontroller. Throwing more hardware at it won't help your power budget!

« Last Edit: January 07, 2022, 11:39:57 pm by Howardlong »
 
The following users thanked this post: MK14

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26907
  • Country: nl
    • NCT Developments
Re: What's after arduino
« Reply #7 on: January 08, 2022, 01:14:31 am »
Professional microcontroller development is about managing scarce resources: eg, cycle counting where necessary and concerning yourself about power budgets. Frameworks, peripheral libraries and Python won't help you much with those things when it comes to squeezing out the most from a microcontroller. Throwing more hardware at it won't help your power budget!
That is ony true if you are after ultra-low cost or ultra-low power. For most projects that isn't an issue and it is very nice to have some extra processing speed and space to work with in a microcontroller. Nowadays I'd definitely go with an ARM based processor with plenty of speed and memory. Especially if the goal is to get a project done instead of working around (unforeseen) limitations of a platform.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online Ed.Kloonk

  • Super Contributor
  • ***
  • Posts: 4000
  • Country: au
  • Cat video aficionado
Re: What's after arduino
« Reply #8 on: January 08, 2022, 02:02:31 am »
Is this for commercial products or for hobby use and learning purposes?
For the latter, there are of course tons of options, but I can suggest the RP2040 from RPi - it appears to tick all your boxes while being cheaper than typical Arduino stuff. There's of course the official Pi Pico board (if you're looking for a dev. board rather than just the chip), but now quite a few other boards have appeared using this MCU - from Sparkfun, Adafruit, and others. Most are sub $15, the Pi Pico is about $4. Both C and CircuitPython are supported, and even if it's still a modest MCU, it's infinitely (well almost :-DD ) more powerful than anything ATMEGA-based.

I've got a heating system controller that has suffered a little due to poor insect ingress protection. Needs 6 analog 0-5v inputs, four digital outputs. I believe the 2040 has 4 inputs and aren't they 3.3v?

The simple fix would be to buy another Arduino and just upload the same code. And, of course, seal the case. But I too wouldn't mind the challenge of something else as long as it isn't such an enormous leap.
iratus parum formica
 

Offline jonovid

  • Super Contributor
  • ***
  • Posts: 1438
  • Country: au
    • JONOVID
Re: What's after arduino
« Reply #9 on: January 08, 2022, 03:16:42 am »
has at a guess
anything micro that can dock with a phone & has an app for all that DIY
Hobbyist with a basic knowledge of electronics
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11891
  • Country: us
Re: What's after arduino
« Reply #10 on: January 08, 2022, 03:18:01 am »
I've been working with arduino a while and want tap into the wisdom of the folks here on the next MC I should pursue subsequent to Arduino.  Below are some criteria that to narrow down the candidates.

Given that Arduino is not a microcontroller, but is rather a packaging together of a software environment and a standardized hardware platform, have you at least progressed to programming an Arduino board as "bare metal"?

Because, IMHO, that would be the first step after "Arduino". You would be programming an Atmel or other microcontroller at low level, using an appropriate toolchain.

This is especially attractive as the Arduino board is already giving you a convenient platform to work with, not inherently much different from a development kit you might obtain for other micros.
 
The following users thanked this post: Siwastaja, george.b

Offline CJay

  • Super Contributor
  • ***
  • Posts: 4136
  • Country: gb
Re: What's after arduino
« Reply #11 on: January 08, 2022, 12:09:00 pm »
I've been working with arduino a while and want tap into the wisdom of the folks here on the next MC I should pursue subsequent to Arduino.  Below are some criteria that to narrow down the candidates.

Given that Arduino is not a microcontroller, but is rather a packaging together of a software environment and a standardized hardware platform, have you at least progressed to programming an Arduino board as "bare metal"?

Because, IMHO, that would be the first step after "Arduino". You would be programming an Atmel or other microcontroller at low level, using an appropriate toolchain.

This is especially attractive as the Arduino board is already giving you a convenient platform to work with, not inherently much different from a development kit you might obtain for other micros.

That would be my next move if I were stuck in Arduino hell, transition to a real programming environment with debug facilities, the C/C++ skills learned from Arduino will transfer as well but it's quite a big step to give up the plethora of libraries in the Arduino environment.
 

Offline rpiloverbd

  • Regular Contributor
  • *
  • Posts: 157
  • Country: bd
Re: What's after arduino
« Reply #12 on: January 08, 2022, 12:16:32 pm »
Starting with STM32 will be a good choice now.
 

Offline eugene

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: us
Re: What's after arduino
« Reply #13 on: January 08, 2022, 03:08:51 pm »
Be forewarned that the Arduino Uno and Mega are 5V devices. Their digital GPIO are 5V and their analog inputs are 0-5V. Almost anything more sophisticated will be 3.3V instead, so interfacing with external electronics will need to be reconsidered.

Having said that, if you're just looking for a more powerful and flexible board that you can program via USB using the Arduino IDE, then look at the Teensy line. If you're looking to roll up your sleeves and get closer to the hardware, then consider a so-called development board, perhaps something from STMicro like this: https://www.digikey.com/en/products/detail/stmicroelectronics/STM32L4P5G-DK/11613090. Outside your declared budget of $15, but not an unreasonable amount of money.

Or go to Adafruit.com and choose something of theirs. Adafruit offers a tremendous amount of support to beginners and hobbyists.
90% of quoted statistics are fictional
 

Offline nali

  • Frequent Contributor
  • **
  • Posts: 657
  • Country: gb
Re: What's after arduino
« Reply #14 on: January 08, 2022, 03:44:04 pm »
Starting with STM32 will be a good choice now.

I'm just getting to grips with STM32 using a Nucleo-L412KB board. It's sub-£10 and compatible with Arduino Nano in terns of pinout.

https://www.st.com/en/evaluation-tools/nucleo-l412kb.html

 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: What's after arduino
« Reply #15 on: January 08, 2022, 04:42:07 pm »
Professional microcontroller development is about managing scarce resources: eg, cycle counting where necessary and concerning yourself about power budgets. Frameworks, peripheral libraries and Python won't help you much with those things when it comes to squeezing out the most from a microcontroller. Throwing more hardware at it won't help your power budget!
That is ony true if you are after ultra-low cost or ultra-low power. For most projects that isn't an issue and it is very nice to have some extra processing speed and space to work with in a microcontroller. Nowadays I'd definitely go with an ARM based processor with plenty of speed and memory. Especially if the goal is to get a project done instead of working around (unforeseen) limitations of a platform.

I did mention that these were particularly prescient with low end microcontrollers.

I agree with the concept of “getting the job done”, using the tools at hand.

Even with higher end microcontrollers such as PIC32MZ, M4 and M7, concentrating on pinch points will be the difference between meeting specs and project cancellation. Unless you dig into C and occasionally assembly language, and put on your bare metal jacket, relying solely on someone else’s libraries, frameworks and bloat is rarely going to provide an optimum result. More often than not, you’ll certainly fail to meet the device’s banner specs as a result, often by quite a large margin.

So when someone asks why your Python device won’t stream an ADC at 10Msps, despite the device’s banner specs declaring such functionality, we will know why.

So in short I agree, but typically at the stage of a project when I get involved, I’m digging around redesigning interfaces and algorithms in C and occasionally assembly language as necessary for those times when the optimiser isn’t taking the bait.

I’m just wary that the OP isn’t really going to learn much about microcontrollers if they’re writing solutions in Python and/or relying solely on mayfly lifespan hardware abstractions and frameworks. I’d go further: it’s rare that for simple peripherals there is any need for peripheral libraries or frameworks: more often than not IME they just get in the way, you have to understand the peripheral’s functionality anyway, using a HAL just gives you something more to learn with when you could’ve been writing code.

Please don’t misunderstand me: the frameworks like Arduino are an incredible achievement, it’s really encouraged a huge amount of people into microcontroller tinkering. But I fear that going to Python in particular is a backwards step of the OP is aiming for a deeper understanding of microcontrollers: it’s about ten abstractions too far ;-)
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 8173
  • Country: fi
Re: What's after arduino
« Reply #16 on: January 08, 2022, 04:58:23 pm »
#1 reason for avoiding numerous and large layers of frameworks and libraries is not performance, although that is sometimes important, too. Code writability, readability and maintainability are the actual reasons. You can do a surprisingly large project in just 2000 lines of code within five-ten .c files, so that the whole project is within grasp of a single developer, and another one can catch up quickly, and modifications do not require "paradigm changes" because of lack of arbitrary limitations added by "frameworks".

For a beginner, this is even more important. A 100-megabyte SDK, where Hello World requires a 2000-line logging library, and LED blinker requires ten files with BSP generator programs, leads to the fact that the beginner has no idea about anything, can only run the existing example, and if everything happens to go well, might be able to modify some parts of the example.

Hence, I second the suggestion: keep the Arduino so far; learn to program it bare metal. Basically, this means downloading and reading the AVR datasheet and following it. Because bare metal AVR is simple, it's a step of correct size for you: not too big at once, but not insignificant or completely without challenges, either. After that, you can pick any popular ARM Cortex-M0, M3 or M4 based microcontroller and keep going. But that doesn't need to happen right now.
« Last Edit: January 08, 2022, 05:00:17 pm by Siwastaja »
 
The following users thanked this post: Howardlong

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: What's after arduino
« Reply #17 on: January 08, 2022, 05:19:57 pm »
.
« Last Edit: August 19, 2022, 05:02:31 pm by emece67 »
 
The following users thanked this post: JojoS

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26907
  • Country: nl
    • NCT Developments
Re: What's after arduino
« Reply #18 on: January 09, 2022, 02:24:35 am »
Professional microcontroller development is about managing scarce resources: eg, cycle counting where necessary and concerning yourself about power budgets. Frameworks, peripheral libraries and Python won't help you much with those things when it comes to squeezing out the most from a microcontroller. Throwing more hardware at it won't help your power budget!
That is ony true if you are after ultra-low cost or ultra-low power. For most projects that isn't an issue and it is very nice to have some extra processing speed and space to work with in a microcontroller. Nowadays I'd definitely go with an ARM based processor with plenty of speed and memory. Especially if the goal is to get a project done instead of working around (unforeseen) limitations of a platform.

I did mention that these were particularly prescient with low end microcontrollers.

I agree with the concept of “getting the job done”, using the tools at hand.

Even with higher end microcontrollers such as PIC32MZ, M4 and M7, concentrating on pinch points will be the difference between meeting specs and project cancellation. Unless you dig into C and occasionally assembly language, and put on your bare metal jacket, relying solely on someone else’s libraries, frameworks and bloat is rarely going to provide an optimum result. More often than not, you’ll certainly fail to meet the device’s banner specs as a result, often by quite a large margin.
I tend to disagree. What I see is that vendor libraries have come a long way in the last 20 years and currently many of them are frameworks you can use for commercial products. I've seen enough examples of people using vendor frameworks in succesful commercial products. IMHO going bare-metal or using a framework depends on your own preferences and existing framework(s) at your disposal. Nowadays you can't go around saying one way is better than the other. It greatly depends on costs versus benefit which is a too project and situation specific trade-off to make blanket statements about.

Quote
But I fear that going to Python in particular is a backwards step of the OP is aiming for a deeper understanding of microcontrollers: it’s about ten abstractions too far ;-)
But still, writing software in C is not without pitfalls (pointers, index overflows, memory corruption, etc). Using Python can be a good way to get more productivity from a team of software engineers. Not so long ago people where argueing that assembly should be used for total control over a microcontroller. Nowadays those folks are silent. Next on the chopping block is C, followed by C++ in favour of a scripting language. It probably takes another 10 to 15 years but at that time standard microcontrollers run at 100s of MHz with several MBytes worth of flash. Look at NXP's RT1000 series for example.
« Last Edit: January 09, 2022, 02:44:38 am by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline ttt

  • Regular Contributor
  • *
  • Posts: 87
  • Country: us
Re: What's after arduino
« Reply #19 on: January 09, 2022, 08:09:40 am »
I second the RP2040 (Raspberry Pi Pico) suggestion.

Based on your criteria I would not recommend the Teensy line of boards which might be another choice. The community around those is just too small and it is not clear to me that a project centered around one individual has a real future.

I would not go for ESP based boards either. Espressif likes to tout their latest products and I am not sure how long real support for ESP8266s will be around for instance which not even that old. Some of the available ESPxx boards are also utter garbage.

As for the RP2040:

I've been working with arduino a while and want tap into the wisdom of the folks here on the next MC I should pursue subsequent to Arduino.  Below are some criteria that to narrow down the candidates.

 1.  An established MC that has:
      a.  A proven toolset

- The official toolchain is open source, based on gcc.
- Arduino IDE is supported if you can't live without it.
- You can use Micropython if you prefer higher level languages

Quote
      b.  Wide community support

The RaspberryPi foundation has a good track record when it comes to community support. Most other commercial vendors are not even in the same league here IMO.

Quote
      c.  The MC and subsequent iterations will be in the market for the foreseeable future

From the official specs:

"Raspberry Pi guarantee availability of the Raspberry Pi Pico product until at least January 2028."

Quote
2.  The cost per board (think Arduino) is  sub-$15US give or take

$4 should fit the bill.

Quote
3.  The programming language is C or Python (I'm not opposed to learning a new language if the benefit outweighs the cost.)

You got it.

Quote
4.  The processor speed and memory are increased as compared to Arduino to facilitate projects of higher complexity.

Going from an 8-bit chip to a Cortex-M0 architecture running at 133Mhz (more if you overclock them) fits the bill certainly. We are talking 10x+ performance improvement here.

Quote
5. Peripheral devices are available with a significant quantity of libraries are available.  (I'm not opposed to programming libraries, but don't want to do that exercise as my first learning experience. )

There are tons of peripherals and that can be extended with the PIO.

Quote
6. Will expand my knowledge of electronics and practical application of MCs.

Once you get into the Raspberry Pi Pico you'll be introduced to 32-bit ARM based MCUs. You can easily leverage that to go beyond that and learn for instance i.MX RT based systems.

 

Online bingo600

  • Super Contributor
  • ***
  • Posts: 1989
  • Country: dk
Re: What's after arduino
« Reply #20 on: January 09, 2022, 09:15:51 am »
Do you seek better uC understanding/skills ?
I would agree with the posters that suggests you keep the arduio hw, and start programming "Bare Metal" on the ATmega.

Do you "just" seek a faster uC w. more Flash/Ram etc. , and are still happy with the "Arduino way of doing things"
Then i'd suggest either :

Teensy (Crazy fast)
or
STM32 https://www.stm32duino.com/
STM32 "BlackPills F401/F411" are "Cheap" , the "BluePill" even cheaper (but prob. a clone mcu).

The Raspi "mini" is lacking in timers etc. , and imho not suited for as much as the above(s).

/Bingo
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: What's after arduino
« Reply #21 on: January 09, 2022, 06:32:30 pm »
Is this for commercial products or for hobby use and learning purposes?
For the latter, there are of course tons of options, but I can suggest the RP2040 from RPi - it appears to tick all your boxes while being cheaper than typical Arduino stuff. There's of course the official Pi Pico board (if you're looking for a dev. board rather than just the chip), but now quite a few other boards have appeared using this MCU - from Sparkfun, Adafruit, and others. Most are sub $15, the Pi Pico is about $4. Both C and CircuitPython are supported, and even if it's still a modest MCU, it's infinitely (well almost :-DD ) more powerful than anything ATMEGA-based.

I've got a heating system controller that has suffered a little due to poor insect ingress protection. Needs 6 analog 0-5v inputs, four digital outputs. I believe the 2040 has 4 inputs and aren't they 3.3v?

If the question is, how easy it would be to replace your Arduino-based solution (that I suppose is ATMEGA-based, because, as others have said, there are now many, many different MCUs and boards supported by the Arduino framework, and many of them are much more powerful, and many are also NOT 5V.)

So yeah, the RP2040 has only 4 analog inputs. And of course, it's a 3.3V device, so you'd probably have to make modifications regarding all IOs you use. But maybe those would be trivial, we'd need to see the schematic. You may or may not  need level shifters.

For the analog inputs, ditto, we'd need to see your schematic. Possibly, using a resistive divider might be enough, depending on the output impedance of whatever is connected to the analog inputs, and the sampling rate. But for the number of inputs - nothing much you can do, except adding a small analog MUX. Something as common as a CD4066 might fit the bill. Or, you may alternatively use an external ADC with at least 6 inputs.

But since the RP2040 is not (yet at least) supported by Arduino, on top of the hardware modifications, you would need to rewrite the whole firmware for a completely new and different target, so make sure this is what you are ready to do.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf