Remote control by location (PIC in Oshonsoft)

Thread Starter

camerart

Joined Feb 25, 2013
3,724
I bought the AK8963 already on a breakout board. Yes, it is more expensive, but it was working the day I received it too. If I were in production, of course I would buy the bare chip.
Hi J,
Do you have a link for the AK8963 breakout board, please?
C.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,724
This is what I used: https://www.mikroe.com/compass-2-click

There might be cheaper versions, like at Adafruit. SparkFun's version doesn't appear to be the AK8963.
Hi J,
Looking at the AK8963 Data sheet, it looks ok for SPI independent of I2C, so I searched for breakout boards with only that chip, but only found the one you used. I need at least 6 with usually some for future spares, and they will end up too expensive.

I found lots of outlets for the chip itself, so I thought I'd buy a few and see if I can make boards for them. The N version 2mmx2mm has pins around the perimeter, so the solder could be checked under a microscope, hopefully. I got mixed up and bought the C version, here's an image with dimensions, no chance!!

I also bought a couple of the different version, on a board see #238, they look promising.

EDIT: Just found this: https://oshpark.com/shared_projects/TKorNebl

C.
 

Attachments

Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi,
I thought I'd attempt to make a breakout board for the AK8963C.

I printed out the footprint and laughed. It's tiny.

Anyway, can someone look at the D/S please, and check VID. How is it connected?

C.
 

Attachments

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi,
I now have the answer to my question in #244

I have (hopefully) sorted out my program. So far I've added all of the modules except the compass (In the post)

So far I'm testing the GPS and the RADIO, where the NMEA sentence is being transmitted to a computer terminal (Teraterm) In the simulator, it appears to be working. In a live test I am seeing this on the terminal:
IN HIGH INTERRUPT 0
RX Err!
IN HIGH INTERRUPT 0
RX Err!
IN HIGH INTERRUPT 0
$GNRMC,110531.00,A,XXXXXXXXXXXXXXXXXXXXXXXXX,,,A*76
[12]ö[01]ÿ

IN HIGH INTERRUPT 0
RX Err!
IN HIGH INTERRUPT 0
RX Err!
IN HIGH INTERRUPT 0
RX Err!
Here is the program:
Can someone check between the '########################### lines, to see why it isn't filtering the correct sentence please? It should be looking at $GPGGA only.

Also there may be my mistakes in the same section with RETURNS and RESUMES.

Thanks, C.
 

Attachments

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi
Re #245
I get the impression that the $GNRMC is being saved in the RXI variables, then printed after receiving the correct $GPGGA sentence, because the $GNRMC RXI wasn't cleared???
C.
 

jjw

Joined Dec 24, 2013
823
It is still difficult to follow.
Can you explain shortly what the program should do.

There is goto skip1 and then return without corresponding gosub.
What is the purpose of the tmr1 interrupt?
Should there be rx interrupt?
 

jjw

Joined Dec 24, 2013
823
Hi
Re #245
I get the impression that the $GNRMC is being saved in the RXI variables, then printed after receiving the correct $GPGGA sentence, because the $GNRMC RXI wasn't cleared???
C.
I think the problem is in the high priority interrupt.
The tmr1 interrupt is happening very fast and rx interrupt is prevented. Why it is used?

Generally the interrupt routine should be short and all processing should be outside the interrupt.
Also you don't check what is the cause of the interrupt.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi I,
Firstly I've edited #1, hopefully it's clearer.

We are working on the RECEIVER at the moment.

There is no real program yet, only module testing.
I'm working through the modules in the order as LINE1, so far the HC-12 and the GPS is working, but with the errors as mentioned. I think there may be mix ups with RESUMES and RETURNS!

There have been a couple of major changes when I must have lost some sections of program.
1/The different way of receiving the NMEA sentences 'Around HSERIN CHAR'
2/Adding 18LF2520 to RECEIVER for PWM.

I can see that maybe there should be a TMR1 reset other than the one inside SKIP1, also slowed down.

The test at the moment is the GPS. The INTERRUPT is for jumping out of the MAIN LOOP to check either the GPS or TRANSMITTED DATA commented out (LATER).

There are a lot of loose ends regarding what will happen in TRANSMITTER and RECEIVER, but for now I just want to get the modules working, then once I get the feel of things, I can explain farther.
C.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi,
I'm trying to get a compass module working with little success.
I found that the SPI CKL doesn't appear to be working.
I get a flicker from an oscilloscope, here is a Logic analyser output.

Does anyone have clues as to why?
Camerart
 

Attachments

Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi,
Found the problem to the above problem :)
I changed the DIM BIT to a SYMBOL LAT

C
 

Attachments

Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi,
I've been trying to get sensible readings from any SPI module, with some success, but not 100%

While waiting for some AK8963 modules, I managed to get some readings from an HMC5983, shown here:

The TXT shows 2x BYTES from each of XY and Z registers, while turning the PCB round.

The AK8963 modules arrived and I made some Breakout boards for them, so I'll switch to these, as they look promising. (They're out of 'iphones' )

C.
 

Attachments

Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi,
For most of the time, the AK8963C compass gives sensible READings as (#254), but then switches to 00 00 00 or 255 255 255 255 255 255.
The READings sometimes correct themselves, or if turned OFF/ON then it mostly corrects.

The PCB #254 show 1xs Capacitor, some distance from the chip.

The PCB was a quick test to see if I could make one, and now I'm going to make more. Should I improve the first one.

Does anyone have suggestions where the problem lies please?

C.
 

Attachments

jjw

Joined Dec 24, 2013
823
I think the values in #254 are too small.
I converted some from twos complement and the values were:
x, y
- 203, 153
-233, - 117
-19, 150
If the values are 16bit, the range is +-32767
 
Last edited:

jjw

Joined Dec 24, 2013
823
I think the values in #254 are too small.
I converted some to twos complement and the values were:
x, y
- 203, 153
-233, - 117
-19, 150
If the values are 16bit, the range is +-32767
I might got this wrong.
+-32767 corresponds to 4192uT field strength, but Earth's field strength is only about 30-60uT.
Why is then 16bits used for the results?
 

Thread Starter

camerart

Joined Feb 25, 2013
3,724
I might got this wrong.
+-32767 corresponds to 4192uT field strength, but Earth's field strength is only about 30-60uT.
Why is then 16bits used for the results?
Hi I,
OK, let's assume for now that the READings are correct, but perhaps need adjusting. maybe we can come back to this point later.

My question in #255 is showing some sort of drop out. I'll concentrate on this first till I get consistent READings. I would like to know, if a circuit drops out, what could the reasons be? e,g, temperature, capacitance, maybe bad connections, so as I'm making new PCBs what should I change?
C.
 

Attachments

Top