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

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.
Since you have a working Pascal program to receive your
logging data, and write the data to a log file...

Is your Log file format already compatible with the
One-CAN Log files that CAN-Do writes and reads?

If compatible, your program can capture the Log,
and your users could still use CAN-Do to examine
their Logs, and share the files with others.

These are binary, fixed length records of 12 bytes,
two time-stamp (second and millisecond) bytes,
then the two LL NH MsgID bytes, and 8 data bytes.

I do insert a Date-Time Pseudo Message just before
the first message in each minute. The LL NH are FF FF,
and the first 4 data bytes are seconds past 1970 (or
some such) and the next 3 are zero (for microseconds)
and the last byte is FF to indicate that there are no
microseconds.

The file extensions are ".evc" for EV-CAN, ".can" for the
CAR-CAN data, and ".avc" for the AV-CAN data.

The two time-stamp bytes are seconds * 1024 + milliseconds.
The sec are 0 through 59, and ms are 0 through 999.
 
Gary,

Frames that do not have n=8 are not sent. You will never see them.

If you go back and look at my very first post you will see a HyperTerminal dump of CAN frames in text format. Each byte of CAN data was sent as two ASCII characters with a CR+LF at the end of the Frame so I could just use HyperTerminal to display the data. I used copy and paste to capture the text data from HyperTerminal and paste into a text file.

The Pascal program I wrote only reads these text files and was used to verify the algorithm handled the CRC correctly. The algorithm was then translated into SX28 assembler code and is what I use to verify the CAN frame have been received correctly before sending it out the serial port (Bluetooth).

I have since changed the serial format to match your CAN-DO format which is raw hex data with the addition of the two extra CRC bytes. I can only log data using your CAN-DO program. I never had a program that did logging.

So no I do not have a working Pascal program to receive data from the serial port. I only have a test program to read a previously saved text file and check the CRC is good.

So bottom line is I still would like to have an option in CAN-DO to handle the extra two CRC bytes and to only accept frames with good CRC.

Jim
 
So, you just throw away the messages with N < 8?

Is there a reason, or was it just an accident?

There are about 25 MsgIDs that have N < 8.

I do not know how important they are, but...
maybe you know something that I don't?
(well, I am sure that you do... :D )
 
Turbo3 said:
Gary,
...

So bottom line is I still would like to have an option in CAN-DO to handle the extra two CRC bytes and to only accept frames with good CRC.

Jim

I will try to add the CRC checking of two extra bytes, and
I will assume that if N < 8, there are just (8-N) *8 fewer bits
in the string of bits to calculate the Checksum.

It might take me a week or two to get it added.

For now, do you only log the EV-CAN bus?
 
I am adding a CRC-Check option to the CAN-Do's EV-CAN
input processing. I expect to have a version for you to test
later today. I will email it to you if you wish, or I could
PM a link to you if you prefer.

Cheers, Gary
 
You asked about getting paid via PayPal :

Generally people send money to an email address that
you have registered for use with your own PayPal account.
They are told that there are no fees (that they see or pay)
but as the money arrives in your account, PayPal subtracts
a fee, approximately 3% in the USA, and 4% for payments
from outside the USA.

There is a way to transfer funds from an existing account
balance to you (a personal transfer) that has no fees.
But, almost always, the fees apply.

You get an email describing the transaction, and you
can log into PayPal to print out a transaction detail
page, or listings of your account activity, with the gross
payments, the fees, and your account balance.

The net is available in your account to spend, or you can
arrange to transfer funds to an "attached" bank account.

People do not even need to have a PayPal account to
pay you, since they can use a credit card to fund a
transaction.
 
I just sent you a PM with a link to CAN-Do v192 wich has
your CRC test as an option on the EV-Comm channel.

Yes, the test Frame that you posted passed my CRC test.
However, I might have messed up the whole Input Provess.

Cheers, Gary
 
Gary,

Tested with v193 which showed problem was with CRC not being good. Took a closer look at my code and found that when I rearranged the registers to allow seven history entries I put in a bug that corrupted the last CRC byte after it was internally checked. Easy to fix and now it works great.

