* IBM HDAPS, I need a tip. @ 2005-08-01 1:53 Alejandro Bonilla Beeche 2005-08-01 4:56 ` Alejandro Bonilla Beeche 0 siblings, 1 reply; 15+ messages in thread From: Alejandro Bonilla Beeche @ 2005-08-01 1:53 UTC (permalink / raw) To: linux-kernel; +Cc: 'Yani Ioannou', Dave Hansen Hi Guys, I hope you all aren't sick about the topic. I have a quick question... Thanks to development of the driver from some nice guys, we are able to get data from the accelerometer. There is one problem. How do we calibrate the values that are outputed from the userspace? All PC's get a different value, and we can't really find the best solution. What is the scientific and smartest way to do this? i.e. of the driver output from the userspace. abonilla@debian:~/hdaps/hdaps-dave-0.02 $ ./ibm_hdaps_userspace /dev/ibm_hdaps x_accel: 409 y_accel: 528 temp: 47 temp2: 47 unknown: 7 If I move the PC 45 deg right.(Looking from front the left side is higher) km_activity (keybd) = 0 km_activity (mouse) = 0 x_accel: 396 y_accel: 579 temp: 47 temp2: 47 unknown: 7 The thing is, people have different values, and I think they are also different depending on where they are. Another question for this kernel inclusion (heh) Should we use Sysfs or should we use the userspace that outputs this data, else what is recomended? Thanks in advance, .Alejandro ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: IBM HDAPS, I need a tip. 2005-08-01 1:53 IBM HDAPS, I need a tip Alejandro Bonilla Beeche @ 2005-08-01 4:56 ` Alejandro Bonilla Beeche 2005-08-01 5:10 ` Lee Revell 2005-08-01 18:08 ` [Hdaps-devel] " Jon Escombe 0 siblings, 2 replies; 15+ messages in thread From: Alejandro Bonilla Beeche @ 2005-08-01 4:56 UTC (permalink / raw) To: linux-kernel; +Cc: hdaps devel, 'Yani Ioannou', Dave Hansen Second Try... ;-) Anyone? .Alejandro On Sun, 2005-07-31 at 19:53 -0600, Alejandro Bonilla Beeche wrote: > Hi Guys, > > I hope you all aren't sick about the topic. I have a quick question... > > Thanks to development of the driver from some nice guys, we are able to > get data from the accelerometer. There is one problem. How do we > calibrate the values that are outputed from the userspace? All PC's get > a different value, and we can't really find the best solution. What is > the scientific and smartest way to do this? > > i.e. of the driver output from the userspace. > abonilla@debian:~/hdaps/hdaps-dave-0.02 > $ ./ibm_hdaps_userspace /dev/ibm_hdaps > x_accel: 409 > y_accel: 528 > temp: 47 > temp2: 47 > unknown: 7 > > If I move the PC 45 deg right.(Looking from front the left side is > higher) > > km_activity (keybd) = 0 > km_activity (mouse) = 0 > x_accel: 396 > y_accel: 579 > temp: 47 > temp2: 47 > unknown: 7 > > > The thing is, people have different values, and I think they are also > different depending on where they are. > > Another question for this kernel inclusion (heh) Should we use Sysfs or > should we use the userspace that outputs this data, else what is > recomended? > > Thanks in advance, > > .Alejandro ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: IBM HDAPS, I need a tip. 2005-08-01 4:56 ` Alejandro Bonilla Beeche @ 2005-08-01 5:10 ` Lee Revell 2005-08-01 6:51 ` Jan Engelhardt 2005-08-01 18:08 ` [Hdaps-devel] " Jon Escombe 1 sibling, 1 reply; 15+ messages in thread From: Lee Revell @ 2005-08-01 5:10 UTC (permalink / raw) To: abonilla; +Cc: linux-kernel, hdaps devel, 'Yani Ioannou', Dave Hansen On Sun, 2005-07-31 at 22:56 -0600, Alejandro Bonilla Beeche wrote: > Second Try... ;-) > > Anyone? You're obviously getting different values because "moving the laptop left to right" will produce a different acceleration every time. So in order to calibrate it you need a readily available source of constant acceleration, preferably with a known value. Hint: -9.8 m/sec^2. Lee ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: IBM HDAPS, I need a tip. 2005-08-01 5:10 ` Lee Revell @ 2005-08-01 6:51 ` Jan Engelhardt 2005-08-01 8:07 ` Yani Ioannou 2005-08-01 12:18 ` Paulo Marques 0 siblings, 2 replies; 15+ messages in thread From: Jan Engelhardt @ 2005-08-01 6:51 UTC (permalink / raw) To: Lee Revell Cc: abonilla, linux-kernel, hdaps devel, 'Yani Ioannou', Dave Hansen >So in order to calibrate it you need a readily available source of >constant acceleration, preferably with a known value. > >Hint: -9.8 m/sec^2. Drop it out of the window? :) Jan Engelhardt -- ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: IBM HDAPS, I need a tip. 2005-08-01 6:51 ` Jan Engelhardt @ 2005-08-01 8:07 ` Yani Ioannou 2005-08-01 13:38 ` Dave Hansen 2005-08-01 12:18 ` Paulo Marques 1 sibling, 1 reply; 15+ messages in thread From: Yani Ioannou @ 2005-08-01 8:07 UTC (permalink / raw) To: abonilla; +Cc: Lee Revell, linux-kernel, hdaps devel, Dave Hansen, Jan Engelhardt Well don't forget there is a bios 'calibration' routine that you will see on start up (especially if you are on a moving vehicle/train). What is this calibration used for, and does it provide calibration information to the windows driver? Could we use it somehow to help solve this problem? Yani On 8/1/05, Jan Engelhardt <jengelh@linux01.gwdg.de> wrote: > > >So in order to calibrate it you need a readily available source of > >constant acceleration, preferably with a known value. > > > >Hint: -9.8 m/sec^2. > > Drop it out of the window? :) > > > > Jan Engelhardt > -- > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: IBM HDAPS, I need a tip. 2005-08-01 8:07 ` Yani Ioannou @ 2005-08-01 13:38 ` Dave Hansen 2005-08-01 19:02 ` Yani Ioannou 0 siblings, 1 reply; 15+ messages in thread From: Dave Hansen @ 2005-08-01 13:38 UTC (permalink / raw) To: Yani Ioannou Cc: abonilla, Lee Revell, Linux Kernel Mailing List, hdaps devel, Jan Engelhardt On Mon, 2005-08-01 at 04:07 -0400, Yani Ioannou wrote: > Well don't forget there is a bios 'calibration' routine that you will > see on start up (especially if you are on a moving vehicle/train). I've never seen that. Could you please elaborate on what you see, and when? -- Dave ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: IBM HDAPS, I need a tip. 2005-08-01 13:38 ` Dave Hansen @ 2005-08-01 19:02 ` Yani Ioannou 0 siblings, 0 replies; 15+ messages in thread From: Yani Ioannou @ 2005-08-01 19:02 UTC (permalink / raw) Cc: abonilla, Lee Revell, Linux Kernel Mailing List, hdaps devel, Jan Engelhardt On 8/1/05, Dave Hansen <dave@sr71.net> wrote: > On Mon, 2005-08-01 at 04:07 -0400, Yani Ioannou wrote: > > Well don't forget there is a bios 'calibration' routine that you will > > see on start up (especially if you are on a moving vehicle/train). > > I've never seen that. Could you please elaborate on what you see, and > when? > Sorry it says diagnostics, not calibration, but the way it behaves leads me to believe its doing some sort of calibration. If you boot up your thinkpad, get rid of your bios splash screen (esc), and tilt the thinkpad back and forth you will see something about IBM Active Protection diagnostics running and a spinner. If you keep tilting the notebook back and forth you can actually prevent the machine from booting because this will fail after a while. Normally you won't see it, I mainly notice it while in a train or car. Yani ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: IBM HDAPS, I need a tip. 2005-08-01 6:51 ` Jan Engelhardt 2005-08-01 8:07 ` Yani Ioannou @ 2005-08-01 12:18 ` Paulo Marques 2005-08-01 12:55 ` linux-os (Dick Johnson) 1 sibling, 1 reply; 15+ messages in thread From: Paulo Marques @ 2005-08-01 12:18 UTC (permalink / raw) To: Jan Engelhardt Cc: Lee Revell, abonilla, linux-kernel, hdaps devel, 'Yani Ioannou', Dave Hansen Jan Engelhardt wrote: >>So in order to calibrate it you need a readily available source of >>constant acceleration, preferably with a known value. >> >>Hint: -9.8 m/sec^2. > > Drop it out of the window? :) No, no. Constant gravity (like having the laptop sitting on the desk) "feels like" constant acceleration. Dropping it out of the window should measure 0 m/sec^2, because the accelerometer is not working on an inertial referential (I hope this is the correct term in english...). For the accelerometer, this is just like the feeling of free falling inside an elevator: no gravity :) -- Paulo Marques - www.grupopie.com It is a mistake to think you can solve any major problems just with potatoes. Douglas Adams ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: IBM HDAPS, I need a tip. 2005-08-01 12:18 ` Paulo Marques @ 2005-08-01 12:55 ` linux-os (Dick Johnson) 2005-08-01 13:09 ` Vojtech Pavlik 0 siblings, 1 reply; 15+ messages in thread From: linux-os (Dick Johnson) @ 2005-08-01 12:55 UTC (permalink / raw) To: Paulo Marques Cc: Jan Engelhardt, Lee Revell, abonilla, linux-kernel, hdaps devel, Yani Ioannou, Dave Hansen On Mon, 1 Aug 2005, Paulo Marques wrote: > Jan Engelhardt wrote: >>> So in order to calibrate it you need a readily available source of >>> constant acceleration, preferably with a known value. >>> >>> Hint: -9.8 m/sec^2. >> >> Drop it out of the window? :) > > No, no. Constant gravity (like having the laptop sitting on the desk) > "feels like" constant acceleration. > > Dropping it out of the window should measure 0 m/sec^2, because the > accelerometer is not working on an inertial referential (I hope this is > the correct term in english...). For the accelerometer, this is just > like the feeling of free falling inside an elevator: no gravity :) > > -- > Paulo Marques - www.grupopie.com You need a centrifuge or something that works like one. You can make one and you can calibrate it using simple techniques. For instance, you can swing the mass (laptop) over your head, round and round with your arm. If the rate is such that the mass "just" falls over the top, the 'G's at that point are zero. At the bottom of the swing, the 'G's will be maximum. If you used a fish-scale (spring-scale) to swing the whole thing, you could measure its static weight, then observe the apparent weight everywhere along the swing arc. If you don't have to go through 0 Gs, you can just swing the whole thing around horizontally and observe the fish-scale. The 'G' load is exactly the indicated weight / static weight. As a relative measure, a 5.5 lb weight, swung through a 5ft diameter, (2.5 ft radius) arc at such a speed that it "just" falls through the top, exerts about 4 Gs (22 lb) at the bottom. Don't accidentally hit something. Impact Gs may make your experiment expensive. Cheers, Dick Johnson Penguin : Linux version 2.6.12 on an i686 machine (5537.79 BogoMips). Warning : 98.36% of all statistics are fiction. . I apologize for the following. I tried to kill it with the above dot : **************************************************************** The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them. Thank you. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: IBM HDAPS, I need a tip. 2005-08-01 12:55 ` linux-os (Dick Johnson) @ 2005-08-01 13:09 ` Vojtech Pavlik 2005-08-01 14:22 ` linux-os (Dick Johnson) 0 siblings, 1 reply; 15+ messages in thread From: Vojtech Pavlik @ 2005-08-01 13:09 UTC (permalink / raw) To: linux-os (Dick Johnson) Cc: Paulo Marques, Jan Engelhardt, Lee Revell, abonilla, linux-kernel, hdaps devel, Yani Ioannou, Dave Hansen On Mon, Aug 01, 2005 at 08:55:53AM -0400, linux-os (Dick Johnson) wrote: > > Jan Engelhardt wrote: > >>> So in order to calibrate it you need a readily available source of > >>> constant acceleration, preferably with a known value. > >>> > >>> Hint: -9.8 m/sec^2. > >> > >> Drop it out of the window? :) > > > > No, no. Constant gravity (like having the laptop sitting on the desk) > > "feels like" constant acceleration. > > > > Dropping it out of the window should measure 0 m/sec^2, because the > > accelerometer is not working on an inertial referential (I hope this is > > the correct term in english...). For the accelerometer, this is just > > like the feeling of free falling inside an elevator: no gravity :) > > > > -- > > Paulo Marques - www.grupopie.com > > You need a centrifuge or something that works like one. You can > make one and you can calibrate it using simple techniques. Not at all. It's enough to let the laptop lie on the table for [0,0]G calibration, then put sequentially it on all the four sides for [-1,0]G, [1,0]G, [0,1]G, [0,-1]G calibration. >From these five measurements you have both the zero point and the slopes, including a good error estimate. I've done that before when toying with IMUs. -- Vojtech Pavlik SuSE Labs, SuSE CR ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: IBM HDAPS, I need a tip. 2005-08-01 13:09 ` Vojtech Pavlik @ 2005-08-01 14:22 ` linux-os (Dick Johnson) 2005-08-01 14:51 ` Vojtech Pavlik 0 siblings, 1 reply; 15+ messages in thread From: linux-os (Dick Johnson) @ 2005-08-01 14:22 UTC (permalink / raw) To: Vojtech Pavlik Cc: Paulo Marques, Jan Engelhardt, Lee Revell, abonilla, linux-kernel, hdaps devel, Yani Ioannou, Dave Hansen On Mon, 1 Aug 2005, Vojtech Pavlik wrote: > On Mon, Aug 01, 2005 at 08:55:53AM -0400, linux-os (Dick Johnson) wrote: > >>> Jan Engelhardt wrote: >>>>> So in order to calibrate it you need a readily available source of >>>>> constant acceleration, preferably with a known value. >>>>> >>>>> Hint: -9.8 m/sec^2. >>>> >>>> Drop it out of the window? :) >>> >>> No, no. Constant gravity (like having the laptop sitting on the desk) >>> "feels like" constant acceleration. >>> >>> Dropping it out of the window should measure 0 m/sec^2, because the >>> accelerometer is not working on an inertial referential (I hope this is >>> the correct term in english...). For the accelerometer, this is just >>> like the feeling of free falling inside an elevator: no gravity :) >>> >>> -- >>> Paulo Marques - www.grupopie.com >> >> You need a centrifuge or something that works like one. You can >> make one and you can calibrate it using simple techniques. > > Not at all. It's enough to let the laptop lie on the table for [0,0]G > calibration, then put sequentially it on all the four sides for [-1,0]G, > [1,0]G, [0,1]G, [0,-1]G calibration. > Huh? A laptop on the table is subjected to 1G on earth. If turned over, is still subjected to 1G, although the sensor may show -1G. Unless the correct k (calibration factor) is known, for each load direction, it cannot be derived from +/- 1, the only readings you have, because of the 1G bias of the load-cell itself. A pair of load-cells mounted orthagonally, will show the accelleration in 4 axis. However, you can't assume that if you held the mass at a 45 degree angle, for instance, that both sensors would read 0.707 (cos 45) or that if at 90, one pair would read 0.0 You need to calibrate using real values. With a sping-scale, and some room to swing the device, you can readily obtain some accurate load values. >> From these five measurements you have both the zero point and the > slopes, including a good error estimate. > > I've done that before when toying with IMUs. > > -- > Vojtech Pavlik > SuSE Labs, SuSE CR > Cheers, Dick Johnson Penguin : Linux version 2.6.12 on an i686 machine (5537.79 BogoMips). Warning : 98.36% of all statistics are fiction. . I apologize for the following. I tried to kill it with the above dot : **************************************************************** The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them. Thank you. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: IBM HDAPS, I need a tip. 2005-08-01 14:22 ` linux-os (Dick Johnson) @ 2005-08-01 14:51 ` Vojtech Pavlik 0 siblings, 0 replies; 15+ messages in thread From: Vojtech Pavlik @ 2005-08-01 14:51 UTC (permalink / raw) To: linux-os (Dick Johnson) Cc: Paulo Marques, Jan Engelhardt, Lee Revell, abonilla, linux-kernel, hdaps devel, Yani Ioannou, Dave Hansen On Mon, Aug 01, 2005 at 10:22:57AM -0400, linux-os (Dick Johnson) wrote: > Huh? A laptop on the table is subjected to 1G on earth. If turned over, > is still subjected to 1G, although the sensor may show -1G. Unless > the correct k (calibration factor) is known, for each load direction, > it cannot be derived from +/- 1, the only readings you have, because > of the 1G bias of the load-cell itself. The MEMS accelerometer measures the projection of the acceleration/gravity vector in two orthogonal directions. If you place the notebook on a horizontal table, the projection of gravity to both the directions measured will be zero, because the gravity vector is orthogonal to both of the directions. Thus for each direction you get the value at -1, 0, and +1 G, and that's perfectly enough to get a calibration, as long as the accelerometer is linear, which MEMSes to a reasonable degree are. > A pair of load-cells mounted orthagonally, will show the accelleration > in 4 axis. However, you can't assume that if you held the mass at > a 45 degree angle, for instance, that both sensors would read > 0.707 (cos 45) or that if at 90, one pair would read 0.0 Well, accelerometers are not load cells with a weight mounted to them, that's the thing. > You need to calibrate using real values. With a sping-scale, and > some room to swing the device, you can readily obtain some accurate > load values. The Earth's gravity is a very well known real value. -- Vojtech Pavlik SuSE Labs, SuSE CR ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Hdaps-devel] Re: IBM HDAPS, I need a tip. 2005-08-01 4:56 ` Alejandro Bonilla Beeche 2005-08-01 5:10 ` Lee Revell @ 2005-08-01 18:08 ` Jon Escombe 2005-08-01 18:25 ` Alejandro Bonilla 1 sibling, 1 reply; 15+ messages in thread From: Jon Escombe @ 2005-08-01 18:08 UTC (permalink / raw) To: abonilla; +Cc: linux-kernel, hdaps devel, 'Yani Ioannou', Dave Hansen >>Thanks to development of the driver from some nice guys, we are able to >>get data from the accelerometer. There is one problem. How do we >>calibrate the values that are outputed from the userspace? All PC's get >>a different value, and we can't really find the best solution. What is >>the scientific and smartest way to do this? >> >> I'm not convinced we need to get so hung up on the calibration. Sure, each laptop has somewhat different resting values - but surely what we're looking for is any rate of change in either the X or Y values thats over a predefined 'safe' threshold? (I would imagine that we're only going to find that safe threshold from some imaginative testing once we've got the head parking sorted....) Just my 2p worth, Jon. ______________________________________________________________ Email via Mailtraq4Free from Enstar (www.mailtraqdirect.co.uk) ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [Hdaps-devel] Re: IBM HDAPS, I need a tip. 2005-08-01 18:08 ` [Hdaps-devel] " Jon Escombe @ 2005-08-01 18:25 ` Alejandro Bonilla 2005-08-01 19:44 ` Jon Escombe 0 siblings, 1 reply; 15+ messages in thread From: Alejandro Bonilla @ 2005-08-01 18:25 UTC (permalink / raw) To: lists Cc: linux-kernel, 'hdaps devel', 'Yani Ioannou', 'Dave Hansen' > >>Thanks to development of the driver from some nice guys, we > are able to > >>get data from the accelerometer. There is one problem. How do we > >>calibrate the values that are outputed from the userspace? > All PC's get > >>a different value, and we can't really find the best > solution. What is > >>the scientific and smartest way to do this? > >> > >> > > I'm not convinced we need to get so hung up on the calibration. Sure, > each laptop has somewhat different resting values - but surely what > we're looking for is any rate of change in either the X or Y values > thats over a predefined 'safe' threshold? (I would imagine that we're > only going to find that safe threshold from some imaginative testing > once we've got the head parking sorted....) > > Just my 2p worth, > Jon. hard drive parking was already sorted out. We have a script that does this and works great parking the heads. The problem here is that we have 10 different models. One will have 20 as X and the others will have 500 as x. Some will increment in 20 when you move them 45Deg, and some will increment 50. How can you determine from an shake, to a fall? .Alejandro ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Hdaps-devel] Re: IBM HDAPS, I need a tip. 2005-08-01 18:25 ` Alejandro Bonilla @ 2005-08-01 19:44 ` Jon Escombe 0 siblings, 0 replies; 15+ messages in thread From: Jon Escombe @ 2005-08-01 19:44 UTC (permalink / raw) To: abonilla Cc: linux-kernel, 'hdaps devel', 'Yani Ioannou', 'Dave Hansen' > hard drive parking was already sorted out. We have a script that does this > and works great parking the heads. Would have to disagree with you here. Jens' ATA7 parking code is a great start but we still have a couple of issues to address before it's usable for this purpose. (1) it only works on a subset of the devices that the Windows driver works for, and (2) we need a way to freeze the device for a short period so that the next I/O request doesn't wake it up before it hits the floor... > The problem here is that we have 10 different models. > > One will have 20 as X and the others will have 500 as x. Some will increment > in 20 when you move them 45Deg, and some will increment 50. > > How can you determine from an shake, to a fall? If there really are devices with resting values of 20 then I would agree we have a problem. I've tried on a few different Thinkpads and have always seen resting values of several hundreds. If this is true for all, I would like to think we could estimate a sensible value that works for everyone... Regards, Jon. ______________________________________________________________ Email via Mailtraq4Free from Enstar (www.mailtraqdirect.co.uk) ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2005-08-01 19:47 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-08-01 1:53 IBM HDAPS, I need a tip Alejandro Bonilla Beeche 2005-08-01 4:56 ` Alejandro Bonilla Beeche 2005-08-01 5:10 ` Lee Revell 2005-08-01 6:51 ` Jan Engelhardt 2005-08-01 8:07 ` Yani Ioannou 2005-08-01 13:38 ` Dave Hansen 2005-08-01 19:02 ` Yani Ioannou 2005-08-01 12:18 ` Paulo Marques 2005-08-01 12:55 ` linux-os (Dick Johnson) 2005-08-01 13:09 ` Vojtech Pavlik 2005-08-01 14:22 ` linux-os (Dick Johnson) 2005-08-01 14:51 ` Vojtech Pavlik 2005-08-01 18:08 ` [Hdaps-devel] " Jon Escombe 2005-08-01 18:25 ` Alejandro Bonilla 2005-08-01 19:44 ` Jon Escombe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox