miimura
Posts: 1915
Joined: Thu Jan 17, 2013 11:13 pm
Location: Los Altos, CA

Introducing OVMS for RAV4 EV

I have been working on a port of the OVMS system for the RAV4 EV. It is ready for people to start using it now. OVMS is short for Open Vehicle Monitoring System. It consists of a small box that connects to a vehicle and can report on its status. It was originally independently developed for the Tesla Roadster since Tesla didn't provide any remote connectivity for that vehicle. It is available as WiFi only or you can buy an optional 4G + GPS card that mounts inside the box. One reason that I haven't announced this earlier is that the 4G modem was just released. There wasn't much point for people to buy it with a 3G radio since those networks were going away soon anyway.

The current implementation is relatively limited. It only reads from the Tesla CAN bus, but we can display anything available on that bus. The next phase of the development will be to decode the Toyota CAN bus and replicate all the remote functionality that was available in Entune through the SafetyConnect communication module. Anyone who wants to help with that, please contact me.

One other cool thing that is available now is A Better Route Planner live data update. The OVMS reads the vehicle position, SOC, speed, battery charge and discharge power and uploads it to the ABRP servers. This gives you extremely accurate trip planning while en-route because it's adjusting to your battery level in real time.

The hardware costs $180 shipped from Asia including the 4G modem and requires a custom cable. It is relatively easy to use standard OBD connectors to pick up the Tesla bus from the connector at the rear of the car and inject 12V power from the nearby power outlet. However, we have identified the exact connector on the Gateway ECU and will offer a special cable to pull both the CAN buses and the always on 12V power from there and put it directly into the OVMS DB9 connector.

https://docs.openvehicles.com/en/latest/

The hardware is available from the US distributor, Medlock & Sons. Select "kit w/ SIM7600G" to get the module with the 4G modem.
https://medlockandsons.com/product/ovms-v3/

The Asian distributor sells without support and incurs substantial shipping time.
https://www.fasttech.com/products/1230/10000001/9747555

Image
the typo indicating the DC-DC is outputting kW has already been fixed. It is now labeled "W". The battery temp is now displayed correctly too instead of the 0.0 shown above.
2012 Shoreline Blue #1462 w/JdeMO | 2018 Tesla Model 3 LR | 4.32kW Motech/Enphase PV Solar + 2x Powerwall 2 AC| Leviton EVB40 40A & Jesla Home Charging | 2015 e-Golf LE (returned)
asavage
Posts: 329
Joined: Mon Aug 07, 2017 4:55 pm
Location: Oak Harbor, Wash.
Contact: Website

Re: Introducing OVMS for RAV4 EV

Great work! I've ordered the box and antenna from FastTech, as I'm currently moving house and have no time for the next month, so shipping delays are of no consequence.
we have identified the exact connector on the Gateway ECU and will offer a special cable to pull both the CAN buses and the always on 12V power from there and put it directly into the OVMS DB9 connector.
Will the availability of this cable (or data to source the connector + pinouts: I can build cables, given specs) be posted here? Or should I join an OVMS forum/list for that info?

I should have significant spare time from May-on, so I may be able to contribute then.
Regards,
Al Savage
2014 Rav4 EV, Shoreline Blue Pearl, #2609, first use 04Jun2014, 49k miles (Aug2017), OpenEV-SE 40A. First DU replacement May2018 59k.
2018 Model 3 LR AWD, blue. 9.6kw solar
http://nissandiesel.dyndns.org
asavage
Posts: 329
Joined: Mon Aug 07, 2017 4:55 pm
Location: Oak Harbor, Wash.
Contact: Website

Re: Introducing OVMS for RAV4 EV

I received it today: about three weeks delivery, pretty good.
Regards,
Al Savage
2014 Rav4 EV, Shoreline Blue Pearl, #2609, first use 04Jun2014, 49k miles (Aug2017), OpenEV-SE 40A. First DU replacement May2018 59k.
2018 Model 3 LR AWD, blue. 9.6kw solar
http://nissandiesel.dyndns.org
davewill
Posts: 336
Joined: Mon Apr 01, 2013 11:42 pm
Location: San Diego, CA, USA

