What EXACTLY can an Arduino accomplish?

Hey guys.

I know that was completely open-ended but the basic premise is there. When do you know it's "too much" to fit and move to another device? Common sense says hack and develop on endless resources and then when you go to production, whittle it down to the bare minimum for production runs - but we're not doing things in mass production!

I (and probably everyone not a pro) have a really hard time forecasting what will fit into an Arduino project. I'm used to modern PC development, where that aspect of your design considerations is literally the least of your worries. Storage space is easier, assuming the libraries modules will fit entirely they'll certainly fit after the unused routines are culled. How do you know what will fit in RAM though?

You might know about Oleg and the USB Host shield development, for various things but originally intended for PTP/MTP camera control. I love the idea. So let's just run with that and spitball...

OK so you'll need enough space for the libraries for each thing required for USB Host communication. Then you'll need the strings for manipulating PTP control, all the challenge/response parts that are camera-specific or not part of the library, etc.

Now, say you want to expand it to control a panoramic head while controlling said camera. You'd require at minimum two servos for pan and tilt. That should also be no problem for a '328. But lets say we're talking about a huge $5000 Canon 1Ds Mk IV dSLR with a heavy lens, so we need stepper motors and gearboxes and driver circuitry. Still not that much, right?

Now say you want to expand it; color graphical LCD to show various status, perhaps even a fully duplicated camera LCD, mirroring the info on the camera itself, etc. So more lines - but how to know? I mean does it require a co-processed LCD module/driver that you can talk I2C/SPI to, or does the free SRAM/pins and processor overhead fit into what's left in the 328? Does the I2C/SPI version require more RAM in the 328 than the LCD code? (obviously the H x V x D resolution matters, but for sake of my example, 480 x 360 x 12 bit.)

Now say I want to add a basic UI: a rotary encoder with push button, 6 push button matrix, etc. will /that/ still fit? The string space for text variables, mostly. I assume what leads you to decide between matrix or individual buttons is free pins and cost, respectively, but as routines fill RAM, do you have to pay attention to things like this WRT free mem? Are there ways to compensate, say if you're running out or workable RAM, to pull strings from EEPROMs as needed, or does that code take as much space as the strings themselves?

At this point I'd wonder if it's going to fit into Flash at all and might have to code with a regular development tool and wipe the Arduino bootloader because suddenly that Flash seems needed. And once I start thinking like that, it's one more step to say "chuck it!" and skip Arduino development all together and use a beefier ARM Cortex development board with megs of RAM, speed enough to refresh a high-resolution LCD, GPIO pins and Flash galore, dedicated USB Host/OTG port, huge on-board Flash, etc.

I mean, these days when you can pick up the new SAM9G45 boards with a touch-sensitive LCD already pre-wired for $100-300 running a full OS like CE or linux or android... and still have ~40 GPIO pins free?

Which comes full-circle - price. I cringe at paying $100 for a dev board with an LCD when for another hundred I can get a complete Atom-based netbook, which is basically what these things are without a case. :slight_smile: But it seems ludicrously expensive for a non-commercial application.

No, as an Open Source hobby geek I like to start with the $1.00 uC and move up. But I really need to learn how to guesstimate what operates in what amount of RAM.

If you got this far, dang! Thanks for reading, and thanks in advance for any replies.

Common sense says hack and develop on endless resources and then when you go to production,

And you would be wrong. Pro developers guess, the double the amount they need, then double it again and pray. Believe it or not that is the way it works.

Most of what you are surmising is beyond the capability of an arduino.

How do you know what will fit in RAM though?

For the arduino you don't but you know RAM is very short so you don't do silly things like specifying a 1K input buffer.

so you'll need enough space for the libraries for each thing required for USB Host communication

Not on an arduino there is no USB host handling.

so we need stepper motors and gearboxes and driver circuitry. Still not that much, right?

The size of motors is totally irrelevant to the power of the processor of any of it's capabilities. It takes exactly the same resource for a large or small stepping motor.

Now say you want to expand it; color graphical LCD to show various status

You can't not even close to enough memory. All the rest is pure waffle, rubbish.

Now say I want to add a basic UI: a rotary encoder with push button, 6 push button matrix, etc. will /that/ still fit?

No because you overflowed things long ago.

Are there ways to compensate, say if you're running out or workable RAM, to pull strings from EEPROMs as needed,

You can pull strings and fixed arrays into flash, but not much else.

it's one more step to say "chuck it!" and skip Arduino development all together and use a beefier ARM Cortex development board with megs of RAM

As I said you reached that point a long time ago.

But I really need to learn how to guesstimate what operates in what amount of RAM.

