Arduino Due (released Oct 22, 2012) Compatibility

Si:
I just don't get the Due concept. I just feel I must be missing something obvious. Someone please explain it to me. Surely, if I need more processor, then its because I'm doing something fundamentally unsuited to an operating system-less device like the Arduino. I.e., image processing, DSP, MP3 playing etc. If I need an OS I'd have Linux on a Raspberry Pi.

@Si: But doesn't that mean that ALL ARM Cortex M3 and various other companies' 32-bit microcontrollers, have no applications?

Even based just on their popularity, I am sure there must be many advantages and applications to a 84 Mhz, 32-bit architecture that make it suitable somewhere in between the domain targeted by 8-bit AVRs and the domain targeted by, e.g., Raspberry Pi.

retrolefty:
My fear is that too many begineers will choose a Due over a Uno based on their possible future requirements rather then picking the best board for their entry into this hobby. The experts will already know how to select the best board for each specific project or application, but too many begineers will 'over buy' based on the wrong reasons.

Lefty

I dunno, that assumes you expect people to have a different processor for each project. I suspect a lot of hobbyists are like me, and only have a few processors (or just one), and then builds things to get a specific action and then tears it down, and goes on to the next project. For example, on the UNO, I've bought several proto-shields so that I could keep the stuff wired up, but switch to the next project.

I see a lot of posts about people wanting to do video and audio on their embedded systems, so I don't think it is something you need to run an OS for. I certainly have projects I want to do that involve video that are hard to do with Arduinos, and I'm certainly thinking that the Arms I just bought (teeny 3.0, radioblock, raspberry pi) might fill the bill.

Also, it sounds rather like the 'old' timers that complain about newbies having it so easy, and that everybody should go through the steps they did. I started programming on IBM punch cards, but I don't expect kids starting out these days to go back to cards.

@Si: But doesn't that mean that ALL ARM Cortex M3 and various other companies' 32-bit microcontrollers, have no applications?

Not amongst Hobbyists I expect.

Still waiting for the flood of examples :wink:

MichaelMeissner:

retrolefty:
My fear is that too many begineers will choose a Due over a Uno based on their possible future requirements rather then picking the best board for their entry into this hobby. The experts will already know how to select the best board for each specific project or application, but too many begineers will 'over buy' based on the wrong reasons.

Lefty

I dunno, that assumes you expect people to have a different processor for each project. I suspect a lot of hobbyists are like me, and only have a few processors (or just one), and then builds things to get a specific action and then tears it down, and goes on to the next project. For example, on the UNO, I've bought several proto-shields so that I could keep the stuff wired up, but switch to the next project.

I see a lot of posts about people wanting to do video and audio on their embedded systems, so I don't think it is something you need to run an OS for. I certainly have projects I want to do that involve video that are hard to do with Arduinos, and I'm certainly thinking that the Arms I just bought (teeny 3.0, radioblock, raspberry pi) might fill the bill.

Also, it sounds rather like the 'old' timers that complain about newbies having it so easy, and that everybody should go through the steps they did. I started programming on IBM punch cards, but I don't expect kids starting out these days to go back to cards.

Ok, but lets focus a bit. What would be your recommendation to a newbie to the hobby (with little or no electronics or software experiance) as to which would be their best choice to enter the arduino world once the Due is in fact avalible. I vote Uno, you vote ?

Lefty

Hi,

I guess there will be a lot of frustrated beginners wrecking Dues.

As for applications for the Due, I have in mind a psuedo modular synth - lots of oscillators, wavetables, analog inputs, some sort of low tech interface and a simulated patch panel.

16 bit audio should be very fast in a 32 bit mcu leaving enough cpu to implement the connections in the simulated patch panel for real in software.

Duane B

retrolefty:
Ok, but lets focus a bit. What would be your recommendation to a newbie to the hobby (with little or no electronics or software experiance) as to which would be their best choice to enter the arduino world once the Due is in fact avalible. I vote Uno, you vote ?
Lefty

