element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Growing Out of UNO
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: chriswhite
  • Date Created: 28 Apr 2015 8:30 PM Date Created
  • Views 2003 views
  • Likes 6 likes
  • Comments 7 comments
  • education
  • thelinker
  • embedded.fm
  • processors
  • arduino
Related
Recommended

Growing Out of UNO

chriswhite
chriswhite
28 Apr 2015

Posted by Elecia White.

 

On last week’s show, Chris and I talked some about some new processors we are using so it was interesting to get listener email asking why we use different processors. The listener (who requested anonymity) said:

 

I'm trying to grok what would make me want to switch off Arduino (besides perhaps the parents fighting... ignoring that, just looking technically).

 

In case you wondered about the “parents fighting” comment, the two teams that created Arduino are fighting about trademarks. It is frustrating to me that this open source, educational company, which makes amazing things for people, is fighting over money. I know it is naïve but I am this close (holding fingers quite close together) to never recommending an Arduino board again, even to beginners.

 

However, the Arduino UNO has been my go-to board for beginners. The easy start-up makes for a good initial experience and the large number of libraries gets home/garage projects off the ground quickly. But to stay on it? The Atmel ATmega chip is a good one but there are so many others. And so many reasons to choose something else: power (current consumption), different peripherals, built in functionality, more processing, more RAM, more flash, size, cost, ease of programming in manufacturing, etc.

 

These depend on what your goals are. Our listener did give a hint about herself:

 

I've made an Arduino Shield (..and...surprise and WHOA...it works :-) ). I mention this to give an approximate idea of my current skill level.

 

A later email also mentioned going through Chris Gammell’s wonderful Contextual Electronics, learning to layout and build a board (I’ve been meaning to do that myself). She continues,

 

I'm hearing conversations about different microcontrollers and platforms. Are there clear (technical) differentiators that would make a different microcontroller (than used by the Arduino) a much better choice within (certain) scenarios? If yes, what scenarios?

 

I’ve been working on some wearable consumer products lately. For one, I needed a fast prototype that could be worn. I chose the RedBear BLENano as a platform. I could have used an Arduino with one of the many BLE shields but it would have been much larger (and less power efficient, so I’d need a bigger battery as well as larger boards). Also, why have two processors if I don’t have to? The BLENano uses the Nordic nrf51822, a processor I’ve used before so I was familiar with its Cortex-M0 with built in Bluetooth Low-Energy (or ANT, a protocol that lots of health and sports gear uses). The BLENano is an mbedTm device which means it has a free online-compiler. It is similar to Arduino, actually: easy to set up, lots of available libraries, debugging via serial port.

 

When I previously used the Nordic nrf51822, it was in a product with a client’s custom board. I used the Keil compiler to build the embedded code along with a debugger. Here is where things might change for our listener. Debugging over serial is fine. I mean, it is ok. However, a real debugger, even one with only a few hardware breakpoints, means getting to walk through code and look at variables. It is so nice. It feels like a luxury vacation after trying to debug interrupts via printf.

 

Such luxury comes at a price: about $100 to get a dev kit with the necessary parts for my nrf51 part. Given how much my time costs to a client, that is a fair deal: I save a lot of development time by being able to look at the variables and registers as I walk through the code (aka “on-chip debugging”). Is it worth it to you when you are doing a home project? It very much depends on just how stuck you are with a problem.

 

You can do on-chip debugging with an Arduino UNO: get an AVR debugger, set up GCC or other compiler to cross-compile (to target the Atmel processor instead of your computer), and start using the board without the Arduino interface. (I know how to do Linux and Windows, I think Mac would be similar to Linux.)

 

The Arduino UNO has the Atmel ATmega328 on it. It is an 8-bit processor with 14 digital inputs/outputs (6 can be used for PWM, 6 can be analog inputs) and a 16MHz clock. This processor is relatively small, all things considered. Sure, it is fine for blinking some LEDs, maybe running a motor or two but if you want to connect via Bluetooth or WiFi you’ll need another whole processor to handle the communication layers. It is inefficient from a parts-cost, size, and power perspective. Like the nrf51288, many BLE and WiFi SOCs (system-on-chips) allow users to run their applications onboard the communications processor.

 

Other processors may also have DSP blocks that speed up signal processing or better PWM blocks that allow for complex and fine-tuned motor control (oh, TI DSPs, I do miss you sometimes). You may want more IO pins. Or you may want far fewer and to have a much smaller board. (Though if you enjoy Arduino, do check out the Trinket and Arduino Micro.) If you are making light up clothing (shoes, jacket, bike helmet, etc.), you probably don’t want or need to carry the full Arduino board in a pocket: size matters.

 

