User avatar
surfingslovak
Vendor
Posts: 3809
Joined: Mon Jun 13, 2011 1:35 pm

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Mon Oct 01, 2012 11:42 pm

TonyWilliams wrote:Is this product available?
We had a prototype in Phoenix, it came straight from Turbo3 (thanks again).

User avatar
TonyWilliams
Posts: 10091
Joined: Sat Feb 19, 2011 1:48 am
Location: San Diego
Contact: Website

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Mon Oct 01, 2012 11:45 pm

surfingslovak wrote:
TonyWilliams wrote:Is this product available?
We had a prototype in Phoenix, it came straight from Turbo3 (thanks again).
Crap, that obviously slipped me checking it out. I would like to buy one, when available.

Thanks, Turbo3, for lending us your stuff. It was a pretty awesome group effort.

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Fri Oct 12, 2012 5:33 pm

I have finally completed building up 12 sets of cables which was the missing item I needed before I could sell the units.

I will be at the Union City Bayleaf meeting tomorrow with seven units for sale (three Basic and four with Bluetooth).

Price is $199 for the Basic and $20 more for the Bluetooth option.

Please email me at WattsLeft.Meter@gmail.com if you are interested in getting one tomorrow and having it installed. I can also email you back a one page Quick Guide with the current set of screens. Please use this email address for ordering and to request the Quick Guide.

Thanks to Steve my beta tester for his suggested improvements.

Regards, Jim

User avatar
linkim
Posts: 495
Joined: Thu Dec 16, 2010 5:06 pm
Location: Silicon Valley

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Sun Oct 14, 2012 7:47 am

Purchased a WattLeft Monitor from Turbo3 at the SF BayLEAFs meeting on 10/13. Now I can see the Gid reading on my LEAF. Left meeting in Union City with reading of 68.7%, 193 gids and arrived in SF with 24.5%, 69 gids (2 bars and 13 GOM miles) - distance of 39 miles. Overnight charged on L1 to a reading of 98.2%, 276 gids, which suggests my battery is still not showing degradation problems. The ODO on my LEAF is 7981 miles, with no QC, infrequent 100% charge, highest battery bars observed is 6, and LEAF is mainly driven on surface streets.

This morning where I was in SF, the temp is now bout 57F, and the car was outside covered with condensation from the fog. Looking at the dashboard, the readings were 12 bars and GOM of 89 miles. Yesterday morning in Cupertino with LEAF charged to 100%, readings were 12 bars and GOM of 116 miles.

Now I can add more data to my spreadsheet.
LEAF SL + QC
Reserved: 4/20/10
Received: April 19, 1 year after reservation

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

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Sun Oct 14, 2012 8:32 am

Jim,
Really Great work!
Do we get soe more pictures, of the finished
proguct, inside, with and without BlueTooth, and outside.

Does this only Log with BlueTooth?

Does the Bluetooth receiver in the PC present a
virtual Comm Port that CAN-Do could conect to?

How would one set that connection up, and
what BT dongle do you recommend for the PC?

Is the Logging data stream compatible with CAN-Do?

If not, what data format did you finally decide to use?
Or, is there an option for the data stream contents?

I look forward to seeing, and trying to Log with,
your nifty device.

Again, Splendid Work!
Thanks, Gary
See SOC/GID-Meter and CAN-Do Info
2010 Prius, now for sale
2011 LEAF, sold in 2015
2018 Tesla Model 3
2014 Tesla S, Model 3 in 2019
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

bradbissell
Posts: 265
Joined: Tue Mar 13, 2012 5:47 am
Delivery Date: 29 Mar 2013
Leaf Number: 404629
Location: Boston, MA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Mon Oct 15, 2012 6:39 am

I too would love to see the final product prior to purchase. Some questions: How long is the cable, where does the unitfit? What lcd did you use (sunlight compatible yellow, or blue?).

Thanks!
Silver/Black 2013 SV Manufactured, Leased March '13, Returned Dec '15
Silver/Dark Ash 2016 Volt LT

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Mon Oct 15, 2012 4:51 pm

Here is a little more detail about the current product and installation.

A complete WattsLeft™ consists of the Display/Electronics unit, the rotary Selector and OBCII right angle connector with one long cable going to the Display and a shorter cable going to the selector. The long cable is about 6’ 10” and the short cable is about 3’ 1”. Starting raw cable lengths are 7’ and 3.5’ before being attached at both ends.
Image

If necessary for installation (advanced type) the Display/Electronics unit can be disconnected from the cable by removing the cable clamp screw and carefully removing the eight pin connector. The orange Power wire is always closest to the side edge. Don’t get that wrong or you will drive +12 volts into the CAN transceiver and load the Car EV CAN down trying to run the electronics/display!

In this backside shot you can see the reset button just below the black 8 pin connector. When you have the Bluetooth module the outer plastic ring will pulse pink when looking for a connection and will stay solid pink when a connection is made. This will happen independent of whether any EV data is being sent.
Image


Here are some pictures of the first customer install. The simplest install is to put the unit in the center of the dash above the Navigation screen and angled towards the driver. The wire runs down the left side of the center black control panel.

Here is an overview shot.
Image

Close-up of display unit.
Image

Close-up of selector unit. Note cable still needs to be moved to the right and should follow the seam on down.
Image

Close-up of underside of dash. Note that the cables from the OBDII connector are routed inside the removable panel to keep them clear of the driver’s feet. There is also sufficient slack in the OBDII cable to allow it to be unplugged without the need to remove the lower panel again. Nissan will need access to the OBDII connector to do any service so it is a good idea to unplug it before going in. Note unplugging the connector will power down WattsLeft™ and all History data will be LOST! So write it down before unplugging.
Image

A more advanced installation would pull the center dash unit out (with Nav screen) so the cable can be route directly down so it does not show. A small amount of filing may be needed on the gray plastic lip so the cable does not get pinched or block the center dash unit from being pushed back in place.

Here is a close-up of the top side of the electronics board. Note that this board has two CAN transceivers for testing but the shipped board will only have one installed (EV CAN). There is currently no firmware to support the Car CAN bus.
Image

Now the back side without the Bluetooth module installed.
Image

Here it is with the Bluetooth module installed.
Image

Set of completed boards with display units attached ready to be install in cases.
Image

Here are the eight completed assemblies. Note that only three have LEDs installed the other five will get LEDs when they are installed in the cases.
Image

Now for Gary’s questions:

The current product only supports logging EV activity over Bluetooth. However when Bluetooth is not installed different firmware is install to support a hardwired serial port. If you look closely at the back of the board just below the top left corner hex plastic standoff and above the black Bluetooth connector you can see two pins. Top one is ground and lower one is serial data. Just connect it to a DB9 to get a hardwired serial port. But I recommend spending the extra $20 and getting Bluetooth as you avoid the cables and connectors. The polarity of the serial data is opposite between hardwire and Bluetooth so different firmware is needed.

Yes the Bluetooth shows up as a virtual Comm Port on the PC. I have used it with the CAN-DO program to log EV data. Baud rate is 57,600. I send two extra bytes at the end which are the original CRC data and ignored by CAN-DO. It would be nice if CAN-DO had an option to accept only CRC validated data. But the first few bytes of the CAN-DO format need to be rearranged inside the PC to match the original CAN format for the CRC to match.

The format I send is 13 bytes (CAN-DO is 11 bytes). First 11 bytes are the same as CAN-DO so you can use Gary’s program. Format is: SYNC, MM, NH, Data 0 thru Data 7 followed by two bytes of original CRC. For the CRC to match the MM, NH bytes need to be rearranged back into the original three bytes send from the EV CAN bus (0H, MM, 0N). The ID data is represented as HMM and N refers to the data count. Note that only eight byte data frames are passed thru so N always equals 8. SYNC= 0x53 xor MM xor NH.

My PC has Bluetooth installed so no dongle. I would think any dongle should work as this is basic serial.

As shown in earlier pictures the LCD is Blue with White characters. I have found that if I leave the protective film they ship with it ON it acts as a ¼ retarder and allows the display to be view with polarized glasses. Since this was not the intended purpose of the film the manufacturer just slapped it on so small bubbles are unavoidable in the finished product. I don’t see them when the display is ON but if they bother you you can always remove the film.

I think that takes care of all the current questions.

