Pages: [1]   Go Down
Author Topic: Which Arduino board would suit my needs best?  (Read 2846 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I'm searching for a ready-to-use board that meet our requirements. I think the Arduine "Mega" can do certainly do the job, although it might be a little bit overdone. Maybe there are smaller models that can do the same.

Furthermore I would like to know the average costs and what other tools/cables/hardware are required to program such a board. Yes, this is the first time I need to pick a microcontroller, so I just like to make sure I'm informed.

- 2 analog inputs, refreshment should be 0.5 millisec or less. 10 bits or higher precission
- 6 high-speed digital inputs that generate an interrupt when being triggered ASAP
- 2 digital outputs. Nothing fancy here
- Serial communication towards another module
- Not much RAM required 2 kb should be more than enough I think
- No other luxery such as LCD, EEPROM needed. A status LED and USB port for programming are handy though.

It's just a small program that needs to read 2 analog pressure sensors as fast as possible between a couple of certain pulses (therefore the interrupts). This will result into array's of samples that are checked later on and send to another module via RS232 or eventually another type of communication. CANbus would be nice.

What Arduino board would suit me best, and for what price (including all other development tools)? I'm trying to compare all the available options.

Thanks!
Rick
Logged

Game hobby project: Tower22

Bonn, Germany
Offline Offline
God Member
*****
Karma: 0
Posts: 903
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

if i understand your needs right then you will be able to use every 'modern' Arduino(clone) with a 328.

Basically i would advise you to use a simple Duemilanove (328 - nkcelectronics.com 29.95$ or a Seeeduino 328 for $24.95).
If Form factor is essential i would recommend looking at the PICO ( http://www.modifiedelectronics.com/- 24$). It is a complete Duemilanove compatible Arduino with the size of an Broad size Atmel - giving you also the possibility of having two additional Analog ports.)

The original Duemilanove needs a USB Cable type B - Seeediono and Pico both use a mini USB cable (which i like more personally).
Inter Module communication could be done in RS232 using various Softserial Libraries that are available here, yet i found I2C quite handy as the number of modules is irrelevant and you only need two wires all the time.. that way you could save yourself the possibility of extending your system for future improvements..

My personal preference here would be to use the PICO (you can easily create a prototype as you can stick the Arduino itself on a breadboard or a Atmel socket).
Logged

Believe me, Mike, I calculated the odds of this succeeding against the odds I was doing something incredibly stupid[ch8230] and I went ahead

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16548
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
- 6 high-speed digital inputs that generate an interrupt when being triggered ASAP

The 'standard' 168/328 based Arduino board and IDE does not directly support this specification, just two user input pin interrupts. There is pin change interrupt capability on the AVR chip to perform port/pin change, but you will have to 'roll your own' routines to gain 6 interrupts.

The mega does have increased number of user pin interrupts but I don't recall the total number.

Lefty
Logged

Denver
Offline Offline
God Member
*****
Karma: 19
Posts: 778
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Re: Nachtwinds link to the Pico, try . . .
http://www.modifiedelectronics.com/mp-01.php
Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The "Arduino MEGA" should have everything I need. But maybe there are smaller models as well.

The prices doesn't differ that much though, in fact, I'm quite surprised. That board just costs about 60$. My alternative is a set of PLC's... including with its software license it will cost ~2000 euro.

But maybe I'm forgetting something. If I understand it right, this Arduino Mega can be programmed with C, provided by Arduino for free(!). Is that it? No other software or programming hardware needed (except for a USB cable)???

How are your experiences with programming these modules? I did a PIC18F in the past, but I'm afraid I have to refresh my mind, so good examples is a big plus.

Thanks for the help!
« Last Edit: September 11, 2009, 02:06:15 pm by RickN » Logged

Game hobby project: Tower22

Bonn, Germany
Offline Offline
God Member
*****
Karma: 0
Posts: 903
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

well, i never used the mega, but i suppose that the experience is the same as it is with the 2009 or it's clones (got 2009 and modified Pico here).

You 'could' use a Hardware programmer if you'd like but you are right - you can program the Arduino (mega) with the usual Arduino IDE or various other IDEs including Eclipse. Compilation is done via the AVR-C compiler which is afaik for free anyway.
You use a language that is almost identical with C, yet of course you have to keep in mind that you dont have the full stdlib working for you.. yet you still have a extremely wide range of possibilities.
As you want to work with pressures you should keep in mind, that floating point calculations arent reliable (http://arduino.cc/en/Reference/Float) but from experience good enough to be used.

So, to make it short: Yes, you wont need anything but a USB cable fitting your Arduino to make it work ;0)
By the way - in case you want to go from prototyping to a stand alone system you could make an Arduino compatible stand alone with just a fraction of the money needed for a Duemilanove - i build an ISP programmer a few weeks ago that did not cost even 15$... and it is programmable via USB (or rather RS232 -> USB) and has everything one needs...
Logged

Believe me, Mike, I calculated the odds of this succeeding against the odds I was doing something incredibly stupid[ch8230] and I went ahead

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

One last question. Does the Arduino Mega support mutexes or other mechanisms to lock variables? Since I have quite alot interrupts and data that is shared amongst these processes, I need a way to protect the data I suppose. For example:

timed interrupt: reads analog1 value ASAP
interrupt pulse1: stores analog1 value into "peak"
itnerrupt pulse2: resets "peak" to 0

These are all 16 bit values so maybe these operations are "atomic", or do I need to protect them somehow anyway? Ifso, how does the Atmel/Mega do this?

Thanks for all the advice!
Logged

Game hobby project: Tower22

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31543
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is a function of the software not the hardware. The mega is no different to any other board in this respect. So it's just the normal C++ public / private variables anything else you have to do yourself. It is a different mindset embedded programming than a PC.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16548
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 The mega1280 AVR processor chip in the Arduino mega has the standard AVR 8 bit core so it does not differ then the other chips used in other Arduino boards in that respect.

As far as insuring atomic operations, the Arduino has statements that can disable and reenable interrupts globally to allow that. Caution on how long one leaves interrupts disabled as it can effected other things using the interrupt system like timers, serial comm, etc.
http://arduino.cc/en/Reference/NoInterrupts
http://arduino.cc/en/Reference/Interrupts

Lefty
Logged

Pages: [1]   Go Up
Jump to: