Slackware - ARMThis forum is for the discussion of Slackware ARM.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When my son is not using my Pi for watching toons I plan to use it to control a model submarine droid. Appart from controlling servos via GPIO pins (to my understanding there's a kernel module [servoblaster] that does that to minimize servo jutter and stop them from overheating dew to task switching timing inaccuracies afflicting userspace) ... but I wanted to give my SUB an accelerometer so that it could correct unwanted accelerations.
When my son is not using my Pi for watching toons I plan to use it to control a model submarine droid.
that seems a very interesting, but also a very eager project. I wonder how you're going to control the vessel:
Via LAN cable? That would restrict its mobility a lot.
Via WiFi? Nearly impossible, the range of 2.4GHz radio waves is mere centimeters under water. Except you have a long rod protruding out of the water.
Fully autonomous? That would require a camera and some sophisticated software, and only slow movement so you're still able to catch it if it should go rampant.
Quote:
Originally Posted by louigi600
I wanted to give my SUB an accelerometer so that it could correct unwanted accelerations.
Okay, but think of physics: You can't distinguish between gravitation and acceleration. Therefore, every slight tilt or cant of the vessel would be interpreted as an acceleration in a certain direction. Did you consider that?
but there's no tutorial for connecting it to Pi and reading data from it.
So you'll have to go the investigative way. The page you point to has a link to the data sheet. There are some other projects for the Pi that communicate with I²C devices. I can't see any other way than checking with the data sheet what commands and instructions the chip needs to be sent to, and what its response looks like and how it is to be interpreted. The general way of using I²C communication can be taken from some other project.
That probably means hours, if not days of investigation and testing. But I'm afraid someone has to do it. If nobody else did it for this chip on the Pi yet, you might have to be that pioneer. ;-)
that seems a very interesting, but also a very eager project. I wonder how you're going to control the vessel:
Via LAN cable? That would restrict its mobility a lot.
Via WiFi? Nearly impossible, the range of 2.4GHz radio waves is mere centimeters under water. Except you have a long rod protruding out of the water.
Fully autonomous? That would require a camera and some sophisticated software, and only slow movement so you're still able to catch it if it should go rampant.
Okay, but think of physics: You can't distinguish between gravitation and acceleration. Therefore, every slight tilt or cant of the vessel would be interpreted as an acceleration in a certain direction. Did you consider that?
So you'll have to go the investigative way. The page you point to has a link to the data sheet. There are some other projects for the Pi that communicate with I²C devices. I can't see any other way than checking with the data sheet what commands and instructions the chip needs to be sent to, and what its response looks like and how it is to be interpreted. The general way of using I²C communication can be taken from some other project.
That probably means hours, if not days of investigation and testing. But I'm afraid someone has to do it. If nobody else did it for this chip on the Pi yet, you might have to be that pioneer. ;-)
[X] Doc CPU
I'm going for full auto ... and I'm not targeting millimetric precision so I'm hoping to do without camera ... but I'll be doing maths on the accelerometers to estimate position. I'll not be attempting to make it swim thought a tiny home but just have it follow a pre-calculated path supposing there are no obstacles in the way. If I can get that to work I'll look into handling unexpected obstacles.
I also said "unwanted acceleration": g is constant and practical so I can deal with that as acceleration is a vector and vectors sum (yes it's simple physics).
I found some other interesting sensors with accelerometer, compass and rotation sensor: I might use one of those
Yes, look into using Inertial Measurement Units (IMUs) using a fibre optic gyro. They are small and used in drones etc. I think you will find that using acceleration as a sole means for determining position very crude. Also IMUs have a drift factor, if you do not use some external input for speed and depth make sure to take it into account.
School project?
Yes, look into using Inertial Measurement Units (IMUs) using a fibre optic gyro. They are small and used in drones etc. I think you will find that using acceleration as a sole means for determining position very crude. Also IMUs have a drift factor, if you do not use some external input for speed and depth make sure to take it into account.
This is the other sensor I found intresting: http://www.allthingsmicro.com/produc...accelmag-board is has all 3 in one neat pcb ... the only snag is that they are not oriented in the same axis which will require software coordinate rearranging. But am an absolure nubi in this field so any suggestions are welcome.
Yeah ... I was guessing that the deceleration caused by drag (and fluid current) would be unmeasurable so I'd haveto account for that somehow, maybe have a small propeller up front attached to an undriven DC motor and measure the tension produced. If I remember correctly the voltage produced is close to linear with angular velocity of the prop, and that should be linear with the speed too.
Water is really dense compared to air so I cal assume any lateral drift is dew to fluid movement, or at worse, the sub changing immersion depth ... so I guess doing full auto might need a means of measuring depth too. How about an accelerometer placed on a tilting surface that is moved by pressure differential between outside and inside ?
Really coarse if fine for a first attempt at a drone ... if I like it I'll look into better accuracy but GPS will not work under water so I'll haveto figure out something else.
Update on the sensors: A friend of mine has a 10DOF left over from is multi-rotor drone chopper ... he's gonna give it to me for some reasonable price so I think I'll go for that.
Now that I have the IMU I did a littple reserch and play with it. If anyone is intrested I wrote a small article on how I went about reading some information out of my IMU on docs.slackware.com
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.