* THE FORUM FOR ALL THOSE INTERESTED IN BUILDING AND OPERATING MODEL SUBMARINES *



Join the AMS - Registered Forum users can become members of the AMS and it's free ...... To join register on the forum first then follow the forum link to our membership form which is on our website


For further details of any events shown here also see the "Shows and Events" section on the forum

First event posted for 2019. Thanks and keep 'em coming!

.

,
Bournville June 2nd 2019, 10am
.

. ,

,

.
.
.

.

.

,,,,

.That's it for this year, folks! See you all in 2019.

Who is online?

In total there are 5 users online :: 0 Registered, 0 Hidden and 5 Guests

None


Most users ever online was 37 on Sun Mar 13, 2011 11:27 am

Latest topics

Statistics

Our users have posted a total of 10736 messages in 1761 subjects

We have 794 registered users

The newest registered user is JohnMac

    Compass bearing by Telemetry - LSM303 module

    Share
    avatar
    david f
    AMS Treasurer

    Posts : 2005
    Join date : 2010-11-10
    Age : 68
    Location : Cumbria

    Compass bearing by Telemetry - LSM303 module

    Post  david f on Thu Jan 03, 2019 1:48 pm

    I have been making some progress with using this module, which has given me problems in the past. The key thing is to make sure that you run the calibration routine for the Arduino regularly. (Not getting the full 0 to 360 degrees is a sure sign of this.)

    I have installed the LSM303 with its own Arduino and 16x2 LCD screen in a "water tight" box:



    The watertight box is something of an overkill but it was  good 3D printer practise! (It still needs an epoxy resin coating for water-tightness.)

    The compass reading goes as an i2c interface to the telemetry (also gives depth and battery voltage) Arduino via a 1m cable. (Still getting some transmission problems with this. Garbage appears on the screen after a few seconds.)

    David
    avatar
    C-3PO

    Posts : 4
    Join date : 2018-11-21
    Location : Northamptonshire UK

    Re: Compass bearing by Telemetry - LSM303 module

    Post  C-3PO on Thu Jan 03, 2019 10:59 pm

    Hi David,

    Are you using i2C Bus Pullup Resistors?

    Is your LSM303 an Adafruit, Pololu or something else?

    Are you using i2c for the LCD screen?

    Do you get the same issue with garbage data if you run the boards example code?

    Perhaps run the i2c scanner to confirm addresses of hardware...

    Regards
    Jonathan

    tsenecal
    Guest

    Posts : 111
    Join date : 2015-04-01

    Re: Compass bearing by Telemetry - LSM303 module

    Post  tsenecal on Fri Jan 04, 2019 3:27 am

    the original telemetry dingus i made that is/was documented over on subpirates used a pololu device that was a 3d compass and accelerometer to compensate for tilt in any direction...  it ran right next to the arduino pro micro, which was 2 inches from the receiver, and gave me reasonably accurate heading for the hour or so that i ran the sub at a regatta in california a few weeks after i built it.

    sadly, i haven't been keeping up on the telemetry side of things, and that dingus has been sitting in a drawer since i got back from that regatta...

    the exact part is still available from pololu:

    https://www.pololu.com/product/2127


    I may be assuming too much, but i would think that is what david is using..
    avatar
    C-3PO

    Posts : 4
    Join date : 2018-11-21
    Location : Northamptonshire UK

    Re: Compass bearing by Telemetry - LSM303 module

    Post  C-3PO on Fri Jan 04, 2019 7:53 am

    I have used various "compass" boards and found them all a bit frustrating apart from this one - CMPS11 ( now CMPS12) - Whilst expensive it is a solid as a rock.

    I notice having pasted the link that this is version 4 CMPS12 which I have not used.

    http://www.hobbytronics.co.uk/cmps-12-tilt-compass

    The CMPS12 has onboard Kalman filter's  - I can't remember the exact spec of the CMPS11 but if had an onboard buffer of some 25 reads or so to smooth the output
    avatar
    david f
    AMS Treasurer

    Posts : 2005
    Join date : 2010-11-10
    Age : 68
    Location : Cumbria

    Re: Compass bearing by Telemetry - LSM303 module

    Post  david f on Fri Jan 04, 2019 9:03 am

    Thanks for the advice Tim and Jonathan.

    The LSM303 IS a Pololu.

    I have fitted 4.7k pullup resistors to the i2c bus which also has the LCD connected.

    The i2c scanner shows the compass Arduino address but only intermittently.

    It is looking like a cable fault (I am using 1 m of audio coax) but your suggestion to run the example software is a nice one.

    I have also tried  a Honeywell compass module HMC5883L but that never gave good readings - maybe calibration issues again?

    I have found compass modules tricky. They work so well in phones!

    It is one of the few sensors which works underwater though.

    Thanks again,

    David
    avatar
    C-3PO

    Posts : 4
    Join date : 2018-11-21
    Location : Northamptonshire UK

    Re: Compass bearing by Telemetry - LSM303 module

    Post  C-3PO on Fri Jan 04, 2019 10:20 am

    Hi David,

    All part of the fun!

    I have been playing with a display for my telemetry. In it's early stages but designed to run via wifi on most web browsers so could be on a phone/tablet/pc

    No real data yet - just beginning to explore the concept



    Regards
    Jonathan

    tsenecal
    Guest

    Posts : 111
    Join date : 2015-04-01

    Re: Compass bearing by Telemetry - LSM303 module

    Post  tsenecal on Fri Jan 04, 2019 7:07 pm

    I am not using pullup resistors, but as i said, there MIGHT be 2" of wires between the compass module and the arduino. I was able to run the example arduino sketch, and the calibration sketch with zero issues.

      Current date/time is Sat Jan 19, 2019 6:58 pm