I wrote i little bit of basic code for an accelerometer and atom pro. It is really hard to get it working, i am just fiddling around a little right now. Only problem i keep on having is that that read out from the accelerometer is somewhat jerky, probably due to jitter etc of the servos, because when powered down there seems to be less of a problem with the value. I have tried averaging, that is to say, instead of taking one measurement i took several and averaged. I made i deadzone, but still. The deadzone has to be quit big to have it less jerky (30 percent of the range!?!). Anyone suggestions as to how the get a value that is less susceptible to instant changes? Anyone some example code how they solved it? I put a small movie in wich i reversed the x and y output. So now it doesn't level on the floor, but 'in the air'. And it does a calibrate routine first, asi said i was fiddling around. You can see it works...somewhat, but pretty jerky. Any advice is welcome...
Joined: Wed Feb 27, 2008 8:59 am Posts: 3286 Location: Online @ innerbreed.co.uk
Its a catch 22 on this one. Iv been observing the footage and from what i can see everything it working fine. Or as its designed to do. By this i mean as the sensor is tilting (by you) the legs are working as they should. But when you place it on the table (tilted) it won't return to normal because you haven't told it to. The sensor remains tilted because the legs are doing what their told to do by the sensor. If that makes sense. Can you post your code? You need to make a command to make the body return to normal.
_________________ Jonny Poole, Freelance Concept Art & Animatronics, 3D Art and 3D Modelling, as well as Physical Modelling, Mechanical design, and illustration. http://www.innerbreed.co.uk Create, Innovate, Inspire.
About the placement. I was thinking the closer to the center (x,y and z) the better. I have fixed it to the body because it seems to experience te least amount of interference there (jitter etc.) And besides the averaging and the deadzone i was thinking about a default to zero of a kind.... so innerbreed that does make sense.
Joined: Mon Oct 31, 2005 10:46 am Posts: 9325 Location: my quiet place
Some accelerometers have a place to solder in a capacitor across the analog output that can be used to directly filter the output. Might be worth a try. I think the main problem is an accelerometer will provide the angle of the object it is connected to when it is stationary, but it has errors when the object is in motion. I think if it were to be accompanied with a gyro the error could be corrected.
Users browsing this forum: No registered users and 3 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum