Go Back   EcoModder Forum > EcoModding > Instrumentation > OpenGauge / MPGuino FE computer
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 02-04-2009, 05:41 PM   #1 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Massachusetts USA
Posts: 84

Ziggy - '95 Audi S6 Sedan

Manfred - '97 Audi A6 Quattro Sedan
90 day: 20.61 mpg (US)

Clarabell - '03 Audi A4 Quattro Avant

Sherman - '98 Audi A6 Quattro Avant

Cab - '96 Audi Cabriolet
Thanks: 0
Thanked 2 Times in 2 Posts
Unable to Upload Sketch

I'm using the Fundamental Logic MPGuino Kit and I've been playing around with the v0.74 code modifying display screens, etc. It's been running just fine in my car for a couple of weeks.

After my latest change, I was no longer able to upload. Before, when uploading, the screen would go blank for a while and then reboot into the new sketch. Now, it just reboots back into the current sketch splash screen almost immediately after I start the upload. Arduino seems to sit waiting for something for a loooong time and then shows this error:

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I thought I might have damaged the bootloader or the FTDI drivers or something. I've spent the last 2 days searching the Web for a solution without success. Then I ran across a comment that said that when avrdude is uploading it listens to serial for a while before starting the upload. And that if there's serial being sent by the device, it will wait forever and finally timeout.

In Arduino, I turned on the Serial Monitor and sure enough, the MPGuino is sending this continually: "000.00,000.00,000.00,000.00,000.00"
I assume it's the instant data being sent in loop() using simpletx.

Here's the latest change that I made. I got tired of running through setup every time I plug in the MPGuino so I commented out this line at the beginning of loop():

// if(newRun !=1) initGuino();

This effectively causes the program to jump right into loop() without pausing for setup after rebooting. I'm guessing that when I upload now, avrdude listens to serial and sees data so never begins the upload.

My problem is that I can't stop the serial output without uploading a new sketch and I can't upload a new sketch without stopping the serial output.

I've tried clicking the buttons while starting the upload but it still reboots to the splash screen.

Has anyone had this problem before? Did you find a solution? Is there some way to pause the serial long enough to let avrdude do its thing?

Help!

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 02-05-2009, 10:57 AM   #2 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Massachusetts USA
Posts: 84

Ziggy - '95 Audi S6 Sedan

Manfred - '97 Audi A6 Quattro Sedan
90 day: 20.61 mpg (US)

Clarabell - '03 Audi A4 Quattro Avant

Sherman - '98 Audi A6 Quattro Avant

Cab - '96 Audi Cabriolet
Thanks: 0
Thanked 2 Times in 2 Posts
UPDATE: I was able to upload a sketch by pulling the ATmega out of the MPGuino and plugging it into an iDuino. The upload worked. Then I put the ATmega back into the MPGuino and it seems to run normally. The sketch has the serial data commented out. I confirmed that no serial data is now being sent.

Unfortunately, I still cannot upload to the MPGuino!

Since upload to the iDuino works, I assume that the PC side of the USB comm is functioning. The previous sketch was sending serial data and that data was visible in Arduino, so the serial send from the MPGuino is working. But I don't know if the MPGuino receive is working.

Any thoughts on how I can troubleshoot the USB connection on the MPGuino side?
  Reply With Quote
Old 02-05-2009, 11:18 AM   #3 (permalink)
Master EcoModder
 
Join Date: Nov 2008
Location: 18603, USA
Posts: 759

The Crimson Crawler - '04 Hyundai Elantra GLS
90 day: 36.71 mpg (US)
Thanks: 221
Thanked 60 Times in 45 Posts
Being that they were two different pieces of hardware, they may be on different COM ports. Make sure that the Arduino IDE is on the right COM for the MPGuino.
  Reply With Quote
Old 02-05-2009, 05:24 PM   #4 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Massachusetts USA
Posts: 84

Ziggy - '95 Audi S6 Sedan

Manfred - '97 Audi A6 Quattro Sedan
90 day: 20.61 mpg (US)

Clarabell - '03 Audi A4 Quattro Avant

Sherman - '98 Audi A6 Quattro Avant

Cab - '96 Audi Cabriolet
Thanks: 0
Thanked 2 Times in 2 Posts
Thanks. Yes, I learned early on to do that. Every time I plug in the USB cable, I check the Windows Device Manager to see what port was just assigned. Then I select that port in the Arduino Tools/Serial Port menu.

Since the iDuino uploads without fail and the MPGuino doesn't, I suspect something wrong on the MPGuino. Could be a short but I suspect something messed up in the FTDI chip. I've read that the EEPROM in that chip can be corrupted. I'll have to search for a fix.

At least I have a workaround. It's a hassle to keep pulling the chip every time I want to update the code but it's doable.
  Reply With Quote
Old 02-06-2009, 09:08 AM   #5 (permalink)
Master EcoModder
 
Join Date: Nov 2008
Location: 18603, USA
Posts: 759

The Crimson Crawler - '04 Hyundai Elantra GLS
90 day: 36.71 mpg (US)
Thanks: 221
Thanked 60 Times in 45 Posts
Check this out:


Arduino Forum - bad brownout changes lock bits? unable to re-d/l
  Reply With Quote
Old 02-06-2009, 10:42 AM   #6 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Massachusetts USA
Posts: 84

Ziggy - '95 Audi S6 Sedan

Manfred - '97 Audi A6 Quattro Sedan
90 day: 20.61 mpg (US)

Clarabell - '03 Audi A4 Quattro Avant

Sherman - '98 Audi A6 Quattro Avant

Cab - '96 Audi Cabriolet
Thanks: 0
Thanked 2 Times in 2 Posts
Thanks for the link. I'm getting by for now swapping the chip back and forth while I wait for my USBtinyISP to arrive. Since the chip works just fine on another board, it has to be something on the MPGuino. I'll mess around with the FT232RL and see if I can reset to factory default settings.

  Reply With Quote
Reply  Post New Thread




Similar Threads
Thread Thread Starter Forum Replies Last Post
MPGuino release one workspace dcb OpenGauge / MPGuino FE computer 1061 01-17-2020 02:37 AM
Open Source electric conversion information bennelson Fossil Fuel Free 8 02-14-2009 12:23 PM
Spiffie MPGuino v2 won't load Ecodriver OpenGauge / MPGuino FE computer 11 12-14-2008 05:37 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com