Those with code level 0.76 will need to select the "Ignore CRC Ck" box until I reflash their boxes to a higher level. But CAN-DO v193 (or higher) is the one to use with "CRC Ck" selected in order to properly handle the extra two bytes of CRC. Otherwise the extra bytes will cause lost frames due to loss of sync after each frame. (I can update at the next BayLeaf meeting on Nov 10)

Thanks again for making this change.

Instructions:

First wake up WattsLeft then press the small Reset Button on the back. You will see the current version number on the first line and the CAN-DO mode on the second line. Turn the rotary selector until the second line changes from CAN-DO Off to CAN-DO Dbg then wait 20 seconds for the setting to be locked in and you return to the normal screens. In debug mode the actual sending of data is user controlled by turning the rotary control fully clockwise (you see the internal register screen).

If you have not already done so add WattsLeft as a Wireless Device on your PC. Take your laptop out to the car and wakeup WattsLeft. From "Control Panel/Bluetooth Devices" select "Add Wireless Device" . A "Pair with a wireless device" window will pop up and in a little while WattsLeft should be found and displayed. Select it and press "Next". Select the option where you provide the pairing code which is "1234". After entering 1234 pairing should be complete. You only need to do this once and you don't need to have CAN-DO set to Dbg or ON. Those modes only select when and if data is sent out.

There is also a CAN-DO ON mode which sends out data on all screens but I do not recommend it as it slows down screen updates. But you can try it if you like. Just press the reset button again (twice if the box is asleep) and turn the selector clockwise until you go from Off=>Dbg=>ON then wait for the auto timeout return.

Start up CAN-DO v193 or higher. You can leave the baud rate at 115200. On the main menu select "Input Logs" then Enable the EV-Comm input, set the COM port to your Bluetooth adapter (must in the COM range 0-16) and select "CRC Ck". Also check the box "Run Dashboard" so you can see the realtime data window. Finally press the "Read Comm Input" Button to start the connection. Don't forget to go back to the main window and select "Update INI" to save your settings.

If you look at the ring around the reset button in the back it will flash pink when Bluetooth is looking for a connection and go solid pink when a connection is made.

Jim
 
Great news that it actually works!

While reading, the number of properly received messages
is shown in the 3rd field, and the number of "errors" is
shown in the 4th (pink) field.

By checking "Show Max Buf" (or some such), the 4th field turns
White, and displays the maximum number of bytes in the
Comm Port buffer. This number should stay fairly small if
CAN-Do is "eating" bytes fast enough.

If you think that your log data looks good, please zip and email
the ".evc" (binary log) file to me to look at.

If you have a compatible USB-attached GPS "hockey puck",
CAN-Do will simultaneously log the selected GPS data.

Please let me know of any problems, or suggestions.
Cheers, Gary
 
I bought this meter, with the new OLED display, this past Saturday. It's great! Jim and I were able to hide the wires well with no permanent modifications. We pulled the main console cover off, fished the wire from the driver's foot well area up to the top, plugged it in to the newly velcro mounted display, then pushed the cover back on. The lower wire for the adjustment knob was easily routed as well by pulling the cupholder up, "flossing" the wire between the plastic panels, then pushing the cupholder back in place.

My wife especially appreciates the straight forward way the information is available.

Pics:

WattsLeft%25204.jpg

WattsLeft%25201.jpg

WattsLeft%25203.jpg
 
Electric4Me said:
I bought this meter, with the new OLED display, this past Saturday.

I don't see where the range is displayed. Can you take a pic of that? Looks great, though.

If one of the Gidmeter builders would like to work on the Rav4, I will pay a substantial premium to get one for my car
 
TonyWilliams said:
Electric4Me said:
I bought this meter, with the new OLED display, this past Saturday.

I don't see where the range is displayed. Can you take a pic of that? Looks great, though.

If one of the Gidmeter builders would like to work on the Rav4, I will pay a substantial premium to get one for my car
I want one as well.
 