Or you might also want to consider cost. If you are conducting a class or making a kit for other people, paying ~$20 for a board can get expensive. If you are willing to use a non-Arduino interface, the STM8 Discovery boards are only $7.  This board’s processor is a slightly less capable than the Arduino UNO ATMega processor but it is close.

 

More likely, though, after you add lights, motors, speakers, and all sorts of sensors, you’ll find the Arduino just isn’t big enough for what you want. You won’t be able to compile as linkers say the code won’t fit, you’ll get crashes because there isn’t enough RAM, or things will just not happen when they are supposed to due to too few clock cycles. You could spend a lot of time optimizing your code: re-writing libraries to remove floating point, getting rid of debug printfs because they take too long to execute, or tweaking your code to stretch the RAM or cycles.

 

Alternatively, you can take an easier path and move up to something larger. The mbed boards are all ARM core boards (mbed is owned by ARM, vendors who use the ARM core to make their processors can make mbed compatible boards, utilizing the online compiler). This has many advantages as our listener had already determined one of the downsides of moving away from Arduino and mbed platforms:

 

I added the ADS1015 ADC. Adafruit had a breakout board, library, wiring diagrams...my goodness...I totally support Adafruit for this level of guidance!...would I get that level with another microcontroller and its platform? Would I have to start at writing a library that talks to the ADS1015 directly (i.e.: parse through the datasheet to build up read/write/control commands)?

 

The mbed might have libraries for you (many are written by community members such as yourself). In general, processor and peripheral vendors are starting to provide more driver libraries, apparently learning that embedded software engineers are as lazy as cats. But, yeah, I read datasheets (ooh! Embedded.fm t-shirt idea!). Sometimes I write drivers from scratch. It is tough the first two or three times, then you get good at it and it is just another skill.

 

Writing drivers and application code, I spend a lot of time working on ARM Cortex-M0 and Cortex-M3, though not necessarily with the mbed interface, usually using IAR or Keil compiler and IDEs (debuggers, yay!). Projects that are more complex might require going to the beefy Cortex-M4F (with floating point built into the hardware!). The Cortex series is popular with people making power efficient (i.e. battery powered), inexpensive devices in large quantity (i.e. consumer). Their ubiquity drives the cost for compilers and debuggers down.

 

If your processing needs move up far enough (or you dislike drivers enough), you may find yourself in Raspberry Pi land (in which case, element14 is a wonderful place to get started). Those are essentially small general-purpose computers. They are extraordinarily capable, often have Linux drivers already written for you, and remarkably easy to build code for (python! Scratch!)… but you’ll need a larger battery.

 

Thus, the processor continuum starts with tiny chips (ATTiny or STM8 or MSP430) and goes all the way to miniature desktop computers. There are many technical differences between various MCU products. As someone learning about hardware and microcontrollers, you probably look at the Arduino and say, “what can I do with this?” That’s only going to last for a little while. Someday soon you are going to see a problem and say “what do I need to solve this?”. When that happens, the Arduino UNO may no longer be the right answer.

  • Sign in to reply

