diff --git a/README.md b/README.md index ef829b0..cf9a0d7 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,13 @@ This is an Arduino library providing an emulation of the CAN communication protocol of the BMS (battery management system) on a Renault Twizy. +By reproducing the system interface of the original BMS, the Virtual BMS enables replacing the original by a custom battery without changing anything else on the Twizy. + +![Twizy Virtual BMS](extras/Virtual-BMS.svg) + The library provides an API to control power limits and charge current, so a wide range of batteries can be used. Even lead-acid is an option. -In the most simple case this can be used without any customization. The provided "SimpleBMS" example shows how to derive a very basic battery monitoring by using the Arduino analog ports to monitor the battery pack voltage and temperature. +In the most simple case this can be used without any customization. The provided "SimpleBMS" example shows how to create a very basic battery monitoring by using the Arduino analog ports to measure the battery pack voltage and temperature. If you'd like to contribute a specific BMS adaptation, please fork and add your code in the examples folder. @@ -17,23 +21,25 @@ You will also need these libraries: - [MCP_CAN_lib by Cory Fowler](https://github.com/coryjfowler/MCP_CAN_lib) - [TimerOne by Paul Stoffregen](https://github.com/PaulStoffregen/TimerOne) -To get the smallest possible ROM & RAM footprint, set `TWIZY_DEBUG_LEVEL` to 0 and `DEBUG_MODE` of the MCP_CAN library to 0. This reduces the core memory usage of the VirtualBMS library to (currently) 7758 bytes ROM and 403 bytes RAM. +To get the smallest possible ROM & RAM footprint, set `TWIZY_DEBUG_LEVEL` to 0 and `DEBUG_MODE` of the MCP_CAN library to 0. This reduces the core memory usage of the VirtualBMS library to (currently) 8338 bytes ROM and 403 bytes RAM. ## Documentation - [API reference](API.md) - [History](HISTORY.md) - + - [Twizy CAN object dictionary](https://docs.google.com/spreadsheets/d/1gOrG9rnGR9YuMGakAbl4s97a6irHF6UNFV1TS5Ll7MY) - [Twizy BMS protocol](extras/Protocol.ods) - [Battery connection scheme](extras/Twizy-BMS-wiring-scheme.pdf) - - [Battery connection part list](extras/Twizy-Battery-Part-List.md) + - [List of parts](extras/Twizy-Battery-Part-List.md) - [SEVCON configuration](extras/SEVCON-Configuration.md) - [Charger configuration](extras/CHARGER-Configuration.md) + - [Prototype](extras/Prototype-Blazej.md) + ## Hardware requirements @@ -49,7 +55,7 @@ To get the smallest possible ROM & RAM footprint, set `TWIZY_DEBUG_LEVEL` to 0 a - **Arduino**: to run the Twizy Virtual BMS you will need some Arduino and some MCP CAN interface. A wide range of hardware options is available. The code perfectly fits into an Arduino Nano leaving enough memory to implement quite complex custom logics. You should pick an MCP 2515 SPI CAN module with at least 16 MHz clock rate. IRQ connection is optional. - **Note**: Michael Balzer offers to customize the Virtual BMS for individual applications and BMS integration. For details please contact him at . + **Note**: Michael offers to customize the Virtual BMS for individual applications and BMS integration. For details please contact him at . - **Connection**: see the [part list](extras/Twizy-Battery-Part-List.md) for relais and connectors needed. diff --git a/extras/Twizy-Battery-Part-List.md b/extras/Twizy-Battery-Part-List.md index 247ba62..79e95a5 100644 --- a/extras/Twizy-Battery-Part-List.md +++ b/extras/Twizy-Battery-Part-List.md @@ -25,7 +25,7 @@ A good source for all parts is [JC Parts](https://www.jcparts.eu/). | 1x | [![296156226R](parts/296156226R-sm.jpg)](parts/296156226R-nm.jpg) | Relais Chargeur Fltg Ent Chrjr
*Charge relais 40A* | 296156226R | 39.96 € | | | | **Total** *(prices may change)* | | **~ 310 €** | -Parts may of course be replaced by functionally compatible ones, for example use a fork lift relais for the main power relais (relais & fuses are no special parts). Blazej Blaszczyk has built his prototype without using Renault parts. For details please contact him at . +Parts may of course be replaced by functionally compatible ones, for example use a fork lift relais for the main power relais (relais & fuses are no special parts). Blazej Blaszczyk has built his [prototype](Prototype-Blazej.md) without using Renault parts. For details please contact him at . - The `296740718R` signal connector is Yazaki part no. [7282-8854-30](http://connectors-catalog.sys.yzk.co.jp/yazaki-web/servlet/SubServlet_e?forward=7282-8854-30&plist=detail&select=XX) (contact terminals sold separate). - The `296743399R` main power connector is DELPHI part no. [F473110](http://ecat.delphi.com/feature?search=F473110), with contact terminals [F176600](http://ecat.delphi.com/feature?search=F176600). diff --git a/extras/Virtual-BMS.svg b/extras/Virtual-BMS.svg new file mode 100644 index 0000000..d0f65f4 --- /dev/null +++ b/extras/Virtual-BMS.svg @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Twizy + + + + + + + + Custom BMS + + + + + + + + Custom Battery + + + + + + + + + + + + + + + + Virtual BMS + + + + + + + + \ No newline at end of file diff --git a/extras/parts/294B16331R-nm.jpg b/extras/parts/294B16331R-nm.jpg index 6b25a36..78172b7 100644 Binary files a/extras/parts/294B16331R-nm.jpg and b/extras/parts/294B16331R-nm.jpg differ diff --git a/extras/parts/294B16331R-sm.jpg b/extras/parts/294B16331R-sm.jpg index b306083..81d55c7 100644 Binary files a/extras/parts/294B16331R-sm.jpg and b/extras/parts/294B16331R-sm.jpg differ