Mega 2560 versus Due

A project is under discussion. Actually Phase 1 of it is completed with the a Mega 2560 and has the following facilities / interfaces :

  1. Bluetooth 4.0 for getting / sending user files from an iPhone
  2. SD card for storing user plan and update actual file ( CSV format)
  3. RTC for real time display
  4. Drive a 4 L x 20 C LCD
  5. Handle 8 Push Buttons
  6. One interrupt channel to record pulses from flow meter.
  7. MIFARE RFID interface to read tags

And now as an additional requirement I have to add a 4 channel RF24 interface to the above setup.

What if I migrate to a DUE ? Reasons

  • Compared to the Mega the DUE “sounds” more professional being a ARM product ( 32 bits too !!wow…)
  • Somehow the UNO and Mega are still seen as Hobby boards.
  • I can change the 4L x20C LCD with maybe a TFT touch screen or a graphics display unit.
  • Debug using the JTAG interface ??

Doubt …

  • How does the DUE interface with the IDE 1.6+ ? As easy as the Mega or…
  • Is the debug interface useful. I know any debug is useful but how much of details does it provide ?

Any thoughts on above ?? Thanks

You want to change to a Due because it sounds better? It uses 3.3V logic so you would need level shifters for any pin that will have >3.3V on it and all your libraries would have to be compatible with the Due but another than that it would work.

Why do you need all the pins? I’d go for a Teensy 3.5 or something Teensy Technical Specs Comparision Table

@SamlAm93

Yeah correct...I also have been looking at the Teensy 3.2. Pretty impressive interface for its size .

But then I am not sure how the migration is going to be from Arduino to Teensy ? I know they may have made it as easy as possible ( I know PJRC from my 8051 days !) Any inputs on this based on your experience ?? Thanks.

There is no migration. Code that runs on the other Arduinos will run on a Teensy. The only exception is some of the sometimes esoteric and usually unnecessary register manipulations.

Is the Mega slow already with the code you have? Is your code already non-blocking, no delays or wait loops?
Does it have enough pins to add the 4 RF24’s?

How it is “seen”? By whom? Is it because of the connectors? The Due has the same type, they’re fine for custom cables but you can desolder them and solder wires directly to the board. You can also get smaller ATmega2560 breakout boards that look more industrial for your end product or make your own if you have the skills in-house.

Mega2560 has 4 hardware serial ports. I’m not sure about the Due but it does have stereo DACs and 13-bit ADC.

The Due certainly is faster and has more RAM. It also has 3.3V IO pins that max output at 10mA, meaning try to use half that or less regularly. The Mega pins max output is 40mA, they can deliver 5V 20-25mA steady. I can’t say about total current draw from the Due but guess that it’s no greater than the Mega board. But otherwise it is pretty wow.

Teensy 3.x are also wow but count the pin holes and pads underneath and consider if you can connect to those pads without burning up or desoldering the chip. Those Teensy’s are a lot smaller IRL than the site pics.

Thanks Morgan. That is very reassuring.

And GoForSmoke asked "who thinks Mega is hobby stuff...?"

It always happens. The client side project team is happy with what you deliver and they have started using it. Then the company goes and gets in a new Wiz kid from now where and right out of college. The first thing he wants to do is impress... so meets up with vendors and finds out what they do. The moment he hears an Arduino Mega in the line up he goes .... Aw why do that ? An 8 bit Arduino ?? OMG...Its all about ARM nowadays guys. Just don't be a dinousar or something on those lines. ANd the moment this point is brought about the project team thinks they are being hobbyists and the game starts....

Frankly the Mega 2560 is going cool with no issues and of course I am nowhere near its performance limits. Of course it has lots of baggage in terms of peripherals but then it was designed for that right ?

Life is never easy.

Mogaraghu:
Thanks Morgan. That is very reassuring.

And GoForSmoke asked “who thinks Mega is hobby stuff…?”

It always happens. The client side project team is happy with what you deliver and they have started using it. Then the company goes and gets in a new Wiz kid from now where and right out of college. The first thing he wants to do is impress… so meets up with vendors and finds out what they do. The moment he hears an Arduino Mega in the line up he goes … Aw why do that ? An 8 bit Arduino ?? OMG…Its all about ARM nowadays guys. Just don’t be a dinousar or something on those lines. ANd the moment this point is brought about the project team thinks they are being hobbyists and the game starts…

