Change Baudrate of MT3339 With Arduino (fixed)
by bram2202 in Circuits > Arduino
21958 Views, 11 Favorites, 0 Comments
Change Baudrate of MT3339 With Arduino (fixed)
I found a BIG problem with this method,
after you cut the power to the module, the baud rate resets its self to Factory setting.
You can connect a battery to de backup power, but this isn’t always practical
i'm going to try to fix this problem.
I’ve fixed the problem, and changed this instructable!
by using the orignal software of manufacturer.
I bought one, but could not get it working
finely I found out how to fix this,
and I wanted to share this if you ever want to do the same :)
Getting Started:
The project contains a Arduino, GPS Module, a bunch of sensors, a grafic LCD and a car :)
so I order one from EBay.
a MT3339 PA6C GPS
on the page said that the Baud rate of the Module was 115200.
I did not think I would matter, so I order the part.
After I received the part I hooked it up to my Arduino en protoboard.
I found 2 libraries for Arduino i could use with my GPS
- Adafruit: https://github.com/adafruit/Adafruit-GPS-Library
- TinyGPS http://arduiniana.org/libraries/tinygps/
Raw Data
and used no code at all.(GPS) RX --> (Arduino) 0
(GPS) TXS --> (Arduino) 1
(GPS) Power --> Arduino 3.3v
(GPS) GND --> (Arduino) GND.
void setup() {}
void loop() {}
The data I received in the Serial monitor (baud rate of 115200)
as you can see, there are some numbers, and a set of coordinates.$GPGGA,205743.000,5143.6835,N,00517.1311,E,1,7,1.02,0.8,M,47.2,M,,*5C
$GPRMC,205743.000,A,5143.6835,N,00517.1311,E,0.52,282.46,110813,,,A*64
I can figure out the speed on the basis of the data.
but I wanted to use the one of the Libraries.
Problems
(example file: Parsing)
I change the wires to match the input as in the Arduino File
But the data coming out of de Serial monitor was:
Adafruit GPS library basic test!
Time: 0:0:0.0
Date: 0/0/200
Fix: 0 quality: 0
no fixes or info whatsoever.
After a close look I found out that the GPS baudrate was set to 9600.
GPS.begin(9600);
I changed it to 115200, a set by the Seller.
to my despondent did dint work.
After some googling and probing I found out that the GPS baud rate was TO fast for the Arduino to handle.
So I had to bring I down to 9600.
Changing the Baud Rate
A Arduino can do this just fine, thanks to its onboard ATMEGA16U2.
Fist Load a Empty program on your Arduino:
void setup() {}
void loop() {}
Connect the wires:
(GPS) RX --> (Arduino) 0
(GPS) TXS --> (Arduino) 1
(GPS) Power --> Arduino 3.3v
(GPS) GND --> (Arduino) GND.
Download the file attached on this page, names "MT3339-Tool-and-Firmware.zip"
-Unpack the zip.
Warning!!
Although this is the official Software and Firmware from the manufacturer
you must pay attention to what you’re doing.
If not used properly, for example: selecting the wrong Agent or ROM you could brick
your GPS unit.
And am not responsible for your mistakes!
SO CHECK YOUR MODDEL NUMBER BEFORE FLASHING!
-Start up “PowerFlash.exe”.
-Click the “Download Agent” button. (See picture 1)
-Select “MTK_AllInOne_DA_MT3339_E3”.
-Click the “ROM” button.
-Go into the “MT3339” map and Select one of the 3 files:
the file names explain there properties
for example: AXN2.10_5013_3339_96.1151100.1
3339 = Model number.
96 = baud rate without the zeros (9600).
1 = 1 Hz.
You see I included the 115200-10Hz and the 38400-5Hz files as well,
just incase you want to go back to the High baud rate.
-Click "Connect"
.
-Click "Download"
-The program now run for a minutes or 2.
-After its din you will see the text
Or something like this (See picture 2)Flash Download]
Pass!!
Flash Type:[AMD] AM29DL640D/G, AM41DL6408G, S29JL064H
[Finish]
Take(57) secs to test.
-and finally hit “STOP”
-You can check this by Opening Arduino SDK, Opening the Serial Monitor, and setting the baudrate to 9600
(See picture 3)
-Pull out the power, wait a few seconds, en power it back up,
-now open the serial monitor again at 9600 baud rate.
u will see more date, even after its power down!
Downloads
DONE
even after power loss!
To check this again and have useful data, reload the Adafruit (parsing) example file.
reconnect the wires to the correct inputs.
Check the Baud rate is set to 9600
GPS.begin(9600);
Open the Serial monitor.
And if everything went as is should, the Serial monitor must display something like this:
Adafruit GPS library basic test!
Time: 21:24:35.0
Date: 11/8/2013
Fix: 1 quality: 1
Location: 5143.6821N, 517.1298E
Speed (knots): 0.44
Angle: 275.06
Altitude: -7.70
Satellites: 8