Friday, February 22, 2013

Car sensors

My conclusion from the speed bump post was that the built-in accelerometer in the Android phone is probably not enough to detect the obstacle. Alexander Kosenkov commented that maybe the accelerometer vector can be processed in a more sophisticated way but my experience is that the car generates such an amount of vibrations that makes extracting relatively faint signals from the accelerometer rather hard if not impossible.

While I was contemplating on this issue, I got a mail from Edward Pultar, president of Valarm, a start-up based in Los Angeles. These guys created an Android application and associated web services that started as a theft-prevention tool and is being repositioned as a general platform for all sorts of sensor data acquisition and processing. Read their press kit about the exact features of their products.

The most fascinating idea in their product is the use of OBD2 interface to connect to the car's own sensors. OBD2 with a Bluetooth plug is widely used by car fanatics to obtain diagnostic data including speedometer, tachometer, engine temperature, on-board GPS (if the car is equipped with it) and many other sensors. Valarm's idea was to use this wealth of data for use cases other than car diagnostics, e.g. monitoring whether the car is driven recklessly. They do sensor fusion with the car sensors and with the phone's own sensors. For example cars don't normally have accelerometers that can detect excessive vehicle vibration caused by bumpy roads or faulty tires but a smartphone has. The phone is also equipped with a wealth of communication options, large memory and is an application platform. It is therefore an ideal device to aggregate data from different sensors (internal and external) and to send the data to web services.

This may sound like a futuristic research paper but to my utter surprise, even my own car which is well in its teenager years has the OBD2 interface. All I need is a commercially available Bluetooth plug (connection by cable is also possible but is less practical) and the car will talk to my Android phone. This makes Alexander's idea about incorporating the speed profile for the speed bump detection pretty easy to implement.


zproxy said...

i too, have been thinking about it for a while now.

gherar said...

Mobile phone built-in accelerometers are quite sensitive and can be used for vehicle applications. My thesis made use of them to detect the risk taking a bend:

It was developed for Nokia N95 but afterwards we tested in Android G1 and worked fine.

Gabor Paller said...

gherar, how did you distinguish acceleration caused by turning (bends) from acceleration caused by speed changes (slowing down/accelerating)?

gherar said...

Good question Gabor. You have to calculate the Longitudinal acc (slowing down/accelerating)from the GPS, algps. Then you have to rotate the signal âacc from the accelerometer to the angle alpha that maximises the dot product between âacc rotated and algps. It´s a simple mathematical processing. if you want more details write me an email to my gmail account. My login is reveriego.

Edward said...


Enjoying your excellent writings. Thank you so much for the blog post on Valarm, Gábor!

There's also a recent update for Valarm, supporting additional sensors: . The update includes normal rheostats/potentiometers, as well as buttons, switches, and any sensor which operates by altering resistance. This means there are 5 switch/potentiometer channels to monitor/alert on switches, photo-resistors, knobs (potentiometer/rheostat/variostat), PSRs (pressure-sensitive resistors), presence of water, etc.

That opens up even more opportunities for sensors in anyone's life with Android! Next up, volatile organic compounds (VOC) and CO2.

Edward Pultar, PhD
Founder, President, Geographic Information Scientist

Gabor Paller said...

gherar, I wrote you a mail.

Gabor Paller said...

Edward, one thing was not clear with this yocto-knob. How do you connect this multi-sensor to the Android device? I can see a bunch of cables in the photo.

Edward said...

Great question, Gábor!

Valarm connects with the Yocto-Knob via USB. USB/Yoctopuce support requires “USB Host Mode” and “OTG Cable” connectivity. Note that not every phone or tablet supports this mode, even if it is running Android 3.1 or newer. See for more details on connecting external USB sensors to Valarm.

Gabor Paller said...

Edward, I thought how great it could be if you could just walk around and the phone would automagically connect to your sensors over e.g. Bluetooth, collect the data and could just do some processing on that data, e.g. detect overheating.

Edward said...

Howdy Gábor,

Another excellent idea!

We do use Bluetooth to connect to the OBD2 adapter, which can detect an overheating vehicle. :)

Additionally, the USB sensors are small enough that we have had customers walking around with them in their pocket.


Alice Green said...

Its an innovative idea which will be very useful in preventing car thefts.
Each manufacturer used their own Diagnostic Link Connector,location and sensor data through the new digital Electronic Climate Control display,Bluetooth adapters plugged into the car's OBD II connector which helps to fix the car and helps keep repair costs down by monitoring all the diagnostic data. I liked the article and got to know many things.