Right now (October 2012), the Uno. However, I imagine by the January time frame, it would be probably be the Due. There is a saying in parts of the US, that pioneers are the ones with arrows in their back, and anybody that buys a Due on day one is a pioneer. But after the initial problems are sorted out, I see the current 8-bit chips going being more of a niche market. Will it happen overnight? Certainly not, but it will happen.

MichaelMeissner:

retrolefty:
Ok, but lets focus a bit. What would be your recommendation to a newbie to the hobby (with little or no electronics or software experiance) as to which would be their best choice to enter the arduino world once the Due is in fact avalible. I vote Uno, you vote ?
Lefty

Right now (October 2012), the Uno. However, I imagine by the January time frame, it would be probably be the Due. There is a saying in parts of the US, that pioneers are the ones with arrows in their back, and anybody that buys a Due on day one is a pioneer. But after the initial problems are sorted out, I see the current 8-bit chips going being more of a niche market. Will it happen overnight? Certainly not, but it will happen.

I fully agree with this. Certainly for newbies the stabilized due will be the platform of choice. It just makes everything easier. For instance it takes away the problem of memory management for small projects. You can do some really bad coding and still have enough cpu left not to notice.
It just makes the start easier and the old farts like me will do the hard work on the small slow 8 bit chips.
At least that means I will have a job until I die :wink:
Best regards
Jantje

Here's a f'example.

I've been working on a framework that is basically a HAL like the Arduino (and does implement the Arduino functions) but has a lot more, such as string parsing, FIFOs etc.

Last I looked it was about 20k in size, a bit large for a Uno but no problems for a chip with a lot of flash. Now of course you don't have to go to an ARM to get a lot of flash, but with the smaller ARMs available for < $2 I just reckon it's easier to use them. Hopefully I can drop this code onto the Due when it arrives but it's not worth porting it to a Uno.


Rob

if I need more processor, then its because I'm doing something fundamentally unsuited to an operating system-less device like the Arduino. I.e., image processing, DSP, MP3 playing etc. If I need an OS I'd have Linux on a Raspberry Pi.

I don't think that that follows. There's a huge performance gap between the current Arduinos and a linux-system like Rasberry Pi. Don't let the price similarities fool you. While RPI and Due may have similar prices, you can transfer a project to your own Due-like system to lower costs. While to make an RPI-based system at their price, I think you need to have RPi-like volumes...

Audio is one example; Due has enough performance to "do" audio without too much problem. You can do SOME audio on an Uno, but it requires careful attention.

Anything that needs and operating system, but not a full-fledged linux, is another candidate. Putting an OS on MEGA is possible, but memory and performance limits make it pretty challenging; more of a technology demonstration than a useful tool.

And remember, it's theoretically a less-than-zero-cost upgrade. Due has more performance and more memory (both flash and ram) than a MEGA at LOWER list price. In fact, it has capabilities similar to the Arduino ADK at about 30% less cost. The briefly-mentioned Uno-Ethernet is (potentially) similarly cheaper than Arduino Ethernet and much cheaper than MEGA+Ethernet Shield.

Depending on acceptance and success, an ARM-based Uno-sized system is also possible, at Uno-like prices, with extra performance and memory...

retrolefty:
What would be your recommendation to a newbie to the hobby (with little or no electronics or software experiance) as to which would be their best choice to enter the arduino world once the Due is in fact avalible. I vote Uno, you vote ?

I vote for purchasing a copy of Grob's "Basic Electronics", a copy of "Art of Electronics", and a copy (set?) of Mims' "Mini-Notebooks" - plus a breadboard, a couple of "Super Surprise" boxes of floor sweepings from Electronic Goldmine, and a cheapo harbor freight multi-meter (free with coupon!). Plus some batteries I guess. Then they should sit and study those books, do the math (at least know what Ohm's Law is!), and attempt to understand why they shouldn't just willy-nilly hook parts up to their Arduino then wonder why it let the magic smoke out.

Does that make me sound like an "old man"? That I want people to understand the basics, to know how to walk, before they learn how to run? To have at least a basic understanding so they don't destroy (and get frustrated with) their $30.00 microcontroller board (Arduino or otherwise)? Is that too much to ask today?

Does that make me sound like an "old man"? That I want people to understand the basics, to know how to walk, before they learn how to run? To have at least a basic understanding so they don't destroy (and get frustrated with) their $30.00 microcontroller board (Arduino or otherwise)? Is that too much to ask today?

It probably really is asking too much. Today is more the world of near instant gratification, and learn by doing, etc. I suspect even us 'get off my lawn' types, if reborn into todays world would mot choose or wish to take the learning journey we did so many decades past. I think today an Arduino with a good starter kit is a good platform to start learning electronics from scratch, the key is if their using a good tutorial type book that lets them proceed step by step and stopping at times to discuss and explain the theory behind what each step is trying to teach them. With so much information avalible on the web these days, there is no shortage of good reference material, it just needs to be orginized and presented in proper context as one proceeds with their arduino projects.

Maybe those here that are actively involved with teaching students using arduinos as teaching aids would let us know what works and doesn't work well for their students? I'm more interested in how the electronics fundementals and theory proceeds rather then how the software skills are teached.

Si:
I just don't get the Due concept. I just feel I must be missing something obvious. Someone please explain it to me.

Surely, if I need more processor, then its because I'm doing something fundamentally unsuited to an operating system-less device like the Arduino. I.e., image processing, DSP, MP3 playing etc. If I need an OS I'd have Linux on a Raspberry Pi.

Arduino is a device for electronic hobbyists. 16 million things a second is faster than I've ever needed an Arduino to perform.

Surprised so much of this discussion has centered around the processor as apposed to I/O.

Due 96 MHz, 54 digital I/O, 16 Analog Inputs (assuming it's I/O is the same as Mega)
RPI 700 MHz, 17 digital I/O, 0 Analog Inputs

If your project involves a lot of low level I/O with any appreciable sensor timing and filtering, Due sure seems to make much more sense to me. The quad/multi copter crowd and home energy monitor crowd are eager for the power. Large amounts of I/O require rather expensive hardware to interfce to the RPI via USB or a multiplexor on I2C which is relatively slow.

I have a home energy monitor on a Mega that uses 44 digital lines and 8 analog. Monitoring HVAC status/run time, water pressure, water pump usage, water heater run times. Have an ultrasonic sensor on the oil tank measuring fluid level. Have sensors on the power lines coming in to the house calculating energy usage "real time". All this is logging to a MySQL data base on the NAS. Also monitoring eight wifi enabled thermostats. I sends out a plethera of alerts via LAN when certain adverse conditions are met. There are (4) Windows 7 machines in the house each banging away on the LAN wih their polluting flood of device discovery messages (arduino has to process all of these that are pointed at it) , and the ATT Uverse router banging away with DHCP status messaging. The Mega can get pretty taxed. I have isues with the fluid level sensor and power monitoring when all of these things manage to stack up on top of each other. Could I do all this with a PC...yes, but every time I've looked into it, the cost gets excessive quickly. My $50 Mega, $20 ethernet shield, and $20 in various opto isolators and resistors is much cheaper, plus it doesn't consume nearly the power the PC based system would.

From my perspective, RPI is a small personal computer, not a microprocessor for imbedded logic projects. I don't need the USB ports, video support, or other peripherals on the RPI. I'm near the front of the line for a Due.

In terms of programming environments, I would prefer an intermediate step between bare metal programming (Ardunio) and running a full OS with full protection (Rasberry-pi, Beaglebone). Many of the things I contemplate doing would be better expressed as a series of cooperating threads, rather than building state machines that keeps track of everything.

For example consider a setup with an IR receiver that is waiting for the user to push a button on a hand held IR transmitter like a TV remote, but at the same time, you want the chip to do what it is normally doing. With cooperative threads, you would have one thread waiting on IR pulses, and when it gets a full sequence of pulses that it recognizes as say the 'up' button, then it sends a message that the button was pressed. Sure on a bare metal system, you build a state machine for the IR pulses, etc. and separate state machines for each of the other tasks.

One problem with threads, is each thread needs its own stack space, and machines like the Arduino have rather limited memory setups. I'm not sure Due will solve this.

There is the QP state machine (Arduino Playground - QP-nano framework) that I've thought about, but I haven't yet used it.

Jantje:

MichaelMeissner:

retrolefty:
Ok, but lets focus a bit. What would be your recommendation to a newbie to the hobby (with little or no electronics or software experiance) as to which would be their best choice to enter the arduino world once the Due is in fact avalible. I vote Uno, you vote ?
Lefty

Right now (October 2012), the Uno. However, I imagine by the January time frame, it would be probably be the Due. There is a saying in parts of the US, that pioneers are the ones with arrows in their back, and anybody that buys a Due on day one is a pioneer. But after the initial problems are sorted out, I see the current 8-bit chips going being more of a niche market. Will it happen overnight? Certainly not, but it will happen.

I fully agree with this. Certainly for newbies the stabilized due will be the platform of choice. It just makes everything easier. For instance it takes away the problem of memory management for small projects. You can do some really bad coding and still have enough cpu left not to notice.
It just makes the start easier and the old farts like me will do the hard work on the small slow 8 bit chips.
At least that means I will have a job until I die :wink:
Best regards
Jantje

I still say a begineer to electronics is better off starting with a Uno. One other reason would be the very wimpy output pins that ARM chips have, even driving a 20ma led will require a switching transistor making a learning lesson all that much more complex to build and understand. Most all tutorials showing interfacing to simple circuits will have to be revaluated to see if they are compatible with ARM output/input pin specs. I think the rather rugged I/O pins of the AVR 8 bitters work much to the favor of raw begineers. Keep pushing those Uno boards. I think many are focusing too much on what a ARM chip is better at, rather then also considering what a 328P chip is better at in context to someone first starting out building simple stuff to learn how electronics works.

Lefty

retrolefty:
... One other reason would be the very wimpy output pins that ARM chips have, even driving a 20ma led will require a switching transistor making a learning lesson all that much more complex to build and understand. ...

I wasn't aware of that. This is indeed a really strong point for the UNO.
Best regards
Jantje

I agree that a Uno is a better choice for a beginner who

a) won't be writing 10000 lines of code,
b) just needs to see a LED flashing and
c) will be following examples that will 99% be for a 5v Uno-style board with IO grunt.


