Has anybody seen this behavior before. When the MediaTek MT3329 is hooked up I see some sort of noise in the read outs. Several of the indicator jump at a specific intervals. I’m able to run both the NMEA and MTK Binary test code ok and reports back correct information. There also seems to be a pause in the data stream when viewing the com port with serial monitor. The two test GPS programs kick back a fairly constant stream.
Background history, I had troubles first using the MTek for testing ArduPilot Meaga in binary mode. I needed to switch to it using the codes below found in link on the
store website.
Serial1.print("$PGCMD,16,0,0,0,0,0*6A\r\n"); // Custom binary protocol
OrSerial1.print("$PGCMD,16,1,1,1,1,1*6B\r\n"); // NMEA
Configurations
MTek in Binary mode – Same result
MTek in NMEA mode – Same resultUnhook MTek – sensors stabilize
ArduPilotMega
OilPANNo other hardware connected
Replies
In lines 678-680, change to this:
// Serial.print(GPS.Lattitude);
// Serial.print(",");
// Serial.print(GPS.Longitude);
Before I commented this out, instead of the configurator showing 1.2 in the upper left where it says Flight Software Version, it would show my GPS latitude. After commenting it out, it correctly shows 1.2 and there are no spikes in the sensor readings. I came upon this after looking at the code I had backed up from when I had everything working and going through all of the changes that had been made between the two. I am using the MT3329 GPS with the GPS_MTK library.
Thanks for the reply. I'm just a little overly enthusiastic with the project and the community. I love this stuff. I will hold tight until the official release. I might have to buy a second board so I bug the ArduPilot Megas guys also ;)
Cheers
Modified the cable going from the APM to the GPS adapter only discontenting the tx. Everything stabilized. I'm thinking I got my GPS in a unsupported or mode refresh rate ect... or the alpha software dose not understand the stream and is not decoding the signals from the GPS and AMP correctly (False positive). To further look into this using the APM_ADC_test with the following results. This is with the GPS tx hooked backup and is the only item hooked to the APM/OilPan no other RC equipment or sensors. If it matters its being powered VIA the mini usb connector on the OilPan.
Hope this helps anybody else seeing the same issue.
Cheers
Thank you for the reply, I will start tracking down that direction.
Still no joy? Something that would help debugging -- would it be possible for you to wire it up so that the GPS is powered, but the GPS tx line is not connected to 'mega rx? This will allow us to see if the GPS is simply drawing more current when it transmits or if current draw is because of the load the ATMega rx pin applies to the GPS tx.
I don't know how good Jordi is at mixed signal design. No offense to him. It is something of a black art usually practiced by people with long, gray beards and offensive social habits. Might be the changing GPS load is raising the ground and/or dropping the ADC reference voltage causing a change in measured values.
Are there loads on the GPS tx line other than the Arduino?
Other things to try:
1. If possible, reduce any other loads on the tx line of the GPS, keep the wires short.
2. Check connections of, possibly increase the value of the capacitors at power supply and / or the analog reference pin of ATMega.
3. Add a small capacitor 0.1 to 1uF, maybe 10uF, (keep leads short) right at the GPS. (Probably the best solution.)
4. Run the GPS wires a couple of turns through a small ferrite toroid. (Probably a good solution.)
5. Add a low value resistor (10-100 ohms?) in series with the GPS tx line. You'll need a scope for this, you need to reduce the load that the ATMega input capacitance puts on the GPS. You don't want to slow the response so much that you get comm errors. (Probably the worst solution.)
But before you attempt a mod, do check to make sure the caps on the power supply and analog reference are soldered well. That, and excessive load on the GPS tx line are my first guesses.