Peter Jakacki said...
jazz, maybe if I have a sunshine detector I could use that to detect the road "rising"
Peter, that is actually a form of a blessing although some of the phrasing is a little different from the Irish tradition.
May the road rise to meet you,
May the wind be always at your back.
May the sun shine warm upon your face,
The rains fall soft upon your fields.
And until we meet again,....
Yes, I am quite familiar with it, but I couldn't resist answering it as it is talking about the "grade" of the road, just what I was asking about. Hence three smilies.
Just a thought... if you are in a vehicle, why not monitor the tach. Applying the delta or 'acceleration' from the tach into a simple PID (proportional–integral–derivative) controller where you are also looking at the values from the Memsic2125 accelerometer should negate 'some' of the actual acceleration value leaving you with more of the true tilt value. Monitoring the tach independently on multiple wheels as an additional PID loop can compensate for centrifugal forces by determining the turning radius of the vehicle with respect to acceleration. If your car has ABS, the independent tach information from each wheel may already be available to the central computer.
Another thought... Using two Memsic2125 accelerometers 'fixed' to the same plane will experience the same or similar acceleration values. When the plane is tilted, you see a tilt vector proportional to the magnitude of the tilt that will eventually decay. So mathematically the two accelerometers would provide a result that is basically the differential of the two.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Beau Schwabe
IC Layout Engineer
Parallax, Inc.
This is on a slow moving truck and I should mention that I have GPS as well basically to give me my ground speed as I can't tap into the truck's systems. I am incorporating an extra MMA7660 on the pcb but as it has fixed addressing of $98 I will simply swap the clock and data to share two devices on the bus. There may be some flexibility in using multiple accelerometers on the same plane and on different planes perhaps. At least if I allow for it I can collect the data to determine the best method.
Looking at the MEMSIC sensor I see that it's actually based on a heated gas concept so it would perhaps be superior for sensing small static positions.
Peter, it can be a bit confusing with the static g vs dynamic. I have been testing a few different accelerometers for my bike computer lately. Here is what I have learned:
1) A basic 2 axis chip works fine, but can find a 3 axis cheaper at times.
2) One of my favorite 2 axis is the Analog Devices ADXL213
3) You typically will be looking for the grade of the road instead of how many degrees of tilt. But it might not matter for your application. (Grade is rise over run, tangent of the angle)
4) There are about 16mg in one degree of tilt
5) Bouncing was not too bad due to rough roads. I take 10 samples then average them.
6) You only need to do the calibration one time. In a 3.3v application, level is going to be pretty close to 1.65v. (Over 1.65v you have a positive grade, below that you are going down hill.) You will need to figure out what margin you want to use for level. For instance, if tilt is one degree either way, then it is basically on level ground. Use a level at the time of mounting the sensor. Get the offset value and plug that in to your equation to set that as a level value.
7) For item #6, the further you are off of level for the offset, the less accurate you will be in higher readings. This mostly comes into play when you are over 6 degrees of tilt.
8) I have also used the 3 axis Freescale MMA7361L. Mount it on edge. You do not need to look at the Z, only X or Y depending on how it is mounted. Z is not going to tell you if the road is going up or down, it will only tell you it is not level
Some good resources on measuring tilt:
-Analog Devices app note AN-603
-Memsic app note #AN-00MX-012
-Freescale AN3107
This stuff was good enough to work on my bicycle where I did not take into account acceleration going up the grade (I usually do not accelerate going up hill, I am lucky to just get up the hill). You can use both X and Y readings to negate the effects of acceleration. You have to mount the sensor at a 45 degree angle. This is shown in the Memsic app note mentioned above.
Comments
Yes, I am quite familiar with it, but I couldn't resist answering it as it is talking about the "grade" of the road, just what I was asking about. Hence three smilies.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
page 1 of the data sheet ... www.parallax.com/Portals/0/Downloads/docs/prod/sens/28017-Memsic2Axis-v2.0.pdf ... "...both static acceleration (gravity and tilt) and dynamic acceleration
(like taking a ride in a car) can be detected."
Just a thought... if you are in a vehicle, why not monitor the tach. Applying the delta or 'acceleration' from the tach into a simple PID (proportional–integral–derivative) controller where you are also looking at the values from the Memsic2125 accelerometer should negate 'some' of the actual acceleration value leaving you with more of the true tilt value. Monitoring the tach independently on multiple wheels as an additional PID loop can compensate for centrifugal forces by determining the turning radius of the vehicle with respect to acceleration. If your car has ABS, the independent tach information from each wheel may already be available to the central computer.
Another thought... Using two Memsic2125 accelerometers 'fixed' to the same plane will experience the same or similar acceleration values. When the plane is tilted, you see a tilt vector proportional to the magnitude of the tilt that will eventually decay. So mathematically the two accelerometers would provide a result that is basically the differential of the two.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Looking at the MEMSIC sensor I see that it's actually based on a heated gas concept so it would perhaps be superior for sensing small static positions.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
1) A basic 2 axis chip works fine, but can find a 3 axis cheaper at times.
2) One of my favorite 2 axis is the Analog Devices ADXL213
3) You typically will be looking for the grade of the road instead of how many degrees of tilt. But it might not matter for your application. (Grade is rise over run, tangent of the angle)
4) There are about 16mg in one degree of tilt
5) Bouncing was not too bad due to rough roads. I take 10 samples then average them.
6) You only need to do the calibration one time. In a 3.3v application, level is going to be pretty close to 1.65v. (Over 1.65v you have a positive grade, below that you are going down hill.) You will need to figure out what margin you want to use for level. For instance, if tilt is one degree either way, then it is basically on level ground. Use a level at the time of mounting the sensor. Get the offset value and plug that in to your equation to set that as a level value.
7) For item #6, the further you are off of level for the offset, the less accurate you will be in higher readings. This mostly comes into play when you are over 6 degrees of tilt.
8) I have also used the 3 axis Freescale MMA7361L. Mount it on edge. You do not need to look at the Z, only X or Y depending on how it is mounted. Z is not going to tell you if the road is going up or down, it will only tell you it is not level
Some good resources on measuring tilt:
-Analog Devices app note AN-603
-Memsic app note #AN-00MX-012
-Freescale AN3107
This stuff was good enough to work on my bicycle where I did not take into account acceleration going up the grade (I usually do not accelerate going up hill, I am lucky to just get up the hill). You can use both X and Y readings to negate the effects of acceleration. You have to mount the sensor at a 45 degree angle. This is shown in the Memsic app note mentioned above.
Hope at least some of this helps.
-Larry G