The CANary 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.
At Greg's urging, I added a Resr computation to the software (just published). To access. select the "Trip" screen from the index and advance to the "Next" via the lower right button (ran out of slots in the index screen). This will bring up a "Health" screen with all the pertinent information plus Resr and the *unloaded* pack voltage.

To compute Resr, I am using a textbook LMS function to minimize the error in the model: unloadedV = measuredV+measuredI*Resr. It is updated each second so you may see Resr fluctuate while driving. When my leaf was new, I was getting ~75mOhms. Today I am reading around 100mOhms. If you have a newer Leaf, it may take a few seconds to converge on your value since I set the initial condition to 100mOhm. (Example: it will take a minimum of 25 seconds to move from the 100 initial condition to 75). I will probably change the i.c. to 75 in the next release but that won't change the steady-state value.
 

Attachments

  • esr.jpg
    esr.jpg
    123.6 KB · Views: 104
I built another CANary yesterday and came across a strange issue with this batch of VP230's I thought I'd share in case anyone else encounters it. Very strange, but they are acting like VP231's. I double checked the package marking and even replaced one (but the replacement was from the same order). Anyway, the only difference between the 230's and the 231's is how sleep mode behaves. On the 230's it goes into a listen-only mode (TX disabled). On the 231's it goes into a full powerdown (TX & RX disabled). So what I am seeing is neither canbus receives any messages unless I set the sleep-mode to disabled with the jumper installed. Power supplies all look good. I've ordered some more parts but meanwhile am running with a software work-around. Isn't strictly required to keep them in sleep mode - I just did it this way as a double safety to prevent CANary from talking in case of a glitch in the program (commonly called "babbling idiot protection").
I'm guessing noone else has encountered this yet (or I would have heard about it). I've added a new define statement that can be set to vp231 mode (I will keep the default at vp230) as a work-around until my new parts come in.
 
Thanks to Turbo3's excellent sleuthing and continued contribution to the knowledge body, we now have tire pressure on CAnary. Needs to be cleaned up - I will probably come up with a graphical, yet diminutive display on the main display for this. There does seem to be a fair amount of error in the TPS so I will probably add a cal function or way to establish a setpoint and just display the psi above/below that setpoint.
 

Attachments

  • Pressure.jpg
    Pressure.jpg
    59.7 KB · Views: 76
TickTock said:
Thanks to Turbo3's excellent sleuthing and continued contribution to the knowledge body, we now have tire pressure on CAnary. Needs to be cleaned up - I will probably come up with a graphical, yet diminutive display on the main display for this. There does seem to be a fair amount of error in the TPS so I will probably add a cal function or way to establish a setpoint and just display the psi above/below that setpoint.

My 4th sensor is off by about +3-4psi. All the others are right on after checking with my Milton pen gauge.
 
I encountered this same problem over the weekend. Screen started flashing on and off. I immediately unplugged it and when I got home discovered, sure enough, that the Zener diode was toast. I can only assume the 5W rating on these diodes must assume you have TMS installed :) since we are only pulling 1.4W and still toasting them. Anyway, before messing with a DC-DC converter, I decided to just put two Zeners in parallel. Since device mortality is exponentially proportional to temperature, this should take care of it. We'll see...

nananaLeafman said:
interesting, my zener diode is toast again.

I ordered a couple spares, but thats really bizarre.

edit: Wonder if I got a bad batch, or the brand is inferior to the ones your using which arent causing you issues. I'm getting tempted to hack in a switching buck regulator in place of the zener to do the 6v drop, I probably have parts that would work.
Still, I'm not sure why I cant run the mbed anymore off usb, I wonder if the lm1117 died from the high voltage, although the absolute max is 20v so it should have survived and thermal regulated itself.

edit2: according to: http://mbed.org/forum/mbed/topic/1802/" onclick="window.open(this.href);return false; it sounds like i also fried the FPF2123 on the mbed, which isnt a big deal. The main issue is why do my zener diodes keep melting...

edit3: ordered http://cgi.ebay.ca/ws/eBayISAPI.dll?ViewItem&item=350753515699" onclick="window.open(this.href);return false; to replace zeners, if its any good.

edit4: replaced zener, noted ~230 ma draw, and a 6.14 v drop accross the diode...

Testing with the bench supply told me it is definitely looping because of thermal regulation of a regulator, they get 80+ degrees very fast at 14V on the mbed, nothing seems damaged other than the FPF2123, which I can replace with solder supposedly, although I'll probably order a new one eventually as I cannot upload firmware now.

at anywhere below 6.2 v things start degrading (after zener) so if your battery is sagging, this will cause issues, I am hopeful that replacing the zener with that SMPS will resolve 99% of these issues, provided the noise it introduces doesnt cause other problems... thoughts? at 5.9V the USB 5V will begin to rapidly drop so thats likely your issue, 6.1V has noticeable screen dimming...
 

Attachments

  • doublediode.jpg
    doublediode.jpg
    68.3 KB · Views: 39
Interesting, its been scorching hot (by toronto standards) for the last couple weeks, and my digikey zener has held up well, with only a few temperature related reboots. I'm still planing to get the smps setup when i get time. Of course real life has made time hard to come by but thats another issue.

Will be interesting to see if your dual zener solution works, I suspect one will take the bulk of the current as they wont be perfectly matched, thus one will eventually burn than the other, but i'm no engineer it might work.
 
nananaLeafman said:
Interesting, its been scorching hot (by toronto standards) for the last couple weeks, and my digikey zener has held up well, with only a few temperature related reboots. I'm still planing to get the smps setup when i get time. Of course real life has made time hard to come by but thats another issue.

Will be interesting to see if your dual zener solution works, I suspect one will take the bulk of the current as they wont be perfectly matched, thus one will eventually burn than the other, but i'm no engineer it might work.
You're right - it won't split the current evenly unless I'm very lucky but, if nothing else, it will act like a heat sink for whichever is dominant. I don't particularly like it either, but I happen to have a bag of these diodes so figured I'd give it a try while I work out a long-term solution (which may very well be exactly what you did and just not buy junk :)).
 
New rev published. Biggest feature is the addition of max and min DTE on the main display. Credit goes to noAZgas for this idea. I keep a record of the max and min efficiency of each trip (greater than 3 miles) and now display a DTE based on those on either side of the big DTE based on the last 10 minutes of driving. So at a glance you get an upper and lower range estimate based on your personal driving history.

Additional changes include:
  • 1) Option to splash the health screen on poweron (reverts to selected screen once car is in motion) and poweroff (reverts after 10 seconds).
    2) Added new SOH value that reflects the value displayed by Nissans own diagnostic equipment
    3) Highlight tire pressure if it drops below 32psi
    4) Added CONFIG.TXT transfer from thumbdrive when firmware is updated (if it exists on the thumbdrive)
 

Attachments

  • maxmin.jpg
    maxmin.jpg
    67.1 KB · Views: 18
True. I'll add programability in a future rev. Today, though, you can edit the #define in the common.h to set whatever threshold you wish. BTW, the image does not show any highlighted - the color changes to orange for the monitor exceeding the threshold.
 
New rev published. No new features - just improved visbility and formatting of the main screen. Made the max and min DTE larger and color coded. Green means you can get this with your most aggressive driving; red means you only get that with your most efficient driving; yellow is the range based on the last 10 minutes of driving.
 

Attachments

  • maxmin.jpg
    maxmin.jpg
    59.7 KB · Views: 90
Been absent for a while on this, but I just updated to this firmware, and I get some wierd artifacting whenever my range goes into the 3 digits (100+). I'll try and snap a picture in morning when there is less glare, but basically where the main yellow range is, there is often a 0 behind the km. This 0 wont disappear very often.

The right (best) range often wraps to the left side of the screen.

Heres a photo of the second issue:
http://imgur.com/zyVyot9
 
nananaLeafman said:
Been absent for a while on this, but I just updated to this firmware, and I get some wierd artifacting whenever my range goes into the 3 digits (100+). I'll try and snap a picture in morning when there is less glare, but basically where the main yellow range is, there is often a 0 behind the km. This 0 wont disappear very often.

The right (best) range often wraps to the left side of the screen.

Heres a photo of the second issue:
http://imgur.com/zyVyot9
Ahh dangit! I forgot km's will push us into 3 digits. I should be able to reproduce by switching mode. Should be easy to fix - we do have some room on that row.
 
OK, give it a shot. The formatting in your pic was easy to fix - just a matter of shifting to accommodate 3 digits. Also, I think I found the bug causing the occasional garbage behind the km/mi indicator. When right-justifying, I needed to compare to 99.5 and 9.5 instead of 100 and 10 since the printf function automatically rounds before printing.

Also, I added a new feature to call the firmware update routine you added if the screen is being touched as power comes on. I did this because one of my experiments froze the CANary and I had to lift it off my dash to expose the programming interface to recover. A PITA since I have it stuck down with double sided tape and secured with a safety tether. So now if that happens in the future, I will have a chance to update the firmware immediately by unplugging and plugging back in while touching the screen.
 
This morning I decided to upgrade my CANary with a dc-dc converter. I used this one. On the bench, I set the output to 7v. To install, only the left screen needs to be removed to gain access to the failure-prone zener. Remove it and use its pads for the input and output connections as shown in the pic. Gnd can be grabbed below. Make sure the gnd connection lays flat otherwise it will interfere with connection to the flex cable. I attached the dc-dc converter to the back wall with 3m industrial double sided tape. Runs a lot cooler than the zener.
dcdcinst2.jpg
dcdcinst3.jpg
 
I also wanted to mention a tip. I found that a 2" buttonhead screw held by the screw end with pliers makes a great tool for removing the flex cable. Reach in (unplug from the OBD port first) to hook onto the black retention wedge on one side and pull toward you to unseat it. Repeat on the other side and the flex cable will drop out.
 
Just published rev 142.

  • 1) Added odometer reading to trip and battery log entries
    2) Removed metric/Imperial selection and, instead, set the metric mode if the dash has been set to metric (CANary units will match the LEAF dash units)
    3) Added audible brake monitor/trainer (sensitivity and squelch thresholds can be tweaked in the config file)

The last item is a mode that will chirp, geiger-counter style, in response to friction brake usage. If you are careful and avoid friction brakes it will not make any sound. The rate at which the chirps come is proportional to the amount of energy being wasted in the brakes. So if you are sitting still, there will be no sound regardless of the amount of brake pressure since you are not wasting any energy (Energy=force*distance). Likewise, if you slam on the brakes at freeway speeds it will chirp quite angrily at you :). This was one of my favorite features of my (modified) SOC-meter since it allowed me to optimize my braking without taking my eyes off the road. At the default threshold setting, it is challenging to brake without getting one chirp. This is because it is impossible to completely eliminate friction braking (the leaf engages friction first, then replaces it with regen). If this annoys you, feel free to change the brkMonThr value in the config file to something higher.
 
That braking chirp sounds really cool! I hope we can get that with Jim's LBA.
Btw (OT), early Thursday afternoon the A/C (89F setting) took my mpkWh from 5.8 to 5.0 in about 10 miles. It never went down to a sliver and I drove very conservatively, no freeways. Fwiw, it showed -15 miles to start, and it never dropped below 7. The new A/C sucks!
 
Back
Top