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

SOC-LCD-Meter "LeafCAN" with 2x16 Display by lincomatic

Thu Apr 26, 2012 8:22 pm

I finally got time to assemble the "LeafCAN" LCD SOC-Meter
(circuit designed and firmware programmed by "lincomatic").

Link: http://blog.lincomatic.com/?tag=can-bus" onclick="window.open(this.href);return false;

Chris H. did a board layout for the circuit and had a prototype
board made, and populated it before sending one to me.

So, thanks entirely to the work of these others, this new
2-line LCD version went together and workes flawlessly:

1. A 1st version prototype board from Chris (2nd is coming "soon"?),
2. Which came populated and already loaded with lincomatic's
"soc" firmware for using a 2 row by 16 character LCD display,
3. A white-on-black, 2x16 LCD display from SparkFun,
4. The box used for the SOC-Meter, with a larger slot for the LCD,
5. An "SOC-Meter" OBD cable.

I "assembled" this prototype SOC-LCD-Meter primarily to work better
with lincomatic and Chris, but also for testing an LCD as the display,
experimentation, and demonstrations.

I need to learn to compile and load new firmware for it,
but it seems to work quite well as it is.

I am looking forward to the next generation of this "LeafCAN" board,
and to testing the LCD in different lighting conditions.

When we find more CAN data to display, I hope that we can add
auto-switching between two (or more) CAN busses, some user-input to select display screens, logging via a USB port, etc.

Also, I would like to find a bezel or frame to fit the LCD,
since a simple rectangular hole lets the backlight shine through.

Any Ideas, suggestions, etc.?

No, it is not "in production" yet, but it could be if there is the demand.

Thanks, Sam (lincomatic) :) :)
Last edited by garygid on Mon Jun 04, 2012 6:29 am, edited 3 times in total.
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
Barbouri
Posts: 79
Joined: Mon Aug 09, 2010 6:41 pm
Delivery Date: 09 Dec 2011

Re: SOC-LCD-Meter "LeafCAN" with 2x16 Display

Sat Apr 28, 2012 2:58 pm

Digikey caries quite a few bezels for LCD displays.
http://parts.digikey.com/1/parts/680408 ... 02010.html

I would be interested in helping out with the "LeafCAN" project.

Greg C.
2015 SV White w/QC-LED
EVSE #1 OpenEVSE 32A L1/L2 RGB LCD display 7.2 KW
EVSE #2 OpenEVSE 16A L1/L2 VFD display 4-17-2012
http://code.google.com/p/diy-openevse/
2012 Silver Reserved: 5-14-2010

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: SOC-LCD-Meter "LeafCAN" with 2x16 Display

Wed May 16, 2012 6:47 am

Thanks.
Digikey: Only one 2.5" Bezel without lens in stock, and $2.34 each.
With lens about $2 more. A bit expensive perhaps.
However, a good suggestion, thanks.

------
The White-on-Black LCD works fine, but the character size is a
bit small for my old eyes. Also, the contrast is sometimes not
really enough for easy reading, and the viewing angle is critical.
So, the 4-digit LED characters (0.5" high) are substantially
easier to read at a glance. So, how often, while driving, does
one need to see several variables (and which ones)?

-----
Chris H. should have a "ver 2" SOC-LCD-Meter board by now,
so I am anticipating more features crammed onto the board,
maybe even two CAN transceivers and a USB port.

-----
In what way would you like to participate (or "play")?

What skills do you already have?
(PM me to get my email address.)

Or, would you like to learn?
(plenty of opportunity there)

Have you tried using CAN-Do?
(Get it at http://www.wwwsite.com/puzzles/cando/" onclick="window.open(this.href);return false; )
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
TomT
Posts: 10650
Joined: Sun Aug 08, 2010 12:09 pm
Delivery Date: 01 Mar 2011
Leaf Number: 000360
Location: California, now Georgia
Contact: Website

Re: SOC-LCD-Meter "LeafCAN" with 2x16 Display

Wed May 16, 2012 6:59 am

What I would like to see at the same time is % SOC, Gids, power/regen in Kw, and pack voltage.

garygid wrote:The White-on-Black LCD works fine, but the character size is a
bit small for my old eyes. Also, the contrast is sometimes not
really enough for easy reading, and the viewing angle is critical.
So, the 4-digit LED characters (0.5" high) are substantially
easier to read at a glance. So, how often, while driving, does
one need to see several variables (and which ones)?
Leaf SL 2011 to 2016, Volt Premier 2016 to 2019, and now:
2019 Tesla Model 3; LR, RWD, FSD, 19" Sport Wheels, silver/black; built 3/17/19, delivered 3/29/19.

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: SOC-LCD-Meter "LeafCAN" with 2x16 Display

Wed May 16, 2012 6:32 pm

TomT,
Well, this 2x16 LCD version of the SOC-Meter might be good for you.

The firmware that mine has shows %GIDs, GIDs, Pack Voltage (Volts),
and Pack Current (Amps). It should be easy to show
Pack Power (kW) instead of Current.

Maybe we can get more info from Chris about his next board,
I will ask.
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
Nekota
Posts: 616
Joined: Sat Dec 11, 2010 11:16 pm
Delivery Date: 12 May 2011
Leaf Number: 2182
Location: Sunnyvale, CA

Re: SOC-LCD-Meter "LeafCAN" with 2x16 Display

Thu May 17, 2012 12:45 am

I'm wondering if the 'mega' version of this chip ATmega2560 would be able to handle all 3 of the data streams from the can buss? There are new experimental serial drivers with adjustable buffer sizes which use C++ streams and provide data logging to a microSDHC. I can setup some serial simulations to test the I/O if some details about the data stream rates and data packet size can be provided. I consider a data packet to be the message + data followed by the terminator. The data writing to the microSDHC takes up to 250 milliseconds so buffering the inputs is needed.

Details on new library --> http://arduino.cc/forum/index.php/topic,85207.75.html" onclick="window.open(this.href);return false;
Res 20Apr2010 / Ordered 27Sep2010 / Delivered 12May2011

PV System

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: SOC-LCD-Meter "LeafCAN" with 2x16 Display

Thu May 17, 2012 10:22 am

The data stream from each CAN bus can be as much as about
one Message per milli-second.

I send a sync byte, two MsgID bytes, and 8 data bytes for
each message, for 11 bytes total, to CAN-Do, which adds
two bytes of time stamp (seconds and milli-seconds) to
each message, and a byte for the channel designation.

This gives 11 minus the sync byte, plus 3 = 13 bytes total to store.
When logging 3 buses at once, there could be 3 messages that
arrive at about the same time. For speed and compactness, I use
binary format, rather some form of text format.

Then, each minute, CAN-Do inserts a Date Time pseudo-message.

I set the Block Size to 64 bytes and Latency Timer to 4 ms when
using the high-speed drivers for the 4-port RS232 to USB adaptor.

So, if one has sufficient buffer, writing to the SD card might require
an average of 500 or so messages per second or about 7k bytes
per second. Not really very fast, but writing only 4 blocks per second
will require a block size of at least 2K and maybe 4K bytes.

Does any of this help?
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: SOC-LCD-Meter "LeafCAN" with 2x16 Display

Thu May 17, 2012 10:41 am

Update from Chris H:
I do not have any more Version 1, boards or components boards.

The Version 2 board is pretty much ready to go for prototype PCB. I added the FTDI USB components to one of the Serial ports. The second would still require a FTDI cable or external board I used the FT232RL chip that is standard in all the sparkfun/adafruit product. I have been thinking about changing it to the new FT230X chip which is a lot smaller and half the price. Maybe that should wait for 2.5 so I can get this thing out the door...
So, there is progress, but it appears that we will have to wait for a while.
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
Barbouri
Posts: 79
Joined: Mon Aug 09, 2010 6:41 pm
Delivery Date: 09 Dec 2011

Re: SOC-LCD-Meter "LeafCAN" with 2x16 Display

Thu May 17, 2012 12:34 pm

Hi Gary,
Here is another possible option for the display.
http://www.adafruit.com/products/823
It is an blue OLED 16x2 display with ultra-high contrast and any-angle readability.
They are pin/shape/code compatible with 'standard' HD44780 LCDs.
Image

Greg C.
2015 SV White w/QC-LED
EVSE #1 OpenEVSE 32A L1/L2 RGB LCD display 7.2 KW
EVSE #2 OpenEVSE 16A L1/L2 VFD display 4-17-2012
http://code.google.com/p/diy-openevse/
2012 Silver Reserved: 5-14-2010

User avatar
Nekota
Posts: 616
Joined: Sat Dec 11, 2010 11:16 pm
Delivery Date: 12 May 2011
Leaf Number: 2182
Location: Sunnyvale, CA

Re: SOC-LCD-Meter "LeafCAN" with 2x16 Display

Thu May 17, 2012 9:11 pm

Thanks Gary for the information of 7 Kbytes/sec. I understand that's the processed data stream but these messages that arrive at 1 millisecond rates, how many bytes in those? And the baud rate on the CAN buss -- is it a standard speed like 57,600 using a UART or does the CAN buss require a specific buffer/interface? Your answers have been very helpful and now for something new. Anyone looking at the Rasberry Pi? It is an ARM11 with 256Meg of memory, ethernet and HDMI interface and a couple of USB ports with enough processor power / decoding to play blu ray movies. It's about $35 and runs linux and uses python - check it out. http://www.raspberrypi.org/" onclick="window.open(this.href);return false;
Res 20Apr2010 / Ordered 27Sep2010 / Delivered 12May2011

PV System

Return to “LEAF CANBus”