Top Comments

  • nevyn
    nevyn over 10 years ago +2
    Nice to see the STM8 microcontrollers getting some love and attention, I think they are very underrated especially when the Discovery boards are such good value. Next step for me, probably the STM32 Discovery…
  • screamingtiger
    screamingtiger over 9 years ago +1
    Don't forget the ChipKit PI with the PIC32 on it. Its a good step from adruino because they have ported many parts of the library over, and the MPIDE they provide is spin off of the arduino IDE. I personally…
  • Former Member
    Former Member over 9 years ago +1
    There are endless supply of other processors and platforms out there, with many being well under the Arduino's price point and usually starting with 10x the performance and/or features. I have configured…
  • Former Member
    Former Member over 9 years ago in reply to screamingtiger

    In the IDE, you drag the communications block into your design. And then somehow assign them a to GPIO pins... I'll attach a few pics, sorry if they are unreasonably large...

     

    From Cypress, the 3 & 5 block diagram...

    image

    ... it doesn't mention UART or SPI, however those are implemented via comms blocks. Possibly in the UDBs?

     

    _________________________________________________________________________________________________________

     

    Anyhow, I open up PSoC creator and this is for the CY8CKIT-059 PSoC 5LP development board that's $9:

     

    OK, I shouldn't have included the datasheet... anyhow, the IDE is on the left. I clicked on the SPI Master Bidirectional mode Macro in the right middle pane. Then in the bottom right, the functional block showed up. I clicked on Open datasheet and my PDF viewer instantly opens the PDF you see in the right window. As you can see, the PSoC 5 has an impressive array of comms available. Then consider it was $9...

    image

    (just edited to make screen grab more focused on the comms, full IDE in next pic for PSoc4)

    _________________________________________________________________________________________________________

     

     

    Here is the same view of the $4 PSoC 4 comms modules:

    image

    For $4, the PSoC 4 has included within functions hobbyist boards aren't even aware exist, like the quadrature decoder. This project was nearly impossible for me, and I ended up buying a specialized quadrature decoder IC that was several times more costly than this PSoC 4 board.

     

    I've got some PSoC 4 and 5LP eval boards I bought but looks like won't do exactly what I want; if you'd like me to mail you one of each (or just one), send us an email on orders@ca-cycleworks.com with your address. image  I haven't bothered to program any of these yet, as I'm working towards a very specific project and since neither of these dev boards can host a thumb drive via the usb connector, I'm moving on to evaluating Infineon's XMC4500 Relax Lite Kit next... Then to Ti Tiva C Connected Launchpad.

     

    Thanks,
    Chris

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • screamingtiger
    screamingtiger over 9 years ago in reply to Former Member

    I was looking at the psOc board and having a hard time understanding how to use it.  I understand it has I/O pins but there does not appear to be any communication protocols.  Do you know if the IDE has libraries to emulate it in software?  I think at a minimum I2C is needed but serial is also good for debugging until one learns the proper method.

     

    Looks like the M3 version you posted has I2C but nothing else in hardware.  I don't mind emulating it in software but without SPI or uarts there are a lot of sensors that are eliminated from being used.

    http://www.cypress.com/?mpn=CY8C5888LTI-LP097

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 9 years ago in reply to screamingtiger

    Yes, but I believe it's worth trying each of them out to get a platform that feels good. A few might hurt at first, but get each to do blinky and then user button changes the rate. Usually this is easy enough to do. And although other platforms' IDE may be bigger or intimidating, my opinion the coding of their libraries will be developed properly and won't be as adhoc as Arduino code. I almost went into convulsions porting some Arduino TFT code to ChipKIT, but was absolutely worth is as Majenko (who makes uecide) saw the benefit and wrote a high performance C++ frame buffer library.

     

    Yes, trying each costs a few $ up front, but if that's an issue, eBay or Amazon them afterwards.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • screamingtiger
    screamingtiger over 9 years ago in reply to Former Member

    Wow there are just so many darn things now its hard to chose.  the arduino pro mini will be my main go do for small, lower power applications.  they can be had for under $3 if ordered from china. I found a version that works perfect.

     

    I really like that $4 PsOc board.  For hobbyist like myself, I need to pic  a design and stick with it.  It becomes too cumbersome with every project ot have the learning overhead needed to get it working with a new platform.

     

    Its so hard to decide which platform to move to!


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 9 years ago

    There are endless supply of other processors and platforms out there, with many being well under the Arduino's price point and usually starting with 10x the performance and/or features.

     

    I have configured a [search on Mouser] to illustrate the possibilities, which I feel are amazing and mind blowing.

     

    Cypress has [$4 red PSoC] boards are about the closest to an arduino, albeit with 20+ GPIO and a 24MHz Cortex M0 processor. Along with these are configurable internal digital logic modules and op-amps and comparators. It took this EE a week at least to begin to understand the capabilities; and who knows when (or if) I'll understand how to leverage this flexibility. For twice the price (yes, $9), you can have a Cortex M3 with built in CAN controller, I2C, more UART than imaginable. And that bad boy has 24 universal design blocks for configuring logic around the processor. The drawback to the power of PSoC is a huge IDE that is quite a memory hog in Windows.

     

    There are STM32 offerings using pin-outs compatible with Arduino that start around $10. Haven't researched their development yet but have some on the way.

     

    Great to see ChipKIT mentioned. They are probably the closest thing to Arduino with "real power". They can be programmed with microchip's "mpide", which they ported from Arduino IDE. Also do not forget About UECIDE | UECIDE and that it is a central IDE that can program Arduino, ChipKIT, and Launchpad TI.

     

    Page 3 of that Mouser search goes from $12.95 to $16.48 and has the Freescale Freedom platform, Launchpad TI, and more. The Freedom boards seem the best alternative with Arduino compatible pins. They start showing up on page 2 for $12.95. (granted I haven't yet evaluated the $10 NUCLEO boards)

     

    In my observation, the freedom boards offer the most to someone stepping up from Arduino, while the other various small form factors are great for when the end result is a "box" and pinout doesn't really matter. For my latest project, once I had the design sorted out, I used a pro mini for the permanent solution and soldered wires to the shield implementing the hardware interface.

     

    image Chris

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube