El_Presidente
Posts: 36
Joined: Tue Apr 03, 2012 7:02 am
Location: Bolton, UK

Re: Car Management/Information Capture/Replay Mashup

Thu Apr 05, 2012 7:24 am

Hello all - nice to be in near the start of what I hope will be the new Pi revolution!

I've seen parts of my desired solution across other Pi projects, but here's my vision:-

A combined motor car management information system.

Done in steady stages, unashamedly pinching everyone else's good ideas from individual projects.

1) Kinect sensor for video/data capture sat on car dashboard while travelling - using cameras, possibly elements of depth sensing and tracking (but starting with video capture).  Connect to Pi by USB and see what SDK or hack/tools on Linux can give me.

2) OBDII car diagnostic port wired to GPIO on Pi, gathering whatever motor/system data it can into logs.

3) Pi connect to Bluetooth GPS unit, gathering the usual groups of data for the journey.

Pi captures everything to SD card.

A separate analysis suite, probably written with Python, would then read in data from 1, 2 and 3 and provide a journey replay, using time sync (?) to join up video, OBDII data and GPS data.

Who knows what I'll use it for but that's just not the point, is it?

Challenges...

I could see the three capture streams overloading the Pi.  Possible bottleneck of the SD Card I/O too on capture.

GPIO to OBDII - need the cable and some bright spark to write the interface (I'm a passable coder, but not usually at the hardware device level).

How to get the data streams sync'd up on a time signal for replay app.

Please give your thoughts, suggestions and ridicule - I genuinely don't mind which!
-----------------------------------------------------------------------------------------
Never trust a man, who when left alone with a tea cosey, doesn't try it on.

gja
Posts: 22
Joined: Sat Mar 03, 2012 9:24 pm

Re: Car Management/Information Capture/Replay Mashup

Sun Apr 15, 2012 11:52 am

Please check the CANbus topic. This covers several of your suggestions.

El_Presidente
Posts: 36
Joined: Tue Apr 03, 2012 7:02 am
Location: Bolton, UK

Re: Car Management/Information Capture/Replay Mashup

Tue May 08, 2012 9:42 am

Thanks, the CANbus thread certainly does look interesting.
-----------------------------------------------------------------------------------------
Never trust a man, who when left alone with a tea cosey, doesn't try it on.

tqm
Posts: 16
Joined: Tue May 08, 2012 12:00 pm

Re: Car Management/Information Capture/Replay Mashup

Tue May 08, 2012 1:14 pm

GPS + accelerometer + OBDII is more than YES YES and I hope Pi will cope with it - there's not as much data on first two, not sure about OBDII.

Video is a bit harder, there's a lot of bandwidth to be served and data to save. You will run out of storage fairly quickly and in multiple write cycles will possibly wear off the SD card in rather short time. Note also, that default Debian image (I'm on this one right now) has swap partition on SD card - not the best idea in my experience but that's just my opinion - I prefer to have boxes like Raspberry Pi or Sheeva Plug (which I also use) not swap to disk. Once device is completed it should be 'fire and forget' for as long as possible.

My suggestion for the video - keep recording to in-memory buffer lasting let's say 30 sec. Set accelerometer as a trigger, so if we're on smooth driving and then we hit the break, hit speed bump or bigger hole, accelerometer reports spike on one of the axis, passes threshold we set and this makes software flush the buffer to SD/USB drive. We record 10sec before spike and 20sec after, this way if something happens you have something like a black box device with full telemetry - time + location (GPS), accelerometer, engine/car parameters and video snippet to show what happened.

This way you have longer flash memory life, less data to worry about etc etc... and if you link it all up properly it could even connect to your wifi network and upload data to your server as soon as you pull up home

Just my £0.02

Return to “Other projects”