Yes you do so get a board and start learning. :wink:
As a rough guide an arduino is about as capable as a hobby computer of the 1985 vintage.

Another thing: Nothing prevents you from using more than one microcontroller in a project; this still won't allow you to get around certain restrictions, and for some projects a single (but more powerful) microcontroller may be a better choice, but for others, multiple microcontrollers (on an I2C bus, say) might be a good compromise.

As a rough guide an arduino is about as capable as a hobby computer of the 1985 vintage.

Grumpy, there are still some things I could do on my original 6809-based Color Computer 3 that would be impossible to do on the ATMega328 (mainly due to architecture differences - Harvard vs Princeton, and memory); conversely, there are things that can be done on a ATMega328 that can't be done on my CoCo 3, either (mainly due to the speed difference - 16-20 MHz vs. 2 MHz). Plus it is much easier to control stuff with an ATMega328 (bus interfacing on a 6809 system requires a bunch of extra hardware - nothing exotic, but it isn't as "plug in play" like the ATMega).

However, I will concede that you said "rough guide" - and leave it at that...

:wink:

From the historic point of view, microcontrollers are not downsized computers, but beefed up MSI chips.

From the times of the intel 4004/8008 on, they were used to simplify circuits, in case the speed of signals would allow this.

This is why the smaller and older AVRs or PICs have no RAM at all!

The ATmegas are a consequent evolution of those devices.You might use them as if they were computers, but with all limitations, some of them hidden by modern programming languages, and more hidden by the HAL of the Arduino way.

So the Arduinos are fine as an educational toy: demonstrate this and demonstrate that, but rarely both at the same time.

They still work as what they had been made for in the first place: reduce the cost for complex devices by substituting electronic by software.

If you start on a high algorithmic level you should by all means consider a sized down real computer.
Like this? http://www.sparkfun.com/commerce/product_info.php?products_id=9564

From the historic point of view, microcontrollers are not downsized computers, but beefed up MSI chips.

From the times of the intel 4004/8008 on, they were used to simplify circuits, in case the speed of signals would allow this.

This is why the smaller and older AVRs or PICs have no RAM at all!

Good point...

If you start on a high algorithmic level you should by all means consider a sized down real computer.
Like this? http://www.sparkfun.com/commerce/product_info.php?products_id=9564

I've looked at the mbed before; while I like it for what it is, what I don't like is the "web based programming environment"; it would be a fine thing if you could host it yourself, but I don't see that as something that exists. What happens if the company behind mbed goes out of business, but you have clients or others to support? What do you do if you've built up a large codebase for some device, and there is no longer a way to compile it? These are main reasons that have turned me off of mbed...

However, there are plenty of other "real computer" platforms available for embedded development; in fact, there are a ton of embedded PC platforms available, many much smaller than a mini-ITX motherboard (which is a pretty nice and cheap embeddable PC form-factor on its own - depending on your needs and the size of the project, of course).

:slight_smile:

However, I will concede that you said "rough guide"

I did indeed and that's what I meant.

In 1985 I had a BBC computer that ran at 2MHz but it has 16K PROM and 32K RAM, and a built in video display. So while the arduino is faster it has much less memory. Interfacing was easy on the BBC by using the User port and printer port, 16 bits of I/O that were just as easy to use as an arduino. Mind you a BBC computer was £250 which is the equivalent of about £800 today. However I could do a lot more on it like video digitising, audio sampling and a host of interfacing.
For a gimps of what I did see:-
http://www.doc.mmu.ac.uk/STAFF/A.Wiseman/Acorn/

I really don't see the major problems... sort of...

USB?
Been done. For specific devices and functions, it's possible. With space left for the rest of the app code. To create a generic and full implementation like you have on your PC? Nah.

Graphics?
Also been done.. ish. Yes, you need a very good board which is doing all the hard work for you - and you're probably aiming high with 480 x 360 x 12 bit - but then I haven't looked at all the options available. Even with a tiling system (tiles stored off-board), you couldn't change the screen fast enough for a fully animated display etc. Or even store the tile map on the Arduino. But with enough of a picture processor on the receiving end, with the tiles and their map largely stored off-board (with the ppu-esque device fetching them directly), and with a fairly static display like you're talking about then the Arduino wouldn't have to be doing that much. Is it worth it given the amount of external hardware you'd have to use? Nah. But could be fun.

Motors?
Not an issue.

The question isn't really whether it's all possible. The question is more why you'd go to such lengths just to have an Arduino in there. Aside from getting some kudos from us. :smiley:

Just noticed I slightly misunderstood what you're aiming at re: graphics. I only spotted the bit about a basic UI, not the full camera view. Forget that. Lol.

For a gimps of what I did see

Ah - that was a fun trip down memory lane - a whole host of similar projects were done for the Color Computer back in the day (though I was really impressed with the 3D shutter viewer you made!).

The Color Computer didn't have an easy-to-use user port, though; only the "cartridge port" (which was basically the 6809's bus brought out to a edge connector - necessitating the use of address decode logic and such), and a "bit-bang" serial port of sorts (interestingly, I don't remember any projects that used this port via shift registers - that doesn't mean they didn't exist, just that I wasn't paying attention, or they weren't published in the magazine I was subscribed to during that time).

Unfortunately, at the time I was only a kid without much of a clue about electronics; the only interfacing I did with my Color Computer happened thru the joystick ports (which were analog) - I did manage to make my own "light gun" device with a target "game"; I also rigged up my CoCo to control my Tomy Verbot using tones instead of "voice commands" which worked fairly well.

I didn't learn much else about electronics until I got out of high school...

:slight_smile:

was £250 which is the equivalent of about £800 today.

No, this is not the correct way to present figures....
We had an increase of hardware complexity of 100% per 1.6 years (=doubling time) The BBC computer was 25 to 26 years ago = 16 doubling times. Its equivalent functionality should today cost 800/64,000 = 1/80 GBP. It is a penny, isn't it?

It is a penny, isn't it?

That's probably pretty close to what it costs Atmel to manufacture an ATMega - but they gotta have some markup...

;D

Well, thanks! Considering how fast this went off-topic, I can hear the laughter in between the words trying to make an Arduino do something it has no ability to do.

@ Mike - I do have a few Arduinos, been using them for various silly project stuff for almost 3 years. But I still have no idea how to "guess" what will operate. I have used I2C EEPROMs to expand on the tiny storage space, but still no closer to understanding max capacities or abilities.

Only one correction: re: motors - I wasn't saying that steppers required more power from the uC, but that it was more complex than just sending PWM pulses to a servo that requires no external hardware not even a transistor for heavy lifting... which probably requires more code like the motor control library.

I'll go get something like an Embest dev board using an Atmel AT91SAM9G45 ARM926EJ-STM @ 400MHz with 4.3" or 7" touchscreen kit... while it costs 10x what an Arduino Duemilanove costs, it's considerably more capable. The problem is that it's overkill, and at 400MHz and 256M of dual-channel DDR2 SDRAM, it probably will chew up a 4000mAh LiPo pack in a couple hours not days. :confused:

I guess it's better than the reverse, but still - same problem, different architecture.

Again, thanks!

As some already have stated, you make your best guess and pray :slight_smile:

I'm working on a project where we are reading 7 eksternal enviroment sensors. Just reading the inputs, converting to usable values and calculating new values and averages demanded a separate Atmega368-chip. And that is okay. Beside the need for it we also got the benifit of splitting the project into separate modules. And that in itself makes a cleaner and easier to read code.

We could of course use a Atmega1280-chip instead, which has more flash and sram.

All the uC's are using I2C to communicate. Works perfectly. :slight_smile:

I've looked at the mbed before; while I like it for what it is, what I don't like is the "web based programming environment"; it would be a fine thing if you could host it yourself, but I don't see that as something that exists. What happens if the company behind mbed goes out of business, but you have clients or others to support? What do you do if you've built up a large codebase for some device, and there is no longer a way to compile it? These are main reasons that have turned me off of mbed...

ARM actually makes the mbed, and provides the development software. They aren't likely to go out of business!

If you want something similar with conventional development tools, look at the LPCXpresso boards:

http://ics.nxp.com/lpcxpresso/

They have the advantage of debugging facilities.

I originally liked the look of the mbed, right up till the point I read "web based programming environment", not all of us have 24/7 access to the web. I can be out of touch for days or even weeks, during which time presemably with the mbed I couldn't do any work at all.

Of course it can, but you can't use the compiler.
And you can purchase the compiler anyway :slight_smile:

This is why I don't like the mbed, it is still at its core proprietary rubbish. Which is a shame since I have been looking to move to faster embedded systems.

Although, it does mean I have an excuse to buy a even better embedded x86 board using a vortex86 that could slap any ARM silly. :slight_smile:

Embedded Linux is fine.... Alas, I have no overview over boards.... There are many systems coming well wrapped in nice boxes

The arduino's possibilities are limitless. I had a friend recently build an entire home alarm system in his house. :wink:

...limitless

This has a little bit to do with the fact that it is kind of a Turing machine - I wonder whether he himself thought of home automation ...But well.. robot concepts existed in SF in the forties, even before Asimov.