So the kind of idiot that over-specs and drives prices up to suit his ego and/or try to make the team look bad?

In 89 I had a friend ask about spending major bucks on a new bleeding-edge PC to run a 15 minute process in less than 5. I pointed out that that 15 mins was part of a 4 hour production cycle and that he should factor the whole 15 minutes into 4 hours to figure out the real gain, 6% at best.

You can get knockoff Mega2560’s from China for about $10 for 1. A Teensy 3.1 runs about $20. For every dollar in manufacture the end price is x4 to x10. From investment to sales, bloated costs kill profit and marketability which I guess they quit teaching a while back.

Going to ARM will require circuit changes and amounts to delivering pizza in a monster truck rather than an economy car.

Frankly the Mega 2560 is going cool with no issues and of course I am nowhere near its performance limits. Of course it has lots of baggage in terms of peripherals but then it was designed for that right ?

Life is never easy.

What peripherals do you mean? Baggage?? Features or problems?

It runs SPI, I2C, RS232, RS485, 1-wire or even external parallel SRAM (has been used for other parallel devices) well. Did you know that AVR serial ports are all capable of full speed master-mode SPI?

I am very impressed with the boards from one of our forum mods, Rob, AKA 'Cross Roads'.
The boards I selected was the 1284 mini, using a 1284p MCU.
Page is here, but you need to scroll down near half way to see the 1284 mini.
The 1284 has two serial ports rather than four the 2560 has, but has more RAM than the 2560.
The 1284 has been considered the 'Goldie Locks' of the AVR range, in that it is not too small or not too large, just right.

Freetronics here in Australia did produce a UNO sized board called the Goldilocks which had the 1284p on it.

As GoForSmoke says, not many know that the async serial ports can be used in SPI mode if you need.

I have used the DUE and it runs my off grid renewable energy system, and works beautifully with CAN bus, but my intention is to go back to an AVR, and that will be the 1284p MCU.

I think if you have in your mind the word Arduino, then that might suggest certain things to certain people, but if you say instead, it is AVR based, then may have less of that 'hobbyist' connotation for those certain people.

If you really need what ARM brings then other variants to look at might be other SAM devices, SAM-D21 or SAM-G55, data on SAM-G55.


Paul - VK7KPA

If your application runs just fine on an ATMEGA then stick with that platform.

The DUE does not use the same processor so there can never be 100% compatibility with the standard that is the ATMEGA platform.

I have been using a DUE for a portable LoRa based tracker receiver see here;

http://www.loratracker.uk/?p=433

There are code differences between the DUE and the ATMEAGA platform, mostly its a case of using different and appropriate libraries, but in one case I found a bug in the way the DUE appears to handle timer interrupts, I worked around it, but the same function worked without error on the ATMEGA platform.

I used the DUE because most all of the parts I am using are native 3.3V, and whilst there used to be a ATMEGA2560 5v\3.3V switchable shield base it does not appear to be available anymore.

The DUE has a dissadvantage, it creates a fair bit more EMI (than an Atmega) and this causes a drop in LoRa sensitivity of around 5dB.

My application does not really need the speed of the DUE, and I would prefer to use a (readily available) ATMEGA board to ensure the highest compatibility with possible future changes to the application.

@rockwallaby

It was a good point on how we define things. AVR is far more "pro" than Arduino I guess. And we of course are not lying ! As they say, for an engineer not all challenges in life are technical !!

@srnet

Reading through all the posts I guess I will stick to my Mega 2560 as its the one which is easily available in my country. But of course just to have fun during the week end, the TEENSY3.5 is on its way. Atleast it has the SD card and RTC in built. And for most part of it the migration to it must be transparent .... and if it works out OK I am ARMed to face my client!!

Thanks for sharing your views.

There is also the Teensy++ 2.0 with 8K RAM, 2 serial, a good number of pins and USB-AVR chip able to communicate to a PC at USB 1.1 speed.