Weird stuff with MTek and ArduCopter.

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

Or

Serial1.print("$PGCMD,16,1,1,1,1,1*6B\r\n");  // NMEA

 

Configurations


MTek in Binary mode – Same result

MTek in NMEA mode – Same result
Unhook MTek – sensors stabilize 


ArduPilotMega

OilPAN


No other hardware connected


You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Commenting out the serial print gps latitude and longitude lines in arducopter.pde fixed the problem for me.

    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.
  • Starting with r53 of the arducopter code, if I include the GPS_MTK.h library in the arducopter.pde, I would get spikes in my accelerometer readings. It goes away if I use the GPS_NMEA.h. Before r53, I didn't have a problem with the GPS_MTK library...the GPS would get a lock and LED C would light up on the IMU to confirm
  • Jani,

    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
  • Update,

    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
  • Ken,

    Thank you for the reply, I will start tracking down that direction.
  • Very interesting. Looks like each time the GPS transmits, the increase in current draw is affecting the analog circuitry. You didn't do anything that would make the serial input line an output and cause it to draw lots of current when driven, right? Have you done a thorough visual on the 'mega? Make sure that power supply caps are present, correctly placed, and soldered. On both ends. ;)

    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.
This reply was deleted.

Activity

DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
19 hours ago
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Friday
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Friday
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Friday
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Friday
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23
DIY Robocars via Twitter
Oct 23
DIY Robocars via Twitter
Oct 19
DIY Robocars via Twitter
Oct 18
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13
DIY Robocars via Twitter
RT @araffin2: 🏎️ After hours of video editing, I'm happy to share a best of my Twitch videos on learning to race with RL. 🏎️ Each part is…
Oct 13
More…