Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Duinomite, MOD-GPS and USB Issue?
Author | Message | ||||
ProdMuch Newbie Joined: 01/12/2013 Location: AustraliaPosts: 10 |
G'day all, I recently purchased a pair of DM Mega's and a pair of DM Mini's from DonTronics. I am impressed - very. I've had a Mini Maximite for a short while, and have been thoroughly drawn into this challenge. A big difference to the ever reliable MC6800 it all started with ... I've created a GPS logger using the MOD-GPS (also from Don), and save the data to a 32Gb uSD, while sending it to a PC over USB. That doesn't sound very scarey. I runs perfectly on the Min-Max, but on the DM Mega's and DM Mini's there appears an extra character sporadically. The character is a replica of the 8th one back, and is just enough to crash my program, and can cause OziExplorer to hiccup. Checksum on error lines is a mismatch to the calculated 'received' checksum. I've logged many hours of data, and have trawled through to discover that the aberration only occurs when the USB is connected. Ext power or USB power no difference. On battery only it is OK. DM's are running DM 4.4B. Also does the same with CAN build. MOD-GPS is running at 19200 (out of the box) Mini MM is running MM 4.4B. PC using Silicon graphics usb driver. Has anyone else seen this? Is it possible a USB 'keep-alive' interference? I can supply my MMBasic code if anyone is interested. |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 926 |
"Ext power or USB power no difference. On battery only it is OK." I don't have any specific experience with logging from GPS's but my experience in data logging with the "mites" is that you can experience a lot of noise from usb and wall warts hence the operation on battery is ok. Maybe some better DC smoothing is required. All the best Graeme |
||||
ProdMuch Newbie Joined: 01/12/2013 Location: AustraliaPosts: 10 |
The thing that points me away from the power is that it characters inserted are always the same as the one 8 back in the data stream - never corrupted. I have a few thousand of them. I've been playing with this since last weekend. I'm running it now just on a disabled USB as a power source. PuTTY is turned off and closed. The problem still persists. 30 in 15 minutes. I'm running it now just on a uninstalled USB as a power source. No data to and fro. It's still doing it. Now using a USB cable with a ferrite at the mini end. Still doing it! Thanks for the thoughts ... Next plan is to roll back through the MMB releases to see if it clears up. Dave. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
"The character is a replica of the 8th one back" That sounds very much like a smoking gun but I cannot guess what could be pulling the trigger! The 8th char is suspicious (the PIC32 has a 8-level deep FIFO receive data buffer) and the intermittent nature of the fault points to a timing issue. Does this character appear in the data that you log to the SD card? And, do you check the checksum on the data from the GPS? It would be useful to discover where the extra char is inserted (serial input or MMBasic or USB to your PC) so some experimenting might be needed. It might be worthwhile trying a different baudrate and/or a software based COM port (ie, COM1 or COM2) and checking if the characteristics of the fault change. Geoff Geoff Graham - http://geoffg.net |
||||
BobD Guru Joined: 07/12/2011 Location: AustraliaPosts: 935 |
Does it have the problem with external power and no usb cable? A usb cable, connected to a PC, still has 5 volts on it and it could be that which is causing your problem. That 5V goes into the MM processor on pin 34 to indicate that the usb is active. I assume that is also true of the DM. The usb port may be inactive (data) from the PC but not so from the DM point of view. |
||||
ProdMuch Newbie Joined: 01/12/2013 Location: AustraliaPosts: 10 |
G'day Geoff, Thanks for jumping onto this. Yes, it gets logged on the SD. My logging S/W also calculates the CS for the data as received. I flag it in the logs also, by adding ' X CC' to the end of the bad line. That makes it easy to find in Notepad - just hunt the 'X', which is not used in NMEA from the MOD-GPS. I use(d) the difference between the sent and recalculated GPS to determine what the character is, which makes the final hunt easier, also. It can be any of the printable chars, or a CR or LF. I've tried to be clinical about my diagnosis. I have worked in for Australia's national airways service provider as a Tech Officer for over 30 years. It is fair to say that I don't chase smoke where it isn't. But, when I do chase it I am reasonably certain of where it is coming from. Enough history ... The code receives a character, prints it to the console, and accumulates it into a string array. Once the last (RMC) sentence is received I extract the date and hour from the RMC to use for log and folder naming in the time between update data streams. There is a definite lag between the display of data, and the writing to the SD, and appropriate pauses after the write (green LED flash) until the start of the next update. I can let you have the code if you like. I will try different rates once I code the change instructions into the DM. More quiet research ... I believe in getting a solution that helps both provider and customer. That is a win-win. A couple of sample lines: $GPGSV,3,2,11,08,39,0648,32,15,33,249,33,01,19,117,26,24,11, 228,*76 X 4E $GPGGA,050844.000,3740.6799,S,14509.8149,E,1,07,1.2,98.0,M,- 3.3,M,,0000*68 $GP*GSA,A,3,09,08,15,28,01,07,26,,,,,,2.3,1.2,1.9*35 X 17 $GPGGA,050855.000,3740.67,99,S,14509.8149,E,1,08,1.1,98.0,M, -3.3,M,,0000*64 X 48 Dave. |
||||
ProdMuch Newbie Joined: 01/12/2013 Location: AustraliaPosts: 10 |
Bob, I've been through that path pretty thoroughly. On Ext supply or battery without USB it is all good. USB powered by USB plug in the Cig lighter is OK, too - no data happening. It is only when the data connection to a host PC/laptop exists. Thanks for your input though. Dave. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
Dave, I have had a look through the serial receive code and no issues pop out. If you can move the GPS to COM1 or COM2 that will be the acid test as the code is completely different to that for COM3 or COM4. Geoff Geoff Graham - http://geoffg.net |
||||
ProdMuch Newbie Joined: 01/12/2013 Location: AustraliaPosts: 10 |
Geoff, I did a search through the document: DuinoMite-UM-1-03.pdf for COM2; section 3.5 Arduino shields lists COM2 TX on Arduino.D5, and RX onArduino.D4. section 5.19 Serial Communication lists COM2 TX on Arduino D7 and RX onArduino.D6. The Open "COMn: statement agrees with sect 5.19. I am powering the MOD-GPS from Pins 2 (3V3) and 4 (GND) of Con 1. None of the above options are effective. I am also now running a Wi-Sys WS5012 GPS head at 4800 on COM3. I can bend it using some previously created code. That too exhibits the same behaviour. It also draws more supply current (80mA) than the MOD-GPS (40mA) as per spec's. I need to do some down time. I was at work until 0100, and have to be back in to do a remote assist at 1200. After that I might try to bend the MOD-GPS. I also suspect I have cooked the TX of my COM 3. DuinoMite-Mega-REV-C.pdf (schematic) refers to this as U2Tx? It is late. Thanks, Dave. |
||||
vk4tec Senior Member Joined: 24/03/2012 Location: AustraliaPosts: 239 |
Dave My MOD-GPS started to do odd things Put a buffer after your open com statement Open "COM1:19200,5024" As #1 http://www.thebackshed.com/forum/forum_posts.asp?TID=5383&KW =vk4tec I spent months on GPS loggers based on MM and DM I have worked on the NAS for the last 7 years RADAR DME NDB VOR ILS VHF UHF - Andrew - Andrew Rich VK4TEC www.tech-software.net |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
None of that makes any sense. I thought that you were using V4.4B of MMBasic on the mini Duinomite and in that case COM2 appears on pins 13 (Rx) and 14 (Tx) as per "DuinoMite MMBasic ReadMe.pdf". You must have that PDF if you downloaded V4.4B for the Duinomite. Geoff Geoff Graham - http://geoffg.net |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Gday Dave, What about if you run on EXTERNAL power and use a USB connector that has the 5V power source cut away? My suspicions are that the GPS is not getting the correct, or noisy, 3V3 (as you mentioned it is supplied by the DM) when on USB as the USB input supply often doesnt supply the correct 5V and is 4.7V or less by the time it gets to the `guts' of the DM. If the 5V is low then the onboard 3V3 (generated from the 5V) may be affected. Another thing to try is one of those USB `Y' cables, Plug the POWER USB into a suitable USB power pack and plug the `DATA' USB into your laptop... Also try a short, and FAT, USB lead Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
ProdMuch Newbie Joined: 01/12/2013 Location: AustraliaPosts: 10 |
Geoff, et al. When all else fails, including an over-tired brain, read the 'read-me'. COM2 is ticking over very nicely at 19200. 25 minutes trouble free. Same cables. Same power supply. Com2 has the MOD-GPS attached at 4800 (sucks 40 mA) and COM3 has my WS5012 attached, and not being processed (sucks 80mA), so a 3V3 load of 120mA. CO3 had 126 issues in 26 mins 15 secs. COM has had none for 25 minutes. Is this indicative of ... ? Dave. |
||||
ProdMuch Newbie Joined: 01/12/2013 Location: AustraliaPosts: 10 |
BTW I hadn't cooked COM3. A simple loop-back proved it as OK. Reading back through the posts a point of clarification is needed: I have 2 Mega's, 2 Mini's and a mini MaxiMite. On one of my Mega's COM2 has been running without blemish since my last post. Dave. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
Thanks for narrowing down the issue. It sounds as if it is in the hardware UART interface for COM3. I will set up a GPS simulator and see if I can reproduce the fault. Give me a few days as I have some other stuff to do first. Geoff Geoff Graham - http://geoffg.net |
||||
ProdMuch Newbie Joined: 01/12/2013 Location: AustraliaPosts: 10 |
No worries. I have stuff to do, too. Like work and sleep. BTW COM2 is still churning away, happily. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
Thanks to ProdMuch's help I have found and corrected the issue with extra characters in COM3's input. This zip contains a new version of DuinoMite MMBasic which fixes the issue. 2013-12-07_093544_DuinoMite_MMBasic_V4.4C_Beta_1.zip This version also fixes a problem with cheap composite monitors (of the type used with vehicle reversing cameras) where the video would roll up the screen. For people who have encountered this issue also attached are versions of MMBasic for the the monochrome and colour Maximites which contain this fix: 2013-12-07_094035_Maximite_MMBasic_V4.4C_Beta_1.zip 2013-12-07_094055_ColourMM_MMBasic_V4.4C_Beta_1.zip Geoff Geoff Graham - http://geoffg.net |
||||
ProdMuch Newbie Joined: 01/12/2013 Location: AustraliaPosts: 10 |
Geoff, Great job. Thanks. Over 6 hours on both Duinomite Mega and Mini. Both are running absolutely fine. My Mini MaxiMite is now running its 4.4C beta, as well. It's looking just as good as ever. Well done. Dave. |
||||
ProdMuch Newbie Joined: 01/12/2013 Location: AustraliaPosts: 10 |
Geoff, Almost 14 days trouble free on COM3, using DMM 4.4C b1. Thanks again. Dave. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
Great news, I believe that we can count that one as fixed. Geoff Geoff Graham - http://geoffg.net |
||||
Print this page |