SOC-Meter Kit Hardware, Display, and Issues

My Nissan Leaf Forum

Help Support My Nissan Leaf Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
evnow said:
garygid said:
Just 2 wires, to Gnd and +5v, should light up "0000"
on the SparkFun "serial" LED 7-segment Display.
Are you getting that?
Yes - essentially the LED is behaving as if the baud rates are not synced (like you described earlier - with random charatcers showing up after a while). I'll check today whether avr studio 4 lets me run the code in debug mode.

It sounds like you might be having a problem w/ fuse settings ... my baud rates were all messed up when CKDIV8 was set in mine. If you can run avrdude

avrdude -c usbtiny -p at90can128 -U lfuse:r:lfuse.txt:h

(substitute your AVR programmer's name where i have usbtiny) it will dump your low fuse into lfuse.txt. Tell me what's in lfuse.txt and I'll let you know if your low fuse is set correctly.
 
My code has
//--- I N I T ---
// Clock prescaler Reset
CLKPR = 0x80;
CLKPR = 0x00;
DDRA =0xFF;

at the start of the main program.

But, you are using AVR-CAN board, right?
And it did work until you "re-wired", right?

My code includes this when BUT was being pressed at the 2-second mark:
Notice the delays that I use, they seem to make it reliable in Baud Setting.

//----------------------------------
// Init UART-1 at 57600 baud (for LED Display)
Uart_select( UART_1 );

//----------------
if( bSetBaudRate != 0 )
{
// raise LED Display UART speed to 57600 (0x7F=127, 0x06)

uart_init( CONF_8BIT_NOPAR_1STOP, 2400 ); DelayMsec(100) ;
uart_mini_printf ("v"); DelayMsec(100) ;
uart_putchar(0x7F); uart_putchar(0x06); DelayMsec(100) ;

uart_init( CONF_8BIT_NOPAR_1STOP, 4800 ); DelayMsec(100) ;
uart_mini_printf ("v"); DelayMsec(100) ;
uart_putchar(0x7F); uart_putchar(0x06); DelayMsec(100) ;

uart_init( CONF_8BIT_NOPAR_1STOP, 9600 ); DelayMsec(100) ;
uart_mini_printf ("v"); DelayMsec(100) ;
uart_putchar(0x7F); uart_putchar(0x06); DelayMsec(100) ;

uart_init( CONF_8BIT_NOPAR_1STOP, 14400 ); DelayMsec(100) ;
uart_mini_printf ("v"); DelayMsec(100) ;
uart_putchar(0x7F); uart_putchar(0x06); DelayMsec(100) ;

uart_init( CONF_8BIT_NOPAR_1STOP, 19200 ); DelayMsec(100) ;
uart_mini_printf ("v"); DelayMsec(100) ;
uart_putchar(0x7F); uart_putchar(0x06); DelayMsec(100) ;

uart_init( CONF_8BIT_NOPAR_1STOP, 38400 ); DelayMsec(100) ;
uart_mini_printf ("v"); DelayMsec(100) ;
uart_putchar(0x7F); uart_putchar(0x06); DelayMsec(100) ;
}

//----------------------------------------
uart_init( CONF_8BIT_NOPAR_1STOP, 57600 ); DelayMsec(100) ;
uart_mini_printf ("v"); DelayMsec(100) ; // clear the display
 
garygid said:
But, you are using AVR-CAN board, right?
And it did work until you "re-wired", right?
Yes & Yes. Anyway, I'll get to the bottom of this over the weekend.

BTW, why do you try all the speeds - we are not sure at what buad the LED will work ?
 
You do not know what speed it might be set to, and
there is no way to find out. The interface is one-way.

New, they are (usually) 9600 baud, but ... if it was used
and returned, or ??? ... so I try each possible Display
baud rate, and set the baud rate speed with each one.

I just finished F1.07 and have decided that the:
Red (left) push-button will be on PB5 (EXT2-29) and
Black (right) push-button on PB7 (EXT2-27).
Of course, the other side of both buttons goes to Ground (at EXT2-7).

Two seconds after boot-up, the uP checks the BUT (on-board button)
and the two push-buttons. If BUT is pressed, or if BOTH push-buttons
are pressed at that moment, the uP will include the Baud-Rate setting
of the Display in its startup sequence (right before the "F1.07" version
number is displayed.
 
garygid said:
We just need to locate the data and determine the scale factors.

So many bits, so little time! :D

Hi Gary, Team,
I got a 2012 LEAF a few months ago and I very interested in "hacking" some CAN data from the 3 main buses and cooperate with the group. I am an EE with quite a good amount of experience in SW and HW and I was wondering the fastest way to start reading and decoding data, without having to reinvent the wheel. It would greatly help me if you can point me to a HW that can help me reading the buses (e.g. AVR-CAN or other) and already decoded CAN messages. That would help me cutting a lot of time. I know that in this forum is a great amount of information all spread around but I was wondering if there is a place where the information may be summarized.

I am in San Jose, CA and have been working on my own EVSE design for my home.

Thanks to all!!! Santiago
 
sqnewton said:
Hi Gary, Team,
I got a 2012 LEAF a few months ago and I very interested in "hacking" some CAN data from the 3 main buses and cooperate with the group. I am an EE with quite a good amount of experience in SW and HW and I was wondering the fastest way to start reading and decoding data, without having to reinvent the wheel. It would greatly help me if you can point me to a HW that can help me reading the buses (e.g. AVR-CAN or other) and already decoded CAN messages. That would help me cutting a lot of time. I know that in this forum is a great amount of information all spread around but I was wondering if there is a place where the information may be summarized.

I am in San Jose, CA and have been working on my own EVSE design for my home.

Thanks to all!!! Santiago

Hey Santiago, welcome aboard! There are several Leaf-CAN projects ongoing but you might check in with Jim (Turbo3) who is also working on some cool stuff and is also in San Jose..

http://www.mynissanleaf.com/viewtopic.php?f=15&t=11914
 
GregH said:
sqnewton said:
Hi Gary, Team,
I got a 2012 LEAF a few months ago and I very interested in "hacking" some CAN data from the 3 main buses and cooperate with the group. I am an EE with quite a good amount of experience in SW and HW and I was wondering the fastest way to start reading and decoding data, without having to reinvent the wheel. It would greatly help me if you can point me to a HW that can help me reading the buses (e.g. AVR-CAN or other) and already decoded CAN messages. That would help me cutting a lot of time. I know that in this forum is a great amount of information all spread around but I was wondering if there is a place where the information may be summarized.

I am in San Jose, CA and have been working on my own EVSE design for my home.

Thanks to all!!! Santiago

Hey Santiago, welcome aboard! There are several Leaf-CAN projects ongoing but you might check in with Jim (Turbo3) who is also working on some cool stuff and is also in San Jose..

http://www.mynissanleaf.com/viewtopic.php?f=15&t=11914

Thanks Greg. I will!!! :) Q
 
For EVSE stuff, check out our OpenEVSE project, and the latest
Plus v2 board.
http://www.mynissanleaf.com/viewtopic.php?f=26&t=6546&hilit=open+evse" onclick="window.open(this.href);return false;
http://code.google.com/p/open-evse/wiki/Workshop_NOCAL" onclick="window.open(this.href);return false;
http://www.mynissanleaf.com/search.php?keywords=openevse&terms=all&author=&sc=1&sf=titleonly&sk=t&sd=d&sr=topics&st=0&ch=300&t=0&submit=Search" onclick="window.open(this.href);return false;


For CAN reading, there is a logging port for the SOC/GID-Meter and
my CAN-Do program and some posted logs. See my signature.
Try using the program to get a look at the logged CAN data.

The LEAF has 4 CAN buses, CAR, EV, AV and QC.
We have made logs of each bus separately, and of all together.
http://www.mynissanleaf.com/viewforum.php?f=44" onclick="window.open(this.href);return false;

For a project with two graphic touch screens, logging the EV
and CAR buses simultaneously, see CANary.
http://www.mynissanleaf.com/viewtopic.php?f=44&t=11557" onclick="window.open(this.href);return false;

Welcome aboard, try to link up with the bay area
LEAF owners' monthly Gatherings (meetings).

Try using Search to find stuff, or ask if you cannot find it.
 
garygid said:
Try using Search to find stuff, or ask if you cannot find it.

Thanks Gary! I checked some of your stuff and I am very impressed. :) Still digesting the information.

For the EVSE I read it and I got the information on how the J1772 works, so I am designing from scratch my own EVSE, rather than the already designed. I plan to add some nice features and change the design a little bit to include other features.

Regarding your CAN-Do/SOC I saw it and love it. Still trying to put all the pieces in my mind together from your website. Still have some questions but working on them. I may order a kit just to get started.

I will find more about the monthly meetings. By pure coincidence I met George Betak one day out in a cafe, but I haven't met anybody else who hacks and works on LEAFs. Eager to know what's going on with those messages...

Thanks! Santiago
 
Back
Top