Shop OBEX P1 Docs P2 Docs Learn Events
Inertial Nav. — Parallax Forums

Inertial Nav.

RivermanRiverman Posts: 6
edited 2009-10-22 16:25 in Robotics
The BOT is sucessfully running around under PING[noparse]:)[/noparse]) control; the SoundPal has replaced the buzzer for reset/ brownout alarms ( "Uh-oh!" ) and is ready for future development; and the other Smart Sensors have been tried & tested. Time for a serious project..............

Accelerators and compass modules reminded me of Intertial Navigation from my RAF days, so I have been giving that some thought. Integrating accel. we obtain velocity, integrate again to get distance; however, BS2 doesn't have an "integrate" function, and·uses integer mathematics. This leaves the standard s=ut x 1/2at2· formula, plus a lot of calculation.· To give accurate results we need to have a high sample rate, but the wheel servo's require updating every 20ms.· The "RC car" project in the SS book simply logs the accel values, and all calculation is carried out in "Excel".· I would like to be able to display "live" distance on the LCD as the BOT moves around.
Given the high sample rate of ( 2 channel ) accel, together with all the scaling, calculations, LCD output, while at the same time driving / navigating the BOT......somewhere in the system compass heading would have to be applied also. My gut feeling was that it would be too much for one BS2, if only due to the·lack of I/O pins.
Scanning the Forums has pretty much confirmed this.·

So I have two options:
·1. use a co-processor to handle most /all of the inertial processes/calculations, such as the uM-FPU v3.1
····· The BS2 would still have to read the accel. & compass module data, but the uM-FPU might be able to·ouput
···· to the LCD direct (?).

·2. use hardware to carry out the integration processes using LM358 's.· This would require a voltage analogue
···· output from the accel being applied to two integrating op. amp cct. in series to produce a voltage analogue
···· of distance, which would then be applied to the BS2 via· ADC0831's.· A suitable accel. unit is the
····· DE-ACCM2G· which gives up to 750mV / g.· The uM-FPU also has two analogue input pins, so it may be
···· possible to use this instead of the op amp ccts.

I hope to put all of the itertial nav. components onto a single daughter board so that it can be moved to another project if needed.· I know that several members are playing with Prop controlled 5/6 DOF IGU projects, so I'm hoping that someone may have been down this route before.· The key to option 2. is getting the· integrating function correct ( together with any scaling involved ). The ADC0831 has 256 "steps", so if I scale distance to 1" per step, it will give me about 21ft. for max. distance before the ADC overruns.

I intend to try both methods as far as possible, but would appreciate some feedback / comments in case I've made some glaring misunderstanding.
Many thanks, John

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-21 15:54
    1) Seriously consider shifting to the Propeller. It can do fast floating point if you need it (40-45us for basic arithmetic operations) and can do up to 8 things at a time. If you're mindful of the difference in logic levels (+3.3V for the Prop vs. +5V for the Stamps), you could even pop a SpinStamp into your BOE instead of the BS2. In most cases, a 2.2K series resistor in each of the I/O pin leads is all you'd need. Depending on what's connected on the other end, you might not even need that.

    2) Remember that the accelerometer and compass you're using have limited accuracy and any error that occurs will accumulate. It won't take long for your estimated location to become completely unrelated to the actual location of your BOT. Consider using some kind of IR beacons or other external position references to periodically recalibrate your position.
  • RivermanRiverman Posts: 6
    edited 2009-10-22 12:37
    Thanks Mike,

    Must admit I have considered the "Prop".· What I didn't say in the original post, is that long term, I hope to expand to a complete IGU/ INU·system with GPS, running in "Spin". As this represent a very large learning curve, my first attempt is to use what·I have available ( BoE/BS2, Mem2125, HM55B etc ) to gain experience (·sensors, techniques, and programming ) even if its a bit crude.· However, since I will have to move up to the Prop at some stage, it may be better to bite the bullet now, rather than having to re-write programme code in the future.

    Somewhere in the forum I read that the HM55B can be +/- 5o and can suffer from various types of interference, so I'm not expecting too much anyway.· As long as the system works reasonable well over sort runs, I'll be happy as a first attempt. GPS can't work inside, &·my BOT is not ready yet for the great outdoors. I'll spend the winter playing with ideas, & trying out, so that ( all being well ) I will be ready for GPS testing next summer. It all comes down to time & money in the end !!

    Cheers, John
  • tronsnavytronsnavy Posts: 70
    edited 2009-10-22 12:58
    Riverman,
    Not sure if this project will help http://www.electronic-engineering.ch/study/ins/ins.html·, but it might provide some ideas.· The project is a low cost INS (Inertial Navigation System).· It uses a small gyroscope (didn't price it) and should provide adequate precision.· I have considered a project like this as well.· I have been in the Navy for 22 years.· Spent a·number of·years on Aircraft Carriers.· Worked RADAR and ECM (Electronic Counter Measures).· The boys in work center 610 worked the COMM/NAV stuff.· I know that the INS systems was always a pain for them (because of extreme precision).· Most Navy squadrons will perform a "compass swing" (calibrate gyros and compass) on all aircraft about once a month.· Since you were in the RAF, I'm sure you already know this.· I will be keeping an eye on this thread.· Can't·pursue this project now as I have many others that I'm working on.· Good luck and have a great weekend.
    Bob
  • RivermanRiverman Posts: 6
    edited 2009-10-22 14:33
    Thanks Bob,

    I'll take a close look at that link; always good to have several lines of investigation.

    Last time I worked on any gyro equipment ( Sperry ), it was the size of a football, & weighed about 20lbs. I'm just amazed that these tiny chips actually work.· Also taking a closer look at the Sparkfun range of accels / IGU's for future development.· Need to get my head around combining direction / heading with velocity / distance before I can even begin to start programming. As I said earlier, I have given myself the winter to do the "leg work" so that I can begin to get serious next year.

    Cheers, John· ( RAF Radar, Comms, Nav. Inst. Wpns systems. )
  • TimmooreTimmoore Posts: 1,031
    edited 2009-10-22 16:25
    Also look at the prop forum for IMU, there have been several projects using the prop for IMU. I posted one a while ago using the Sparkfun gyros/accelerometer and compass for example.
Sign In or Register to comment.