User avatar
garygid
Gold Member
Posts: 12469
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: Flashing the AVR-CAN board

Mon Jun 27, 2011 9:23 pm

Yes, the 10 to 14v of the Vehicle "12v" system is really too much for the AVR-CAN, so we will probably add a 7808 (8v) regulator or a 5-volt zener diode.

A typical "5v" USB source is a bit low, and a 9v source is a bit high. Maybe a 9v source with a 2v or 3v zener diode?
See SOC/GID-Meter and CAN-Do Info
2010 Prius
2011 LEAF, 2014 Tesla S85
2018 & 2019 Tesla Model 3
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
Craigslist: Xm5000Li Electric Motorcycle

User avatar
evnow
Moderator
Posts: 11480
Joined: Thu Apr 22, 2010 11:41 am
Delivery Date: 25 Feb 2011
Leaf Number: 303
Location: Seattle, WA

Re: Flashing the AVR-CAN board

Mon Jun 27, 2011 9:33 pm

garygid wrote:Yes, the 10 to 14v of the Vehicle "12v" system is really too much for the AVR-CAN, so we will probably add a 7808 (8v) regulator or a 5-volt zener diode.

A typical "5v" USB source is a bit low, and a 9v source is a bit high. Maybe a 9v source with a 2v or 3v zener diode?
I was actually just referring to flashing the avr-can when away from the car - in that case we can use one of those phone chargers.

Is the overheating happening in your avr-can alone or others as well ?
1st Leaf : 2/28/2011 to 5/6/2013
2nd Leaf : 5/4/2013 to 3/21/2017
Volt : 3/25/2017 to 5/25/2018
Model 3 : 5/10/2018 to ?

User avatar
garygid
Gold Member
Posts: 12469
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: Flashing the AVR-CAN board

Mon Jun 27, 2011 10:20 pm

The "overheating" is just a very-hot small regulator chip on one corner of the board.

We think it happens on all/most boards, because we are feeding 14v (from the OBD connector) rather than 9v or less as stated in the specifications.

It is aggravated by adding the LED display board that essentially doubles (?) the current draw from the card's regulated 5-volts.

We should check the voltage and current ratings of that regulator chip itself.
See SOC/GID-Meter and CAN-Do Info
2010 Prius
2011 LEAF, 2014 Tesla S85
2018 & 2019 Tesla Model 3
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
Craigslist: Xm5000Li Electric Motorcycle

User avatar
garygid
Gold Member
Posts: 12469
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: Flashing the AVR-CAN board

Thu Jun 30, 2011 5:54 pm

DRAT!
The programmer board PGM-09825 from www.SparkFun.com that evnow suggested is an ISP programmer, not a JTAG programmer! The 2x5 pin header socket made me think it was for JTAG, and I did not read closely enough, I guess.

So, I have two of these $15 boards. If anybody can use them, please let me know.
See SOC/GID-Meter and CAN-Do Info
2010 Prius
2011 LEAF, 2014 Tesla S85
2018 & 2019 Tesla Model 3
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
Craigslist: Xm5000Li Electric Motorcycle

User avatar
garygid
Gold Member
Posts: 12469
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: Flashing the AVR-CAN board

Thu Jun 30, 2011 6:07 pm

YEA!
I got the AVR-JTAG boards from Ebay to work, using AVRdude. They use an RS232 connection to the PC, and some USB-to-RS232 cables only work (connect with this card) about 1 out of 42 times. Unknown why, perhaps a byte-timing issue.

However, my two "better" USB-to-RS232 adapters work EVERY time.

The "don't-work-with-PGM-09825-board" USB-to-RS232 adapters appear to work fine with transporting CAN-message data from the AVR-CAN board to the PC, which is what we originally got them for.
See SOC/GID-Meter and CAN-Do Info
2010 Prius
2011 LEAF, 2014 Tesla S85
2018 & 2019 Tesla Model 3
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
Craigslist: Xm5000Li Electric Motorcycle

User avatar
evnow
Moderator
Posts: 11480
Joined: Thu Apr 22, 2010 11:41 am
Delivery Date: 25 Feb 2011
Leaf Number: 303
Location: Seattle, WA

Re: Flashing the AVR-CAN board

Thu Jun 30, 2011 6:13 pm