waidy said:
TonyWilliams said:
Electric4Me said:
I bought this meter, with the new OLED display, this past Saturday.

I don't see where the range is displayed. Can you take a pic of that? Looks great, though.

If one of the Gidmeter builders would like to work on the Rav4, I will pay a substantial premium to get one for my car
I want one as well.

Woo Hoo!!!! I'll bet I can round up a few more of the 140 Rav4 owners who want one, too.

Toyota will sell 2600 of these, so there is a market here in California.
 
TonyWilliams said:
Electric4Me said:
I bought this meter, with the new OLED display, this past Saturday.
I don't see where the range is displayed. Can you take a pic of that? Looks great, though.
Tony... There are several pictures of the various screens posted earlier in this thread:
http://www.mynissanleaf.com/viewtopic.php?p=230923#p230923" onclick="window.open(this.href);return false;
http://www.mynissanleaf.com/viewtopic.php?p=224711#p224711" onclick="window.open(this.href);return false;
http://www.mynissanleaf.com/viewtopic.php?p=236357#p236357" onclick="window.open(this.href);return false;

Here is what the "turtle" range screen looks like (though not on the new OLED display):
dtturtle.jpg
 
Since this sub-forum is "Leaf CANbus",...
I started a new thread in the Accessories and Mods
Forum for investigating the Rav4 CAN bus data.

If there is one nearby we can probably log some data.
 
I finally completed all the firmware improvements on 1/29/2013 and released the final 1.0 version of the code.

Changes include:
* Filtering so short charges of less than 60 seconds, seen while pre-heating/pre-cooling, do not get saved in the history log.
* Screen 8 which had been the register view screen has been changed to show the current configuration settings (Version number, Starting Distance to Event value and CAN-DO state OFF- Debug-ON). So it looks just like the screen shown after pressing reset but is view only.
* The Configuration screen has changed (accessed by pressing Reset) so it now includes a flashing arrow to indicate which of the two fields will change when the rotary selector is turned.
* History data is now dumped out the Bluetooth link whenever the display is on and the car is not in drive or charge mode. This will allow a future App to collect and log the history data on your Smartphone or tablet.
* Screen 3, the motor Current/RPM screen, how also shows the peak and current regeneration KWs. The peak value automatically resets to 0 at the start of each drive but can also be manually reset while driving by selecting screen 8.
* The selectable Distance to Event starting value has been reduced from 24 values (12 mi/kw and 12 km/kw values) down to 16 (2.0 thru 4.5 mi/kw and 3.0 thru 7.5 km/kw).
* Interrupt handler has been optimized to reduce overhead.

With the completion of the coding I have started to ship outside the Bay Area. Those with units that have not been updated to version 1.0 can contact me to arrange a flash update.

I have also started production of another batch of WattsLeft™ units. The next batch of circuit boards are done and tested. Cables were just finished today. I had a bit of a shock yesterday when my supplier emailed me there would be an 18 week delay in getting more OLED displays. After checking around today I determined the problem was only with the blue color displays so I switched the order to yellow which I should get in a week or two. Additional Bluetooth modules are also in the mail and should be here next week.

boardsy.jpg

cablesc.jpg


Here is what the blue and yellow OLED displays look like.
mfgnhd0216kzwab5.jpg

mfgnhd0216kzway5a.jpg


The pricing is the same: $199 basic with LCD (these can ship now), plus $20 for Bluetooth option (one can ship now) and plus $30 for OLED (again I have one available now in blue (just sold this one), next batch will be yellow). Shipping is by USPS Priority Mail. In the US it is about $10.25 which includes tracking number and insurance and around $24 for international Priority Mail. Ships in a Priority Mail Small Flat Rate Box with cable disconnected to fit in the box.

Here is the current price list (2/23/2013).
pricelist2232013.jpg


If you are interested in getting a WattsLeft™ please email to [email protected]. I can send you a copy of the Quick Guide to show you what information can be displayed on the 15 selectable screens.

Jim
 
Back
Top