Digital spirit-level, which sensor?
#1
Posted 17 November 2010 - 03:11 PM
#2
Posted 17 November 2010 - 03:23 PM
You could use a 2-axis accelerometer for this. It will provide data that you can use to determine the orientation of the camera.Hi there,
i have a question for a project that bugs me for some time now, because i dont know which sensor to use.
If i want to measure the angle a camera is flipped to the front (lets call it x-axis so the lens is looking to the ground) and to the side (lets call it y-axis so the camera would make a portrait instead of a landscape photo) which kind of sensor would i have to use?
Do i have to use a accelerometer oder do i have to use a gyro?
#3
Posted 17 November 2010 - 03:50 PM
#4
Posted 17 November 2010 - 03:58 PM
You may be right, however the accelerometer that I am using will report both static orientation and movement.Alfred,
I don,t think a accelerometer will work as it gives a signal corresponding to the acceleration through an angle. Once the movement is stopped there will be no more signal. In this case a gyro will work better as it gives a constant output as long as the axis are not aligned to horizontal or vertical.
This is the one I use http://www.parallax....93/Default.aspx
I have not yet used it with the Netduino, but it works great with the BasicStamp.
#5
Posted 17 November 2010 - 04:22 PM
#6
Posted 17 November 2010 - 06:01 PM
#7
Posted 17 November 2010 - 06:19 PM
#8
Posted 17 November 2010 - 06:39 PM
#9
Posted 17 November 2010 - 07:35 PM
Alfred,
From what you are saying I am sure that the sensor will not work for what you want to do.
This is why: An accelerometer will give output when it moves from any steady state to the next. The rate of change produces an certain output. The output is proportional to the rate of change through the angle. By measuring the rate of change output, you can determine how far you have moved. This is normally angular displacement. Once the movement seizes, the output will drop to zero.
Now a gyro on the other hand will measure an angular position. It will give an output proportional to the angular position from a reference. This is what you want to measure. You do get solid state gyros that dont make use of centrifugal force to measure the angular error.
I think you might be referring to the original poster, and I imagine what you are saying is correct. However I want to add that the accelerometer that I have been using seems to behave identically to the accelerometer in the iPhone and the iPad in that it CAN indicate the orientation of the device whether or not the device is moving. It can also update the orientation information in realtime as the device is moving.
Check out these notes on the Memsic 2125 Dual-axis Accelerometer
http://www.parallax....c2Axis-v2.0.pdf
http://www.parallax....ltDispCntrl.pdf
-AlfredBr
#10
Posted 17 November 2010 - 07:54 PM
#11
Posted 17 November 2010 - 08:00 PM
Yes, it is a fun sensor...and it is available at RadioShack!Alfred
Sorry about confusing you with the poster. The sensor that you use is a combined sensor. Hence the ability to provide angular position. It would seem that the sensor could be used to show angular movement in any direction from the horizontal plane if you correlate the two signals. Nice sensor!!
#12
Posted 17 November 2010 - 08:37 PM
Hi there,
i have a question for a project that bugs me for some time now, because i dont know which sensor to use.
If i want to measure the angle a camera is flipped to the front (lets call it x-axis so the lens is looking to the ground) and to the side (lets call it y-axis so the camera would make a portrait instead of a landscape photo) which kind of sensor would i have to use?
Do i have to use a accelerometer oder do i have to use a gyro?
Just a note on using a gyro. All of the solid state gyros, MEMS gyros, that are readily available be they one, two, or three axis measure the angular rate, i.e. velocity, of rotation about each axis. You will see the the gyro's range listed as degrees/sec, e.g. 100 degrees/sec. This is the maximum angular rate the gyro can report. It is output as an analog voltage, there are some digital output MEMS gyros available. The analog voltage ouput is generally a range from 0 to a few hundred millivolts. For most gyros the "at rest," i.e. no movement, voltage is a positive voltage in the middle of the output voltage range. A clockwise rotation of the gyro on a given axis will generate a positive voltage, which will be reflected as a voltage higher than the at rest voltage and a counter clockwise rotation of the gyro will generate a negative voltage which will be reflected as a voltage lower than the at rest voltage. Through A/D conversion and application of the proper scaling factors the output voltage of the gyro is converted to the angular rate of the gyro.
The important thing to note here is that the gyro is not reporting the angle it has rotated through. It is reporting the angular rate of the rotation it has undergone. To obtain the actual angle the gyro has passed through requires integration of the the angular rate over the elapsed time of the rotation - a nontrivial exercise.
This weekend I will be adding a two axis MEMS gyro to a Netduino based project and will be posting the results of calibrating it, measuring angluar velocity and hopefully an algorithm for integrating over time to get the angle of rotation.
Paul
#13
Posted 18 November 2010 - 09:33 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users