I am currently looking at starting a datalogging project for my car, and I am looking at the possibility of logging lots (really lots) of things.
Realistically I would need at least 24 analog inputs, but 36 would be preferable.
I saw the "Mux Shield" on the store, am I correct to assume that it will allow me to connect 48 analog inputs ? (Most of these will be sensors outputting between 0 and 5V)
Am I also correct assuming that I can plug one shield on top of another shield, and if yes is there a limit to the number of shields one can use ?
For instance, is it possible to plug a mux shield, a gps shield and a tinkerkit shield (with accelerometer and gyroscope sensors on it) on an arduino ?
If yes, which is the most powerful arduino CPU I can get which still works with all of these ?
And is it possible to power it all using USB or PoE ?
As this is for an embedded project I can take a laptop with me in the car (or I can use the 12V from the car but I'd rather not).
Finally my last question (I am terribly sorry for this long post), I would like to sample all these values every 10ms, and write it all to an SD card.
Is this realistic ?
Both from a CPU performance and from an SD-card bandwidth point of view ?
Thanks a lot in advance to those who will answer !
Jonathan Oxer had a project in one of his books with a datalogger with GPS in the car. Here's a link to the summary which includes some words of wisdom and more links. I recall from other comments I've seen on it that it was a able to run on the Arduino Uno.
Unfortunately my car does not have ODB.
Even if it had it does not have a multiplexed bus (such as CAN) so I would only get info from the engine control unit, which I am not interested in.
What I want to log are several chassis parameters, such as :
suspension travel (one sensor for each wheel)
tire temperature (3 sensors per wheel)
yaw acceleration
etc.
So basically even with a car where every electronic unit sends something I would not get those informations, since AFAIK no production car comes with those sensors installed as standard anyway (well your car has a yaw sensor if it comes with ESP but this info is not sent over CAN or ODB).
And 10ms is what I need, whether or not this is reasonable using an Arduino remains to be seen but if it's not I'll just have to use something else
I mean at work we log some stuff with sub-milliseconds periods, some others with 1ms, 2ms, 5ms .. well you see my point.
So back to the original questions, am I right to assume shields can be stacked ?
Is there some limit to the number of shields one can use ?
Are some shields incompatible with some Arduinos ?
I did not find any info on the site, so basically any pointer would be greatly appreciated !
TurboSchnecke:
So back to the original questions, am I right to assume shields can be stacked ?
Is there some limit to the number of shields one can use ?
Are some shields incompatible with some Arduinos ?
I did not find any info on the site, so basically any pointer would be greatly appreciated !
Shields can be stacked but that is limited to what pins each shield uses. Most shields are designed to be used on the Uno and may be incompatible with other arduinos depending on what pins the shield uses.
Thanks for your clarification. Typically shields can be stacked, though the caveat is that you need to assess the pin usage for each to ensure there are no clashes. The shieldlist.org website is very useful for determining this. If you have a need that's not addressed by a single shield there is the other option of creating your own, by soldering components on a protoshield. A further option is to use one or more breakout boards, or create your own and wire the Arduino to it/those.
Do you have a link to the datasheets for the sensors you will be using? If they must be all analog there are a couple of ways to address them, either by switching many possible inputs and reading them via a smaller number of Arduino analog pins (eg 74hc4051 can switch up to 8 analog sources - the data sheet states switching time in the nanosecond scale); or using external ADC ICs you read the sensors with them, and pick up the values via digital pins on the Arduino.
There may also be digital variants of your analog sensors which would avoid needing additional intermediary ICs nor shields. It's typical for accelerometers to be interfaced via I2C or SPI, and there are many digital temperature sensor types so I expect the number of analog channels you will need is actually less than the 64 you initially specified.
TurboSchnecke:
Finally my last question (I am terribly sorry for this long post), I would like to sample all these values every 10ms, and write it all to an SD card.
Is this realistic ?
Both from a CPU performance and from an SD-card bandwidth point of view ?
The Arduino ADC takes just over 100us to sample an analog input at the default resolution. Therefore, if you drive it using interrupts (so that the processor can do other things while a conversion is in progress), you can in theory take nearly 100 readings in 10ms.
if you take 36 readings every 10ms and store to the SD card as 16-bit values, then that's 36 * 2 * 100 bytes per second = 7200 bytes/sec. Even class 2 SD cards can do 2MB/sec sequential writes, so SD card speed should not be a problem.
Regarding stacking I think it is clear to me now.
Sorry if some of my questions can sound stupid at times, but I have no electronics experience whatsoever so I'm learning.
Also from the shieldlist.org website it seems that what I want is perfectly possible
If I get an Arduino Uno Rev3 that should do it then ?
Can someone also please confirm that if USB is plugged then it does not need a separate AC/DC adapter to get its power from ?
And what do you guys think of the PoE version ?
I will have to look further though, because AFAIK those are very expensive and since I need plenty of them I am not very happy right now as you can imagine.
TurboSchnecke:
Can someone also please confirm that if USB is plugged then it does not need a separate AC/DC adapter to get its power from ?
Confirmed. It can draw its own power supply from USB when plugged into that, however be mindful it's only got limited capability to drive other devices so best you plan to drive all these sensors from an independent supply.
TurboSchnecke:
And what do you guys think of the PoE version ?
Great, if you have ethernet handy that you can power it from. In a car there's probably simpler sources than setting up a LAN though.
TurboSchnecke:
Other vendors don't post them online it seems, but I expect it to be similar, that is with 0V, 5V and one signal pin.
That's the typical configuration for analog devices such as those. Digital ones may need more connections (I2C has +5V, GND a data and a clock line for example) but multiple devices can share the same bus, only consuming 2 pins on your Arduino (in the case of the I2C example).
Looks like MoTeC knows they can charge a premium for their particular vertical market.