Where (/dev/xyz... any other evidence of this).. How do we poll it.. Whats the output (units).. What brand of sensor?
It seems most of you know that this device does have this sensor..
And if you must ask, I'd like to get the reading to fine tune - or better put, double check - the offset value for a 2 bar map sensor.. Barometric pressure on a car (most of the time) determined by the reading of the map sensor just before the engine is started.. which makes sense. So you could check your values by measuring the raw voltage of the map sensor with engine off.. putting it thru your linear + offset equation.. and seeing if it matches up to a localized barometric pressure reading.. weather.com.. not exactly localized.
Good question.
It has one according to the iSuppli teardown. It is a Bosch Sensortec BMP085.
Looks like it will output into hectopascals (millibar) with up to 10cm accuracy.
This may be good for:
Pairing up with GPS to give height calculations
Allowing the Xoom to autoswitch into airplane mode
Pilots as an EFB
Location based services
The first one would be awesome if properly implemented.
Here's some info from Google in regards to the API. This link has anecdotal references to temp calculations, so it could be used for weather prediction although it would need a hygrometer to make it practical IMO
Happy development
"•Allowing the Xoom to autoswitch into airplane mode"? I may be wrong but I believe a airplane cabin is pressurized, Wouldn't this affect the sensor reading?
They are.
Regardless of your altitude, chances are that there will be a differential between the ambient pressure and that inside the cabin while in flight. I have a Casio Pathfinder watch and can see the pressure change by a few hPa's.
You are required to turn off all electronics before takeoff, so the function would only be useful if it did a pressure check differential.
Since commercial airliners are typically pressurized to @6,900 ft while in flight, I would log the pressure before power-off, compare it on startup and kill the radios if the delta is too high.
I would set the function to disable the radios first and ask the user if they want to enable them in a pop-up dialog or something. This would be used if something erroneously triggered the function like rebooting when going up 40 stories in a hi-rise or farting on the device as it boots
Anyhoo, I'm just guessing at potential uses. Who knows, it may have made it in as part of the Google Tablet reference and will never be used. I fly quite a bit, so I would like to see something created.
I also don't know the hardware init sequence during startup. The sensor would need to do the check during startup and before the radios are initialized. Doing it after is pointless.
Just fyi, it also has a temp sensor. Think of that as a motherboard temp sensor, depending on where the chip is located. It really is a nice, accurate sensor. Why oh why must cars use this old age 0-5V junk? Before anything can be done.. we probably gotta see how/if android sees the device.
So I wonder what the difference between the following two kernel config options are:
CONFIG_SENSORS_MOTO_BMP085=y
# CONFIG_BMP085 is not set
Is there really a difference between the two? Also, this may be a Tegra thing, as the G-Tab Kconfig has such an option. Doubt it has one, none of the Nvidia developer boards seem to have one.
Can someone ls -al /sys/devices/platform ?
If there's too much 'stuff'.. try ls -al /sys/devices/platform | busybox grep BMP . If you have busybox, that is. Otherwise im sure you can spot anything with BMP in it. Either that or it could simply be called bark sensor. I'd do it myself but I don't have access to the Xoom at the moment.
Oh and don't invoke ls using busybox... its broken.. as is find.
EDIT: NEVERMIND THIS POST!!!!! YAY!!!
So who's as pumped as I am?!!!
cat <kernel-source-root-dir>/Documentation/ABI/testing/sysfs-i2c-bmp085
What: /sys/bus/i2c/devices/<busnum>-<devaddr>/pressure0_input
Date: June 2010
Contact: Christoph Mair <[email protected]>
Description: Start a pressure measurement and read the result. Values
represent the ambient air pressure in pascal (0.01 millibar).
Reading: returns the current air pressure.
What: /sys/bus/i2c/devices/<busnum>-<devaddr>/temp0_input
Date: June 2010
Contact: Christoph Mair <[email protected]>
Description: Measure the ambient temperature. The returned value represents
the ambient temperature in units of 0.1 degree celsius.
Reading: returns the current temperature.
What: /sys/bus/i2c/devices/<busnum>-<devaddr>/oversampling
Date: June 2010
Contact: Christoph Mair <[email protected]>
Description: Tell the bmp085 to use more samples to calculate a pressure
value. When writing to this file the chip will use 2^x samples
to calculate the next pressure value with x being the value
written. Using this feature will decrease RMS noise and
increase the measurement time.
Reading: returns the current oversampling setting.
Writing: sets a new oversampling setting.
Accepted values: 0..3.
I am slightly confused by the last two posts, but yeah the sensortec is a barometer that can compute temperture. Did you check the links above?
Related
Well, there are already a couple of applications out there already, but i was playing with the SDK and just trying some stuff out in visual studio so i thought, why dont i just release it?
Its a first release, it does work, has some basic calibration and im trying to make a bit more visually appealing that just some bars
So,
version 0.2:
- Updated graphics of the "Circle" compass/meter. Now actually looks like a compass thingy
- Added the ability to actually save the calibration data, and to let you know its doing something and its done.
- Created an CAB Installer to install the addon.
- Made all pictures internal resources.
version 0.1:
shows an Water level for the X and Y Axis, an circle "meter" and an light meter. There arent any big bugs that i know off, but i didnt implement the "maximal" meter bars yet. That means the measure bars can go a bit beyond the container
Requirements:
You do need the Compact framework 2.0, it will (unfortunatly) not work without it! But seeing as everyone already has the lightsaber application i guess its not that much of an issue
Other:
If anyone has some suggestions or comments (bad or good..) just let me know..
Source:
I added the source code if anyone is interested. Its not some good code, and the calibration could be alot more detailed, but perhaps it helps someone
Oh, and if anyone reflects the application and starts to rant about how my code sucks, i didnt optimize it or plan ahead, i just started to code some
1. congrats and keep the good work! it is refreshing to see a newbie that brings something to the forum and don't start with a wining post.
2. i really hope you'll receive only positive feed back (not so common here ) and allow me to be the first one to say: no, i don't think yr code sucks
3. is the calibration function working?
4. can you explain what "lumens" are doing here. lumens is an international measure unit for light. are u trying to use the internal light sensor to measure the light? this could be a good idea and i'll be very interested.
Lumens is the light sensor =)
Awesome app, calibration works perfectly and saves the setting ok and that light sensor is a nice addon.
Would love to see this made into a .cab installation and perhaps make this app work with the AppToDate program for easy updates.
Look forward to future updates
This is going in my favourite apps
Ignore my double post
awesome it is! great app.
explain please what is with light measuring pls....only measuring or calibrating the automatic light level also?
thanks!!!
No, it measures the amount of light the light sensor receives. I will eventually add an cab installer, but seeing as its still in the "works" i am not bothering with it yet
The calibration works, its not as awesome as the BubbleLevel one yet. When you press the button let the diamond lay there for 3 seconds, and then it calibrates. I wont update the backlight.
The light sensor only shows the value, it doesnt update the backlight it self. I tried doing that, but i can only turn the backlight on very bright, very dim and off. Not somewhere in between
Calibration
Nice app! I like the light sensor also, i finally found out where the light sensor really is
It calibrates fine but does it actually saves it somewhere? the moment i close the app and start Teeter, still not calibrated.
So far non of the apps around here were able (for me) to save the calibration. Some people mentioned success though and since I have tried by now all available roms and on none the calibration works, i get this idea that there are several versions of the sensor (hardware) around...
Anyhow, good to see a new app like this and success with it!
No, the calibration it not saved yet, i will add that soon. The problem with the calibration data is that its reset on reboot. The only tool that i know of comes from a different telephone (Raphael or something) and does save the calibration. But not all roms work with this.
So the calibration from almost all applications will only work on the application itself
Wow, thats the best waterlevel prog here around! Nice graphics, but still very simple. And the lights measurment is very nice too!
Very good work! Thanks!
icon maybe?
I updated te first post with version 0.2. I added some more graphics (lightmeter still had to be done ) an saving of the calibration data for this app only.
@ KukurikU:
Well, i created a simple icon. I tend to like simple stuff that easily identifies a software app..
i put my diamond on a real level meter, bring the level meter to 0,0,0 and pressed "calibrate" and now i can use my diamond as a level meter.....until next reset..
Thanks Wiebbe, nice little app. Will be very useful with my missile launcher!
Accuracy is a little off, well a lot off, on vertical measurements, try to get it to read 90 degrees, could this be an issue with the G sensor itself?
uniqueboy said:
Accuracy is a little off, well a lot off, on vertical measurements, try to get it to read 90 degrees, could this be an issue with the G sensor itself?
Click to expand...
Click to collapse
hard to tell who is to blame. look at the experiment/calibrate method described in my previous post.
i found my diamond to be "off" by 1.4-2 degrees (am i lucky or what?!) and after calibration 0,0 it stayed this way after playing with it quite a bit.
edit: sorry, my bad, now i get it...you r right, on vertical about 7 degrees off... getting 97-96 degrees.
Well, its not that the accuracy is really off. The SDK returns a certain value and its kinda hard to precisely convert it
Ill see what i can do, working on a different way to calculate the angle now.
edit:
Its odd, when i place the diamond vertically against a flat surface (whick should be 90 degrees) the build in Angle says 98 (from the raw data) my calculated one says 92. so its hard to decide which one is correct
After some more testing, it seems that all other applications have the same "error". Bubblelevel says 97 degrees as well when i place it against an 90 degree angle object. Same goes for SpiritLevel. I made a new way to calculate it which seems to be more "accurate" with the angles. But it still wont be 100%! Well, the number of degrees isnt 100% accurate, the bar it self ofcourse does work properly!
Does the output from the G sensor give X,Y,Z or just X,Y ? That coul be a problem when measuring the vertical. If it's just X,Y then maybe when tipped past a certain threshold an error message should be given, or even an audible warning.
The SDK in rawdata form gives back the following:
Angle for X
Angle for Y
Tilt value for Y
Tilt value for X
Tilt value for Z
The angle values are really in degrees, the same as SpiritLevel. They output around the same values as i output.
The tilt values are something from 0 till 1000+, you can see these in BubbleLevel as well at the calibration. I used the angles before, but these arent very correct.
Ill see if i can get myself a watermeter and an setting where i create an real 90 degrees setting so i can calculate a bit what the real values should be
It could be my house is like 97 degrees sloping, but i doubt that ^^
dont forget that an angle of 97 is possible if you tilt it above the 90 degrees value..
I too live on a hill.
Please how does the G sensor works?
I am not quite sure what exactly you intend to ask, but I'll try to answer as a developer of these things (G-sensors, that is). Basically the micromechanical G-Sensors (MEMS - look it up in Wikipedia) are spring-mounted oscillating silicon blocks etched into the same material and form, microelectronics are made of. When such a chip is moved or turned, the mass moves a little and changes its electrical properties (typically capacitiy). The resulting electrical signal is then digitized and translated for access by programs and the OS running on the device.
Hey Guys..
i think this software probably doesn't exist.. but i thought let's give it a try
I recently swapped gyms and in the gym i'm now at, when i'm working out, my pulls and pushes aren't counted.. also the distance i pull/push isnt checked like in my former gym.. so i can't watch my technique..
Then i thought.. maybe there's an app wich uses the g-sensor too register the movement of the device and displays them usefull for working out, when i attach my phone to the weights..
Anyone's come across such software??
Thankyou
Well the accelerometer in the phone can only track acceleration (and direction, due to gravity), not absolute movement or distance. To do that, you need a reference point and potentially other sensors (e.g. the Nintendo Wii's IR bar, and the additional angular rate sensors in the MotionPlus accessory).
If you had a set speed, you could calculate distance based on time (which it'd know by the angle of the phone, assuming you attached it to yourself / the weights in a fixed position), but your speed's probably going to vary enough to make the output useless.
hmm.. too bad..
Thanks for the response!!
Hi guys!
This morning during physical time at school, i was thinking about a new app that i don't ever seen on the network.
A tool that allow to measure lenght of object by g-sensor built-in our (yours XD i've an old Kaiser, my brother has an Omnia) ppc.
So, on the X Axis, we have the time, and on the Y axis we have the speed/velocity.
We need to calculate the space having the acceleration value (taken from g-sensor) and the time.
Suppose this:
You have to measure the lenght of a tennis court.
You start the application. There is a button, press it.
Now the ppc is recording every second, the acceleration on an axis (supposed to be the z axis), and he's saving it on memory.
If you are still, the value is 0, then you have the previus speed, if you are moving in one direction, it will increase its value, but when you walk at the same speed (costant) the value is 0 again (not worry, it's working perfectly).
When you stop the app, it will stop recording the values and calculate the distance.
There is anyone that would make this application, i'm good only at web design and graphics, but not at develope apps =)
I could also help you, or would be good if we can create a team ^^
Oh ! It's a great idea man
I have a hard time believing it'd be any more accurate than measuring with the GPS.
Meaning, not very accurate.
If you tilted the device (even slightly) your measurement could be WAY off.
it's possible to delete this error of tilting the device by using sin/cosin function.
It strikes me, however, that by using the GPS coupled with the accelerometer, you could calculate the height of trees to within the nearest mile or so...
but you cannot use gps for small object, for example, rooms, or desktop =)
and in this case you could set your phone on the dest and slide from the A side to the B side.
Baly23 said:
it's possible to delete this error of tilting the device by using sin/cosin function.
Click to expand...
Click to collapse
How so?
I don't claim to be a math wizard, but I don't see how the device can tell the difference between being accelerated through space and being tilted. This ambiguity is the very basis of the stationary "roller coaster" rides that put the track on a screen and tilt you around to make you think you're moving.
if your phone is on a table (not tilted) all the g-acceleration is on an axis.
If you tilt a bit the device, the g-acceleration is divided in 2 or 3 axis. let's try with an app that tell you the info and take a look
Baly23 said:
If you tilt a bit the device, the g-acceleration is divided in 2 or 3 axis.
Click to expand...
Click to collapse
Unless it's rotated AROUND the axes in question?
Again, I could be way off here, I'm just going from my understanding...
for rotating around an axes, you have to tilt the device!
For make an accurate measure, you have to don't rotate it xD
it's like start the chronometer when a race start, and stop it when you want, not at the end of the race XD
The chronometer could be good like 1/100 of second, but if you stop it after 3 or 4 seconds, doesn't have any sense
hi
it will not work because if you move at constant velocity the acceleration will be null, so the accelerometer will be inefficient. and the distance covered will not be counted.
gjeremie said:
hi
it will not work because if you move at constant velocity the acceleration will be null, so the accelerometer will be inefficient. and the distance covered will not be counted.
Click to expand...
Click to collapse
in italian is "Legge oraria del moto uniformemente accellerato"
it's a law of the uniform accelerate motion.
space = initial speed * time + 1/2 * acceleration * time^2
so, if acceleration = 0, all the second part of the law will be 0, but not the first!
if you are at 2m/s, and there is no acceleration, you will gain 2meters erery second, until you don't change the speed
Well, hey, if the math works out, I think it'd be a neat project.
gjeremie said:
hi
it will not work because if you move at constant velocity the acceleration will be null, so the accelerometer will be inefficient. and the distance covered will not be counted.
Click to expand...
Click to collapse
The real question is, "can the accelerometer be used to accurately determine speed (given a known starting state, i.e. zero velocity)". I don't know the answer to that question, but if it's "yes", then the project is feasible.
i don't know the exact sample rate of the g sensor, but if it takes value at 5Hz (5 times per second), could be good.
i'm quite sure that the value is at least 10Hz
http://www.maspware.com/products/gpsmeterpe/index.php
not exactely the same, but we have also a gps...
bbonzz said:
http://www.maspware.com/products/gpsmeterpe/index.php
not exactely the same, but we have also a gps...
Click to expand...
Click to collapse
yes, but it's gps!
You cannot measure indoor object smaller then 1 meter!
The error of the gps it's about +-1/m for x and y axis, you cannot use it to meausure 1m object... you have 100% of relative error!
I think I understand what he is getting at. What he is saying is that using the accelerometer, this app would start when the phone starts to move recording the velocity at that moment. If you swing your arm while walking to measure something it would constantly be changing velocity and both positively an negatively. Now all we have to do is record those velocities do a little math and we will have a ft/sec or in/sec, now factor in the time from start to finish and you have a measurement. GPS is nice for outside and large objects, it will get you within 5 to 10 feet. But this could be much more accurate than GPS and also used for smaller items such as rooms.
One thing I would recommend is that the time starts and stops automatically when the phone starts and stops. This would provide the most accuracy. Sure have a "Start to Measure" button but that would be more of an initiate button.
Excellent Idea! Any developers want a shot?
if you start the timer manually, and don't move your phone, it's ok, cause acceleration is 0 and initial speed is 0, so for the partial time, it doesn't move and it's ok
You are correct. So it really would not matter.
We've all seen the lists of resistors to use for the USB ID pin on Samsung models.
http://forum.xda-developers.com/showthread.php?t=1629359
It's always struck me that the values were somewhat arbitrary.
No, not the fact that they are exponential, I realize that.
If you look at the datasheet of FSA9480 and the like you see that they have for applications
chains of pushbuttons and off-the-shelf resistors.
The thing is, this is all being detected by a 5 bit ADC connected to a logarithmic converter.
(Voltage = log(current) through a diode junction.)
Also, there are no dead spots.
By that I mean, you can adjust the resistance and it goes instantly from a setting of 5 to a setting of 6.
It does not look at the reading and say, "You're a 5 no longer, but you are not a 6 yet".
The value can be read directly in the sysfs on the Android by anyone.
On my Samsung Note 3 it appears at /sys/devices/virtual/sec/switch/adc
I even added it to my UsbMode (but I haven't uploaded this version yet.)
I connected up some pots and determined where the transition points were.
They seem completely in agreement with an exponential curve.
They seem to be a bit at variance with accepted values, but within the limits.
Particularly the jump from 150k to 200k in the accepted values seems off.
I'm going to remeasure with a more accurate setup.
Is this system used for any non-Samsung models?
Interesting... mind sharing your test app?
billa said:
Interesting... mind sharing your test app?
Click to expand...
Click to collapse
Wow, I had forgotten all about this.
Yeah, the code is still in there but I'll have to make it less model specific.
I don't even remember when I had a Samsung Note 3, it must have been from work.
Can you even see a path like /sys/devices/virtual/sec/switch/adc on your device?
The regular UsbMode .apk is in the signature.
I'll look to see if anything I own has an ADC and update the app.
Renate NST said:
Wow, I had forgotten all about this.
Yeah, the code is still in there but I'll have to make it less model specific.
I don't even remember when I had a Samsung Note 3, it must have been from work.
Can you even see a path like /sys/devices/virtual/sec/switch/adc on your device?
The regular UsbMode .apk is in the signature.
I'll look to see if anything I own has an ADC and update the app.
Click to expand...
Click to collapse
Thanks for your reply.... well the resistor JIG might be useful for newer Samsung devices for USB-C, since with the right value it can enable low level dial mode, I believe with a 619K for keypad codes. If that path you're mentioned requires root, then I'm afraid it's not accessible. That's the whole purpose of the JIG to enable certain modes without root (root is quite rare on newer devices and with lots of firmware version restrictions).
I'll give it a try and will let you know.