A lower-cost, ARM-based Arduino alternative?

I stumbled across this NXP press release for the LPC134x which is based on the ARM Cortex-M3. The press release says “The on-chip USB drivers support both the Mass Storage Class (MSC) and Human Interface Device (HID) class. Furthermore, these drivers are incorporated in ROM, saving customers approximately 5-6 K bytes of user code”

Looking at this presentation, (slide 25), the chip shows up under Windows (and they say Linux) as a Flash drive to provide “Drag and Drop Flashing”. It has this capability built in at manufacture! No need for a bootloader, JTAG, or a second chip, like the FTDI USB to serial interface on an Arduino. Put an LPC134x on a board, connect USB, and it should ‘just work’ (TM :-))!

An entire USB-based micro-controller board only needs an LPC1342 or LPC1343, a crystal, voltage regulator, a few passives and PCB. The LPC1342 is available from Farnell for £2.20 and LPC1343 for £2.70 or £3.30. So a board could be smaller than an Arduino-Nano, and lower-cost.

I haven’t read the datasheet in detail, but overall these micro-controllers are more powerful than Arduino’s comparable Atmel ATmega168 or ATmega328, with 16K or 32K of program memory, so this is the best I’ve found to achieve the goal of sub-$10 micro-controller (at one-off prices).

The NXP parts have plenty of advantages over the Atmel parts. The LPC134x runs at 72MHz vs the ATmega’s 16MHz, and both execute instructions in one or two cycles. The LPC134x is a genuine 32-bit processor, whereas the ATmega is an 8-bit processor, so this means some calculations will go much faster on the ARM. I don’t think this is a huge benefit, as my Arduino’s spend most of their time waiting around for something to happen, but it may mean some programs are smaller on the LPC134x.

The LPC134x looks like it has much faster (40x) Analogue to Digital Conversion (ADC), opening up a range of interesting sensors and experiments. The LPC134x has significantly more RAM; LPC1342 has 4KB vs the ATmega168’s 1KB, the LPC1343 had 8KB vs ATmega328’s 2KB.

Both families have a set of timers. Timers are used to implement analogWrite, millis, micros, delay and delayMicroseconds in the Arduino language, but they are also used to control servo motors, stepper motors, modulate Infrared LEDs, and time external events.

The LPC134x have 2 × 32 bit timers, and 2 × 16 bit timers vs the ATmega’s 1 × 16 bit timer, and 2 × 8 bit timers. The LPC134x timers look more flexible than the Atmega168/328. The LPC134x comes in a package with more pins, so there are more PWM pins, and more pins to time external events.

The on-board LPC134x USB is 12Mbit/second vs 0.115Mbit/second for the FTDI chip on an Arduino.

The rest of the comparison between LPC134x shows similar peripherals to the Arduino’s on chip. They both have I2C, SPI and USART. So overall the LPC134x looks as good or better than comparably priced ATmega’s (at one-off prices).

There is a free, Open Source, GNU toolchain for the ARM, which is based on the same compiler as the Arduino IDE uses. So it looks like there are no real obstacles to making a lower-cost, ARM-based Arduino alternative. Of course, there is a plenty of work in porting the Arduino language libraries, like analogRead and analogWrite, but the core functions, which we use the most, would probably be only a few weeks.

I’ve ordered a low-cost NXP development board, LPCXpresso, to do some investigation. This is a similar price to Arduino’s, at £18.34 from Future, or £17.86 from Farnell (plus VAT). This is an encouraging price because the LPCXpresso contains much more technology than an Arduino. The LPCXpresso has a JTAG debugger which supports much more sophisticated debugging than available on an Arduino, and it probably costs as much or more than the LPC1343 itself.

There is a free downloadable LPCXpresso development environment available, so it should be practical to get a better understanding, and discover the disadvantages that datasheets never show for very little further cost. I’ll try to make some time to investigate this in more detail after Christmas.

Please don’t misunderstand. I love my Arduino’s, but the ability to significantly reduce its price, and make better technology available to an even wider audience is compelling.


Tags: ,

4 Responses to “A lower-cost, ARM-based Arduino alternative?”

  1. Brian Says:

    This sounds really interesting, have you got any further with this? Like you i lament the fact that the usb interfacing via FTDI costs so much to implement on arduino and is one of the things keeping the price high.
    (Met you at DEV8 )

    • ourduino Says:

      I’ve got the LPCXPRESSO (http://uk.farnell.com/nxp/om11048/kit-dev-lpcxpresso-lpc1343/dp/1777673). I actually bought mine from Future as part of a larger order. The board has a cut down JTAG on board, and a free development environment with a hardware level debugger.

      Sadly I haven’t done anything useful partly because the LPCXPRESSO software is MS Windows, and I try to use Open Source tool chains, or at least tool chains that work on more platforms than MS Windows.

      I am also oscillating between NXP, and other Cortex-M3 ARM’s. I like the ST Micro STM32F’s. Some of the USB-enabled STM32F are comparable in price to an ATmega+FTDI, so could produce a board with a similar price to the Arduino, but a lot more resources and performance. A nice feature of the STM32F is common pin-outs across the packages. A single PCB would support chips from 16K program flash and 4K RAM all the way upto 1M program flash with 96K RAM. There is also an Open Source toolchain on other platforms including Mac. If you look at http://micromouseonline.com/, Pete has described his experience using it as a robot controller.

      I recently attended an Atmel workshop using the Atmel SAM3U, which is Atmel’s first Cortex-M3. It is very nice, but Atmel’s newer SAM3S is lower-cost and looks extremely good as an ATmega upgrade. I also like reading Atmel’s technical documentation more than NXP or ST.

      Summary: I need to put more time into Cortex-M3.

  2. ursine1 Says:


    I’ve had very similar thoughts, and I also just got one of the LPCXpresso kits.
    I haven’t yet tried the USB examples; I had to deal with some water seepage into my basement. (We’ve had record rains in the Boston area.)

    I had been thinking about trying to do a bit-bang implementation of low-speed USB, using the LPC1114, but it looks like the LPC 143x is much more capable, and the overall cost would still (I hope) come in well below current Arduino and work-alike boards. There are also numerous upgrade paths, as bang/buck increases, such as the LPC176X parts. An ethernet-capable Arduino variant (without having to muck with a shield) would be very nice! (Though I’ll leave that for later.)

    Best regards,


  3. Michael Shimniok Says:

    Cool article!!

    I’ve had an interest in ARM too. I started playing around with mbed last year. I dig the mass amount of easy libraries and the community support. The LPC1768 is absurdly powerful compared to Arduino: 64K ram, enormous flash (512? can’t remember), 96MHz, and loads of peripherals. There’s also an M0 USB variant now.

    I picked up an LPCXpresso earlier this year. The price can’t be beat. How’s it going with yours? I’ve done nothing so far. 🙂 I also got one of the free STM32F4 Discovery boards (168MHz M4!) Done nothing with that either.

    I like the mass storage-on-a-chip deal. That sounds awesome. The mbed has an onboard mass storage; makes it nice to flash. I may have to look into that chip. I just built an LPC2103 breakout board in DIP form and have played a little with coding in IAR EWARM Kickstart. The serial bootloader is nice, but a built-in usb flash would be totally awesome.

    I did an article on some of the hobbyist options for ARM that I know of (http://www.bot-thoughts.com/2011/12/arm-for-hobbyists.html) for what it’s worth. Have you checked out the Maple from Leaf Labs? I’m curious about that one.

    Of course Arduino will be going ARM one of these days soon.

    How about Raspberry Pi…? That’s kind of a whole different ballgame. I have one preordered. Can’t wait to play with it!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: