crazy accelerometer readings

jubenini

New Member
Hello,

I'm working on changing the intensity of 6 vibration motors independently based on the readings from a 2-axis accelerometer. Basically, the more the accelerometer deviates from 'straight up', the more the vibrators should vibrate. Everything is working pretty well, except for a certain range of accelerometer values. When the deviation is small, the vibrators turn on just a bit. When the deviation is large, the motors turn on a lot. But, somewhere in the middle, the accelerometer readings oscillate from really low to really high. So, for example, when it should be reading 11, it reads 11, then 150, then 9, then 70, and that repeats.

When I turn off the vibrators and just read the accelerometer, everything works great. So I guess my question is, what could be causing these strange readings? If it is the vibration itself, wouldn't the readings be strange for the entire range of the accelerometer? Does anyone have any ideas?

Thanks!
 

Wrenow

Senior Member
My immediate thought is that it could be a couple of things. One, the vibration from the vibration motors. Especially when they set up a reinforcing wave of vibration. The other is voltage spikes and drops from the motors having effects on the Picaxe itself either in main power or causing fluctuations in the ADC readings. Without diagrams or schematics, however, just guesses on my part.

Cheers,

Wreno
 

jubenini

New Member
Hmm, schematics are a bit beyond my capabilities as an electronics engineer (no capabilities at all). I am using the picaxe AXE210 connect board with an xbee and an 18X. The motors are just connected directly to output pins 0 through 5 and to ground. The accelerometer is attached to input pins 0 and 1 for the adc. That's basically all there is to it... hopefully that clears something up? Thanks!
 

MFB

Senior Member
I would suspect electrical noise from the motors. Try the usual things, like extra capacitance across the PICAXE supply and low-pass filters between the accelerometer output and ADC inputs. A 6.8K series resistor with 0.1uF between each ADC input and ground would be a good starting point.
 

toxicmouse

Senior Member
my guess is that the accelerometer is not sampling the acceleration at the same point in the vibration cycle, in essence- the vibration frequency is greater than the sensor sample rate.

try to reduce the oscillation frequency, get a faster accelerometer or try to start the sampling from the same point.

good luck
 

Vmax

Member
Harmonics? Maybe you’re getting mechanic overtones. Try moving your accelerometer.
 
Last edited:

moxhamj

New Member
I'm not sure this would be easy to diagnose without a CRO. With a CRO you could see the waveform and see the harmonics and the maximum frequency response and the hash from the motors. Have you got a spare $130?
 
Top