What is the OVMS?
OVMS = Open Vehicles Monitoring System
The OVMS is a small module that connects to the vehicle's diag port (OBD2/CAN bus) to continously read the vehicle status and performance data. It can also write to the CAN bus to reconfigure the motor controller ("chip tuning").
The OVMS can (but does not need to) be connected to the GSM network using a standard SIM card. If you do, it can be controlled by SMS, using the OVMS smartphone App or from a computer. The OVMS can send telemetry data to a server enabling long term data capturing and analysis.
The module can also send SMS alerts, for example on charge process interruption or when the 12V battery needs charging. It's also equipped with a GPS receiver so you can locate the vehicle and record your tracks.
More about the system can be found on the official website: www.openvehicles.com/
Circuit schemes and software of the OVMS are released as Open Source and can be used freely for any purpose. Anyone can help on the project, every help is welcome. The OVMS originates on the Tesla Roadster but now supports a wide range of vehicles.
What does the OVMS do in a Twizy?
Charge monitoring: battery state of charge (SOC), SOC usage range, recording of charge and discharge processes, alert at charge interrupt, notification at completed charge and optionally at sufficient charge level for next trip, charge time estimation, monitoring of the 12V aux battery, reducing charge power level, stopping charge at sufficient SOC/range.
Range: reading the Twizy range estimation, calculation of the individual ideal range (configurable), extrapolation of both ranges during charge
Battery monitoring: surveillance and recording of all single cell voltages and temperatures, reporting of suspicious values, alerts on high cell deviations and high overall drift (standard deviation), measuring batter capacity (SOH = state of health)
Power monitoring: recording of energy consumption both overall and by drive phase (constant/acceleration/deceleration) and altitude change (up/down height differences), each with efficiency (Wh/km) and recuperation rates, automatic report at trip end (optional), recording of charge energy totals
GPS tracking: continous position tracking also while Twizy is off (anti theft), track logging on the server optionally once per minute or every 5 seconds (streaming mode), recording and analysis of the trip energy consumption
Chip tuning (SEVCON configuration): changing speed limit and warn speed, controlling maximum motor current, torque and/or power, setting drive and recuperation (neutral/brake) levels both overall and by speed, changing pedal translation ramps and smoothing, implementing a kickdown function, dynamic adjustment of drive power levels to the available battery/BMS power levels, low level access to the SEVCON registers (e.g. for custom tuning and experiments)
Note: since about July/August 2016 all Twizy versions come with a new SEVCON firmware that has been locked against tuning. Based on current knowledge the protection cannot be disabled and affects all tuning tools. This only affects tuning, all other OVMS features including the charge control continue to work.
How high can the Twizy be tuned?
|Twizy 80||Twizy 45|
|Speed (GPS)||111 kph||78 kph|
|Torque||70,1 Nm||36,0 Nm|
|…with current control||139,7 Nm ||82,6 Nm |
|Power||16,9 kW||10,0 kW|
|…with current control||33,0 kW ||19,4 kW |
|Current||120% = 540 A||123% = 330 A|
|Recuperation||100% ||100% |
|Ramps||20.000 rpm/s||20.000 rpm/s|
: these are theoretical figures. In reality the motor reaches magnetic saturation at high currents, so actual output will be lower (if you've got a dynamometer, please test and send results). The controller also protetcs itself and the motor against overheating, so even with disabled battery protection, the maximum output can only be produced for a few continous seconds.
: the battery limiter normally cuts off recuperation at about 45% of the driving power level. You can use 100% after disabling the battery limiter, but drivability of very high levels is poor because of the bad pedal resolution. "One pedal driving" is still possible, also with enabled limiter.
Important: you should understand all technical backgrounds before attempting tuning at the upper limits (see user manual)! For example, the Twizy 80 gearbox will be outside specs above 108 Nm!
Is it legal?
OVMS is a hobbyist project, not a commercial product. By using the OVMS you agree to do so completely on your own risk. The OVMS has neither CE approval nor undergone any official EMC tests. It has no ECE approval, so depending on your country may not be legal on public roads. Your insurance may become invalid and the Renault warranty may be void by just mounting the module.
If you apply speed and power changes, these may be detected permanently. The power limits of the battery will not be violated by the module without explicit request, so a rented battery can stay within its technical operating limits. But if Renault declines replacing a battery at 75% capacity because of some detected tuning, you will need to legally proove this at your cost and risk.
Is it dangerous?
Depends on how you use it. If you stick to telemetry, threats for Twizy or driver are very unlikely... that is, if you avoid winding the antenna cords around your neck or steering wheel.
Raised power, speed and recuperation need raised awareness and responsibility. Winter road conditions may already be dangerous with the default recuperation for unexperienced drivers, as the recuperation only brakes the rear axle. A Twizy with raised recuperation levels can become uncontrollable on icy roads even for good drivers. On the other hand, lowering the recup level will make the Twizy behave much better in winter than with the default configuration.
A fast Twizy remains silent and cute. You need to pay even more attention to pedestrians and other traffic participants, as they will not expect that agility from the Twizy.
Of course, higher power levels lead to higher stress on the components and therefore higher wear. The Twizy gear box is outside specification already at 77 kph on a T80 / 53 kph on a T45. Long driving at high speed can lead to oil overheating and damage of the oil seals.
The Twizy engine controller protects itself, the battery and motor against overload and overheating. But higher power means more heat and more mechanical stress from heat expansion, so the components will age faster.
On the other hand: reducing the power level will lead to a longer component life.
How do you control the OVMS?
The simple way: use SMS to send text commands to the OVMS and receive results and alerts. This works with any simple mobile phone.
The smartphone way: OVMS Apps are available for iOS and Android from the App store / Google Play. The latest Android development release can be downloaded from dexters-web.de/downloads. The App is very easy to use but does not support all Twizy specific functions yet. Using the App you normally don't need to use SMS, as alerts and notifications can be received by the App (as long as both OVMS module and phone have GPRS connection).
The server way: you can access all status and stored telemetry data using simple script commands or the server web interface, for example to download in CSV format and process in OpenOffice Calc, MS Excel or the like. GPS track logs can easily be converted into GPX format and visualized using Google Maps or OSM. Integration with home automation systems is easy.
The offline way: the OVMS has a standard serial port and allows calling all SMS and smartphone commands for example by using a simple terminal emulator. Using a serial cable you can operate the module without any network connection or even SIM card. A user guide and a user interface for MS Windows can be found on dexters-web.de/links.
Does it support remote control charging?
Yes, that can be done with a home automation system or just a simple remote control plug and a PC, Raspberry Pi or the like.
The Android App supports scripting beginning with version 3.12.1, so a simple smartphone or tablet now is sufficient for automation.
If for example you'd like to start charging when enough solar power is available, you schedule the home automation server, PC or RaspPi to query the solar power and switch on the Twizy plug if power is sufficient.
To then let the charge stop at for example 80%, the system uses one of the OVMS command line clients to query the Twizy SOC and switch off the smart plug when 80% has been reached.
In version 3.8.2 the OVMS can also stop the charge itself. The charge process can be configured to automatically stop on reaching a configured SOC or range limit. This can for example be used for long term storage at reduced SOC or to get full recuperation from start.
Since version 3.8.1 the OVMS can reduce the charge power level, so the Twizy can be charged at a 6A plug or from a solar inverter. The level can be adjusted remotely any time during charging, so you can let it follow the currently available power i.e. of your solar panels.
The scripts can be adapted to other systems easily: User report and script for the Conrad/ELV FS20 radio control plugs
Of course there are nearly no limits to more gimmicks, for example how about querying the Twizy GPS coordinates and automatically open your garage door when the Twizy comes home?
How much? Where to buy?
Update 06/2019: as the OVMS module version 3.2 has now undergone all checks and certifications needed for a legal commercialization within US and EU regions, the system can now also be sold at local resellers additionally to Fasttech.
The first reseller is Glyn Hudson, UK: shop.openenergymonitor.com/ovms
Overall costs for a complete kit are (at Fasttech) around 140 Euro plus customs fee (if you're lucky it may get through customs without fee). Resellers will normally include customs and taxes in their prices, if in doubt ask them.
Standard kit for Twizy within Europe:
- OVMS v3.1 SIM5360E 3G Modem Module (EU Edition)
- OBD-II to DB9 Data Cable for OVMS (left)
- OVMS GSM Antenna
- Universal GPS Antenna (SMA Connector)
A SIM card for Hologram.io is included (inserted and preconfigured). Roaming partner of Hologram in Germany is Telekom/D1, but for Germany Congstar is usually cheaper. The module requires a nano format SIM.
Cables and antennas of the v2 module can be used.
You do not need a flash programmer for v3, the module firmware can be updated over the air, by SD card or via USB.
OVMS v2 (discontinued)
Overall costs (without SIM card) for a complete kit including flash programmer are around 160 Euro plus customs fee (if you're lucky it may get through customs without fee).
Standard kit for SIM usage:
- OVMS Car Module v2
- OBD-II to DB9 Data Cable for OVMS (left)
- OVMS GSM Antenna
- Universal GPS Antenna (SMA Connector)
- SIM card
Kit for usage without SIM card:
Add for firmware updates (necessary for all use cases!):
More info including hints on SIM selection can be found in the user guide.
How much SMS and data volume do you need?
You need SMS only until you've established the GPRS connection or if it's temporarily unavailable. Only few SMS are necessary for the basic configuration.
You may choose if the OVMS sends alerts and notifications like charge status and trip reports by SMS and/or IP. The App receives IP notifications as system push notifications and collects them in the "messages" tab. So you don't need SMS in this case.
To cut down message volume you can suppress informational notifications or even completely disable notifications and SMS replies. Control message channels and type suppressions using parameter #3 and feature #14.
If you use the iOS App or an outdated firmware you will need SMS to access some Twizy specific functions like the battery cell monitor and the SEVCON configuration. Using the latest firmware and Android App, all text commands can be sent over the IP channel.
The IP volume depends on your usage pattern, the more you drive the more telemetry data will be produced. On average usage a volume of about 10 MB per month will be sufficient for the normal GPS track resolution. If you intend to often use high resolution tracking, more volume will be needed.
Where is the user manual?
Note: regarding the Twizy, V3 works very similar to V2. All telemetry data tables and tuning profiles are fully compatible, and the commands are very similar. Therefore, the basic descriptions and background info from the V2 manual are valid for V3 as well.
Hints on V3 commands:
- V3 commands need to be in lower case.
- When accessing via USB terminal, first issue enable (login).
- V3 commands are similar to V2 commands, just structured slightly different.
- Hint: try help, ? and xrt ?. Twizy commands are subcommands of "xrt".
- TAB only works via USB / SSH. Shortcuts can be used generally, e.g. mo t instead of module tasks.
- A usage info is shown if a command syntax is wrong or incomplete.
All latest document versions can be found here:
Direct link to the user manual (PDF):
General information can be found in the Tesla Roadster manual:
How do you mount it?
The easiest way is to just put the module including the antennas into the left glove box, where the diag plug is located.
A more sophisticated way: Mounting behind the glove box (Wido Vogel)
Does it need a permanent mount?
No, the module does not need to stay connected if you just want to tune or diagnose your Twizy. You also can use the same module to tune an arbitrary number of Twizys.
The disadvantage of unplugging is that you can only use one fixed tuning profile. The module can do dynamic parameter adjustments to realize a pedal kickdown and to adapt the drive and recup power levels to the dynamic battery power levels. The battery allows different charge and discharge power levels depending on SOC and temperature. If the tuning needs more current than available, you will experience sudden power cutbacks on acceleration and braking, and the battery will not be used with best efficiency.
Another big disadvantage of unplugging is that you lose the ability to quickly change drive and recuperation levels by road conditions demand.
Can it coexist with a Twizplay?
Yes, you can connect both Twizplay and OVMS in parallel using a standard OBD2 Y adapter (splitter) that connects the CAN bus to both plugs.
How to do the basic configuration?
The v3 module has builtin Wifi and can be configured using a web browser. Plug in the module (USB/vehicle), connect your PC/tablet/smartphone with the module's Wifi access point OVMS password OVMSinit and open http://192.168.4.1 in a browser. The configuration wizard leads through the setup. See user guide for details.
Hint: installation and configuration is covered perfectly by the workshop by Peter Saß:
- Prep 1: obtain a SIM card, initialize it and remove the PIN lock (using a standard mobile phone), charge the account.
- Prep 2: create a user account at dexters-web.de or www.openvehicles.com and creare a vehicle account therein.
- Prep 3: update the module firmware (see below).
On insertion of the SIM, check if the GPRS switch is set to enabled (inwards).
Connect the module to the diag port and the antennas. Wait until only the green LED flashes twice. Note: a fresh SIM card may need some hours for the first network registration. Also the GSM signal quality at the parking lot may be bad. The LED flash codes signal problems, see here and in the Tesla manual, page 14, for explanations.
Notes on SMS commands: Case is irrelevant on command keywords (i.e. (PASS = Pass = pass), but may be relevant on parameters (for example a password). If a command fails check case first. Quotes "..." in text sections mark the beginning and end of commands and shall not be entered. Braces <...> or [...] designate user defined values (parameters) and also shall not be entered.
Blanks/Spaces must be entered exactly as shown, none may be added or omitted. Especially query commands like MODULE? may not contain any spaces before the "?", and parameters must be separated by exactly one space.
Wait for acknowledge/error responses for every command before sending the next. If the module receives and processes a command, it sends an acknowledgement reply (unless deactivated). The reply will normally come after at most 3 minutes and will only be missing if a command has been spelled wrong or the SMS has been lost. If that happens, check spelling and send again.
Note on auto provisioning: this convenience function at the OpenVehicles website (green button at car entry) will try to set nearly all configuration parameters by SMS. It's currently incomplete, you still need to set the vehicle type "RT" yourself, either by SMS command MODULE … or by setting parameter #14. Please send a donation to the project if you use this function (SMS cost).
- Step 1: send SMS REGISTER OVMS from your mobile phone to the module. "OVMS" is the default module password, if you want to register another phone later on, replace this by your personal password (see next step).
- Step 2: send SMS PASS <password> to set your personal password, replacing "OVMS". This password must be used by unregistered mobile phones. Example: PASS sesam
- Step 3: send SMS MODULE <vehicleid> K SMSIP RT -- the vehicle id is the vehicle account login consisting of upper case letters and digits. "K" = kilometers, "SMSIP" enables notifications by SMS and IP, and "RT" = "Renault Twizy". Example: MODULE TWIZY007 K SMSIP RT
- Step 4: check if everything works so far: switch on the Twizy, then send SMS STAT? to query the battery SOC. Also try GPS? to query the coordinates.
The OVMS is now already ready to use by SMS. If you also want to connect to the server and use the App, continue with...
- Step 5: establish the GPRS connectivity by sending GPRS <apn> <username> <password> with your SIM provider's APN data (can be found via Google or on the provider's info pages). Use "-" for empty username/password. Example for blau.de: GPRS internet.eplus.de blau blau -- google for provider name + "APN" to find yours.
- Step 6: configure the OVMS server connection by (for example) SERVER ovms.dexters-web.de <vehiclepassword> -. The password to be used here is the one belonging to the vehicle login as used in the MODULE command -- "TWIZY007" in the example above. The green LED will be flashing once when the server connection has been established.
- Step 7: configure the App: add the vehicle on tab "Settings". Enter the vehicle login and password, the vehicle label can be chosen freely. You may enter the module/SMS password as well, but that's not necessary for the App. Check if it works: after selecting the vehicle, the App should display SOC, GPS position etc. (iOS: Server entry in system configuration)
- Step 8: if you want to tune your Twizy you need to activate CAN write access. You can do so either by SMS FEATURE 15 1 or using the App: Settings → Joystick Icon → Features
The OVMS is now configured. More options can be found in the manuals. Using the latest Android App you can now send all text commands from the "Messages" tab instead of using SMS. You also can remove "SMS" from the notifications channels parameter, as the App will receive all notifications by IP.
If you're stuck somewhere: check the support FAQ first!
Important: to not lose your configuration when updating the firmware, you need to check the option "Preserve device EEPROM" in the flash software!
If a configuration seems to be completely broken, flash once without "preserve EEPROM" to re-initialize the whole configuration. Then start over with REGISTER OVMS.
How to achieve the first tuning?
Remember to always wait for the command response / acknowledgement, also if sending the commands from the App. On error check spelling and try again. A bad connection may cause the App to display errors as well.
Preparation: if not done yet, activate CAN write access by issueing FEATURE 15 1.
The primary tuning goals are more speed, more power and more recuperation. A good start for this is:
- Step 1: switch on the Twizy but do not ignite (i.e. don't proceed to "GO")
- Step 2: set top speed to 100 kph, warn speed at 95 kph: CFG SPEED 100 95
- Step 3: set torque to 130%, power to 120%: CFG POWER 130 120
- Step 4: set recuperation to 20% on neutral (coasting) and 40% on foot braking: CFG RECUP 20 40
- Step 5: save your tuning profile: CFG SAVE 1
- Step 6: switch off the Twizy, start as usual and do a test drive.
You can now switch between the default and your profile 1 after switching on (before "GO"), either from the App, by commands CFG LOAD 0 / CFG LOAD 1, or using the SimpleConsole/WifiConsole by pushing the first/second switch / turning the knob. You may save two more custom profiles in slots 2 and 3.
For your next steps take a look at ramp tuning (CFG RAMPS, CFG RAMPL and CFG SMOOTH), and with a bit more experience creating your own torque/speed characteristics (CFG TSMAP).
Configure example tuning profiles
The user manual contains three example profiles -- please don't hesitate to get creative with your own experiments!
To prep your module with these three profiles, just send the following commands (the Twizy does not need to be switched on yet):
- #1 Power: CFG SET 1 3m9wg295ABozAAAAAAAAAAAuOkVbZVNFNRUrRVtlNSMbJGUAAAABAABlZQAAAAAA [Editor]
- #2 Eco: CFG SET 2 TW9wg3RsRxozAAAAAAAAAAAuOkVbZVNFNRUrRVtlNSMbHwAAAABlAAAAAAAAAAAA [Editor]
- #3 Ice: CFG SET 3 aQAAAAAAAAEBARgpW1tbZWUAAAAAAAAAAAAAAAAAAAAAHwAAAAAAAAAVFQAAAAAA [Editor]
Now you can activate for example the "power" profile by sending CFG LOAD 1 (with Twizy switched on, before "GO"), or by using the profile switch from the App. Don't forget to reboot the Twizy to activate the tuning.
Can I switch profiles without a mobile phone?
Yes. An emergency reset to the default configuration can be done using the D/N/R drive mode switch: simply push D or R three times right after switching on (before "GO"). Important: the module needs to be connected for this.
The best solution for OVMS v3 ist a "WifiConsole" with a push/turn knob and OLED display, that communicates wireless and battery powered with the module. It supports switching through the configured profiles as well as changing the recuperation and drive power levels on the fly.
The WifiConsole is built from few standard parts (based on WEMOS D1 mini) and can be built by any experienced electronics hobbyist in about an hour. Total cost is around 40 Euro. Instructions & software for WifiConsole (Github)
The best solution for OVMS v2 is connecting a "SimpleConsole" with four push switches and LEDs to the module. The LEDs show which of the four profiles (standard or tuning 1/2/3) is currently active, the switches can be used to change the profile.
Power and recuperation levels, ramps and smoothing can be changed anytime even while driving. So if you for example encounter black ice in winter you can switch off recuperation immediately simply by pushing a profile switch.
The SimpleConsole is not available to buy ready to use yet, but it's very simple and can be built by any experienced electronics hobbyist in about an hour. Total component cost is around 20 Euro. For details see SimpleConsole build instructions (PDF).
Why all the logins and passwords?
Hint: to avoid mistakes begin with using the same login and password for everything.
The SMS password allows to send commands to the module from another mobile phone than the registered one, you'll need this if you lose your phone.
The server needs two logins because it allows to manage a fleet of vehicles. The main login is your user account at the server, which may contain an arbitrary number of vehicle accounts.
The main login is used for vehicle management only. Module and App only know the vehicle login.
Btw, vehicles may exchange their GPS locations by using the "social groups" feature.
Why are firmware updates necessary?
The default firmware installed by the manufacturer is outdated and does not support all Twizy features.
The latest full featured ready to use version is the one contained in the ZIP from dexters-web.de/downloads.
The precompiled firmware images on Github are up to date, but due to ROM space restrictions or maintainer decision do not contain all Twizy functions. That affects for example the battery monitoring (BATT) and the SEVCON tuning (CFG).
Of course you can also compile the firmware yourself, so you've got full control over the functions included in your firmware. See the OVMS developer documentation for details.
How do you update the firmware?
You can do updates automatically, via Wifi or SD card. See menu "Firmware" in the web interface. More info can be found in the user guide.
The MPLAB software development package contains the flash programmer tool "IPE". The software is available free of charge for Linux, Mac OS and Windows:
For PICkit2 on Windows, the standalone software works better. That can be found in the Microchip Download Archive somewhere at the bottom.
If you encounter voltage problems with PICkit 3: some USB ports fail to provide 5 V, for example many Macs only do 4.7 V. That's normally still sufficient to flash, but you need to tell the programmer that the OVMS module can be flashed with 4.7 V. If that doesn't help, you need to use an external power supply (see manual: "Dry run"). Laptop solution: flash the module connected to the Twizy.
Att.: do not buy a "PCkit 3.5+"! This so-called "PICkit compatible" programmer available at Fasttech (and others) is incompatible to the OVMS.
How do you install the latest Android App?
Note: since V3.12.3 the latest App is again available on the Play Store.
Previous releases are available on dexters-web.de/downloads.
Steps to install previous releases:
- uninstall the Play store version if necessary
- enable APK installs from "unknown sources" in Settings → Security
- download the APK file and install it (Note: you may need to rename the downloaded file from ".man" to ".apk" using a file manager)
- if problems occur clear the App data and cache
The App can also be used in an Android emulator / virtual machine. Use a current Android image with Google API support and add a Google account in the emulator.
Port access control: if the App cannot connect to the server with correct data, check if your network is protected by a firewall. You need to open ports 6867 and 6868 to be able to access the OVMS server.
Typical problems and their LED flash codes
- Red 1: receiver fault, normally caused by GPRS dropouts or antenna problems
- Red 6: module can't connect to the GSM network, may be caused by bad signal quality or if the SIM card is not authorized
- Red 7/8: data (GPRS) connection can't be established, i.e. due to wrong APN configuration, insufficient account balance or provider GPRS blocking
- Red 9: can't connect to the OVMS server: the server may be down or login fails due to wrong server address / vehicle id / vehicle password
If the module can be accessed by SMS:
- Query LED and net state: DIAG
- Query APN config: GPRS?
- Query vehicle id: MODULE?
- Query server address and password: SERVER?
...and post results on the Twizy forum.
What's CFG PRE and CFG OP about?
If you only use macro commands like CFG SPEED and CFG POWER, you don't need these.
If you want to dig deeper into the SEVCON configuration you need these to access some registers.
The SEVCON tuning is done by writing to memory registers called "SDO" = service data objects. Some SDO can be changed any time, others need the SEVCON to be in the "pre-operative" mode. The "pre" mode can be compared to the BIOS screen of a PC and like that can only be entered right after switch-on.
The low level commands CFG READ/CFG WRITE etc. allow to access all SEVCON registers. Have a look at the SEVCON documentation and the master dictionary contained in the DVT software package to learn about register addresses and encoding.
The SEVCON will tell you if you need the "PRE" mode to change a register.
Example: after reading page 13 of the Twizy user guide you decide to change the battery cutback to begin at 10% instead of 15%. That's encoded in SDO address 3813.13 by scaling the percent value by 50. SO you try:
CFG WRITE 3813 13 500
...and get this response:
CFG WRITE: OLD: SDO 0x3813.13: 0x02EE = 750 ERROR 0008 SDO ABORT 0x3813.13: 0x08000004
That means 1) the old register value is 750 (/50=15%), and 2) the WRITE failed. Code 0x0800... is a CANopen/SEVCON standard error code. You may read about these in the SEVCON manual, section 7: "4" means "Not in pre-operational" -- to write to this register, you need the "PRE" mode.
So you now do:
...then once again...
CFG WRITE 3813 13 500
...which now succeeds. To switch the Twizy back to operational mode you finish with
...or simply switch the Twizy off and on again.
Your Twizy will now begin battery power cutback at 10% SOC.
There are lots of further SEVCON registers that may provide valuable tuning options.
How can I express gratitude and support the project?
OpenVehicles is a non commercial hobbyist project made by enthusiasts for enthusiasts. There is no regular income or sponsoring.
As the developer of the Twizy firmware and operator of the german OVMS server dexters-web.de, I appreciate donations of any amount. Just send whatever you consider appropriate with keyword "OVMS" by Paypal to my address
email@example.com – Thank you!