memsic
Markysparky
Posts: 21
OK i have gotten the accelerometer to work...the problem lies in a zero value...is there a way to precisly and accuratly set a zero acceleration when the accelerometer is at an actual zero? when it sits on my counter it reads an acceleration where there should be none.
thanks
thanks
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Have you looked at the supply voltage on a scope ac coupled 0-100mV range?
Does the supply voltage look the same when stable versus not stable accelerometer readings?
If you don't have a scope, hang a large (10 uf or larger) and a small (0.1 uF) cap on the supply voltage to ground. Be sure your large cap voltage rating is larger than your supply voltage.
Does the above eliminate the irregular noisy signal?
(+)
|
·············(Cap)
(-)
|
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Jonb) : 4/10/2005 2:26:09 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Jonb) : 4/10/2005 10:51:58 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·· Or you could have a connection or ground problem.· I would recheck the wiring and make sure that the Memsic and Stamp have a common ground, and that all the wires are secure.
·· The device isn't overly complicated, in that 3 lines go to Stamp I/O pins, 1 to Vdd and 2 to Vss.· But I have seen a missing connection deliver erratic results.· Especially from a missing line to ground.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Jonb) : 4/10/2005 4:46:53 PM GMT
Do you have memsic 2125 IC or did you purchase the Parallax module which includes other components and is on a PCB with pins? The IC is not something you hook up directly to the stamp·. You need to·add components such as on the modules which are sold at many places.
Do you have this?
http://www.parallax.com/detail.asp?product_id=28017
If so, and you have read the documentation and it does not work, I'm at a loss. Maybe the IC is defective.
If you did not purchase the module, but have the IC then try to copy what is done on the module, which is based on the spec sheet. When you've given up as I have, then purchase the module which was straightforward to use.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Jonb) : 4/10/2005 9:28:52 PM GMT
From the Parallax documents:
Not only do you need to take into account temperature which will affect your readings, but you need to filter out fluctuations and spikes. Your calibration in software will need to take the temperature into account, as your 0 will be different at different temperatures. I used an external temp sensor which was already in the design. but you could use a A/D on TOUT.
I like the software approach to smooth it out.
Check this out maybe it will help:
http://owlogic.com/BS2math5.htm#Smoothing
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Jonb) : 4/10/2005 10:29:21 PM GMT
thanks for your help
I can not seem to locate the code I used, but based it on previous posts regarding this subject. More info can be found by searching for "accelerometer", but the smoothing technique is the key. Basically you could take a few samples and eliminate erradic readings or average it out.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Jonb) : 4/10/2005 10:55:58 PM GMT
The output pins on the 2125 output a pwm signal with varying voltage from .1 to 4.9v but is callibrated to 1.25v @ 25C.
A temperature of say -20C(not uncommon up here) can change the value by 225 millivolt.
I didnt use an absolute zero, instead using ranges worked well for my task. The memsic 2125 has many uses and is very sensitive.·Maybe the sensor is picking up vibrations from something.
Log the output data after smoothing it(with pass filters or through software), you will see it is much more useable.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Jonb) : 4/11/2005 1:48:25 AM GMT