Re: Introducing OVMS for RAV4 EV

I'm interested in hearing how it goes for you.
asavage
Posts: 329
Joined: Mon Aug 07, 2017 4:55 pm
Location: Oak Harbor, Wash.
Contact: Website

Re: Introducing OVMS for RAV4 EV

I'm hopeful that miimura will respond to my questions of 25Mar, as I can't collaborate without communication. But, yes, I'm holding the hardware + 4G antenna: the easy part.
Last edited by asavage on Thu Apr 28, 2022 5:48 pm, edited 1 time in total.
Regards,
Al Savage
2014 Rav4 EV, Shoreline Blue Pearl, #2609, first use 04Jun2014, 49k miles (Aug2017), OpenEV-SE 40A. First DU replacement May2018 59k.
2018 Model 3 LR AWD, blue. 9.6kw solar
http://nissandiesel.dyndns.org
hokiematt
Posts: 69
Joined: Thu Nov 02, 2017 8:57 pm
Location: Salisbury, NC

Re: Introducing OVMS for RAV4 EV

For anyone interested in making their own cable:

The male receptacle (e.g. on the gateway PCB) is only available as a PCB mount, so one has to solder flying leads to the pins (i.e. there is no option for male crimp pins). There are options for either straight or right angle:

https://www.mouser.com/ProductDetail/538-34690-9201 (straight)

https://www.mouser.com/ProductDetail/538-34691-0201 (right angle)

The female plug that will plug into the gateway's connector is either of these:

https://www.mouser.com/ProductDetail/538-34729-0201

https://www.mouser.com/ProductDetail/538-31408-1201

Both are listed as mating with the receptacles above, but I felt that the first option (-0201) fit slightly better than (-1201).

The female crimp terminals can be bought individually:

https://www.mouser.com/ProductDetail/Mo ... sdK26Xc%3D

Note these are intended for 20 AWG wire (other sizes are available if needed).

To make your own passthrough cable, wire receptacle-to-plug the following pins:

6 - IGCT
16 - IGDI
20 - B+
10 - GND

Use twisted pair for the following:
3 - Tesla CAN L
13 - Tesla CAN H

2 - Toyota CAN L
12 - Toyota CAN H

Optional: Ethernet port (only needed if using Tesla Powertrain software, such as Vlad's remote diagnostic support)
9 - TX+
19 - TX-
8 - RX+
18 - RX-

The OVMS module connects with a standard 9-pin d-sub; male pins are on the OVMS, so the adapter cable will be female sockets:

9 - 12V (B+)
3 - GND

7 - CAN0 H (Tesla CAN)
2 - CAN0 L

5 - CAN1 H (Toyota CAN)
4 - CAN1 L

The B+ and GND wires will tie to the corresponding pins on the passthrough cable constructed above. The two CAN connections should each be twisted as pair, and will similarly be connected in parallel to the corresponding pins.

If there is sufficient interest, I would be willing a) to make cables, and/or b) lay out a small PCB to go with the soldered-in connector, possibly packed in a small plastic box for a more robust interfacing solution.
alflash
Posts: 171
Joined: Sun Sep 03, 2017 3:46 pm
Location: Ukraine
Contact: Website

Re: Introducing OVMS for RAV4 EV

Thanks for info.
That k28 (gray) connector also has pin #7 aka SHLD (pin #12 of Data Link Connector 3 No. 2)
Image
Russian fascists are killing the civilian population of Ukraine.
miimura
Posts: 1915
Joined: Thu Jan 17, 2013 11:13 pm
Location: Los Altos, CA

Re: Introducing OVMS for RAV4 EV

asavage wrote: Wed Apr 27, 2022 3:18 am I'm hopeful that miimura will respond to my questions of 25Mar, as I can't collaborate without communication. But, yes, I'm holding the hardware + 4G antenna: the easy part.
Matt provided the detailed cable information above. All of my current code is checked into the master branch on GitHub, but you probably need to sign up for "edge" firmware update from their servers in order for my code to be included. I normally update my module over my local wifi. I just turned on IIS on my desktop windows box and put the locally compiled binary in a folder under the webroot.

