• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Radio control by location

camerart

Active Member
Thread starter #41
Off hand, I can imagine a GPS or solid state compass doing what you want. The GPS might be more complicated and less sensitive for the yaw (vertical) axis. Most compasses come with accelerometers in the same plastic IC, In most cases, you can ignore what you done't want. I have experience with the BMC156, MPU9250, and AK8963. The MPU9250 actually incorporates the AK8963 as I recall. It is the most complicated to deal with as it requires both SPI and I2C for the compass.

My personal favorite was the AK8963. It was easy (SPI), sensitive (more than the BMC), and gave fast response. Response time is under user control as you control the number of readings being averaged. My code is Assembly and for an enhanced mid-range PIC (probably the 16F1829). I found its datasheet easier to understand than the BMC's too.

I have attached a zipped file of the MP4. Not sure I can upload MP4 here. Hope it works.

John (aka JP or J1 :) )

EDIT: I had forgotten that I wrote a short review of those 3 chips:
Hi J,
I'm now working on the Compass chip MPU9250.
I have the MPU-9250 Register Map and Descriptions Revision 1.4 and the AK8963 Data sheets, and as you say it's mighty complicated.

I think the best way to use it, is by using the FIFO, where each register must be pointed at, before READ. I don't think Oshonsoft can do this, and with previous modules, I READ each 8BIT address in quick succession.

Do you have any programs from when you used them, please.
C.
 

camerart

Active Member
Thread starter #42
Hi,
I found a starter program for the Compass, written in that foreign language Arduino, but I'm sure some of you can read it.;)

EDIT: I'm a bit puzzled whether it uses Ic2 or SPI, I want to use SPI.
EDIT: I added an interesting note, attached.
EDIT: I may have made a mistake adding the INO and ZIP files below! If so, I found them from searches using 'MPU-9259 SPI', google and Github.
C.
 

Attachments

Last edited:

camerart

Active Member
Thread starter #43
Hi,
On reading about the MPU-9250, I found that it needs both I2C and SPI to receive the DATA, so I'm now looking at the LSM303C which I hope will allow SPI only. Waiting for the ship to arrive.
C.
 

camerart

Active Member
Thread starter #46
Hi,
I have tried different compass modules, and failing to be able to program them mainly because I2C, seems to be needed somewhere in the program, even if SPI is used.

I am now looking at the AK8963C module, which appears to be programmable to use SPI.

The price choices are a breakout board for app £25, a 3x3mm chip for £5/each or 5x BGA chips for £4. I have ordered the challenging BGA type as I will need a number of them. Here's a pic. (They're small:eek:)

I'm going to attempt to make breakout boards for them.

Would someone please look at the D/S and let me know how VID connection is PIN is connected please? Or if there is a schematic?

C
 

Attachments

#47
It's just the CPU power voltage; if the CPU is 3.3V just connect VID and VDD to the same source.

It looks to be capable of running with lower voltage CPUs, so the SPI etc. can operate from a lower voltage than the main supply so the outputs do not exceed the CPU input voltage limits.
 

camerart

Active Member
Thread starter #48
It's just the CPU power voltage; if the CPU is 3.3V just connect VID and VDD to the same source.

It looks to be capable of running with lower voltage CPUs, so the SPI etc. can operate from a lower voltage than the main supply so the outputs do not exceed the CPU input voltage limits.
Hi R,
Thanks for the clarification.
C.
 

camerart

Active Member
Thread starter #49
Hi,
Hi,
Finding a compass module has been a bit of a puzzle. It needs to be SPI configured, which isn't always straight forward.
I found a likely one, used in iphones: AK8963C, but the breakout board, is quite expensive, so I decided to try to make my own.
Here is my breakout board:
I've got it working, now I need to get sensible compass READings out of it, here: https://www.electro-tech-online.com/threads/twos-compliment-in-oshonsoft.153076/

C.
 

Attachments

Latest threads

EE World Online Articles

Loading

 
Top