[Ovmsdev] Nissan Leaf
Jeremy Whaling
jeremy.whaling at gmail.com
Fri Dec 20 16:55:57 HKT 2013
Thanks Håkon! Glad to see there is logic available on the board. Yes VCM is
the Vehicle Control Module. Unfortunately the wake line isn't on the OBD2
connector as far as we know. I plan on having my OVMS piggyback the
telematics module where the logic line is located. Note that the telematics
is located on the EV can bus.
On Thu, Dec 19, 2013 at 1:01 AM, Håkon Markussen
<hakon.markussen at gmail.com>wrote:
> Powering up the VCM (Vehicle Control Module?) from the OVMS should be
> easy; simply by choosing one of the four analogue outputs (RC[0-3] and sett
> it in high state when needed in the code.
>
> A similar solution was made by Think in their Think City, where the built
> in Remote Acquisition Unit (telemetry unit) powers up some of the other
> ECU's on request, like Climate and Defrost Control Module.
>
> At the Leaf, lets assume we choose RC0 for awaking VCM, the following line
> will put RC0 in high state (+5V)
> *PORTCbits.RC0 = 1;*
>
> The RC0 is wired to pin 2 at the 9x2 header. This signal should be used to
> control a source for powering up the VCM. A relay,mosfet or a transistor
> would do.
>
>
> The OVMS-boad have to be modified, adding a single wire from 9x2 pin 2 to
> one free pin at the d9-sub-connector (vehicle connector).
> I think it's nice if the 5V-to-12V-logic is kept inside the Ovms-box, but
> one can keep it on the outside the box as well.
>
> Then you have to look at the Leaf wiring diagram, finding the easiest way
> to connect to the VCM. Maybe there is a line at on of the pins in OBD2?
>
> See attached pictures for similar implementation for Think City. In this
> case all the lines are used for switching power on the negative side ->
> pull a line down to gnd. One for Airbag Status lamp, two for door lock and
> one for starting heater (via an additional relay).
>
> Best regards.
> Håkon
>
>
> 2013/12/18 Nikolay Shishkov <nshishkov at yahoo.com>
>
>> Maybe the work done by Håkon on activating some of features that were not
>> available on the CAN bus for the Think City EV can be used for the Leaf?
>>
>> Nikolay
>>
>>
>> On Wednesday, December 18, 2013 12:34 PM, Jeremy Whaling <
>> jeremy.whaling at gmail.com> wrote:
>> I posted this in the LEAF CANbus decoding thread on mynissanleaf.com,
>> but I should probably let you folks know the bad news too...
>>
>> Sadly, there is no "magic" CAN bus command to wake up the VCM or the rest
>> of the leaf. The telematics module (as well as the on board charger) wake
>> up the VCM over dedicated logic lines when the car is off to start
>> charging/climate/request SOC. This is according to the service manual. The
>> OVMS module will have to do the same in order to get SOC or any other
>> parameter out of the leaf if it is not on. Note that the EV can bus is
>> alive (along with the VCM) during charging but the CAR can bus is quiet.
>> There is a relay that will cycle if you do requests on the car can bus
>> during charging, and is seen as undesired. Conversely, the CAR can bus can
>> be active if you're in accessory mode (or just unlocking the doors) but the
>> EV bus is quiet until the car is started.
>>
>> Doe the OVMS module have any sort of external logic besides the CAN
>> transceiver? Something will be needed in order to duplicate the logic that
>> wakes the VCM up. We will also have to probe these logic lines during a
>> remote request to see what sort of voltage/logic is used (I didn't see any
>> details stated in the service manual).
>>
>>
>> On Tue, Dec 17, 2013 at 4:57 PM, Mark Webb-Johnson <mark at webb-johnson.net
>> > wrote:
>>
>> Nikki,
>>
>> Thanks for this.
>>
>> Firstly, I'm glad the firmware is connecting back to the server ok. I
>> broke that a few months ago (this new module meant I had to reorganise some
>> low-level crypto stuff to make room), and am glad it is fixed again.
>>
>> For the SOC, I'm really just guessing. Supposedly message 0x5b3 on car
>> can bus has GIDs in B6bit0 and B7 - I just divided that by 3 to get a rough
>> approximation of SOC, but it is obviously not working. I think this one
>> shouldn't be too hard, but I don't have any CAN bus dumps of what the 0x5b3
>> message looks like. If I can see a dump, with matching known SOC / GIDs,
>> then I am sure we can get this right. That said, active polling (which is
>> what leafspy uses) seems to be a better way of getting this, as it gets us
>> true GIDs off the EV can bus.
>>
>> Glad about the parking indicator. I work off the parking brake for that
>> one, and it is an important status flag for quite a few things.
>>
>> I'm working on the polling mechanism at the moment. It is very similar to
>> the OBDII VIN number polling mechanism we already have, and my recent work
>> on the common vehicle.{h,c} polling code should make this relatively easy.
>>
>> Regards, Mark.
>>
>> On 18 Dec, 2013, at 6:22 am, Nikki Gordon-Bloomfield <
>> nikki at aminorjourney.com> wrote:
>>
>> So here’s what I’ve learned from the alpha code so far…
>>
>> 1) It’s recording the parking status accurately, as far as I can tell.
>> within a few minutes of parking, it’s noting that on the app screen.
>>
>> 2) It’s certainly sending me alerts as you might expect for low SOC
>> warnings.
>>
>> 3) But sadly SOC isn’t working correctly with my car. For some reason,
>> SOC is jumping all over the shop, with 22% SOC seemingly a favourite place
>> for the OVMS code. On my quick trip just now to the shops, I noted it went
>> from 76% SOC (which I think was fairly accurate given the number of bars I
>> had) down to 22% when I parked up.
>>
>> Coming back, I got no update and ended up having to do a hard reboot to
>> get the system to wake up.
>>
>> I haven’t been able to get any logs yet because I don’t have a splitter
>> for the ODBII system. I’ll get that sorted later this week/early next.
>>
>> Nikki.
>>
>>
>>
>>
>> On 17 Dec 2013, at 20:06, Nikki Gordon-Bloomfield <
>> nikki at aminorjourney.com> wrote:
>>
>> Okay guys.
>>
>> I’ve done a couple of quick tests with the new beta software.
>>
>> First up, it installs (Which is good, of course) Second up: I was able to
>> drive around the block and see some SOC reports. What did appear to happen
>> is that SOC dropped and then went back up again. I had values from 27% SOC
>> down to 14% SOC to Empty and back up to 22% SOC. I’d guesstimate my real
>> SOC was nearer 45%. (Although I didn’t check with LEAFSpy)
>>
>> Of course, I need to check the other bits and bobs too — Park/Drive
>> status seems to work with the car on — but with the module rebooted, it
>> forgets what was previously on. This is a problem I believe with the LEAF
>> CAN bus, which turns itself off when parked. I’m guessing we’ll need to
>> figure out a way to wake up CAN and then switch back off again? (That
>> said,I think it’s supposed to stay on when charging… and I’m currently
>> charging)
>>
>> I’ll play a little more tomorrow and throughout the rest of the week.
>> I’ll also try and get some decent logs if I can.
>>
>> Nikki.
>>
>>
>> On 17 Dec 2013, at 14:16, Mark Webb-Johnson <mark at webb-johnson.net>
>> wrote:
>>
>>
>> Attached is a first-run at Nissan Leaf support, with a few values read
>> from the bus passively:
>>
>>
>> - Speed
>> - Headlight status
>> - Park / Drive status
>> - SOC
>>
>>
>> I’ve also pushed this to github (along with a large number of other small
>> changes).
>>
>> The Nissan Leaf support is proving really hard for me. I don’t have the
>> car, or much CAN bus data, and the public documentation is contradictory
>> and incomplete. End result is that I am just guessing, and completely
>> unable to test my guesses.
>>
>> Anyway, please try it and let me know if any of those figures show up
>> with any sense of accuracy at all.
>>
>> Going forward, I really need some CAN bus dumps from a Nissan Leaf.
>> Specifically:
>>
>>
>> 1. Car idle
>> 2. Car plugged in and charge started
>> 3. Car charging
>> 4. Charge interrupted
>> 5. Driving
>> 6. Driving as close to a constant speed of 10 kph as possible
>> 7. Driving as close to a constant speed of 20 kph as possible
>> 8. Driving as close to a constant speed of 30 kph as possible
>> 9. Car parked, but on
>> 10. Car parked, coming out of park into drive gear
>> 11. Car stopped, coming out of drive gear into park
>> 12. Car in park gear, then handbrake applied
>>
>>
>> For each of those, both with and without a T connector and LeafSpy
>> running would be helpful.
>>
>> I’m guessing the logs can be gotten from monitor-all mode with an OBDII
>> adaptor. There is not too much data on the can bus and that should be fast
>> enough.
>>
>> If anyone can help with the above, please let me know.
>>
>> Regards, Mark.
>>
>> <OVMS.X.production.zip>
>> _______________________________________________
>> 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.openvehicles.com/pipermail/ovmsdev/attachments/20131220/ae728d3a/attachment.htm>
More information about the OvmsDev
mailing list