garygid wrote:DRAT!
The programmer board PGM-09825 from http://www.SparkFun.com that evnow suggested is an ISP programmer, not a JTAG programmer! The 2x5 pin header socket made me think it was for JTAG, and I did not read closely enough, I guess.

So, I have two of these $15 boards. If anybody can use them, please let me know.
Hmmm .... I just got the board as well. :(
1st Leaf : 2/28/2011 to 5/6/2013
2nd Leaf : 5/4/2013 to 3/21/2017
Volt : 3/25/2017 to 5/25/2018
Model 3 : 5/10/2018 to ?

User avatar
garygid
Gold Member
Posts: 12469
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: Flashing the AVR-CAN board

Thu Jun 30, 2011 6:38 pm

As it is, configured for ISP instead of TJAG, do NOT plug its 10-pin connector into the AVR-CAN board and try to apply power! The +5v of one or both cards will be shorted to ground. :(
See SOC/GID-Meter and CAN-Do Info
2010 Prius
2011 LEAF, 2014 Tesla S85
2018 & 2019 Tesla Model 3
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
Craigslist: Xm5000Li Electric Motorcycle

User avatar
tomsax
Posts: 105
Joined: Wed Apr 21, 2010 2:33 pm
Delivery Date: 21 Sep 2011
Leaf Number: 8847
Location: Sammamish, WA

Re: Flashing the AVR-CAN board

Fri Jul 01, 2011 10:44 am

I got my Olimex AVR-CAN board from Sparkfun on Wednesday. Cathy had a JTAG ICE (one of the original models before Mark II), so I thought I was set for a programmer. It can talk to the chip and read/write fuse bytes, but every attempt to program the flash using avrdude version 5.10 (Mac OS X) fails with a content mismatch message at offset 0x0000. If I dump the flash memory, it's all zeros. I tried everything: powering it from the board, from an external source at various voltages, messing with the bit rate, and using multiple different binary file formats. They all fail with the same problem: all zeros.

I am able to program it with an AVR ISP programmer by pulling all of the needed pins out of the various headers. That didn't work at first because the ISP progamming doesn't use the MOSI and MISO pins, instead it uses PE0 for MOSI and PE1 for MISO. (See the AT90CAN manual, section 25.7.2. Cathy is a genius for figuring this out.)

Unfortunately, the six pins you have to pull out are spread across all three of the breakout headers, so it's a bit of a rat's nest when it's all wired up.

Code: Select all

ISP signal  header   pin
----------  ------   ---
GND         JTAG      2
+5V         JTAG      4
!RESET      JTAG      6
MISO (PE1)  EXT1     14
MOSI (PE0)  EXT1     15
SCK (PB1)   EXT2     33
Using the same avrdude command (with just the programmer part changed) works perfectly every time.
Tom Saxton
Sammamish, WA

User avatar
davewill
Posts: 5083
Joined: Thu Mar 17, 2011 6:04 pm
Location: San Diego, CA, US

Re: Flashing the AVR-CAN board

Fri Jul 01, 2011 10:55 am

tomsax wrote:...They all fail with the same problem: all zeros...
It's a kind of a dumb question, but could it possibly be skipping the erase? Can you try doing a separate erase first?
2014 Rav4 EV, Blizzard Pearl White
2011 LEAF SL w/QC, Blue Ocean, returned at end of lease

User avatar
tomsax
Posts: 105
Joined: Wed Apr 21, 2010 2:33 pm
Delivery Date: 21 Sep 2011
Leaf Number: 8847
Location: Sammamish, WA

Re: Flashing the AVR-CAN board

Fri Jul 01, 2011 6:09 pm

davewill wrote:
tomsax wrote:...They all fail with the same problem: all zeros...
It's a kind of a dumb question, but could it possibly be skipping the erase? Can you try doing a separate erase first?
I tried, that's not the problem. The erase always happens when you write flash, if you don't ask for it avrdude warns you it's doing it anyway, and you always get a message while the erase is happening. There's definitely something wrong with the JTAG ICE Mark I and the AT90CAN128 (or perhaps the AVR-CAN board).

Really I just posted to let people know it can be programmed from an ISP programmer since I saw that a number of people bought an ISP programmer.
Tom Saxton
Sammamish, WA

Return to “LEAF CANBus”