I am currently working on a small firmware updated to allow better control of the LED by disabling it on certain screens. The change will allow it to function only on the 1st screen (SOC) and the 5th screen (DTE-V) and 6th screen (DTE-T).

Jim

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

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Tue Oct 16, 2012 11:53 pm

If you tell me how to check the crc data, I could add in CAN-Do
a CRC Mode (2 additional bytes), and a Check CRC option
to discard messages that do not have a good CRC check.

As it is, CAN-Do has to try to re-sync twice after each of your
Messages (that have the CRC bytes appended).
See SOC/GID-Meter and CAN-Do Info
2010 Prius, now for sale
2011 LEAF, sold in 2015
2018 Tesla Model 3
2014 Tesla S, Model 3 in 2019
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Thu Oct 18, 2012 12:54 pm

Use the following procedure to verify the received data is good.

The received frame consists of 13 bytes:
SYNC, MM, NH, D0, D1, D2, D3, D4, D5, D6, D7, CRCH, CRCL

First these bytes need to be rearranged to match the order used to generate the appended CRC. SYNC is not used so it is dropped. Two bytes contain less than 8 bits so the notation “(n)” following the byte indicates the number of actual bits used right justified.

H(4), MM, N(7), D0, D1, D2, D3, D4, D5, D6, D7, CRCH, CRCL (total of 99 bits)

Technically H(4) could be H(3) since H ranges 0 to 7 but for this calculation the fourth bit represents the SOF bit which is always 0. However starting zeros before H do not affect the CRC calculation.

N(7) recreates the RTR,IDE,RB0 & DLC bits. We actually only have the DLC (Data Length Code) bits but the other three bits are always zero so loading a byte with N works for this recreation. Only the low order seven bits of this byte are used in the CRC calculation.

Now that we have our 99 bits in the correct order each bit is processed in MSB to LSB order (keeping in mind that two bytes have less than 8 bits) through the CRC generator polynomial.

The generator-polynomial is: X15 + X14 + X10 + X8 +X7 + X4 + X3 +1

For this I use a 16 bit unsigned integer variable cleared to zero at the start. At the end of processing all 99 bits this variable should contain the value 0x4599. (Ok, you think it should be zero at the end but the 99th bit is not really part of CRCL. CRC is really only 15 bits. The LSB of CRCL is actually the “Delimiter” bit which is always a 1. If you stopped at the 98 bit this variable’s low order 15 bits would be zero with the 16th MSB bit either 1 or 0. I just run the delimiter bit through which results in 0x4599 being the final ‘good’ value. If you stop one bit earlier you need to mask off the MSB bit to get zero.)

On the PC I use the following Turbo Pascal 3 code (Turbo3) to process each bit. The procedure is passed the bit to process as the LSB of newbit. CRC is the 16 bit variable.

Procedure GENCRC (newbit:integer);
Begin
crc:= crc shl 1;
If (crc and $8000)<>0 then newbit:=newbit XOR 1;
If newbit<>0 then crc:=crc XOR $4599;
End

First crc is shifted left one bit then the MSB is tested and if a one the bit being processed is inverted. Lastly original or inverted newbit is tested to see if it is a one. If the newbit is now a one the current value in the crc variable is XORed with 0x4599 (the generator-polynomial).

Here is an example of a frame with good crc attached.

CAN-DO format (Plus 2 extra bytes of CRC)

SYNC, 0xBC, 0x85, 0x39, 0x83, 0x2C, 0x3B, 0xC9, 0x06, 0x40, 0x0A, 0xAC, 0x45

Rearranged for CRC processing

0x05, 0xBC, 0x08, 0x39, 0x83, 0x2C, 0x3B, 0xC9, 0x06, 0x40, 0x0A, 0xAC, 0x45

Processing the above 99 bits in13 bytes (remember that two bytes have less than 8 bits) should result in the CRC variable containing 0x4599.

Jim

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

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Fri Oct 19, 2012 9:30 am

What happens when N < 8?

You transmit extra FF bytes, but they are not included
in the checksum bits?
See SOC/GID-Meter and CAN-Do Info
2010 Prius, now for sale
2011 LEAF, sold in 2015
2018 Tesla Model 3
2014 Tesla S, Model 3 in 2019
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

Return to “LEAF CANBus”