Since Toyota is totally incapable of restoring Entune communication with my car, we need people that can capture CAN logs while issuing remote commands that go through SafetyConnect. By capturing the Toyota CAN bus when the telematics module is passing information to the car, we can replicate that functionality.

Anyone who wants to communicate directly about this project can send me a Private Message on this board and I will provide my e-mail address.
2012 Shoreline Blue #1462 w/JdeMO | 2018 Tesla Model 3 LR | 4.32kW Motech/Enphase PV Solar + 2x Powerwall 2 AC| Leviton EVB40 40A & Jesla Home Charging | 2015 e-Golf LE (returned)
asavage
Posts: 329
Joined: Mon Aug 07, 2017 4:55 pm
Location: Oak Harbor, Wash.
Contact: Website

Re: Introducing OVMS for RAV4 EV

Good work, Matt.

Hmmm, only ten connect/disconnect cycles max, ouch:

Image
https://www.content.molex.com/dxdam/literature/987651-0951.pdf, pg. 11

Good thing I'm not planning to install/remove this much.

To simplify the Ethernet connection, I've ordered a RJ-45 Ethernet Round Panel Mount Extension Cable, Adafruit 4215, $5 from Adafruit or Mouser, and I'll cut off the plug. (For those who prefer, naturally there's a similar product at Amazon)

Image


On the CAN connections: my understanding is the Best Practice is to have terminating resistors at either end of the physical bus, and that intermediate CAN devices should pass through the lines. I'm reading that any stub connections should be kept short, and that they have the potential to reflect the signal. Does anyone know if the OVMS incorporates termination? I'm assuming it's not needed, but then again I don't know a lot.


I was going to chop up a spare serial cable from days gone by, but the first two I pulled out of the bin didn't have all wires through, and then I saw, "The two CAN connections should each be twisted as pair," and realized I'd have to run wire anyway, so gave up on chopping a cable up for this. In a previous life I used to repair computer monitors and terminals, and a common failure was when people shoved their CRT monitor away from them and the signal cable, which often exited the rear of the monitor horizontal, would be forced to a 90* bend, eventually breaking one of the signal pins. I say this to note that I'm certain that I do have a couple of DB9 (DE9) backshells in my stock, but those bins are not only in storage, they're tied face-to-face to prevent the sliding drawers from increasing entropy, and it's literally not worth $5 for me to untie/retie them right now . . . so, I thought I'd add one to the Mouser order I'm compiling. Wow, the metal backshells have gotten expensive (metal is all I'll use, too many stripped or warped plastic shells in my past). Mouser TE Conn. 571-5748676-1, $9. Ouch. Part of living a while is you get to see prices move.

The actual DE9 connector, Mouser Amphenol DE09S064TLF with female sockets and easy-to-assemble solder cups, $0.67 ea.

The OVMS I purchased is supplied without a SIM card (or data plan), so signed up with Hologram.io and added a form factor 4FF-compliant Hologram.io SIM card to my Mouser order, SIM-E-TRI-GL, $4. Once I get the SIM, I can register it with Hologram.io and it'll become active (I hope; I've never done this before, everyone's new at things once).
Regards,
Al Savage
2014 Rav4 EV, Shoreline Blue Pearl, #2609, first use 04Jun2014, 49k miles (Aug2017), OpenEV-SE 40A. First DU replacement May2018 59k.
2018 Model 3 LR AWD, blue. 9.6kw solar
http://nissandiesel.dyndns.org
hokiematt
Posts: 69
Joined: Thu Nov 02, 2017 8:57 pm
Location: Salisbury, NC

Re: Introducing OVMS for RAV4 EV

The Tesla and Toyota CAN networks are terminated at both ends. A brief scan through the OVMS documentation seems to indicate that there are no termination resistors in the unit, so it should connect without any problems.

The max length for a CAN stub is 1 meter, but I recommend keeping it as short as practical. For the twisted pair, you can make your own or I often recycle twisted pair from old Ethernet cables.

Return to “Modifications & Accessories”