[Ovmsdev] OVMS Leaf Support
Barry Gershenfeld
gbarry42 at gmail.com
Wed Oct 23 06:58:33 HKT 2013
I have an ICD-2. Is the PIC operated at 5V, or 3? I don't think I've
found any board info, or I could answer that myself.
For the 12 V battery in the LEAF, it's a more accurate thing to say that
the battery may be charged any time the traction battery comes on line.
There are relays that disconnect the pack entirely. (You're a musician,
Nikki--you may recognize the LEAF's "relay song"). They say the LEAF will
power up automatically every 5 days to maintain the 12V, but this behavior
is bypassed if the J1772 is attached. So, there's the cause of that
problem. I have also successfully done the charge-1hr-per-day thing,
although I wasn't really away long enough to matter.
I looked to see what OVMS sells for and noticed it's in Pounds, which made
me wonder if shipping to the States would be messy. Also, it said, "out of
stock." But more importantly, it made me wonder if the firmware in a US
LEAF might be different? Might explain why you can't get your logs to jive
with Leaf Spy.
On Tue, Oct 22, 2013 at 2:29 PM, Tom Saxton <tom at idleloop.com> wrote:
> I'm not able to program the V2 board with the PICkit2 unless the board
> plugged into the car to get 12V power, so I'd recommend the PICKit3, which
> I'm assuming doesn't have this issue.
>
> I need to either build a cable to power the OVMS from a power supply or
> order the PICKit3 from Fasttech. For now, my laptop is living in the
> Roadster's passenger seat while I've been doing some work on the charge
> time predictor.
>
> Tom
>
> From: Mark Webb-Johnson <mark at webb-johnson.net>
> Reply-To: OVMS Developers <ovmsdev at lists.teslaclub.hk>
> Date: Monday, October 21, 2013 11:42 PM
>
> To: OVMS Developers <ovmsdev at lists.teslaclub.hk>
> Subject: Re: [Ovmsdev] OVMS Leaf Support
>
> Rob,
>
> If you are not developing code then a PICKIT2 is easier.
>
> The original is here:
>
>
> http://www.amazon.co.uk/Microchip-PG164120-Programmer-Pickit-2/dp/B0040ZRGCQ/ref=sr_1_4?s=electronics&ie=UTF8&qid=1382423740&sr=1-4&keywords=pickit2
>
>
> but as it is 'open source', there are lots of much cheaper clones. For
> example:
>
>
> http://www.fasttech.com/products/0/10000018/1002200-pickit-2-compatible-programmerdebugger
>
>
> Personally, I'd go with the clone.
>
> Regards, Mark.
>
> On 22 Oct, 2013, at 2:32 pm, Robert Sharpe <
> robert.sharpe at evergreen-consulting.co.uk> wrote:
>
> Hi Mark,
>
> Wow great work.
>
> For me my current status is
>
> Good and frequent access to a Nissan Leaf - YES
> RS232-to-USB adaptor and laptop (or laptop with RS232 port) - YES
>
> OVMS v2 Module - Accepted Kevin's offer of h/w waiting for delivery
> OVMS v2 OBD-II cable - Accepted Kevin's offer of h/w waiting for delivery
>
> PICKIT2 or PICKIT3 programmer - Will order one today (any suggestions to a
> good source?)
>
>
>
> Regards,
> Rob
>
> ---- On Tue, 22 Oct 2013 02:11:52 +0100 *Mark Webb-Johnson<
> mark at webb-johnson.net>* wrote ----
>
> OK, here's an update...
>
> I went through the logs we captured, and had a look at Leaf Spy. I even
> purchased a copy of Leaf Spy Pro (even though I don't have a Leaf) just as
> a donation to say thank you to Turbo3 for pushing this approach and working
> out so much of the mechanics of it.
>
> I spent an evening reading through the "Using clone ELM327 Bluetooth
> OBDII adapter with Leaf" on mynissanleaf.com<http://www.mynissanleaf.com/viewtopic.php?f=44&t=12098> (all
> 238 pages of it!), and got a good understanding of the history of where CAN
> decoding on the Nissan Leaf is, and where it is headed.
>
> Bottom line:
>
>
> - There are two CAN buses in the Nissan Leaf that are useful to us:
> the EV CAN bus and the CAR CAN bus.
> - The standard OVMS OBD-II cable connects to the CAR CAN bus. By
> passive listening on the bus, we can see some EV information, and all of
> the car information.
> - The EV CAN bus is also available on the OBD-II socket. By passive
> listening on the bus, we can see all the EV information, but little-to-no
> car information.
> - OVMS V2 hardware can only connect to one bus.
> - Someone worked out that active requests for information from the
> controllers (PID polling, as opposed to passive listening) are bridged. You
> can request information from a controller on the EV CAN bus, via the CAR
> CAN bus, and the car will bridge the requests between the buses. This
> appears to work bi-directionally.
> - There is a slight nasty in that if the car is off (asleep), active
> polling the EV controller causes it to wake up and you can hear a little
> 12V relay click near the front of the car each time you poll. We don't want
> to poll too fast when the car is asleep (off) and not charging, to avoid
> wearing out that relay.
> - The OBD-II connector has 12V power (both switched and non-switched)
> that we can use for OVMS, powered by an automotive 12V lead acid battery.
> We do need to take care because apparently that 12V battery is only charged
> when you drive or once every five days when the car is unplugged (and not
> at all when the car is plugged in). There is a CAR CAN message to show the
> 12V battery voltage (and OVMS V2 can also measure directly).
> - There is 'active discussion' in the community on how things like
> SOC%, battery capacity, ideal and estimated ranges, should be determined.
> Nissan made a mess of it, and the users are struggling to agree on a
> uniform approach to a correct way of doing things.
>
>
> I think our plan of attack should be:
>
>
> 1. Use a standard V2 module, with standard OVMS OBD-II cable, to
> connect to the CAR CAN bus.
> 2. Use passive CAN listening, for the car information (doors, speed,
> on/off, etc) as much as possible.
> 3. Use active CAN polling, bridged to the EV CAN bus, for the EV
> information that we need.
> 4. Agree our own user-centric approach of how to represent capacity,
> SOC, ideal and estimated ranges.
>
>
> It has been quite frustrating looking at the community documentation for
> CAN bus messages in the Leaf. The documentation doesn't match what I am
> seeing, and is not at all clear. A lot of people are sharing, but some seem
> to be holding back and saying things like "here are some clues to what I've
> found, so go look for it yourself". Some closed source. Not the way I like
> to do things.
>
> There is one very good thread on the active CAN bus polling, here:
>
> http://www.mynissanleaf.com/viewtopic.php?f=44&t=11676
>
>
> A good background read (34 pages) on Leaf CAN bus passive monitoring is
> here:
>
> http://www.mynissanleaf.com/viewtopic.php?f=8&t=4131
>
>
> and I recommend everyone involved in this to read that thread (only 12
> pages) to get a good understanding.
>
> There are two spreadsheets tracking Leaf CAN bus messages:
>
>
> https://docs.google.com/spreadsheet/ccc?key=0AuDGAXnbchK0dDc4T05oNE04aVZtUzB6S19DT1RwaHc&authkey=CJi03v4F&hl=en_US&authkey=CJi03v4F#gid=0
>
>
>
> https://docs.google.com/spreadsheet/ccc?key=0An7gtcYL2Oy0dGRaSWl6VTV2eXBQMy1ON2xZSzlMUXc#gid=5
>
>
> So, what I'm going to do now is to setup a framework in the
> vehicle_nissanleaf module to do passive listening on the CAR CAN bus, and
> active polling of the information on the EV CAN bus (bridged via CAR CAN
> bus). Once the framework is done, I'll test it in the local Hong Kong Leaf,
> and ask you guys to help.
>
> I do need one or two people with the following equipment to help out:
>
> Good and frequent access to a Nissan Leaf
> OVMS v2 Module
> OVMS v2 OBD-II cable
> PICKIT2 or PICKIT3 programmer
> RS232-to-USB adaptor and laptop (or laptop with RS232 port)
>
>
> This is to run the framework in their car, and capture RS232 output from
> the DIAG port.
>
> So, volunteers please.
>
> Regards, Mark.
>
> On 19 Oct, 2013, at 11:23 pm, Mark Webb-Johnson <mark at webb-johnson.net>
> wrote:
>
>
> I met up with a local Leaf owner (George) and spent a few hours in the car
> logging stuff off the main CAN bus. The car is a 2011 model, I think (the
> VIN model year is U/V, which makes no sense).
>
> Good news it that the OVMS cables are fine. The ‘right hand’ ovms obdii
> cable appears to be the best for the right hand drive nissan leafs. The
> OBDII connector is under the steering wheel, parallel with the car
> direction of travel, short side on the left, so using a right-hand cable
> directs the cable towards the front of the car, which should be easiest for
> routing.
>
> I managed to get quite a few log files, using a standard CAN USB adaptor
> at 512kbps.
>
> Bad news is I am having trouble correlating lots of the messages against
> the published spreadsheets of Leaf can bus messages. Some messages are
> partially correct, but many are missing / don’t match up. The car also
> seems to go to sleep during charging, although the leaf spy could update
> the SOC ok. The 0x5b3 SOC+GIDS message wasn’t visible on the bus at all.
>
> I think we are going to have to use PID polling to get the data we need.
>
> Regards, Mark.
>
> On 16 Oct, 2013, at 10:31 pm, Mark Webb-Johnson <mark at webb-johnson.net>
> wrote:
>
>
> Anyone feeling brave?
>
> I’ve just committed a nissan leaf module (set vehicle id to NL) that will
> monitor the can bus and pickup the SOC%. That is all it does at the moment,
> but it should work.
>
> Regards, Mark.
>
> On 16 Oct, 2013, at 2:49 pm, Nikki Gordon-Bloomfield <
> nikki at littlecollie.com> wrote:
>
> I've already messages mark C. Let's hope he has it :) I know he and his
> husband have done a lot of logging.
>
> Sent from my iPhone
>
> On 16 Oct 2013, at 07:02, Robert Sharpe <
> robert.sharpe at evergreen-consulting.co.uk> wrote:
>
> Hi Mark,
>
> >I think the fastest way to get this done is for me to do it with a local
> Leaf owner.
> That sounds like a good idea.
>
> >Can someone tell me which CarCAN bus message to look for, which byte(s)
> to access, and how to convert to percentage SOC?
> >The document at
> https://docs.google.com/spreadsheet/ccc?key=0An7gtcYL2Oy0dGRaSWl6VTV2eXBQMy1ON2xZSzlMUXc#gid=5 suggests
> ID 5B3 tracks SOH and Gids. But how to convert to percentage SOC?
>
> Is @nufkin (Mark C) on this list? He has done some analysis of codes.
> There is always the authors of the other projects that read Leaf data.
>
> Regards,
> Rob
>
>
> On Oct 16, 2013, at 6.33AM, Mark Webb-Johnson wrote:
>
>
> I think the fastest way to get this done is for me to do it with a local
> Leaf owner.
>
> If I can get basic support working, then perhaps someone else (or others)
> with better knowledge of the Leaf scene, can take over to get the advanced
> stuff working.
>
> So, I'm going to try to get some Leaf Spy traces, as well as CAN bus logs
> for parked, charging and driving. Then, get the basic module working with
> SOC%, GPS location, door status, drive/park and charge monitor.
>
> My biggest confusion at the moment is SOC% in the Leaf. There is a lot of
> talk about gids, etc, but I've never gone into it too deeply.
>
> Can someone tell me which CarCAN bus message to look for, which byte(s) to
> access, and how to convert to percentage SOC?
>
> The document at
> https://docs.google.com/spreadsheet/ccc?key=0An7gtcYL2Oy0dGRaSWl6VTV2eXBQMy1ON2xZSzlMUXc#gid=5suggests ID 5B3 tracks SOH and Gids. But how to convert to percentage SOC?
>
> Regards, Mark.
>
> On 16 Oct, 2013, at 1:03 pm, Evergreen <<robert.sharpe at evergreen-consulting.co.uk>
> robert.sharpe at evergreen-consulting.co.uk">target="_blank">robert.sharpe at evergreen-consulting.co.uk>
> wrote:
>
> That's great news.
>
> Regards,
> Rob
>
> On 16 Oct 2013, at 06:00, Mark Webb-Johnson < <mark at webb-johnson.net>
> mark at webb-johnson.net">target="_blank">mark at webb-johnson.net> wrote:
>
>
> P.S. I'm trying to find a friendly Leaf owner in Hong Kong to co-operate
> with this. There are 200+ Leafs here, and no carwings coverage at all, but
> most are in government service and relatively few in private hands.
>
>
> I think my fishing expedition on the forums may have come up with a bite.
> A Hong Kong Leaf owner who is willing to help.
>
> I'll let you know how it pans out (over the next couple of days), but if I
> can get access to a local Leaf, getting the basic support working should be
> much faster.
>
> Regards, Mark.
>
> On 15 Oct, 2013, at 1:00 pm, Mark Webb-Johnson < <mark at webb-johnson.net>
> mark at webb-johnson.net">target="_blank">mark at webb-johnson.net> wrote:
>
> Barry,
>
> Thanks for the history. I really think we can get what we need from the
> single car CAN bus.
>
> I'll extract the relevant sections from the developers guide tonight, and
> post them here. The first step is to see which of those 'virtual car'
> pieces of information are available on the car CAN bus, and see if they
> match-up.
>
> I really would like to see a dump (and dump) of the car CAN bus, as well
> as a trace from the leaf spy program. The captioned google docs spreadsheet
> for leaf can bus messages is quite confusing - it would be good to be able
> to compare that against what is actually seen on the bus.
>
> Regards, Mark.
>
> P.S. I'm trying to find a friendly Leaf owner in Hong Kong to co-operate
> with this. There are 200+ Leafs here, and no carwings coverage at all, but
> most are in government service and relatively few in private hands.
>
> On 15 Oct, 2013, at 11:45 am, Barry Gershenfeld < <gbarry42 at gmail.com>
> gbarry42 at gmail.com">target="_blank">gbarry42 at gmail.com> wrote:
>
> Early development assumed you had to get the EV info from the EV-CAN
> buss. Somewhere during the development of Leaf Spy they kept finding
> desirable info on the car-CAN buss and so eventually determined that all if
> could be gotten from the car-CAN. As a bonus, the ELM dongle no longer has
> to be modified to read the EV buss.
>
> The original reporting efforts started with the "GID" meter, and the early
> work involved Gary G. building a data recorder as well as a program to
> analyze the logs. I'm sure that's precisely what you have in mind as
> well. There were downloadable logs--he invited others to install the
> analyzer and try to find meaningful messages therein. But as it was early
> development, they were probably gotten from the EV-CAN. I don't know if
> any more recent logs from the car CAN buss are posted.
>
> As a matter of fact, I suspect Gary would be happy to have his analyzing
> program used. It would be nice output the data into the same format that
> it uses. Or at least write a converter.
>
> I naturally have some interest, being a LEAF owner and PIC hacker. I'll
> see if I can make head or tail of the developer's guide.
>
> * * *
>
> On Mon, Oct 14, 2013 at 7:04 PM, Mark Webb-Johnson <<mark at webb-johnson.net>
> mark at webb-johnson.net">target="_blank">mark at webb-johnson.net> wrote:
>
> Developers guide is here:
>
>
> https://github.com/markwj/Open-Vehicle-Monitoring-System/blob/master/docs/OVMS_Development.pdf?raw=true
>
>
> I would rather the actual development discussions take place here on this
> list. A lot of smart people here, with experience getting these vehicle
> modules working.
>
> The biggest concern for me is whether we can get everything we need off
> one CAN bus...
>
> _______________________________________________
> OvmsDev mailing list
> <OvmsDev at lists.teslaclub.hk>
> OvmsDev at lists.teslaclub.hk">target="_blank">OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
>
> _______________________________________________
> OvmsDev mailing list
> <OvmsDev at lists.teslaclub.hk>
> OvmsDev at lists.teslaclub.hk">target="_blank">OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
>
> _______________________________________________
> OvmsDev mailing list
> <OvmsDev at lists.teslaclub.hk>
> OvmsDev at lists.teslaclub.hk">target="_blank">OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
> _______________________________________________
> OvmsDev mailing list
> <OvmsDev at lists.teslaclub.hk>
> OvmsDev at lists.teslaclub.hk">target="_blank">OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
>
>
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
>
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
>
> _______________________________________________ OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.teslaclub.hk/pipermail/ovmsdev/attachments/20131022/ec6fb12c/attachment-0001.html>
More information about the OvmsDev
mailing list