<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://openinverter.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pyoorkate</id>
	<title>openinverter.org wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://openinverter.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pyoorkate"/>
	<link rel="alternate" type="text/html" href="https://openinverter.org/wiki/Special:Contributions/Pyoorkate"/>
	<updated>2026-04-28T17:39:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://openinverter.org/wiki/index.php?title=Toyota_Prius_Gen3_Board&amp;diff=2248</id>
		<title>Toyota Prius Gen3 Board</title>
		<link rel="alternate" type="text/html" href="https://openinverter.org/wiki/index.php?title=Toyota_Prius_Gen3_Board&amp;diff=2248"/>
		<updated>2022-02-10T01:28:29Z</updated>

		<summary type="html">&lt;p&gt;Pyoorkate: Added image of 50 pin connector and clarified points to test for PWM signal during testing.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[File:Prius Gen3 Inverter Control v2.jpg|thumb|Prius Gen3 Control Board v2]]&lt;br /&gt;
&lt;br /&gt;
The Toyota Prius Gen3 Board is an open source project to repurpose 2010-2015 Toyota Prius inverters for DIY EV use. &lt;br /&gt;
&lt;br /&gt;
It consists of a open inverter circuit board and programming which replaces the OEM logic board in the prius inverter.&lt;br /&gt;
&lt;br /&gt;
This allows independent control of mg1 power stage, mg2 power stage, buck/boost converter and the dc/dc converter. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Note that there is also a [[Toyota Prius Gen2 Board]] for the 2004-2009 model years.&lt;br /&gt;
&lt;br /&gt;
== Prius Inverter ==&lt;br /&gt;
The Toyota Prius is a hybrid vehicle. Their inverters are suitable and attractive for DIY EVs because of:&lt;br /&gt;
* Large part availability. Priuses have been made in large numbers for 20 years.&lt;br /&gt;
* High affordability. Prius inverters are available for around $150 from scrapyards&lt;br /&gt;
* Durability. Toyota engineers appear to have made the inverters foolproof, many inputs and outputs gracefully handle fault conditions.&lt;br /&gt;
* Respectable performance. Rated for 50kW output, but tested to handle 600v, and 500+A on MG2. (MG1 unknown, Gen2 had 70% of MG2 on MG1).&lt;br /&gt;
* Ease of repurposing. Emulating the original ECU seems reasonably feasible.&lt;br /&gt;
&lt;br /&gt;
The Gen3 Prius (2010-2015 model years) has a variety of useful components inside the inverter package:&lt;br /&gt;
* 2 high power inverters, for the 2 motors MG1 (starter) capable of handling 250 amps, and MG2 (drive motor) capable of handling 350 amps.&lt;br /&gt;
* A DC-DC converter to provide 12v power supply to the automotive systems and accessories.&lt;br /&gt;
* A boost module to boost the 200v battery pack up to 500v, which looks to be able to function as a battery charger (wish list for future development)&lt;br /&gt;
* See this video for a thorough disassembly and explanation of the Gen3 Inverter (Timestamp ???? ): https://www.youtube.com/watch?v=Y7Vm-C4MsW8&lt;br /&gt;
&lt;br /&gt;
== Control Board ==&lt;br /&gt;
&lt;br /&gt;
The current version as of Jan 20, 2020 is v2.&lt;br /&gt;
&lt;br /&gt;
As designed by Damien Maguire, the open source hardware for the control board can be purchased as both partially populated and fully populated and tested boards on his website: &lt;br /&gt;
&lt;br /&gt;
[https://www.evbmw.com/index.php/evbmw-webshop/toyota-partially-built-boards-copy/prius-gen-3-inverter-logic-board-partial Prius Gen3 Partial]&lt;br /&gt;
&lt;br /&gt;
[https://www.evbmw.com/index.php/evbmw-webshop/toyota-built-and-tested-boards/prius-gen-3-inverter-built-tested Prius Gen3 Prius Gen3 Full &amp;amp; Tested]&lt;br /&gt;
&lt;br /&gt;
The control board is a physical replacement for the OEM Prius Gen3 inverter logic board inside the inverter. Remove the old one and replace it with the new one.&lt;br /&gt;
&lt;br /&gt;
== Development History ==&lt;br /&gt;
&lt;br /&gt;
V1 - This board was sold tested but also as a bare logic board requiring purchase of your own components and SMD placement and soldering skills. &lt;br /&gt;
&lt;br /&gt;
V2 - A new board source was found to be both high quality and low cost. The boards were redesigned around the inventory of parts available from this supplier. In particular the high cost of populated and soldered boards (10x the price) from the source used to make the v1 boards is so significantly lower on the v2 that there are likely no savings by building and soldering the board yourself. The circuit now has hardware to support repurposing the MG1 inverter as a battery charger, though as of Jan 20, 2020, software is still in development.&lt;br /&gt;
&lt;br /&gt;
v1c - this board uses mg2 power stage for motor control, and mg1 +buck/boost converter as a battery charger, or parallel connection of MG1 and MG2 to give more amps to a single motor.&lt;br /&gt;
&lt;br /&gt;
v1d - this board allows to use mg1 and mg2 power stages for dual motor control &lt;br /&gt;
&lt;br /&gt;
== Vendors ==&lt;br /&gt;
&lt;br /&gt;
 [https://www.evbmw.com/index.php/evbmw-webshop EVBMW Webshop]&lt;br /&gt;
&lt;br /&gt;
== Support ==&lt;br /&gt;
&lt;br /&gt;
Community support is available on the [https://openinverter.org/forum/viewtopic.php?f=14&amp;amp;t=488 Prius Gen 3 Inverter Logic Board Support Thread]&lt;br /&gt;
&lt;br /&gt;
You are not entitled to support, purchase from a vendor who offers support if you want it guaranteed. Treat the community with respect.&lt;br /&gt;
&lt;br /&gt;
== Inverter Model Numbers ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Inverter No || Car model(s) || Logic Board No || Power Board No || Compatible 50 pin connector|| PCB size || Confirmed works with board ||  Link &lt;br /&gt;
|-&lt;br /&gt;
| G9200-47141 || Auris 2012, RHD || || || || || || &lt;br /&gt;
|-&lt;br /&gt;
|G9200-47140&lt;br /&gt;
|Prius 2010&lt;br /&gt;
|F1759-47041 01&lt;br /&gt;
|&lt;br /&gt;
|Yes&lt;br /&gt;
|&lt;br /&gt;
|Yes&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|G9200-47162&lt;br /&gt;
|Prius + &lt;br /&gt;
|F1759-47041 01&lt;br /&gt;
|F1789-47090&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
| G9200-47180  || || || || || || || [https://www.diyelectriccar.com/forums/showpost.php?p=1026169&amp;amp;postcount=8 Photo diyelectriccar.com]&lt;br /&gt;
|-&lt;br /&gt;
| G9200-47190 || Auris 2017 || F1759-47070 05 || F1789-52010&lt;br /&gt;
|| ? || || || [https://openinverter.org/forum/viewtopic.php?f=14&amp;amp;t=51&amp;amp;start=270#p5661 Forum Thread openinverter.com]&lt;br /&gt;
|-&lt;br /&gt;
|G9200-47210&lt;br /&gt;
|Prius 2012&lt;br /&gt;
|F1759-47070 05&lt;br /&gt;
|&lt;br /&gt;
|YES&lt;br /&gt;
|154x143mm&lt;br /&gt;
|Yes&lt;br /&gt;
|https://openinverter.org/forum/viewtopic.php?p=16539#p16539&lt;br /&gt;
|-&lt;br /&gt;
|G9200-47220&lt;br /&gt;
|Prius 2014&lt;br /&gt;
|F1759-47070 05&lt;br /&gt;
|&lt;br /&gt;
|YES&lt;br /&gt;
|154x143mm&lt;br /&gt;
|Yes&lt;br /&gt;
|https://openinverter.org/forum/viewtopic.php?p=21384#p21384&lt;br /&gt;
|-&lt;br /&gt;
|G9200-47230&lt;br /&gt;
|Prius 2015&lt;br /&gt;
|&lt;br /&gt;
|F1789-52010&lt;br /&gt;
|Yes&lt;br /&gt;
|154x143mm&lt;br /&gt;
|&lt;br /&gt;
|https://openinverter.org/forum/viewtopic.php?p=29248#p29248&lt;br /&gt;
|-&lt;br /&gt;
|G9200-52010||Yaris&lt;br /&gt;
Prius C&lt;br /&gt;
||F1759-52010 04||F1789-52010|| ||154x143mm||&lt;br /&gt;
|https://openinverter.org/forum/viewtopic.php?f=14&amp;amp;t=257&amp;amp;p=5828#p5828&lt;br /&gt;
|-&lt;br /&gt;
|G9200-52031&lt;br /&gt;
|Yaris 2016&lt;br /&gt;
|F1759-52010 04&lt;br /&gt;
|F1789-52010&lt;br /&gt;
|YES&lt;br /&gt;
|&lt;br /&gt;
|YES&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| G9200-52032 || Yaris 2015 || F1759-52010 04 || F1789-52010 || YES || Long 143mm || || [https://openinverter.org/forum/viewtopic.php?f=14&amp;amp;t=439#p5058 Forum Thread openinverter.com] [https://openinverter.org/forum/viewtopic.php?f=14&amp;amp;t=51&amp;amp;start=270#p5669 Forum Thread openinverter.com]&lt;br /&gt;
|-&lt;br /&gt;
| G9201-52011 || Yaris || || || YES|||||| [https://openinverter.org/forum/viewtopic.php?f=14&amp;amp;t=439#p5681 Forum Thread openinverter.com]&lt;br /&gt;
|-&lt;br /&gt;
| G9201-52012 || Prius C || F1759-52010 || F1789-52010 || YES (presumably) |||||| [https://openinverter.org/forum/viewtopic.php?p=6979#p6979 Forum Thread openinverter.com]&lt;br /&gt;
|-&lt;br /&gt;
|G9200-52030&lt;br /&gt;
|Prius C (a.k.a. Prius Aqua)&lt;br /&gt;
|F1759-52010 04&lt;br /&gt;
|F1789-52010&lt;br /&gt;
|&lt;br /&gt;
|154mm long&lt;br /&gt;
|&lt;br /&gt;
|[https://openinverter.org/forum/viewtopic.php?f=11&amp;amp;t=999&amp;amp;p=16434#p16434 Forum Thread openinverter.com]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Kit Assembly Instructions (V1C) ==&lt;br /&gt;
[[File:Prius3-ldo2.jpg|thumb|Extra voltage regulator on Prius Gen3 board]]&lt;br /&gt;
This guide is for the assembly of version V1C of the Gen 3 board available here: https://www.evbmw.com/index.php/evbmw-webshop/toyota-built-and-tested-boards/prius-gen-3-inverter-built-tested&lt;br /&gt;
&lt;br /&gt;
This is based on the assembly videos by Damien Maguire. &lt;br /&gt;
&lt;br /&gt;
Part 1: https://www.youtube.com/watch?v=QE-zym8iIgM&amp;amp;t=2643s &lt;br /&gt;
&lt;br /&gt;
Part 2: https://www.youtube.com/watch?v=Nu5_OBOPk4s&amp;amp;t=1787s&lt;br /&gt;
&lt;br /&gt;
=== LDO strengthening ===&lt;br /&gt;
The stock 3V3 LDO (3.3V linear voltage regulator) does not provide sufficient current for both the STM32(s) and wifi module(s). Therefor the wifi module needs a distinct regulator.&lt;br /&gt;
&lt;br /&gt;
TODO: does this also affect the latest revision boards?&lt;br /&gt;
&lt;br /&gt;
=== Early Board Correction, pre July 2020 ===&lt;br /&gt;
The first batch of JLCPCB boards shipped have an incorrect resistor value that needs to be changed over. Boards &#039;&#039;shipped after Jun 26, 2020&#039;&#039; will not need to do this.&lt;br /&gt;
&lt;br /&gt;
[[File:Power supply.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Resistor labeled R101 (labeled &#039;1002&#039;) needs swapping for a 8k2 (0805 package) resistor. &lt;br /&gt;
[[File:20200629 155303.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
=== Motor Current Sensor correction. ===&lt;br /&gt;
Boards currently have an error with the current sensor circuit. R14 is supposed to be in parallel with C11 to form the voltage divider. One workaround would be to put a 1k resistor from one of the pads to ground. this can be done externally if you&#039;d rather not modify the board, put a 1k ohm resistor from MG2_STATOR_T2 to a ground pin. Then connector the temperature sensor from MG2_STATOR_T1 to MG2_STATOR_T2 as normal. &lt;br /&gt;
 &lt;br /&gt;
This is a current issue on the boards. A new revision is not yet available. &lt;br /&gt;
[[File:Screenshot 2021-08-13 at 8.50.56 am.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
=== Wifi Module Correction ===&lt;br /&gt;
The capacitor needs increasing to deal with noise. C49 needs changing for a 10uF capacitor.&lt;br /&gt;
[[File:Screenshot 2021-08-23 at 1.07.32 pm.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
=== DC-DC Startup Delay (V1c &amp;amp; V1d) ===&lt;br /&gt;
These revision boards will start up the DC-DC converter during pre-charge, if you&#039;ve soldered the jumper. This will mean the current for the DC-DC will be drawn during pre-charge, potentially preventing the main contactor closing.&lt;br /&gt;
&lt;br /&gt;
See https://openinverter.org/forum/viewtopic.php?f=14&amp;amp;t=1039 for more details.&lt;br /&gt;
&lt;br /&gt;
=== Soldering The Breakout Board ===&lt;br /&gt;
Solder the Ampseal socket to the the breakout board, the silk-screen indicates side and orientation fitment.&lt;br /&gt;
&lt;br /&gt;
[[File:20200605 174452.jpg|thumb|alt=|none]]&lt;br /&gt;
&lt;br /&gt;
Next flip it over and solder the 34 way IDC locking header on, notch upwards as show.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: Some versions of the breakout board have and error in the silk-screen that indicate orientation incorrectly, with the notch towards the bottom.&#039;&#039;&lt;br /&gt;
[[File:20200606 130213.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
=== Soldering the Main Board ===&lt;br /&gt;
The main board is mostly pretty easy to solder, the one exception is the 50 way white connector. I found that putting flux on the pads and dragging solder across them, placing the connector in place and then placing the iron on the pins was the easiest. &lt;br /&gt;
[[File:20200619 175629.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Next up I did conn 1, it can only go one way, and is a piece of cake after the 50 way connector.&lt;br /&gt;
[[File:20200605 174924.jpg|none|thumb]]&lt;br /&gt;
And Conn8, again easy.&lt;br /&gt;
[[File:20200605 175047.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Next the DCDC convert connector, again only fits one way.&lt;br /&gt;
[[File:20200605 175849.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
MG1 and MG2 Current sensor Connectors, both these are the same, the tabs on both MG1 and MG2 are at the top.&lt;br /&gt;
[[File:20200605 181654.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Next up the L2 inductor, it can go either way&lt;br /&gt;
[[File:20200605_182754.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Next up I did the right angled pins for the wifi module, stick the pins in the module connector and then through the board, hold it in place and flip it over.&lt;br /&gt;
&lt;br /&gt;
[add photo]&lt;br /&gt;
&lt;br /&gt;
Cut 2 lengths of 3 pins from the header pin strips for the ISP header for programming the Atmega328P that will be used ton control the buck-boost converter.&lt;br /&gt;
[[File:20200605 183933.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
To enable the DCDC converter for I&#039;ve bridged over the 2 pin holes, but you can add a switch or something here, or leave it open if you&#039;re not using the DCDC to keep the 12v battery charged.&lt;br /&gt;
&lt;br /&gt;
See note above for &#039;&#039;&#039;V1C and V1D boards&#039;&#039;&#039;&lt;br /&gt;
[[File:20200605 184633.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Pin header for Alegro current sensor, currently no software exists to control the buck boost, hopefully in the future this will be able to be used as a charger, this pin header is for the possible addition of a current sensor to facilitate.&lt;br /&gt;
[[File:20200605_185543.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Three options exist on the board for flashing the firmware to the STM32.&lt;br /&gt;
&lt;br /&gt;
If you plan on programming your board with a [https://www.tag-connect.com/product/tc2050-idc-nl-050 TC2050 JTAG]  then obviously skip the next step.&lt;br /&gt;
&lt;br /&gt;
Solder a 3 pin headers for single wire program interface, or a 6 pin header for FTDI interface.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The photo below shows both headers populated, however you don&#039;t necessarily need both.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:20200605 185557.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Last up is the 34-way ICD interlock connector for the breakout board. Notch outward.&lt;br /&gt;
[[File:20200609 094633.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
=== Powering up ===&lt;br /&gt;
Now it&#039;s time to power up the board with 12v and test.&lt;br /&gt;
&lt;br /&gt;
Green wire is +12v (pin 1) and blue 0v (pin 11)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; When Idle, board consumes about 1.7 - 1.8A of current. When PWM starts, current consumption goes up to ~2A.&lt;br /&gt;
[[File:20200608 125857.jpg|none|thumb]]&lt;br /&gt;
[[File:Screenshot 2020-06-07 at 1.32.12 pm.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
=== Checking voltages ===&lt;br /&gt;
&lt;br /&gt;
Check for ~3.3v here on C32&lt;br /&gt;
[[File:20200608 124947.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Check for ~5v here on C21/C20/C22/C25&lt;br /&gt;
[[File:20200607 134336.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Check for -5v here on the little via next to CONN7 or right next to CONN2 there&#039;s a via with -5V under it.&lt;br /&gt;
[[File:20200608 125110.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Finally the 26v &lt;br /&gt;
[[File:20200608 125053.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
Full kits will be supplied programmed and partial kits will be un-programmed.&lt;br /&gt;
&lt;br /&gt;
=== Wifi Module Firmware ===&lt;br /&gt;
&amp;lt;u&amp;gt;The WiFi module supplied as part of a kit will have the default SSID of &#039;&#039;&#039;&#039;&#039;inverter&#039;&#039;&#039;&#039;&#039; and a password of &#039;&#039;&#039;&#039;&#039;inverter123&#039;&#039;&#039;&#039;&#039;&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
My wifi module came with the firmware already installed, but if yours didn&#039;t follow the outline steps below. You will need a 3.3v USB to Serial adaptor.  &lt;br /&gt;
# Download the software from https://github.com/jsphuebner/esp8266-web-interface &lt;br /&gt;
#  Install the Arduino core from https://github.com/esp8266/Arduino (Arduino IDE, Platform.IO etc supported)&lt;br /&gt;
#  Write code to ESP8266&lt;br /&gt;
#  Write filesystem to ESP8266&lt;br /&gt;
&lt;br /&gt;
Step by Step using Arduino IDE&lt;br /&gt;
# Add https://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board &lt;br /&gt;
# Go to Boards -&amp;gt; Board Manager and install ESP8266&lt;br /&gt;
# Extract the esp8266-web-interface software to your Arduino projects directory&lt;br /&gt;
# Create a new folder named data&lt;br /&gt;
# Move all files except FSBrowser.ino to the data folder.&lt;br /&gt;
# Choose Olimex MOD-WIFI-ESP8266 as the board&lt;br /&gt;
# Upload the code using the Arduino IDE&lt;br /&gt;
# Use &#039;ESP8266 Sketch Data Upload&#039; from the Tools menu, this will upload the files in the data directory to the ESP8266&lt;br /&gt;
&lt;br /&gt;
=== Programming Firmware ===&lt;br /&gt;
There are three different interfaces that are possible to program the firmware.&lt;br /&gt;
&lt;br /&gt;
Below are instructions for using the single wire programming interface with the [https://www.st.com/en/development-tools/st-link-v2.html USB STLink V2].&lt;br /&gt;
&lt;br /&gt;
Connect the 3 wire pin headers to the programming device.&lt;br /&gt;
[[File:Swp.jpg|none|thumb]]&lt;br /&gt;
[[File:S-l1600.jpg|none|thumb]]&lt;br /&gt;
The pin labeled &#039;&#039;DAT&#039;&#039; on the board should connect to &#039;&#039;SWDIO&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The middle pin of the 3 pins on the board should go to &#039;&#039;GND&#039;&#039; on the STLink V2&lt;br /&gt;
&lt;br /&gt;
The pin labeled &#039;&#039;CLK&#039;&#039; on the board should connect to &#039;&#039;SWCLK&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You will also need to hook up power to the board. You can connect the 5V output of the STLink to the 5V pin of the FTDI header. This is the third pin from the left, where pin 1 is just below the letters BLK on the board.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using a Mac or Linux&#039;&#039;&#039; install https://github.com/stlink-org/stlink&lt;br /&gt;
&lt;br /&gt;
The bootloader can be found here: https://github.com/jsphuebner/tumanako-inverter-fw-bootloader/releases&lt;br /&gt;
&lt;br /&gt;
Run command to write the bootloader&amp;lt;blockquote&amp;gt;st-flash write stm32_loader.bin 0x08000000&amp;lt;/blockquote&amp;gt;&#039;&#039;&#039;For Windows&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Grab the custom bootloader (the .bin file) from https://github.com/jsphuebner/tumanako-inverter-fw-bootloader/releases&lt;br /&gt;
&lt;br /&gt;
Install the ST Link software from here: https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-link004.html&lt;br /&gt;
&lt;br /&gt;
Run the software then select Target&amp;gt;Connect and then Target&amp;gt;Settings to check that your USB device is connected and that the settings look as follows:&lt;br /&gt;
[[File:ST Link Software Settings.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Select File&amp;gt;Open and choose the bootloader from its download location. Then select Target&amp;gt;Program &amp;amp; Verify and you should see this:&lt;br /&gt;
[[File:Programming bootloader with ST Link software.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Once the bootloader has been programmed the main firmware can be uploaded and upgraded via the [[web interface]].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The main firmware can be found here: https://github.com/jsphuebner/stm32-sine/releases&lt;br /&gt;
&lt;br /&gt;
A wifi network should be visible with the name &#039;&#039;ESP-*&#039;&#039; connect to it&lt;br /&gt;
[[File:Screenshot 2020-06-20 at 8.33.04 am.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Once connected open a browser and navigate to http://192.168.4.1 and find the update section, upload the firmware.&lt;br /&gt;
[[File:Screenshot 2020-06-20 at 8.28.53 am.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
Once this has completed you can verify by scrolling to the Spot Values section and you&#039;ll see the software version&lt;br /&gt;
[[File:Screenshot 2020-06-20 at 8.39.58 am.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
=== Atmega328p Firmware ===&lt;br /&gt;
&#039;&#039;&#039;Be super careful never to program the Atmega while high voltage is applied and caps are not discharged. When cycling through the boot loader, it seems to do something strange that will blow up the otherwise bullet proof buck/boost converter! Also be aware that Arduino also cycles through the boot loader when closing the serial terminal!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will control the Buck Boost module that&#039;s hopefully going to be a functioning charger in the future, it also requires a simple bit of firmware to enable the DC-DC converter.&lt;br /&gt;
&lt;br /&gt;
[Add instructions for firmware]&lt;br /&gt;
&lt;br /&gt;
== Inverter Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Parameter&lt;br /&gt;
!Suggested Value&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|pwmfrq&lt;br /&gt;
|2&lt;br /&gt;
|PWM frequency. 0=17.6kHz, 1=8.8kHz, &#039;&#039;&#039;2=4.4kHz&#039;&#039;&#039;, 3=2.2kHz. Needs PWM restart&lt;br /&gt;
|-&lt;br /&gt;
|pwmpol&lt;br /&gt;
|0 - Active High&lt;br /&gt;
|DO NOT PLAY WITH THIS!&lt;br /&gt;
|-&lt;br /&gt;
|deadtime&lt;br /&gt;
|130&lt;br /&gt;
|Deadtime between highside and lowside pulse. 28=800ns, 56=1.5µs. Not always linear, consult STM32 manual. Needs PWM restart&lt;br /&gt;
|-&lt;br /&gt;
|il1gain&lt;br /&gt;
|4.56&lt;br /&gt;
|Digits per A of current sensor L1&lt;br /&gt;
|-&lt;br /&gt;
|il2gain&lt;br /&gt;
|4.5&lt;br /&gt;
|Digits per A of current sensor L2&lt;br /&gt;
|-&lt;br /&gt;
|udcgain&lt;br /&gt;
|5&lt;br /&gt;
|Digits per V of DC link&lt;br /&gt;
|-&lt;br /&gt;
|udcofs&lt;br /&gt;
|0&lt;br /&gt;
|DC link 0V offset&lt;br /&gt;
|-&lt;br /&gt;
|udclim&lt;br /&gt;
|540&lt;br /&gt;
|High voltage at which the PWM is shut down&lt;br /&gt;
|-&lt;br /&gt;
|snshs&lt;br /&gt;
|1&lt;br /&gt;
|Heatsink temperature sensor. 0=JCurve, &#039;&#039;&#039;1=Semikron&#039;&#039;&#039;, 2=MBB600, 3=KTY81, 4=PT1000, 5=NTCK45+2k2, 6=Leaf&lt;br /&gt;
|-&lt;br /&gt;
|pinswap&lt;br /&gt;
|8&lt;br /&gt;
|0=None, 1=Currents12, 2=SinCos, 4=PWMOutput13, &#039;&#039;&#039;8=PWMOutput23&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
[[Parameters]] Details&lt;br /&gt;
&lt;br /&gt;
== First Run (PWM verify) ==&lt;br /&gt;
Once your board in installed in the inverter and all the internal connectors are connected you can power up the inverter with 12v as above. No need to have anything connected to the HV battery or MG1 or MG2. You&#039;ll hear an audible wine. We&#039;re first going to verify the PWM outputs on the board and then connecting up a motor.&lt;br /&gt;
&lt;br /&gt;
Connect pin 3, MG2_FORW_IN to 12v&lt;br /&gt;
&lt;br /&gt;
Navigate to the [[Web Interface]]&lt;br /&gt;
&lt;br /&gt;
Change the parameter  encmode to &#039;AB&#039; as at the moment we don&#039;t have any sensors connected.&lt;br /&gt;
&lt;br /&gt;
Start the inverter in manual mode with the button&lt;br /&gt;
[[File:Screenshot 2020-07-06 at 1.21.04 pm.png|thumb|alt=|none]]    &lt;br /&gt;
&lt;br /&gt;
Now set the 2 testing parameters, fslipsnpnt and ampnom to 1. &lt;br /&gt;
[[File:Screenshot 2020-07-06 at 1.21.13 pm.png|none|thumb]] &lt;br /&gt;
&lt;br /&gt;
Using a scope, look for a PWM signal on MG2 A/B/C Hi/Low on the 50 pin connector. R74 through R79 can be used as test points for the PWM signal - these are located next to the 50 pin connector as shown in the image below. &lt;br /&gt;
[[File:51872869539 19178b9a51 o.jpg|alt=Partial shot of the 50 pin connector showing the location of the resistors which can be used as test points to check for the PWM signal on MG2 A/B/C Hi / Low. |none|thumb]]&lt;br /&gt;
Stop the inverter &lt;br /&gt;
&lt;br /&gt;
== First Run (Open loop motor spin) ==&lt;br /&gt;
&lt;br /&gt;
Now connect up the 3 motor phases and a small voltage of around 30v to the HV, I manually pre-charged with a 50w 10ohm resistor for a couple of seconds, the supply needs to be able to supply 10 amps or so. I also had a 20 amp fuse inline.&lt;br /&gt;
&lt;br /&gt;
As above, start the inverter in manual mode, set ampnom to 100 and fslipsnpnt to 10, the motor should start to spin.&lt;br /&gt;
&lt;br /&gt;
You may have [[Errors]] to address if this doesn&#039;t happen.&lt;br /&gt;
&lt;br /&gt;
== DC-DC Converter ==&lt;br /&gt;
The inverter contains a DC DC converter, that is used to keep the 12v battery charged using the high voltage battery. This is the EV equivalent to the alternator on a combustion engined car.&lt;br /&gt;
&lt;br /&gt;
As per the assembly instructions above this needs to be enabled via the jumper on the control board.&lt;br /&gt;
&lt;br /&gt;
In the unmodified state, the DC DC converter will operate with a main battery voltage in the ~80v to ~235v range and will require a simple modification to allow it to operate at higher voltage range, ~140v to ~400v.&lt;br /&gt;
&lt;br /&gt;
There&#039;s a couple of options for the DC DC converter. If you aren&#039;t planning on using the inverter as a charger and don&#039;t want to change the resistors you can use the buck boost module to step down the battery voltage to within the DC DC range.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Unmodified DC DC Resistors, using Buck Boost to step down.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Connect your battery to the inverter as shown below, with pre charge and fuses etc.[[File:20200705 190723.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
You can use the following sketch on the atmega328p&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Runs atmega328p buck/boost control on Prius Gen 3 and Yaris/Auris inverters in buck mode to drop Main HV down for DCDC converter.&lt;br /&gt;
Experimental code. Only tested on the bench! Use at your own risk!&lt;br /&gt;
D.Maguire&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;Metro.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int HVLow = 0;        // voltage on low side of converter&lt;br /&gt;
int HVHi = 0;        // voltage on high side of converter&lt;br /&gt;
int SetV = 0;       //set point voltage&lt;br /&gt;
int PWMDuty = 0;    //pwm duty cycle&lt;br /&gt;
&lt;br /&gt;
Metro timer_pwm=Metro(5); &lt;br /&gt;
Metro timer_serial=Metro(200);&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);//&lt;br /&gt;
  TCCR1B = TCCR1B &amp;amp; B11111000 | B00000010;    // set timer 1 divisor to  8 for PWM frequency of  3921.16 Hz&lt;br /&gt;
  pinMode(9, OUTPUT); //boost low side&lt;br /&gt;
  pinMode(10, OUTPUT); //boost Hi side&lt;br /&gt;
  analogWrite(9,0); //low side off&lt;br /&gt;
  analogWrite(10,0); //High side off&lt;br /&gt;
  SetV=210;  //set at 210v to run dcdc&lt;br /&gt;
  PWMDuty=0;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
// the loop function runs over and over again forever&lt;br /&gt;
void loop() {&lt;br /&gt;
&lt;br /&gt;
    HVLow = (analogRead(A0)/1.85)-43; //-43 needed for Lexus CT200h variant. Remove for Prius / Auris.&lt;br /&gt;
    HVHi = (analogRead(A1)*1.25);&lt;br /&gt;
    &lt;br /&gt;
    updatePWM();  //call pwm update routine.&lt;br /&gt;
    serialOUT();  //call serial out routine&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void serialOUT()&lt;br /&gt;
{&lt;br /&gt;
  if(timer_serial.check()){&lt;br /&gt;
  Serial.print(&amp;quot;Low Vbus = &amp;quot;);&lt;br /&gt;
  Serial.print(HVLow);&lt;br /&gt;
  Serial.print(&amp;quot;Volts&amp;quot;);&lt;br /&gt;
  Serial.print(&amp;quot;\t High Vbus = &amp;quot;);&lt;br /&gt;
  Serial.print(HVHi);&lt;br /&gt;
  Serial.print(&amp;quot;Volts&amp;quot;);&lt;br /&gt;
  Serial.print(&amp;quot;\t PWMDUTY = &amp;quot;);&lt;br /&gt;
  Serial.println(PWMDuty);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void updatePWM()&lt;br /&gt;
{&lt;br /&gt;
if(timer_pwm.check()){&lt;br /&gt;
  if(HVHi&amp;gt;300){  //if hv is above 300v start ramping up pwm and regulate to setpoint.&lt;br /&gt;
    if (HVLow&amp;lt;SetV) PWMDuty++;&lt;br /&gt;
    if (HVLow&amp;gt;SetV) PWMDuty--;&lt;br /&gt;
    if (PWMDuty&amp;lt;0)  PWMDuty=0;&lt;br /&gt;
    if (PWMDuty&amp;gt;250)  PWMDuty=250;&lt;br /&gt;
    analogWrite(10,PWMDuty);&lt;br /&gt;
  }&lt;br /&gt;
  if(HVHi&amp;lt;250)&lt;br /&gt;
  {&lt;br /&gt;
      PWMDuty--;;  //if hv is lower then 250v ramp down pwm&lt;br /&gt;
      if (PWMDuty&amp;lt;0)  PWMDuty=0;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Modified DC DC Resistors, using Buck Boost to bridge.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You must have modified the resistors in the inverter for this method to work. &lt;br /&gt;
&lt;br /&gt;
Connect your battery to the inverter as shown below, with pre charge and fuses etc.&lt;br /&gt;
&lt;br /&gt;
[[File:20200705 190723.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
The following sketch can use used on the atmega328p to internally bridge the buck boost module so that the full battery voltage reaches the DC DC converter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// I/O-PINS&lt;br /&gt;
const uint8_t boostLoDrivePIN = 9; // D9 (PB1)&lt;br /&gt;
const uint8_t boostHiDrivePIN = 10; // D10 (PB2)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/********&lt;br /&gt;
* SETUP *&lt;br /&gt;
********/&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  pinMode(boostHiDrivePIN, OUTPUT);&lt;br /&gt;
  digitalWrite(boostHiDrivePIN, HIGH); // To set high drive ON&lt;br /&gt;
  &lt;br /&gt;
  pinMode(boostLoDrivePIN, OUTPUT);&lt;br /&gt;
  digitalWrite(boostLoDrivePIN, LOW); // To set low drive OFF&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*******&lt;br /&gt;
* LOOP *&lt;br /&gt;
*******/&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Modified DC DC Resistors and using Buck Boost for charging.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Your battery will be connected to Charging HV + and HV - with contactors and precharge. You will also have another contactor that the atmega328p will control to externally bridge Charging HV+ and Driving HV+ this will externally bridge both sides of the buck boost module when in run mode so that the driving isn&#039;t limited by the buck boost module but during charging the contactor will open and the connection is severed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:20200705 190723 2.jpg|none|thumb]]The charing code for the atmega328p is here https://github.com/celeron55/prius3charger_buck, more details on charging is further down in the wiki.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Modifying the DC DC converter resistors&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DC DC converter in unmodified state will startup at a little over 100v and shut down at around 240v, to use it with a higher voltage it needs to be modified by changing some smd resistors.&lt;br /&gt;
&lt;br /&gt;
See https://www.youtube.com/watch?v=Nu5_OBOPk4s&amp;amp;t=2s&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need to remove the bottom cover of the inverter to expose the DC DC converter control board.&lt;br /&gt;
[[File:Screenshot 2021-01-06 at 6.51.47 pm.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
We need to replace 4 resistors on the top side of the board, these are R629, R627, R625, R623, currently 120k ohm, these will need replacing with  210k ohm&lt;br /&gt;
&lt;br /&gt;
(1%, 0.5W, 0805, Manufacturer part#: ERJP06F2103V Farnell #: 2326773 )&lt;br /&gt;
[[File:Screenshot 2021-01-06 at 6.56.26 pm.png|none|thumb]]&lt;br /&gt;
[[File:20210114 162937.jpg|none|thumb]]&lt;br /&gt;
These are the 4 resistors on the top.&lt;br /&gt;
[[File:20210114 172258.jpg|none|thumb]]&lt;br /&gt;
And Replace&lt;br /&gt;
[[File:20210114 174343.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
There&#039;s also 4 resistors to replace on the bottom, these are R630, R628, R626, R624, these also need to be 210k ohm.&lt;br /&gt;
[[File:Screenshot 2021-01-06 at 6.59.08 pm.png|none|thumb]]&lt;br /&gt;
[[File:20210114 172503.jpg|none|thumb]]&lt;br /&gt;
The bottom resistors are up next to the flexible cable, on the underside of the board, to access them, unscrew the 4 screws holding the board in place, unplug the black connector carefully lift the board upwards.&lt;br /&gt;
&lt;br /&gt;
Bare in mind the flexible cable is still attached and is soldered directly to the board. Flip it over.&lt;br /&gt;
[[File:20210114 172710.jpg|none|thumb]]&lt;br /&gt;
[[File:20210114 173552.jpg|none|thumb]]&lt;br /&gt;
Bottom side replaced. You can now place the board back in place, screw the 4 screws in and don&#039;t forget the black plug.&lt;br /&gt;
&lt;br /&gt;
Replace the bottom metal cover.&lt;br /&gt;
&lt;br /&gt;
== 12v Battery Connection ==&lt;br /&gt;
The 12v battery positive connects to this post, it&#039;ll output ~14v when the DC-DC is running to keep the battery charged, the negative terminal of the battery should be connected to the case of the inverter.[[File:20200705_190706.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
== High Voltage Battery Connection ==&lt;br /&gt;
The HV battery connection is bellow, DO NOT directly connect the battery here. It needs to be connected via contactors and a pre-charge resistor. This connection point by-passes the buck/boost converter.&lt;br /&gt;
&lt;br /&gt;
[[File:20200705 190723.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
[Add details of pre-charge and contactor]&lt;br /&gt;
&lt;br /&gt;
== Motor Connection ==&lt;br /&gt;
If you are only using MG2 to power a motor, and not paralleling MG1 and MG2, connect your 3 phase wires from the motor to the outer 3 terminals.&lt;br /&gt;
&lt;br /&gt;
[[File:20200705 190657.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
== Parallel MG1 and MG2 on a single motor ==&lt;br /&gt;
MG1 and MG2 can be used in parallel for more power, to do so there&#039;s some solder jumpers on the board to use. Jumpers SJ1 to SJ6 need soldering across the little gap between them.&lt;br /&gt;
[[File:Screenshot 2021-08-20 at 9.17.02 am.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You then need to connect MG1 phase 1 to MG2 phase 1 and so on. This needs to be done before the the current sensors so that all the current goes through MG2 current sensors on the phase bars, otherwise the software cannot measure the current correctly.&lt;br /&gt;
[[File:1n9hto6.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== IDC Connector ==&lt;br /&gt;
If you are not using the AMPSeal daughterboard, you can connect directly to the 34 pin IDC connector on the EVBMW board. &lt;br /&gt;
&lt;br /&gt;
Connections are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Pin Number&lt;br /&gt;
|Label&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12V_IN&lt;br /&gt;
|Provide with +12V supply from battery or power supply for testing&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|12V_IN&lt;br /&gt;
|Provide with +12V supply from battery or power supply for testing&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|MG2_FORW_IN&lt;br /&gt;
|Active high signal at 12V (switches at &amp;gt;7V) to tell the inverter which way to spin the motor. Take positive feed from 12V battery or supply and wire through a three position switch, with the switched connections running to forward and reverse.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|MG2_REVER_IN&lt;br /&gt;
|Active high signal at 12V (switches at &amp;gt;7V) to tell the inverter which way to spin the motor. Take positive feed from 12V battery or supply and wire through a three position switch, with the switched connections running to forward and reverse.&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|MG2_START&lt;br /&gt;
|Active high signal at 12V (switches at &amp;gt;7V) to start the inverter and move it from pre-charge to run mode. Typically connected to the momentary &#039;START&#039; position of your ignition switch.&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|MG2_BRAKE_ON&lt;br /&gt;
|Active high signal at 12V (switches at &amp;gt;7V) to inform the inverter that the car is under braking. Typically takes a feed from the brake switch that also turns on brake lights etc.&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|CRUISE_IN&lt;br /&gt;
|Active high signal at 12V (switches at &amp;gt;7V) to turn on cruise control mode. This sets the current motor speed as the set point for cruise control. Cruise control is disabled by a signal from the brake switch.&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|VCC_5V&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;+5V supply for temperature and throttle sensors&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|MG2_ACCEL&lt;br /&gt;
|5V analogue input from first channel of throttle sensor. These typically take a 5V supply and ground and return to this pin a variable voltage that indicates throttle position.&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MG2_BRAKE_TRANS&lt;br /&gt;
|5V analogue input from second channel of throttle sensor. These typically take a 5V supply and ground and return to this pin a variable voltage that indicates throttle position.&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|GND&lt;br /&gt;
|Common ground for 12V supply or 5V return.&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|GND&lt;br /&gt;
|Common ground for 12V supply or 5V return&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|CAN_EXT_H&lt;br /&gt;
|CANBus digital communication connection for remote interface with inverter&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|CAN_EXT_L&lt;br /&gt;
|CANBus digital communication connection for remote interface with inverter&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|VCC_5V&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;+5V supply for temperature and throttle sensors&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|MG2_ENC_1&lt;br /&gt;
|Can be either digital input for encoder (in which case, connect the relevant encoder output here and provide the device with 5V and ground), or one of the two connections for the SIN winding if you are using a resolver for motor position.&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|MG2_ENC_2&lt;br /&gt;
|Can be either digital input for encoder (in which case, connect the relevant encoder output here and provide the device with 5V and ground), or one of the two connections for the COS winding if you are using a resolver for motor position.&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|GND&lt;br /&gt;
|Common ground for 12V supply or 5V return&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|MG2_COSA&lt;br /&gt;
|Connect SIN winding of motor resolver here and to Encoder Channel A&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|MG2_SINA&lt;br /&gt;
|Connect COS winding of motor resolver here and to Encoder Channel B&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
|MG2_EXCA&lt;br /&gt;
|Connect exciter winding of motor resolver here and to ground&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
|GND&lt;br /&gt;
|Common ground for 12V supply or 5V return&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
|MG2_STATOR_T1&lt;br /&gt;
|5V output for the motor temperature sensor. These are typically variable resistance devices. Connect one side of the sensor here.&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
|MG2_STATOR_T2&lt;br /&gt;
|Input from motor temperature sensor. Connect the other side of the sensor here. &#039;&#039;&#039;(Note the board correction above. Do not connect if it hasn&#039;t been addressed by a new revision or work around)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|MAIN_CON&lt;br /&gt;
|Open Collector (Will switch the ground side from disconnected to ground). &lt;br /&gt;
Connect one side of the contactor coil to +12v and the other to this pin. Your contactor will need either a built in economiser or additional circuit. MAX 2 amp.&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
|PRECHG_RLY&lt;br /&gt;
|Open Collector (Will switch the ground side from disconnected to ground). &lt;br /&gt;
Connect one side of the contactor coil to +12v and the other to this pin. Your contactor will need either a built in economiser or additional circuit. MAX 2 amp.&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|AC_CON&lt;br /&gt;
|Open Collector (Will switch the ground side from disconnected to ground). &lt;br /&gt;
Connect one side of the contactor coil to +12v and the other to this pin. Your contactor will need either a built in economiser or additional circuit. MAX 2 amp.&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|HV_CON&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
|AC_PRECH&lt;br /&gt;
|Open Collector (Will switch the ground side from disconnected to ground). &lt;br /&gt;
Connect one side of the contactor coil to +12v and the other to this pin. Your contactor will need either a built in economiser or additional circuit. MAX 2 amp.&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND&lt;br /&gt;
|Common ground for 12V supply or 5V return&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
|EVSE_PROX&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
|CONTROL_PILOT&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|CHG_CANH&lt;br /&gt;
|CANBus digital communication connection for remote interface with charger&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|CHG_CANL&lt;br /&gt;
|CANBus digital communication connection for remote interface with charger&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Ampseal Socket &amp;amp; Plug ==&lt;br /&gt;
There are multiple part numbers for the large 35 way Ampseal through hole socket, with small mating differences, be sure to get a matching pair.&lt;br /&gt;
&lt;br /&gt;
TE connectivity &#039;&#039;&#039;776164-1&#039;&#039;&#039; and &#039;&#039;&#039;776163-1&#039;&#039;&#039; are a matched pair (source https://www.ebay.co.uk/itm/Connector-ECU-Terminals-35P-35-Way-776164-1-776231-1-776163-1-Male-Female-Pins/401764868163?hash=item5d8b0d6043:g:3TkAAOSwexhc1Tcy&amp;lt;nowiki/&amp;gt;Ebay)&lt;br /&gt;
&lt;br /&gt;
[[File:AMPSeal socket (male).jpg|alt=|none|thumb|AMPSeal socket (male) in 3D printed surround with pins marked]]&lt;br /&gt;
&lt;br /&gt;
The AMPSeal connector is wired as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Pin Number&lt;br /&gt;
|AMPSeal Pinout Label&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12V SUPPLY POSITIVE&lt;br /&gt;
|Provide with +12V supply from battery or power supply for testing&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GROUND&lt;br /&gt;
|Common ground for 12V supply or 5V return&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|FORWARD DIRECTION SIGNAL&lt;br /&gt;
|Active high signal at 12V (switches at &amp;gt;7V) to tell the inverter which way to spin the motor. Take positive feed from 12V battery or supply and wire through a three position switch, with the switched connections running to forward and reverse.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|REVERSE DIRECTION SIGNAL&lt;br /&gt;
|Active high signal at 12V (switches at &amp;gt;7V) to tell the inverter which way to spin the motor. Take positive feed from 12V battery or supply and wire through a three position switch, with the switched connections running to forward and reverse.&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|START SIGNAL&lt;br /&gt;
|Active high signal at 12V (switches at &amp;gt;7V) to start the inverter and move it from pre-charge to run mode. Typically connected to the momentary &#039;START&#039; position of your ignition switch.&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|BRAKE DIGITAL SIGNAL&lt;br /&gt;
|Active high signal at 12V (switches at &amp;gt;7V) to inform the inverter that the car is under braking. Typically takes a feed from the brake switch that also turns on brake lights etc.&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|CRUISE CONTROL SIGNAL&lt;br /&gt;
|Active high signal at 12V (switches at &amp;gt;7V) to turn on cruise control mode. This sets the current motor speed as the set point for cruise control. Cruise control is disabled by a signal from the brake switch.&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|5V OUT&lt;br /&gt;
| +5V supply for temperature and throttle sensors&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|ACCELERATOR CHAN 1 INPUT&lt;br /&gt;
|5V analogue input from first channel of throttle sensor. These typically take a 5V supply and ground and return to this pin a variable voltage that indicates throttle position.&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|ACCELERATOR CHAN 2 INPUT&lt;br /&gt;
|5V analogue input from second channel of throttle sensor. These typically take a 5V supply and ground and return to this pin a variable voltage that indicates throttle position.&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|GROUND&lt;br /&gt;
|Common ground for 12V supply or 5V return.&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|INVERTER CAN HIGH&lt;br /&gt;
|CANBus digital communication connection for remote interface with inverter&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|INVERTER CAN LOW&lt;br /&gt;
|CANBus digital communication connection for remote interface with inverter&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
| +5V OUT&lt;br /&gt;
| +5V supply for temperature and throttle sensors&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|ENCODER CHAN A&lt;br /&gt;
|Can be either digital input for encoder (in which case, connect the relevant encoder output here and provide the device with 5V and ground), or one of the two connections for the SIN winding if you are using a resolver for motor position.&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|ENCODER CHAN B&lt;br /&gt;
|Can be either digital input for encoder (in which case, connect the relevant encoder output here and provide the device with 5V and ground), or one of the two connections for the COS winding if you are using a resolver for motor position.&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|GROUND&lt;br /&gt;
|Common ground for 12V supply or 5V return&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|RESOLVER SIN&lt;br /&gt;
|Connect SIN winding of motor resolver here and to Encoder Channel A&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|RESOLVER COS&lt;br /&gt;
|Connect COS winding of motor resolver here and to Encoder Channel B&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|RESOLVER EXC&lt;br /&gt;
|Connect exciter winding of motor resolver here and to ground&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
|GROUND&lt;br /&gt;
|Common ground for 12V supply or 5V return&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
|MOTOR TEMP SENSOR T1&lt;br /&gt;
|5V output for the motor temperature sensor. These are typically variable resistance devices. Connect one side of the sensor here.&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
|MOTOR TEMP SENSOR T2&lt;br /&gt;
|Input from motor temperature sensor. Connect the other side of the sensor here. &#039;&#039;&#039;(Note the board correction above. Do not connect if it hasn&#039;t been addressed by a new revision or work around)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
|MAIN HV CONTACTOR&lt;br /&gt;
|Open Collector (Will switch the ground side from disconnected to ground).&lt;br /&gt;
Connect one side of the contactor coil to +12v and the other to this pin. Your contactor will need either a built in economiser or additional circuit. MAX 5 amp.&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|HV PRECHARGE RELAY&lt;br /&gt;
|Open Collector (Will switch the ground side from disconnected to ground). &lt;br /&gt;
Connect one side of the contactor coil to +12v and the other to this pin. Your contactor will need either a built in economiser or additional circuit. MAX 5 amp.&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
|CHARGER AC INPUT RELAY&lt;br /&gt;
|Open Collector (Will switch the ground side from disconnected to ground). &lt;br /&gt;
Connect one side of the contactor coil to +12v and the other to this pin. Your contactor will need either a built in economiser or additional circuit. MAX 5 amp.&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|CHARGER HV DC REQUEST&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|CHARGER AC PRECHARGE RELAY&lt;br /&gt;
|Open Collector (Will switch the ground side from disconnected to ground). &lt;br /&gt;
Connect one side of the contactor coil to +12v and the other to this pin. Your contactor will need either a built in economiser or additional circuit. MAX 5 amp.&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
|GROUND&lt;br /&gt;
|Common ground for 12V supply or 5V return&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|EVSE PROXIMITY SIGNAL&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
|EVSE CONTROL PILOT SIGNAL&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
|CHARGER CAN HIGH&lt;br /&gt;
|CANBus digital communication connection for remote interface with charger&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|CHARGER CAN LOW&lt;br /&gt;
|CANBus digital communication connection for remote interface with charger&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|NOT USED&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
|NOT USED&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Connecting Resolver ==&lt;br /&gt;
For resolver connect EXC to one side of the exciter winding and other to Ground.&lt;br /&gt;
&lt;br /&gt;
Connect one side of SIN winding to SIN and other to Encoder A&lt;br /&gt;
&lt;br /&gt;
Conenct one side of COS winding to COS and other to encoder B.&lt;br /&gt;
&lt;br /&gt;
== Inverter as charger ==&lt;br /&gt;
The buck/boost module in the inverter can be used to step up or down an input voltage to charge the high voltage battery in the car. Stepping down to a lower voltage is buck and up is boost converting.&lt;br /&gt;
&lt;br /&gt;
=== Buck Mode Charging. ===&lt;br /&gt;
This is what you need if your battery voltage will be lower than the rectified input (&amp;lt; 340v for 240v single phase, 600v for 3 phase)&lt;br /&gt;
&lt;br /&gt;
There&#039;s some firmware for the Atmega on the EVBMW board to control the buck/boost in buck mode for charging.&lt;br /&gt;
&lt;br /&gt;
https://github.com/celeron55/prius3charger_buck&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve downloaded the code there&#039;s some things to change.&amp;lt;blockquote&amp;gt;#define BATTERY_CHARGE_VOLTAGE 300    //Set this to your battery full voltage&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;#define AC_PRECHARGE_MINIMUM_VOLTAGE 550  // European 3-phase rectifies to 600V, Single Phase 240v rectifies to 340V&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;#define PRECHARGE_BOOST_ENABLED true.   // The capacitor needs pre-charging, there&#039;s 2 options, a pre-charge resistor on the A.C input or use the battery to boost to the input voltage.&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;#define PRECHARGE_BOOST_VOLTAGE 550  // European 3-phase rectifies to 600V, Single Phase 240v rectifies to 340V&amp;lt;/blockquote&amp;gt;The battery connection needs to be a little different. The battery + will need connecting to the left most terminal and a contactor will be needed to bridge the left most and right most when running.&lt;br /&gt;
[[File:20200705 190723 2.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
== 3D Printed Parts ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|[[File:20210119 125158.jpg|none|thumb]]&lt;br /&gt;
|[[File:20210119 110057.jpg|none|thumb]]&lt;br /&gt;
|[[File:20210119 191934.jpg|none|thumb]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
User bobby_come_lately has created a fair few 3D printable parts for use with the inverter. They can be downloaded https://github.com/jamiejones85/Gen3PriusInverter3DParts&lt;br /&gt;
&lt;br /&gt;
== Frequently Asked Questions ==&lt;br /&gt;
&#039;&#039;&#039;What happens when the inverter has an ERROR?&#039;&#039;&#039;&amp;lt;blockquote&amp;gt;The Toyota driver error signals are connected to the pk_in pin on the stm32 so when the Inverter has an error it stops the PWM by giving the STM32 an interrupt signal. See [https://openinverter.org/forum/viewtopic.php?p=25460#p25460 Here]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
[https://github.com/damienmaguire/Prius-Gen3-Inverter/tree/master/V2 Damien&#039;s Prius Gen3 v2 Github]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/damienmaguire/Prius-Gen3-Inverter/blob/master/V1c/PriusGen3HandPlacedParts.csv Bill of Hand Placed Parts] (Github)&lt;br /&gt;
&lt;br /&gt;
[https://github.com/damienmaguire/Prius-Gen3-Inverter/blob/master/V2/PriusG3_V1b_BOM_JLC.xls?raw=true Bill of Materials] (Github)&lt;br /&gt;
&lt;br /&gt;
The control board takes advantage of the [https://openinverter.org/wiki/Downloads OpenInverter.org software] for control.&lt;br /&gt;
&lt;br /&gt;
[[Category:OEM]] [[Category:Toyota]] [[Category:Inverter]]&lt;/div&gt;</summary>
		<author><name>Pyoorkate</name></author>
	</entry>
	<entry>
		<id>https://openinverter.org/wiki/index.php?title=File:51872869539_19178b9a51_o.jpg&amp;diff=2247</id>
		<title>File:51872869539 19178b9a51 o.jpg</title>
		<link rel="alternate" type="text/html" href="https://openinverter.org/wiki/index.php?title=File:51872869539_19178b9a51_o.jpg&amp;diff=2247"/>
		<updated>2022-02-10T01:25:02Z</updated>

		<summary type="html">&lt;p&gt;Pyoorkate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Partial shot of the 50 pin connector showing the location of the resistors which can be used as test points to check for the PWM signal on MG2 A/B/C Hi / Low.&lt;/div&gt;</summary>
		<author><name>Pyoorkate</name></author>
	</entry>
	<entry>
		<id>https://openinverter.org/wiki/index.php?title=Batteries&amp;diff=1152</id>
		<title>Batteries</title>
		<link rel="alternate" type="text/html" href="https://openinverter.org/wiki/index.php?title=Batteries&amp;diff=1152"/>
		<updated>2020-11-29T19:23:09Z</updated>

		<summary type="html">&lt;p&gt;Pyoorkate: Created batteries page - mainly detailing some design challenges for pouch cells. Placeholders in place for LiIon / 18650 builds. Placeholders for pack design.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
There are a wide variety of battery chemistries available for use as the main traction battery of an EV. To use each chemistry safely, and to ensure an adequate service life from the battery pack it is important to understand the requirements for the chemistry you are using. Failure to do so may lead to premature or catastrophic failure of the pack.&lt;br /&gt;
&lt;br /&gt;
Good pack design will allow for a nominal amount of abuse. People make mistakes and the pack should allow a margin for safety - and for longevity!&lt;br /&gt;
&lt;br /&gt;
== Lithium Iron Phosphate (LiFePO4) Batteries ==&lt;br /&gt;
Lithium Iron Phosphate (also known as LFP, or LiFePO4) batteries offer a good compromise between safety, energy density and ease of use for DIY conversions. They are available in a number of formats, commonly pouch cells and cylindrical cells.&lt;br /&gt;
&lt;br /&gt;
=== LiFePO4 Pouch cells ===&lt;br /&gt;
The majority of this content is drawn from this thread: [https://endless-sphere.com/forums/viewtopic.php?f=14&amp;amp;t=38761&amp;amp;start=900 https://endless-sphere.com/forums/viewtopic.php?f=14&amp;amp;t=38761] discussing the use of the A123 20Ah pouch cell. However, many of the general points apply equally to other similar pouch cells.&lt;br /&gt;
&lt;br /&gt;
==== General build requirements ====&lt;br /&gt;
Pouch cells are vulnerable to damage from debris, and must be held in compression (see the datasheet for your battery, but 10-12 psi is recommended for the A123 pouch cells as a guide). A rigid container capable of preventing damage and providing compression is therefore required. Be aware the cells expand and contract in use, so allowance for this must be included in the structure of the case.&lt;br /&gt;
&lt;br /&gt;
The pouch cells should be separated to prevent abrasion between cells, and also to avoid the development of hot spots. Prebuilt modules from A123 systems had thin foam sheets or heatsinks between each cell. Be sure to avoid any debris that could rub on the pouch surface, particularly if using recycled cells.&lt;br /&gt;
&lt;br /&gt;
Mylar, &#039;[https://www.americanmicroinc.com/fish-paper/ Fish paper]&#039; or a [https://www.rogerscorp.com/elastomeric-material-solutions/poron-industrial-polyurethanes compliant foam] may be appropriate materials to serve this purpose. This material should not be flammable. If the material is heat insulating, it is important to address thermal management.&lt;br /&gt;
&lt;br /&gt;
==== Compression ====&lt;br /&gt;
Compression is required to prevent premature failure of the cell. Without compression electrolyte will become unevenly distributed, causing current gradients in the cell and uneven heating. Local temperatures can become high enough to form gas formation leading to cells &#039;puffing up&#039; even when the pack is otherwise held within temperature and voltage constraints. This will be exacerbated in packs with otherwise poor thermal management. Compression forces gas generated to the margins of the cell, outside of the cell stack, minimising its effect cell performance. Gas in the middle cells will create a dead space which does not store or release energy.&lt;br /&gt;
&lt;br /&gt;
There is ~1% expansion through a discharge cycle. As the cell ages, the nominal cell thickness can grow by 3-5%. For A123 cells the ideal pressure is between 4 and 18psi with the ideal pressure being ~12psi. Maintaining 12psi can increase the life by 500 cycles over that of 4 or 18psi&lt;br /&gt;
&lt;br /&gt;
There is some suggestion that in uses where 1C is never exceeded compression &#039;&#039;may&#039;&#039; not be required.&lt;br /&gt;
&lt;br /&gt;
Highly rigid endplates with a mechanism to allow for a limited degree of expansion (e.g. steel bands) are considered an effective solution to this challenge.&lt;br /&gt;
&lt;br /&gt;
It should be noted that compression is a challenge specific to pouch cells. Cylindrical cells are designed to maintain their own compression within the cell&#039;s electrode stack by their design.&lt;br /&gt;
&lt;br /&gt;
This thread provides more information and experimentation relating to pack compression: &amp;lt;nowiki&amp;gt;https://endless-sphere.com/forums/viewtopic.php?f=14&amp;amp;t=52244&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pouch Cell Pack Design Examples ====&lt;br /&gt;
Placeholder&lt;br /&gt;
&lt;br /&gt;
==== Notes regarding recycled pouch cells ====&lt;br /&gt;
Pouch cells are somewhat fragile, and breaching the insulation is not difficult, especially in a cells removed from existing packs and repurposed. If the pouch has had their poly-layers compromised you may see a number of faults:&lt;br /&gt;
* Black spots around the perimeter of the cell indicate electrolyte leakage&lt;br /&gt;
* Voltage on the outside of the bag. Note that microvoltage between the pouch and the electrode is normal (and due to a capacitive effect).&lt;br /&gt;
While the majority of these cells should no longer be in the market, a significant number of faulty cells made it back into the &#039;greymarket&#039; in around 2013. These cells had misaligned tabs which can also lead to isolation failures between the tab and the pack. These cells should be avoided, particularly in high demand applications.&lt;br /&gt;
&lt;br /&gt;
=== Cylindrical cells ===&lt;br /&gt;
Placeholder&lt;br /&gt;
&lt;br /&gt;
==== Situations likely to cause cell failure ====&lt;br /&gt;
&#039;&#039;Taken directly from [https://endless-sphere.com/forums/memberlist.php?mode=viewprofile&amp;amp;u=33107 wb9k]&#039;s post on endless sphere in the [https://endless-sphere.com/forums/viewtopic.php?f=14&amp;amp;t=38761 A123 thread]&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Overcharge&#039;&#039;&#039;. Any extended time above 3.8 Volts will generate enough heat and electrochemical activity to puff a cell, especially one that is improperly compressed.&lt;br /&gt;
# &#039;&#039;&#039;Overdischarge followed by charge&#039;&#039;&#039;. Any A123 cell that has been pulled low enough to come to rest at &amp;lt;300 mV should be immediately scrapped. The published number for that is 500 mV, but the real figure is closer to 300, so that&#039;s a &amp;quot;safety buffer&amp;quot; if you will. Below this Voltage, the Cu electrodes start to dissolve into the electrolyte. When charge is applied, the Cu forms dendrites that puncture the separator layer, forming an internal short in the cell. This can puff a cell in a hurry---the more charge current on tap, the worse it&#039;s prone to be.&lt;br /&gt;
# &#039;&#039;&#039;Driving a cell negative&#039;&#039;&#039;. I&#039;ve neglected to mention this before, but it is a possibility. I don&#039;t know much about the specific mechanism at this time.&lt;br /&gt;
# &#039;&#039;&#039;Malfunctioning or misinformed electronics&#039;&#039;&#039;. This is the most common cause of all of the above in my experience. At this stage of the game, it is critical for YOU to understand how your BMS functions on at least a cursory level. Choose your BMS very carefully and periodically verify that it is operating properly. They&#039;re not all created equal. Make sure V sense lines are securely connected and free of corrosion. Just because your BMS says there was never a problem doesn&#039;t necessarily make it so. Avoid harnesses or ribbon cables between multiple modules if possible--they are problematic wherever they are used in any mobile electronics.&lt;br /&gt;
# &#039;&#039;&#039;Exposure to or generation of sufficient heat&#039;&#039;&#039;. I don&#039;t know exactly at what temperature gas formation begins in the electrolyte, but we spec a max storage temp of 80 (or 85?) degrees C and I suspect this is the reason. The hotter, the puffier--to a point. This is why soldering tabs poses a real hazard to cell health. If you feel you must solder, sink or blow the heat away from the body of the cell. Use a big iron that can make sufficient local heat quickly, before the whole mass of the cell gets hot. You might even get the cell warm enough to melt separator if not careful.&lt;br /&gt;
# &#039;&#039;&#039;No compression, not enough compression, improperly distributed compression&#039;&#039;&#039;. This is a pack/module design issue. Apply 10, maybe 15 psi to your cell stack end to end and then band snugly and evenly. Use hard endplates of some sort--never wrap cells directly or allow their shape to become distorted. Protect all areas of the pouch from impact damage. This obviously does not apply to cylindrical cells.&lt;br /&gt;
&lt;br /&gt;
==== Cell aging for LiIoPO4 cells ====&lt;br /&gt;
&#039;&#039;Derived (barely paraphrased) from [https://endless-sphere.com/forums/memberlist.php?mode=viewprofile&amp;amp;u=33107 wb9k]&#039;s post on endless sphere in the [https://endless-sphere.com/forums/viewtopic.php?f=14&amp;amp;t=38761 A123 thread]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Capacity loss is caused by the Lithium that was available for storage becoming permanently plated on the cathode. Being unable to move within the cell it is no longer available to store energy. The impact of this plating is greater than the amount of lithium &#039;lost&#039; to plating because not only is the lithium no longer available, it is also preventing access to that part of the cathode meaning Li that can still move has to take a longer path to reach the cathode. Lithium plating is one cause of increased cell resistance (there are others), a sign of worsening cell health.&lt;br /&gt;
&lt;br /&gt;
There is no linear relationship between actual capacity loss and impedance rise. However some cell defects will also increase impedance.&lt;br /&gt;
&lt;br /&gt;
Increasing cell resistance may cause a number of symptoms which may be confused with [https://earthshipbiotecture.com/a-lithium-ion-battery-primer/ High Self Discharge.]&lt;br /&gt;
# Elevated Peukert Losses. As more energy per amount of current through the cell is lost as heat, the cells useable capacity decreases. So the apparent capacity loss is higher than the actual capacity loss of cycleable lithium. When used in low current applications (e.g. solar energy storage) the actual and apparent decrease in capacity will be small. In high current draw applications (like EV traction packs), the Peukert loss increases proportionally, so the apparent capacity loss increases much faster than the actual capacity loss.&lt;br /&gt;
# Greater voltage excursion under the same load. Due to increased cell resistancethe voltage will sag further under the same load than a cell in optimal condition. The inverse is also true, the voltage will be higher for the same amount of charging current applied. The cell will then rebound to a voltage further from the loaded and charging voltages. This, obviously, can look like high self discharge but is a different phenomenon.&lt;br /&gt;
# Absolute maximum current decrease.&lt;br /&gt;
Elevated impedance causes a more complex constellation of symptoms, some of which may be easy to confuse with High Self Discharge (HSD). Ohm&#039;s law (E=I/R) holds the key to understanding here.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1) Elevated Peukert losses.&#039;&#039;&#039; Because more energy per unit of current through the cell is lost as heat, less of the cell&#039;s capacity is actually USABLE. Thus, apparent capacity loss can be significantly greater than actual capacity loss caused by the loss of cycleable Li alone. In low current applications, the two numbers will be close together. In high current applications, Peukert losses increase in proportion, so apparent loss of capacity breaks further and further away from actual capacity loss as current increases.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2) Greater voltage excursion under the same load.&#039;&#039;&#039; Elevated resistance across the cell means that voltage will sag more under the same load than it did when the cell was healthier. Conversely, voltage will rise higher with the same amount of applied charge current than it did when it was healthier. At the same time, rebound/settling voltages will be further away from loaded/charging voltages. In other words, the cell will rebound to a voltage further away from loaded voltage, all else being equal. Similarly, voltage will settle farther from the charge voltage with the same charge applied. This can give the illusion of elevated self-discharge, but the phenomenon is actually not the same thing. Again, the greater the charge and load currents, the greater the effect becomes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3) Absolute max current decreases.&#039;&#039;&#039; Because the cell&#039;s series resistance is elevated, the maximum possible current through the cell is decreased.&lt;br /&gt;
&lt;br /&gt;
Just to confuse things further, there can be many factors that lead to impedance rise. Some are related to Li plating, others are not.&lt;br /&gt;
&lt;br /&gt;
== Lithium Ion Batteries ==&lt;br /&gt;
Lithium Ion (LiIon) batteries have a greater energy density than Lithium Iron Phosphate batteries, but have more challenging needs to use safely. The ideal operating range of LiIon batteries is between +15 and +45°C. The upper limit of temperature is particularly important as LiIon batteries experience thermal runaway - an unstoppable chain reaction that can occur in milliseconds releasing the stored energy in the cell. This can produce temperatures of 400°C and a fire that is extremely difficult to put out. Thermal runaway can start as low as 60°C and becomes much more likely at 100°C&lt;br /&gt;
&lt;br /&gt;
Risk factors for thermal runaway:&lt;br /&gt;
* Short Circuits - either internally or externally&lt;br /&gt;
* Overcharging&lt;br /&gt;
* Excessive current draw or when charging&lt;br /&gt;
&lt;br /&gt;
=== LiIon Pouch cells ===&lt;br /&gt;
Placeholder&lt;br /&gt;
&lt;br /&gt;
=== 18650 and other cylindrical cells ===&lt;br /&gt;
Placeholder&lt;/div&gt;</summary>
		<author><name>Pyoorkate</name></author>
	</entry>
</feed>