[TangerineSDR] Magnetometer bring up issues

Dave Larsen kv0s.dave at gmail.com
Sat Jul 8 11:28:42 EDT 2023


Bob

A bit of history.  The original idea was to produce a single board that
could be used at either end of the link.  The issue with this is that the
common boards had parts that were generally non-informative.
For example, the LCL temp sensor is just the temperature of the board in
your radio shack.  The RMT is the temperature of the board in the mounting
tube outside and is used for temperature compensation for the PMI board.

For some reason the i2c addresses were moved during the final production of
the board and the local temperature sensor was removed to reduce cost.
The software can be changed as you display  above or through command line
switches.  See "runmag -h"

I hope this makes things a bit clearer.

Dave Larsen KV0S




On Fri, Jul 7, 2023 at 11:33 PM Bob Stricklin via TangerineSDR <
tangerinesdr at lists.tapr.org> wrote:

> I managed to get this working by forcing the proper address in the header
> files as shown below.  My guess is the developers had HAT pcbs and remote
> pcbs that had all the parts populated. The TAPR boards only have parts on
> the remote boards. The code is not dealing with this properly or I did not
> set some flag I was supposed to set.
>
> This is what makes it function:
>
> *device_defs.h*
>
> //-------------------------------------------
> // Address of the device changed N5BRG  7/7/2023
> //-------------------------------------------
> // #define RM3100_I2C_ADDRESS              0x20
> // #define RM3100_I2C_ADDRESS_7bit         0x20
> // #define RM3100_I2C_ADDRESS_8bit         0x20 << 1 // MBED uses 8 bit
> address
> #define RM3100_I2C_ADDRESS              0x23
> #define RM3100_I2C_ADDRESS_7bit         0x23
> #define RM3100_I2C_ADDRESS_8bit         0x23 << 1 // MBED uses 8 bit
> address
>
> *MCP9808.h*
>
> // MCP9808 Bus Address.
> //-----------------------------------
> //#define MCP9808_LCL_I2CADDR_DEFAULT         0x18       // alt: (selected
> by chip hardware 0x18 - 0x1F
> //#define MCP9808_RMT_I2CADDR_DEFAULT         0x19       // alt: (selected
> by chip hardware 0x18 - 0x1F
> // Changed N5BRG  7/7/2023
> #define MCP9808_LCL_I2CADDR_DEFAULT         0x1F       // alt: (selected
> by chip hardware 0x18 - 0x1F
> #define MCP9808_RMT_I2CADDR_DEFAULT         0x1F       // alt: (selected
> by chip hardware 0x18 - 0x1F
>
>
> I see the MEMORY chip is on a different i2c bus and don’t think I have
> this one function yet.  I figured the idea was to put calibration info in
> that chip.
> I plane to look a little more into that issue and get it working before I
> put the remote sensor in the ground.
>
>
> Bob N5BRG
>
>
> On Jul 7, 2023, at 4:29 PM, Bob Stricklin via TangerineSDR <
> tangerinesdr at lists.tapr.org> wrote:
>
> I am trying to get the TAPR supplied magnetometer working and having some
> problems.
>
> After cloning Dave's GitHub and running make I see this output:
>
> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ls
> CHANGES.txt  cmdmgr.h  device_defs.h  i2c.c  i2c.o    *logs*    main.h
> MCP9808.h      README.md  runMag.c  runMag.o       *runrun.sh*
> cmdmgr.c     cmdmgr.o  *docs*           i2c.h  LICENSE  main.c  Makefile
> metadata.json  *runMag*     runMag.h  *run-nopipe.sh*
> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* cat runrun.sh
> ./runMag -b 1 -j -M 23 -A 10 -c 400 -U 140 -Z >
> /home/web/wsroot/pipein.fifo
> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* mkdir test/
> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ./runMag -b 1 -j -M 23 -A 10 -c
> 400 -U 140 -Z > ./test/pipein.fifo
> ./runMag: invalid option -- 'U'
> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ./runMag -b 1 -j -M 23 -A 10 -c
> 400 -Z > ./test/pipein.fifo
> Error : I/O error reading temp sensor at address: [0x19].
> Error : I/O error reading temp sensor at address: [0x18].
> Error : I/O error reading temp sensor at address: [0x19].
> Error : I/O error reading temp sensor at address: [0x18].
>
>
> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ./runMag -M 23 -m
> "time", "rtemp", "ltemp", "x", "y", "z", "rx", "ry", "rz", "total"
> "07 Jul 2023 21:04:38", 15.1029, -19.0455, 45.8655, 134, -169, 407
> "07 Jul 2023 21:04:38", 15.0998, -19.0481, 45.8631, 134, -169, 407
> "07 Jul 2023 21:04:39", 15.0984, -19.0519, 45.8628, 134, -169, 407
> "07 Jul 2023 21:04:40", 15.0972, -19.0479, 45.8633, 134, -169, 407
> "07 Jul 2023 21:04:41", 15.0957, -19.0515, 45.8711, 134, -169, 407
> ^C
> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ./runMag -L 1f -l
> i2c_writebuf(): write(): Remote I/O error
> i2c_read read value.: Remote I/O error
>
> RM3100 REVID NOT CORRECT: RM3100 REVID: 0x0 <> EXPECTED: 0x22.
>
> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ./runMag -L 0x1f -l
> i2c_writebuf(): write(): Remote I/O error
> i2c_read read value.: Remote I/O error
>
> RM3100 REVID NOT CORRECT: RM3100 REVID: 0x0 <> EXPECTED: 0x22.
>
> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* ./runMag -L 0x1F -l
> i2c_writebuf(): write(): Remote I/O error
> i2c_read read value.: Remote I/O error
>
> RM3100 REVID NOT CORRECT: RM3100 REVID: 0x0 <> EXPECTED: 0x22.
>
>
> *pi at Fox-in-box-v3*:*~/rm3100-runMag $* sudo ./runMag -L 0x1f -l
> i2c_writebuf(): write(): Remote I/O error
> i2c_read read value.: Remote I/O error
>
> RM3100 REVID NOT CORRECT: RM3100 REVID: 0x0 <> EXPECTED: 0x22.
>
>
>
> Raspberry Pi 3B:  (Also tried a few other Raspberry Pi units.)
>
> used sudo raspi-config to activate I2C
>
> Then I edited /boot/config.txt to add:
>
>
> dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=28,i2c_gpio_scl=27
>
>
>
> *pi at Fox-in-box-v3*:*~ $* i2cdetect -l
> i2c-3 i2c       3.i2c                           I2C adapter
> i2c-1 i2c       bcm2835 (i2c at 7e804000)          I2C adapter
> *pi at Fox-in-box-v3*:*~ $* i2cdetect -y 1
>      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
> 00:          -- -- -- -- -- -- -- -- -- -- -- -- --
> 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1f
> 20: -- -- -- 23 -- -- -- -- -- -- -- -- -- -- -- --
> 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 70: -- -- -- -- -- -- -- --
> *pi at Fox-in-box-v3*:*~ $* i2cdetect -y 3
>      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
> 00:          -- -- -- -- -- -- -- -- -- -- -- -- --
> 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 70: -- -- -- -- -- -- -- --
> *pi at Fox-in-box-v3*:*~ $* i2cdetect -y 2
> Error: Could not open file `/dev/i2c-2' or `/dev/i2c/2': No such file or
> directory
> *pi at Fox-in-box-v3*:*~ $* i2cdetect -y 4
> Error: Could not open file `/dev/i2c-4' or `/dev/i2c/4': No such file or
> directory
> *pi at Fox-in-box-v3*:*~ $*
>
>
>
> Results:
>
> Looks like the magnetic sensors may be responding but the temp sensor is
> not responding to reads. The temp sensor does show up as a valid i2c
> address though.
>
> I noticed the memory chip on local and on remote is not responding with
> address A0 and this device in on the same i2c bus it seems. According to
> the data sheet
> without the jumper installed on WP it should be working in read mode. I
> put the jumper on and still do not see the device with i2cdetect -y 1. If
> this is not being used for
> anything else I would prefer to put the jumper on WP and allow it to be
> used in the ground after being buried. With WP pulled high the chip is
> still pulling 1 - 2 ma anyway.
>
> I would appreciate any comments on what else should be done to get this
> working so I can put the unit in the ground and get providing data.
>
>
> Bob N5BRG
>
>
> --
> TangerineSDR mailing list
> TangerineSDR at lists.tapr.org
> http://lists.tapr.org/mailman/listinfo/tangerinesdr_lists.tapr.org
>
>
> --
> TangerineSDR mailing list
> TangerineSDR at lists.tapr.org
> http://lists.tapr.org/mailman/listinfo/tangerinesdr_lists.tapr.org
>


-- 
KV0S - Dave Larsen
Columbia, MO, USA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tapr.org/pipermail/tangerinesdr_lists.tapr.org/attachments/20230708/780dd873/attachment-0001.html>


More information about the TangerineSDR mailing list