Rob

You think i can use a DUE on my project of a spaceship to go to the Moon ?!
PS- My Arduino UNO didnt had enough Sram ...

One problem with threads, is each thread needs its own stack space, and machines like the Arduino have rather limited memory setups. I'm not sure Due will solve this.

I think the relevant number is the ratio of RAM size to thread state size (roughly, number of bytes of registers). AVR is particularly weak here: 2048/32 = 64. Due is about 96k/(4*16) = 1536, so that SHOULD be a lot better.

even driving a 20ma led will require a switching transistor

Or a driver chip. OTOH, these days for a lot of apps you can just use a 1mA LED instead...

westfw:

One problem with threads, is each thread needs its own stack space, and machines like the Arduino have rather limited memory setups. I'm not sure Due will solve this.

I think the relevant number is the ratio of RAM size to thread state size (roughly, number of bytes of registers). AVR is particularly weak here: 2048/32 = 64. Due is about 96k/(4*16) = 1536, so that SHOULD be a lot better.

Well it would be less than that since you have to account for the stack frame size of each thread. Having more ram also means you can think about using dynamic allocation (in moderation). There are certainly ways to do it in memory starved environments, but it takes more effort (essentially going back to a state machine for each thread).

However, if the DUE has 100k RAM or so that the SAM3X83 has on chip, it still in inadequate for doing much with video. A QVGA (320x240) image with 3 bytes/pixel, is something like 225K, and if you wanted to full hog to HD video, that is 5 megabytes per picture.

Reading the data sheet, there is a large section on the different types of memory which was over my head, but gave the impression that it would not be too difficult to attach banks of high speed external memory.

Duane B