I have a DE-ACCM3D that I attach to my bot, the tilt output is a variable analog voltage for the amount of tilt, I use it as a leveling device for the bot right now but you could program the gait to respond to the variable amount. Maybe something that you could use.
You know I’m curious, I haven’t tested the device to see if there is an out put for tilt simply by moving the device forwards or backwards, there is for up and down.
I like it!
A little pricey 'tho.
This shield mentioned is about $70
criticalvelocity.com/item.php?itemid=shield6
Alan KM6VV
I have the -axis unit, and looked at both as I recall, but I don’t remember a specific “tilt” output. Probably takes an IMU to get that.
Alan KM6VV
This unit has 3 out puts x/y tilt and z accel.
Buffered ±3g Triple Axis Accelerometer (ADXL330) $37.14 CAD
it’s very simple to use.
Sounds better!
I’m sure not seeing anything about tilt outputs in the data sheet.
Where did you read it? Block diagram only shows three analog (XYZ) outputs.
Alan KM6VV
The x/y are the tilt ( analog ) and the z is the up/down accelerate ( analog)
Soo, let me see if i understand this:
a gyro is the best and fastest in giving me the correct tiltangle, but it will drift off, and eventually give me the wrong “up”. The combination of an accelerometer and gyro is the best answer, where the accelerometer corrects the gyro ald allways gives the right “up”
… And the I found out another problem, I did a pinoutmap (nc.sverige.net/nc/robot/PinoutARC32.xlsx) over the connections of my ARC32, and because i whant to use HSERVOSTATE for all (or as many as possible) of my servos, I have to connect them to pin 8-15 and 24-31, leaving no analog ports at all for my analog sensors … therefor i havto limit the selection of tiltsensors even further: it has to have a serial interface.
The 9DOF SEN-09623 looks really nice, its serial connected, and it had errorcorrection as it compiles all its input with a own programmable processor, but it still is alitte overkill (92€)
The 6DOF DEV-09956 ArduIMU+ V2 (Flat) is alittle cheaper (73€), and i think is has all i whant, but the swedish supplyer cant give me a delivery-date as he hasnt it in stock
Ill keep on looking, but if not someone else has a better alternative (or tell me they are crap), Ill choose some of them above
Soo, let me see if i understand this:
a gyro is the best and fastest in giving me the correct tiltangle
Not exactly, gyroscopes measure angular velocity, how fast something is spinning about an axis.
Check out this guide about accelerometers, gyros and IMU’s at Sparkfun:
sparkfun.com/tutorials/167
You’ll hopefully find some useful info there.
Yes, that one i have been reading a lot…
If i dont blindly look after serial devices, instead look for PWM, the Memsic 2125
parallax.com/tabid/768/Produ … fault.aspx
seemes quite nice and simple
Humm,
Not the way I think of them working. X and Y are in the horizontal plane. Normally they don’t “feel” any vertical (gravity) acceleration, Z feels it all.
True, if the XY plane is tilted, one or both axis will feel the acceleration. They will see X and Y acceleration, and gravity if tilted. The two outputs are not separated. Not specifically “tilt” outputs, but I get why you’re calling them that.
Alan KM6VV
The x/y are the tilt ( analog ) and the z is the up/down accelerate ( analog)
Your right, KM6VV , I found more data about the chip and it does sense acceleration in all directions, but I also found that in use by moving the device back and forth on the horizontal plane that there is very little voltage variance in the x/y outputs compared to tilting in the x/y. I can see this device being used as an angle meter which in turn would let you know if a limb is 90 degrees to the ground (or any other angle) therefore your bot would know which way is down depending on how you setup your code.
Oh I definitely agree that it can be used to sense when a 'bot is tilted or upside down or whatever when stopped. Should be easy to implement.
And as I think about it, our 'bots rarely do 32 f/s[super]2[/super] continuous acceleration, (more time either stopped of moving at a constant rate), so what will mostly be seen will be the tilt components.
What I’d really get a handle on is a full 9 axis IMU and it’s sensor fusion! Then it would be useful to really know where the 'bot is, and which way it is going!
Alan KM6VV
I’ve got my Memsic 2125 today … and I’ll keep you all posted…
Yes, Please do!
Alan KM6VV
The Memsic 2125 is a very easy to use tilt sensor !
http://nc.sverige.net/nc/robot/DSC09356.JPG
As it uses a PWM as a signal, it allso is very “pin-effective” because you can usa all pins who have PWM enabled, and that is just about all of them…
The measurementerror due to the fact that i use “straight line math” is between 0 and 0,5 deg-35 to +35 deg, and 1,5 deg -45 to +45 deg
nc.sverige.net/nc/robot/Memsic2125graph.JPG
the code is very simple and straightforward and fast:
[code]xIn con P0 ’ X input from Memsic 2125
yIn con P16 ’ Y input from Memsic 2125
xMid CON 9950 ;± 1800
yMid CON 10049 ;± 1800
Times CON 10 ; used for the mean vaule: 100 takes 2s, 10 takes about 0,19s and 1 takes 18ms, 10 is recommended
xRaw VAR Word ’ pulse from Memsic 2125
yRaw VAR Word
yDATA VAR long ’ data for the mean value
xDATA VAR long
i VAR byte ’ loopvariable
xDeg VAR SByte ’ result from the sub
yDeg VAR SByte
main:
Gosub GetTilt
;hserout "X: “, dec xRaw,” raw, ", 13] ; used during programming/building to compensate for “not horisontal mounting”
hserout "Tilt X: ", sdec xDEG , 13]
;hserout "Y: “, sdec yRaw,” raw, ", 13] ; used during programming/building to compensate for “not horisontal mounting”
hserout "Tilt Y: ", sdec yDEG , 13]
pause 100
goto main
;[GetTilt]
GetTilt
;begin
xDATA = 0
yDATA = 0
for i = 1 to Times
PULSIN Xin, 0, xRaw
xDATA = xDATA + xRaw
PULSIN Yin, 0, yRaw
yDATA = yDATA + yRaw
next
xRaw = xData/Times
xDEG = (xRaw - xMid) / 41 MIN -45 MAX 45
yRaw = yData/Times
yDEG = (yRaw - yMid) / 41 MIN -45 MAX 45
Return[/code]
The Memsic 2125 generates PWM!
Yes, it does seem simple to use. I’m accustomed to using analog inputs.
Thanks for the report!
Alan KM6VV
The result is a 22x24mm board whith screwholes
http://nc.sverige.net/nc/robot/DSC09372.JPG
See it mounted in my Noob-thread
lynxmotion.net/viewtopic.php?f=8&t=6958&start=45