Pages: [1]   Go Down
Author Topic: Automotive datalogging - Lots of analog inputs needed.  (Read 572 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone,

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 !

David.
Logged

Offline Offline
Edison Member
*
Karma: 32
Posts: 1383
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

While this sounds fun, I don't think 10ms is reasonable.

There are ready made solutions for this:
http://www.myscantool.com/
Logged

Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1121
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi David

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.

Cheers ! Geoff
Logged

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank both of you for your answers.

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 smiley-wink
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 !
Logged

NE PA
Offline Offline
Full Member
***
Karma: 5
Posts: 156
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1121
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Cheers! Geoff
Logged

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9470
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So back to the original questions, am I right to assume shields can be stacked ?

They can usually be physically stacked, but there is no assurance that a second shield stacked on top of the first will work in that configuration.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Once again, thanks everyone !

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 smiley

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 ?

Regarding datasheets I could only find some on the Motec website, here :
http://www.motec.com/sensors/position
http://www.motec.com/sensors/temperature/
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.

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.
Logged

Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1121
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
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.
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. 

Cheers ! Geoff
Logged

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Pages: [1]   Go Up
Jump to: