<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hobby</title>
	<atom:link href="https://hobby.farit.ru/feed/" rel="self" type="application/rss+xml" />
	<link>https://hobby.farit.ru</link>
	<description></description>
	<lastBuildDate>Fri, 27 Feb 2026 07:17:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.39</generator>
	<item>
		<title>Coolant temperature gauge in BMW E30 instrument cluster</title>
		<link>https://hobby.farit.ru/coolant-temperature-gauge-in-bmw-e30-instrument-cluster/</link>
		<comments>https://hobby.farit.ru/coolant-temperature-gauge-in-bmw-e30-instrument-cluster/#comments</comments>
		<pubDate>Fri, 20 Jun 2025 02:45:42 +0000</pubDate>
		<dc:creator><![CDATA[Farit]]></dc:creator>
				<category><![CDATA[bmw e30]]></category>

		<guid isPermaLink="false">http://hobby.farit.ru/?p=727</guid>
		<description><![CDATA[The coolant temperature gauge in the BMW E30 instrument cluster is connected to the brown-plug coolant temperature sender(12621710511). The coolant temperature sensor The temperature sensor is an NTC thermistor, its resistance is higher when the temperature is lower. It was inserted into a container with liquid silicone that was subjected to freezing and heating. Temperature [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The coolant temperature gauge in the BMW E30 instrument cluster is connected to the brown-plug coolant temperature sender(12621710511). </p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2025/06/tempgauge-e30.jpg"><img src="http://hobby.farit.ru/wp-content/uploads/2025/06/tempgauge-e30-854x728.jpg" alt="Temperature Gauge BMW E30" width="854" height="728" class="aligncenter size-medium wp-image-728" /></a></p>
<h3>The coolant temperature sensor</h3>
<p>The temperature sensor is an NTC thermistor, its resistance is higher when the temperature is lower.<br />
It was inserted into a container with liquid silicone that was subjected to freezing and heating. Temperature values were recorded. They are lower that the temperature range of the engine, I may try to measure the higher temperatures later and recalculate the results.</p>
<table>
<tr>
<th>Temperature</th>
<th>Resistance</th>
</tr>
<tr>
<td>3°C (38°F)</td>
<td>1300 Ω</td>
</tr>
<tr>
<td>25°C (77°F)</td>
<td>620 Ω</td>
</tr>
<tr>
<td>60°C (140°F)</td>
<td>186 Ω</td>
</tr>
</table>
<p>The Steinhart–Hart equation coefficients:<br />
A = 0.0021390576483277567<br />
B = 0.00011856786248721395<br />
C = 0.000001702703922601429</p>
<h3>Coolant temperature gauge values</h3>
<p>The values for the reference marks, they start from 0. The supplied voltage is 5 Volts.</p>
<table>
<tr>
<th>Mark</th>
<th>Resistance</th>
<th>Temperature</th>
<th>Input voltage</th>
</tr>
<tr>
<td>0 (blue)</td>
<td>160 Ω</td>
<td>64°C (147°F)</td>
<td>3.1 V</td>
</tr>
<tr>
<td>1</td>
<td>85 Ω</td>
<td>82°C (180°F)</td>
<td>2.3 V</td>
</tr>
<tr>
<td>2</td>
<td>54 Ω</td>
<td>94°C (201°F)</td>
<td>1.8 V</td>
</tr>
<tr>
<td>3 (middle)</td>
<td>35 Ω</td>
<td>106°C (222°F)</td>
<td>1.33 V</td>
</tr>
<tr>
<td>4</td>
<td>25 Ω</td>
<td>114°C (237°F)</td>
<td>1.05 V</td>
</tr>
<tr>
<td>5 (red)</td>
<td>20 Ω</td>
<td>120°C (248°F)</td>
<td>0.86 V</td>
</tr>
<tr>
<td>6</td>
<td>12.5 Ω</td>
<td>132°C (270°F)</td>
<td>0.6 V</td>
</tr>
</table>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2025/06/resistance-e30sensor.jpg"><img src="http://hobby.farit.ru/wp-content/uploads/2025/06/resistance-e30sensor-854x447.jpg" alt="resistance-e30sensor" width="854" height="447" class="aligncenter size-medium wp-image-732" /></a></p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2025/06/resistance-voltage-e30.jpg"><img src="http://hobby.farit.ru/wp-content/uploads/2025/06/resistance-voltage-e30-854x447.jpg" alt="resistance-voltage-e30" width="854" height="447" class="aligncenter size-medium wp-image-733" /></a></p>
]]></content:encoded>
			<wfw:commentRss>https://hobby.farit.ru/coolant-temperature-gauge-in-bmw-e30-instrument-cluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HML087 coding plug ROM for BMW E30 instrument cluster</title>
		<link>https://hobby.farit.ru/hml087-coder-rom-for-e30-instrument-cluster/</link>
		<comments>https://hobby.farit.ru/hml087-coder-rom-for-e30-instrument-cluster/#comments</comments>
		<pubDate>Sat, 15 Feb 2025 21:39:47 +0000</pubDate>
		<dc:creator><![CDATA[Farit]]></dc:creator>
				<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://hobby.farit.ru/?p=693</guid>
		<description><![CDATA[The E30 instrument cluster for newer models have a coding plug (codier stecker) in front that stores the configuration parameters for SI boards: 6 or 4 cylinders, the maximum RPM, etc. If you open the coding plug, you can find the chip HML087. It&#8217;s a 40-year-old ROM that uses its own communication protocol. The coding [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The E30 instrument cluster for newer models have a coding plug (codier stecker) in front that stores the configuration parameters for SI boards: 6 or 4 cylinders, the maximum RPM, etc.<br />
If you open the coding plug, you can find the chip HML087. It&#8217;s a 40-year-old ROM that uses its own communication protocol.</p>
<h3>The coding plug pins</h3>
<table>
<tr>
<th>Pin</th>
<th>Function</th>
<th>Description</th>
</tr>
<tr>
<td>1</td>
<td>CLOCK</td>
<td>The data is sent on its level going from high to low</td>
</tr>
<tr>
<td>2</td>
<td>GND</td>
<td>Ground</td>
</tr>
<tr>
<td>3</td>
<td>+5V</td>
<td>Power to the chip</td>
</tr>
<tr>
<td>4</td>
<td>GND</td>
<td>Ground</td>
</tr>
<tr>
<td>5</td>
<td>DATA</td>
<td>The output data: high &#8211; 1, low &#8211; 0</td>
</tr>
<tr>
<td>6</td>
<td>GND</td>
<td>Ground</td>
</tr>
<tr>
<td>7</td>
<td>CS</td>
<td>The ROM is selected when the CS level is high</td>
</tr>
<tr>
<td>8</td>
<td>GND</td>
<td>Ground</td>
</tr>
</table>
<h3>Communication protocol capture</h3>
<p>The protocol can be captured using a Saleae compatible logic analyzer and the Saleae software. </p>
<p>The coding plug for HML087 1385468 (E30 325i M20B25 7000RPM USA)<br />
<a href="http://hobby.farit.ru/wp-content/uploads/2025/02/hml087_1385468.png"><img src="http://hobby.farit.ru/wp-content/uploads/2025/02/hml087_1385468-854x172.png" alt="hml087_1385468" width="854" height="172" class="aligncenter size-medium wp-image-697" /></a></p>
<p>The communication protocol description.<br />
The pin CS is set high by a microprocessor. Then, the microprocessor sends 64 CLOCK signals. When the CLOCK signal goes from high to low, the ROM outputs data on the DATA pin.</p>
<h3>Data from different E30 coding plugs</h3>
<table>
<tr>
<th>Coding plug</th>
<th>Description</th>
<th>0</th>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>7</th>
<th>8</th>
<th>9</th>
<th>10</th>
<th>11</th>
<th>12</th>
<th>13</th>
<th>14</th>
<th>15</th>
</tr>
<tr>
<td>1385468</td>
<td>E30 325i M20B25 7000RPM USA</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>1380873</td>
<td>E30 M3 S14 8000RPM Europe</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>1377368</td>
<td>E30 325e M20B27 5000RPM USA</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
</tr>
<tr>
<td>1394321</td>
<td>E30 318is M42B18 7000RPM USA</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>1385364</td>
<td>E30 318i M40B18 7000RPM Europe</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>16</th>
<th>17</th>
<th>18</th>
<th>19</th>
<th>20</th>
<th>21</th>
<th>22</th>
<th>23</th>
<th>24</th>
<th>25</th>
<th>26</th>
<th>27</th>
<th>28</th>
<th>29</th>
<th>30</th>
<th>31</th>
</tr>
<tr>
<td>1385468</td>
<td>&nbsp;</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>1380873</td>
<td>&nbsp;</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>1377368</td>
<td>&nbsp;</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>1394321</td>
<td>&nbsp;</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>1385364</td>
<td>&nbsp;</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>32</th>
<th>33</th>
<th>34</th>
<th>35</th>
<th>36</th>
<th>37</th>
<th>38</th>
<th>39</th>
<th>40</th>
<th>41</th>
<th>42</th>
<th>43</th>
<th>44</th>
<th>45</th>
<th>46</th>
<th>47</th>
</tr>
<tr>
<td>1385468</td>
<td>&nbsp;</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
</tr>
<tr>
<td>1380873</td>
<td>&nbsp;</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>1377368</td>
<td>&nbsp;</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>0</td>
</tr>
<tr>
<td>1394321</td>
<td>&nbsp;</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
</tr>
<tr>
<td>1385364</td>
<td>&nbsp;</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>48</th>
<th>49</th>
<th>50</th>
<th>51</th>
<th>52</th>
<th>53</th>
<th>54</th>
<th>55</th>
<th>56</th>
<th>57</th>
<th>58</th>
<th>59</th>
<th>60</th>
<th>61</th>
<th>62</th>
<th>63</th>
</tr>
<tr>
<td>1385468</td>
<td>&nbsp;</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>0</td>
</tr>
<tr>
<td>1380873</td>
<td>&nbsp;</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>0</td>
</tr>
<tr>
<td>1377368</td>
<td>&nbsp;</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
</tr>
<tr>
<td>1394321</td>
<td>&nbsp;</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>1385364</td>
<td>&nbsp;</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
</table>
<h3>HML087 emulation</h3>
<p>The communication protocol can be emulated by a microprocessor. While the Attiny family looks like an obvious choice, it&#8217;s too slow for the application. It will work with older SI boards where the CLOCK signal period is 30 µseconds, but in the newer SI boards the period is 5 µseconds.</p>
<h3>HML087 emulator that uses the microprocessor ch32v003</h3>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2025/02/hml087_emulator.png"><img src="http://hobby.farit.ru/wp-content/uploads/2025/02/hml087_emulator-854x535.png" alt="hml087_emulator" width="854" height="535" class="aligncenter size-medium wp-image-717" /></a></p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2025/02/hml087_emulator_schema.png"><img src="http://hobby.farit.ru/wp-content/uploads/2025/02/hml087_emulator_schema-854x519.png" alt="hml087_emulator_schema" width="854" height="519" class="aligncenter size-medium wp-image-719" /></a></p>
<p>Here is the software for the BMW E30 coding plug emulator that uses the RISC-V microcontroller CH32V003: <a href="https://github.com/faritka/hml087" rel="noopener" target="_blank">https://github.com/faritka/hml087</a></p>
<p>You can check the timing diagram for the coder.</p>
<p>The CLOCK signal pulse period is 5.583 µs as the programmed coder was inserted into one of the latest SI boards.<br />
When the CLOCK signal changes from HIGH to LOW, the coder reacts after 725 ns (0.725 µs) and sends 0 (LOW) on the DATA line. This delay is acceptable for the latest SI boards. </p>
<p>The CLOCK signal pulse period is about 30 µs for earlier SI boards, and the coder certainly works with them.</p>
<p><a href="https://hobby.farit.ru/wp-content/uploads/2025/02/coder_diagram.jpg"><img src="https://hobby.farit.ru/wp-content/uploads/2025/02/coder_diagram-816x854.jpg" alt="coder_diagram" width="816" height="854" class="aligncenter size-medium wp-image-752" /></a></p>
]]></content:encoded>
			<wfw:commentRss>https://hobby.farit.ru/hml087-coder-rom-for-e30-instrument-cluster/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Playing WAV files on STM32 for BMW E30 gong</title>
		<link>https://hobby.farit.ru/bmw-e30-gong/</link>
		<comments>https://hobby.farit.ru/bmw-e30-gong/#comments</comments>
		<pubDate>Mon, 15 Jul 2024 05:57:41 +0000</pubDate>
		<dc:creator><![CDATA[Farit]]></dc:creator>
				<category><![CDATA[bmw e30]]></category>

		<guid isPermaLink="false">http://hobby.farit.ru/?p=680</guid>
		<description><![CDATA[The main goal of the project was to minimize power consumption by replacing the existing gong module with a modern microprocessor. The main microprocessor for the gong is the STM32L452RET6. The microprocessor sleeps most of the time consuming only 5 μA. When the level changes on one of its interrupt lines, a WAKEUP interrupt awakens [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The main goal of the project was to minimize power consumption by replacing the existing gong module with a modern microprocessor.</p>
<p>The main microprocessor for the gong is the STM32L452RET6.</p>
<p>The microprocessor sleeps most of the time consuming only 5 μA. When the level changes on one of its interrupt lines, a WAKEUP interrupt awakens the microprocessor. The program detects which interrupt line awakened the system and plays a corresponding WAV file on its DAC. When it stops playing, the microprocessor goes back into sleeping.</p>
<p>WAV files are only a few seconds each, and they are stored in the microprocessor flash. The program uses a timer to transfer bytes to the DAC according to the bit rate, usually, 16 bit/44.1kHz or 16 bit/48kHz. As the STM32 DAC is only 12-bit, some conversion is done. First, bytes are read into a memory buffer. Then, they are transferred to the DAC using a DMA channel. The program waits until it receives a transfer complete interrupt, and send a new portion of the music file to the buffer. </p>
<p>The DAC signal is amplified by the amplifier chip NJM2135M (MC34119).</p>
<p>The software uses the Real-Time Operating System Zephyr to organize multiple threads and simplify writing drivers.</p>
<h3>The gong schema.</h3>
<p>I used a simpler and cheaper octocouple before, and the power consumption was similar. </p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2024/07/gong_schema.png"><img src="http://hobby.farit.ru/wp-content/uploads/2024/07/gong_schema-854x604.png" alt="BMW E30 gong schema" width="854" height="604" class="aligncenter size-medium wp-image-681" /></a></p>
<p>The audio amplifier subschema.<br />
<a href="http://hobby.farit.ru/wp-content/uploads/2024/07/gong_amplifier_schema.png"><img src="http://hobby.farit.ru/wp-content/uploads/2024/07/gong_amplifier_schema-854x604.png" alt="BMW E30 gong amplifier schema" width="854" height="604" class="aligncenter size-medium wp-image-682" /></a></p>
<h3>The gong PCB</h3>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2024/07/gong_front.jpg"><img src="http://hobby.farit.ru/wp-content/uploads/2024/07/gong_front-854x507.jpg" alt="BMW E30 gong pcb" width="854" height="507" class="aligncenter size-medium wp-image-685" /></a></p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2024/07/gong_back.jpg"><img src="http://hobby.farit.ru/wp-content/uploads/2024/07/gong_back-854x471.jpg" alt="BMW E30 gong pcb" width="854" height="471" class="aligncenter size-medium wp-image-686" /></a></p>
<p>Software: <a href="https://github.com/faritka/e30gong" target="_blank">BMW E30 gong software for Zephyr RTOS and STM32</a></p>
]]></content:encoded>
			<wfw:commentRss>https://hobby.farit.ru/bmw-e30-gong/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6-button digital clock for BMW E30</title>
		<link>https://hobby.farit.ru/bmw-e30-clock-zephyr-stm32/</link>
		<comments>https://hobby.farit.ru/bmw-e30-clock-zephyr-stm32/#comments</comments>
		<pubDate>Tue, 15 Aug 2023 05:14:18 +0000</pubDate>
		<dc:creator><![CDATA[Farit]]></dc:creator>
				<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://hobby.farit.ru/?p=657</guid>
		<description><![CDATA[The clock is engineered to be installed into the existing 6-button BMW E30 digital clock enclosure. The digits and letters are drawn by five red LTP-305HR 5&#215;7 dot matrix displays covered by an orange filter. There are two PCBs: the first is for the power supply and processor, the second is for the displays, buttons, [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The clock is engineered to be installed into the existing 6-button BMW E30 digital clock enclosure. The digits and letters are drawn by five red LTP-305HR 5&#215;7 dot matrix displays covered by an orange filter. There are two PCBs: the first is for the power supply and processor, the second is for the displays,  buttons, and display chip. The time functions are processed by the RTC module RV-3032-C7, which is temperature-compensated and very accurate. When the power is off, the RTC module gets power from the supercapacitor, which can supply enough power for a few months. The light sensor VEML7700 provides information about the current light level. The display dims at night. The optocoupler provides isolation from other car electronics.</p>
<p>The software is written using RTOS Zephyr for the processor STM32L452RE. There are several threads that read and update the current time, check the light level and adjust the display brightness, process interrupts fired by controlling buttons. A watchdog process restarts the processor in case of a serious error.</p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2023/08/clock_parts.jpg"><img src="http://hobby.farit.ru/wp-content/uploads/2023/08/clock_parts-854x423.jpg" alt="clock_parts" width="854" height="423" class="aligncenter size-medium wp-image-664" /></a></p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2023/08/clock_open.jpg"><img src="http://hobby.farit.ru/wp-content/uploads/2023/08/clock_open-854x569.jpg" alt="clock_open" width="854" height="569" class="aligncenter size-medium wp-image-666" /></a></p>
<h3>The processor is programmed by connecting it to an STM32 Nucleo board.</h3>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2023/08/clock_programming.jpg"><img src="http://hobby.farit.ru/wp-content/uploads/2023/08/clock_programming-854x639.jpg" alt="clock programming" width="854" height="639" class="aligncenter size-medium wp-image-667" /></a></p>
<h3>The display PCB.</h3>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2023/08/display.png"><img src="http://hobby.farit.ru/wp-content/uploads/2023/08/display-854x604.png" alt="Display" width="854" height="604" class="aligncenter size-medium wp-image-658" /></a></p>
<h3>The processor PCB.</h3>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2023/08/processor.png"><img src="http://hobby.farit.ru/wp-content/uploads/2023/08/processor-854x604.png" alt="processor" width="854" height="604" class="aligncenter size-medium wp-image-659" /></a></p>
<h3>The power module.</h3>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2023/08/power.png"><img src="http://hobby.farit.ru/wp-content/uploads/2023/08/power-854x604.png" alt="power" width="854" height="604" class="aligncenter size-medium wp-image-660" /></a></p>
<h3>The supercapacitor charger module.</h3>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2023/08/battery_charger.png"><img src="http://hobby.farit.ru/wp-content/uploads/2023/08/battery_charger-854x604.png" alt="battery_charger" width="854" height="604" class="aligncenter size-medium wp-image-661" /></a></p>
<p>Software: <a href="https://github.com/faritka/e30clock" target="_blank">BMW E30 clock software for Zephyr RTOS and STM32</a></p>
]]></content:encoded>
			<wfw:commentRss>https://hobby.farit.ru/bmw-e30-clock-zephyr-stm32/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LED Matrix Font for HT1632C and Zephyr RTOS</title>
		<link>https://hobby.farit.ru/led-matrix-font-ht1632c-zephyr-rtos/</link>
		<comments>https://hobby.farit.ru/led-matrix-font-ht1632c-zephyr-rtos/#comments</comments>
		<pubDate>Fri, 30 Jul 2021 19:18:33 +0000</pubDate>
		<dc:creator><![CDATA[Farit]]></dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[ht1632c]]></category>
		<category><![CDATA[stm32]]></category>
		<category><![CDATA[zephyr]]></category>

		<guid isPermaLink="false">http://hobby.farit.ru/?p=629</guid>
		<description><![CDATA[Now, when the HT1632C display driver for Zephyr RTOS is ready, we want to write characters into the display buffer and send the buffer to the LED matrix. LED matrix The LED indicator is the LTP-305HR 5&#215;7 dot matrix display. It has an LED for a dot ., that is located at the column 0. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Now, when the <a href="http://hobby.farit.ru/ht1632-driver-rtos-zephyr-nucleo-stm32/" rel="noopener" target="_blank">HT1632C display driver for Zephyr RTOS</a> is ready, we want to write characters into the display buffer and send the buffer to the LED matrix.</p>
<h3>LED matrix</h3>
<p>The LED indicator is the LTP-305HR 5&#215;7 dot matrix display. It has an LED for a dot ., that is located at the column 0. So, we will start writing characters at the column 1 of the display buffer.</p>
<p>The HT1632C supports 32 ROWs &#8211; in our case they will be vertical columns, and 8 COMs &#8211; they will be horizontal rows. </p>
<p>The center of coordinates 0x0 starts at the left top.</p>
<p>In our case, we will use 5&#215;7 fixed width fonts. Each character will be represented as an array of 5 uint8_t 8-bit numbers(bytes). The array will start from the leftest column. The top row will start from the most significant(the leftest) bit of a byte.</p>
<p>Here is the letter <strong>M</strong> displayed on the LED matrix. When a bit is set to 1, it turns on the LED at that position; when it is set to 0, it turns off the LED. The 8th bit doesn&#8217;t matter as it&#8217;s not displayed at all &#8211; we will set it to 0.</p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2021/07/led_m.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/07/led_m.png" alt="led matrix m" width="500" height="468" class="aligncenter size-full wp-image-633" /></a></p>
<p>The C array for the letter M looks like this:<br />
{Column 1, Column 2, Column 3, Column 4, Column 5}</p>
<pre>{0b11111110, 0b01000000, 0b00110000, 0b01000000, 0b11111110}, // M</pre>
<h3>Font File</h3>
<p>All characters for the 5&#215;7 font are included in the file font_5x7.h</p>
<p>They are located according to the ASCII order starting from the character SPACE &#8216; &#8216;, which has the decimal number 32.</p>
<pre>
#ifndef FONT_5x7_H
#define FONT_5x7_H

// The width of each font character
#define APP_FONT_WIDTH 5

const uint8_t font[][APP_FONT_WIDTH] = {
    {0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000}, // 
    {0b00000000, 0b00000000, 0b11111010, 0b00000000, 0b00000000}, // !
    {0b00000000, 0b11100000, 0b00000000, 0b11100000, 0b00000000}, // "
    {0b00101000, 0b11111110, 0b00101000, 0b11111110, 0b00101000}, // #
    {0b00101000, 0b01010100, 0b11111110, 0b01010100, 0b00101000}, // $
    {0b11000100, 0b11001000, 0b00010000, 0b00100110, 0b01000110}, // %
    {0b01101100, 0b10010010, 0b10101010, 0b01000100, 0b00001010}, // &#038;
    {0b00000000, 0b00000000, 0b11100000, 0b00000000, 0b00000000}, // '
    {0b00000000, 0b00111000, 0b01000100, 0b10000010, 0b00000000}, // (
    {0b00000000, 0b10000010, 0b01000100, 0b00111000, 0b00000000}, // )
    {0b00101000, 0b00010000, 0b01111100, 0b00010000, 0b00101000}, // *
    {0b00010000, 0b00010000, 0b01111100, 0b00010000, 0b00010000}, // +
    {0b00000000, 0b00001010, 0b00001100, 0b00000000, 0b00000000}, // ,
    {0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00010000}, // -
    {0b00000000, 0b00000110, 0b00000110, 0b00000000, 0b00000000}, // .
    {0b00000100, 0b00001000, 0b00010000, 0b00100000, 0b01000000}, // /
    {0b01111100, 0b10000010, 0b10000010, 0b10000010, 0b01111100}, // 0
    {0b00000000, 0b01000010, 0b11111110, 0b00000010, 0b00000000}, // 1
    {0b01000010, 0b10000110, 0b10001010, 0b10010010, 0b01100010}, // 2
    {0b01000100, 0b10000010, 0b10010010, 0b10010010, 0b01101100}, // 3
    {0b00001000, 0b00011000, 0b00101000, 0b01001000, 0b11111110}, // 4
    {0b11110100, 0b10010010, 0b10010010, 0b10010010, 0b10001100}, // 5
    {0b01111100, 0b10010010, 0b10010010, 0b10010010, 0b01001100}, // 6
    {0b10000000, 0b10001110, 0b10010000, 0b10100000, 0b11000000}, // 7
    {0b01101100, 0b10010010, 0b10010010, 0b10010010, 0b01101100}, // 8
    {0b01100100, 0b10010010, 0b10010010, 0b10010010, 0b01111100}, // 9
    {0b00000000, 0b01101100, 0b01101100, 0b00000000, 0b00000000}, // :
    {0b00000000, 0b01101010, 0b01101100, 0b00000000, 0b00000000}, // ;
    {0b00010000, 0b00101000, 0b01000100, 0b10000010, 0b00000000}, // <
    {0b00101000, 0b00101000, 0b00101000, 0b00101000, 0b00101000}, // =
    {0b10000010, 0b01000100, 0b00101000, 0b00010000, 0b00000000}, // >
    {0b01000000, 0b10000000, 0b10001010, 0b10010000, 0b01100000}, // ?
    {0b01111100, 0b10000010, 0b10011000, 0b10100100, 0b01111000}, // @
    {0b01111110, 0b10010000, 0b10010000, 0b10010000, 0b01111110}, // A
    {0b11111110, 0b10010010, 0b10010010, 0b10010010, 0b01101100}, // B
    {0b01111100, 0b10000010, 0b10000010, 0b10000010, 0b01000100}, // C
    {0b11111110, 0b10000010, 0b10000010, 0b10000010, 0b01111100}, // D
    {0b11111110, 0b10010010, 0b10010010, 0b10010010, 0b10000010}, // E
    {0b11111110, 0b10010000, 0b10010000, 0b10010000, 0b10000000}, // F
    {0b01111100, 0b10000010, 0b10010010, 0b10010010, 0b01011110}, // G
    {0b11111110, 0b00010000, 0b00010000, 0b00010000, 0b11111110}, // H
    {0b00000000, 0b10000010, 0b11111110, 0b10000010, 0b00000000}, // I
    {0b00000100, 0b10000010, 0b10000010, 0b10000010, 0b11111100}, // J
    {0b11111110, 0b00010000, 0b00101000, 0b01000100, 0b10000010}, // K
    {0b11111110, 0b00000010, 0b00000010, 0b00000010, 0b00000010}, // L
    {0b11111110, 0b01000000, 0b00110000, 0b01000000, 0b11111110}, // M
    {0b11111110, 0b00100000, 0b00010000, 0b00001000, 0b11111110}, // N
    {0b01111100, 0b10000010, 0b10000010, 0b10000010, 0b01111100}, // O
    {0b11111110, 0b10010000, 0b10010000, 0b10010000, 0b01100000}, // P
    {0b01111100, 0b10000010, 0b10001010, 0b10000100, 0b01111010}, // Q
    {0b11111110, 0b10010000, 0b10011000, 0b10010100, 0b01100010}, // R
    {0b01100100, 0b10010010, 0b10010010, 0b10010010, 0b01001100}, // S
    {0b10000000, 0b10000000, 0b11111110, 0b10000000, 0b10000000}, // T
    {0b11111100, 0b00000010, 0b00000010, 0b00000010, 0b11111100}, // U
    {0b11111000, 0b00000100, 0b00000010, 0b00000100, 0b11111000}, // V
    {0b11111100, 0b00000010, 0b00111100, 0b00000010, 0b11111100}, // W
    {0b11000110, 0b00101000, 0b00010000, 0b00101000, 0b11000110}, // X
    {0b11100000, 0b00010000, 0b00001110, 0b00010000, 0b11100000}, // Y
    {0b10000110, 0b10001010, 0b10010010, 0b10100010, 0b11000010}, // Z
    {0b00000000, 0b11111110, 0b10000010, 0b00000000, 0b00000000}, // [
    {0b01000000, 0b00100000, 0b00010000, 0b00001000, 0b00000100}, /* \ */
    {0b00000000, 0b10000010, 0b11111110, 0b00000000, 0b00000000}, // ]
    {0b00100000, 0b01000000, 0b10000000, 0b01000000, 0b00100000}, // ^
    {0b00000010, 0b00000010, 0b00000010, 0b00000010, 0b00000010}, // _
    {0b00000000, 0b10000000, 0b01000000, 0b00000000, 0b00000000}, // `
    {0b00000100, 0b00101010, 0b00101010, 0b00101010, 0b00011110}, // a
    {0b11111110, 0b00010010, 0b00100010, 0b00100010, 0b00011100}, // b
    {0b00011100, 0b00100010, 0b00100010, 0b00100010, 0b00000100}, // c
    {0b00011100, 0b00100010, 0b00100010, 0b00010010, 0b11111110}, // d
    {0b00011100, 0b00101010, 0b00101010, 0b00101010, 0b00011000}, // e
    {0b00000000, 0b00010000, 0b01111110, 0b10010000, 0b01000000}, // f
    {0b00010000, 0b00101010, 0b00101010, 0b00101010, 0b00111100}, // g
    {0b11111110, 0b00010000, 0b00100000, 0b00100000, 0b00011110}, // h
    {0b00000000, 0b00100010, 0b10111110, 0b00000010, 0b00000000}, // i
    {0b00000100, 0b00000010, 0b00100010, 0b10111100, 0b00000000}, // j
    {0b11111110, 0b00001000, 0b00010100, 0b00100010, 0b00000000}, // k
    {0b00000000, 0b10000010, 0b11111110, 0b00000010, 0b00000000}, // l
    {0b00111110, 0b00100000, 0b00011110, 0b00100000, 0b00011110}, // m
    {0b00111110, 0b00010000, 0b00100000, 0b00100000, 0b00011110}, // n
    {0b00011100, 0b00100010, 0b00100010, 0b00100010, 0b00011100}, // o
    {0b00111110, 0b00101000, 0b00101000, 0b00101000, 0b00010000}, // p
    {0b00010000, 0b00101000, 0b00101000, 0b00101000, 0b00111110}, // q
    {0b00111110, 0b00010000, 0b00100000, 0b00100000, 0b00010000}, // r
    {0b00010010, 0b00101010, 0b00101010, 0b00101010, 0b00100100}, // s
    {0b00000000, 0b00100000, 0b11111100, 0b00100010, 0b00000100}, // t
    {0b00111100, 0b00000010, 0b00000010, 0b00000100, 0b00111110}, // u
    {0b00111000, 0b00000100, 0b00000010, 0b00000100, 0b00111000}, // v
    {0b00111100, 0b00000010, 0b00001100, 0b00000010, 0b00111100}, // w
    {0b00100010, 0b00010100, 0b00001000, 0b00010100, 0b00100010}, // x
    {0b00110000, 0b00001010, 0b00001010, 0b00001010, 0b00111100}, // y
    {0b00100010, 0b00100110, 0b00101010, 0b00110010, 0b00100010}, // z
    {0b00010000, 0b00010000, 0b01101100, 0b10000010, 0b10000010}, // {
    {0b00000000, 0b00000000, 0b11111110, 0b00000000, 0b00000000}, // |
    {0b10000010, 0b10000010, 0b01101100, 0b00010000, 0b00010000}, // }
    {0b01000000, 0b10000000, 0b01000000, 0b01000000, 0b10000000}, // ~
    {0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000}, // Delete
};

#endif /* FONT_5x7_H */
</pre>
<p>When we draw a character, we can subtract the value of SPACE &#8216; &#8216; from its decimal number and find its location in the font array. Then, we write 5 bytes of the font to the buffer.</p>
<pre>
/**
 * Draws a character at the position X
 *
 * @param uint8_t c The character to display
 * @param uint8_t x The position at the display from which to display
 */
void draw_char(uint8_t buf[], const uint8_t font[][APP_FONT_WIDTH], 
               uint8_t c, uint8_t x) 
{
    // Convert the character to an index
    c = c &#038; 0x7F;
    if (c < ' ') {
        c = 0;
    } else {
        c -= ' ';
    }

    for (int i = x, j = 0; j < APP_FONT_WIDTH; i++, j++) {
        buf[i] = font[c][j];
    }
}
</pre>
<p>We can display a character starting from the position 1 like this:</p>
<pre>
draw_char(buf, font, 'M', 1);
</pre>
<p>When all required characters are set in the display buffer, the display buffer is sent to the HT1632C controller at once.</p>
<pre>
display_write(display_dev, 0, 0, &#038;buf_desc, buf);
</pre>
<p>The code is available on <a href="https://github.com/faritka/zephyr-ht1632c" rel="noopener" target="_blank">https://github.com/faritka/zephyr-ht1632c</a></p>
]]></content:encoded>
			<wfw:commentRss>https://hobby.farit.ru/led-matrix-font-ht1632c-zephyr-rtos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing HT1632 driver for RTOS Zephyr and Nucleo STM32</title>
		<link>https://hobby.farit.ru/ht1632-driver-rtos-zephyr-nucleo-stm32/</link>
		<comments>https://hobby.farit.ru/ht1632-driver-rtos-zephyr-nucleo-stm32/#comments</comments>
		<pubDate>Mon, 12 Jul 2021 21:16:31 +0000</pubDate>
		<dc:creator><![CDATA[Farit]]></dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[ht1632c]]></category>
		<category><![CDATA[stm32]]></category>
		<category><![CDATA[zephyr]]></category>

		<guid isPermaLink="false">http://hobby.farit.ru/?p=598</guid>
		<description><![CDATA[Zephyr Real-Time Operating System When you have a powerful microcontroller, there is no need to limit yourself by the capabilities of Arduino. Most Arduino programs run in a loop that checks buttons, does some calculations, connect to the Internet, etc sequentially. Coding gets complicated when you want to click on a button and process the [&#8230;]]]></description>
				<content:encoded><![CDATA[<h3>Zephyr Real-Time Operating System</h3>
<p>When you have a powerful microcontroller, there is no need to limit yourself by the capabilities of Arduino. Most Arduino programs run in a loop that checks buttons, does some calculations, connect to the Internet, etc sequentially. Coding gets complicated when you want to click on a button and process the click quickly while another function is slowly connecting and parsing a webpage. </p>
<p>A Real-Time operating system allows to code multiple functions and delegate the task of running them simultaneously to the OS.</p>
<p><a href="https://www.zephyrproject.org/" rel="noopener" target="_blank">Zephyr Project</a> is a very promising project. But some sensors, displays, hardware chips don&#8217;t have drivers to interact with them yet.</p>
<p>An experienced programmer usually learns by reading code of sample programs. Zephyr provides <a href="https://docs.zephyrproject.org/latest/" rel="noopener" target="_blank">many samples</a>.</p>
<h3>STM32 Nucleo boards</h3>
<p>ST provides $15 evaluation boards for its family of the STM32 ARM processors called Nucleo. </p>
<p>I compared <a href="https://www.st.com/en/evaluation-tools/stm32-nucleo-boards.html" rel="noopener" target="_blank">the list of available Nucleo boards</a> with <a href="https://docs.zephyrproject.org/latest/boards/" rel="noopener" target="_blank">the list of the Nucleo boards supported by Zephyr</a>. </p>
<p>I wanted a low-power microcontroller with the largest RAM and flash, and in the LQFP64 package (64 pins, 10&#215;10 mm), which is hot-air solderable. I selected <a href="https://docs.zephyrproject.org/latest/boards/arm/nucleo_l452re/doc" rel="noopener" target="_blank">ST Nucleo L452RE</a> for the project.</p>
<h3>How the Holtek HT1632C works</h3>
<p>The Holtek HT1632C is a popular display controller that can drive matrices of LEDs (one chip up to 32&#215;8 or 24&#215;16). <a href="https://www.holtek.com/productdetail/-/vg/HT1632D_32D-2" rel="noopener" target="_blank">The Holtek HT1632D</a> is a newer version that can come in a smaller LQFP48 7&#215;7 mm package that has fewer pins for rows.</p>
<p>Here is a typical electrical schema. The HT1632C controls the 5&#215;7 LED matrices (with 1 additional row for a dot) with the common cathodes.</p>
<p>Here is how it works. To turn on the 1st top LED in the 2nd column, the HT1632C sets 1 (HIGH) on ROW1 and opens COM0, so the current flows via the current-limiting resistor to the LED and then via COM0 to the ground. The LED turns on.</p>
<p>The LEDs in the matrices are addressed starting from the leftest top LED.</p>
<p>In order to enable the 1st top LED in the 2nd column, user code must write 1 into the HT1632C RAM address matching the ROW1 and COM0 combination. According to the HT1632C controller datasheet, the address is 02H when the controller is configured as 32 ROW x 8 COM or the address is 04H when the controller is configured as 24 ROW x 16 COM.</p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2021/07/display_LTP-305.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/07/display_LTP-305.png" alt="display LTP-305" width="832" height="945" class="aligncenter size-full wp-image-605" /></a></p>
<h3>The HT1632C communication protocol</h3>
<p>The HT1632C uses 4 pins to communicate with a microcontroller.</p>
<ul>
<li>CS (chip select)</li>
<li>WR (write)</li>
<li>RD (read)</li>
<li>DATA</li>
</ul>
<p>This driver doesn&#8217;t read from the display controller. It only writes. So, we don&#8217;t use the RD pin.</p>
<ul>
<li>The CS pin is active LOW. When the microcontroller wants to communicate with the HT1632C, it sets the CS pin to the ground (LOW).</li>
<li>The microcontroller sets the WR pin to LOW.</li>
<li>It sends a bit (0 or 1) by setting the DATA pin to LOW (0) or HIGH (1).</li>
<li>It sets the WR pin to HIGH. The HT1632C reads the DATA bit on the rising WR edge.</li>
<li>The microcontroller repeats the WR LOW, DATA bit, WR HIGH sequence until all bits are sent.</li>
<li>When it finishes, it sets the CS pin HIGH.</li>
</ul>
<p>There are two modes of operation: the command mode and the write data mode.</p>
<p>The command mode starts with the 3 bits 100 and then the command itself.</p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2021/07/command_mode.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/07/command_mode.png" alt="HT1632C command mode" width="1570" height="477" class="aligncenter size-full wp-image-610" /></a></p>
<p>The write data mode starts with the 3 bits 101, the RAM address, the 4 bits of data.</p>
<p>This driver writes the whole array of data starting from the address 00H using the Successive Address Writing Mode. It starts with the 3 bits 101, the RAM address 00H, then all 32 8-bit words or 24 16-bit words.</p>
<p>It&#8217;s the task of the application code to set individual bits in the matrix array. Then it sends the whole matrix array to the driver.</p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2021/07/write_data_mode.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/07/write_data_mode.png" alt="HT1632C write data mode" width="1469" height="358" class="aligncenter size-full wp-image-611" /></a></p>
<p>Here is how the command SYS EN (Turn on system oscillator) looks like on the screen of my oscilloscope.<br />
SYS EN 100-0000-0001-0</p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2021/07/sending_command_sys_en.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/07/sending_command_sys_en.png" alt="HT1632C command SYS EN" width="1050" height="434" class="aligncenter size-full wp-image-615" /></a></p>
<h3>Zephyr Application Structure</h3>
<p>The structure of my application is based on <a href="https://github.com/zephyrproject-rtos/example-application/" rel="noopener" target="_blank">the Zephyr Example Application</a>.</p>
<p>It creates an application with a sensor driver.</p>
<p>I changed the string &#8216;example-application&#8217; in the files to my own application name.</p>
<h3>HT1632C Zephyr Driver Installation</h3>
<p>Download the source from <a href="https://github.com/faritka/zephyr-ht1632c" rel="noopener" target="_blank">https://github.com/faritka/zephyr-ht1632c</a> and follow instructions there.</p>
<h3>Zephyr driver configuration files</h3>
<p>Available configuration options are defined in the file <i>dts/bindings/display/holtek,ht1632c.yaml</i>.<br />
It follows the Device Tree specifications.</p>
<p>The GPIOS have the phandle-array type that describes the GPIO identifier, pin, and flags. For example, the flag GPIO_OUTPUT_HIGH sets the default output as HIGH, the flag GPIO_ACTIVE_LOW means when you set the pin ACTIVE, the signal goes LOW (the CS pin is active low). </p>
<pre>
description:  Holtek HT1632C display controller

compatible: "holtek,ht1632c"

include: base.yaml

properties:
    cs-gpios:
      type: phandle-array
      required: true
      description: GPIO to which the CS pin of HT1632C is connected.

    wr-gpios:
      type: phandle-array
      required: true
      description: GPIO to which the WR pin of HT1632C is connected.

    data-gpios:
      type: phandle-array
      required: true
      description: GPIO to which the DATA pin of HT1632C is connected.

    commons-options:
      type: int
      required: true
      default: 0x00
      description: |
        0x00: N-MOS  opendrain output and 8 common option
        0x01: N-MOS  opendrain  output  and  16 common option
        0x10: P-MOS  opendrain output and 8 common option
        0x11: P-MOS  opendrain  output  and  16 common option
</pre>
<p>The test application is located in the directory <i>app</i>.<br />
I created the overlay configuration file for my Nucleo L452RE board: <i>app/boards/nucleo_l452re.overlay</i>.</p>
<p>I defined the GPIOs that are connected to the HT1632C controller on the Nucleo L452RE board: CS to PB3, WR to PB5, DATA to PB4. The commons-options configures the HT1632C controller as 32&#215;8 N-MOS. This configuration doesn&#8217;t need external transistors, the current will flow from ROWN -> resistor -> LEDs -> COMN.</p>
<pre>
/ {
    ht1632c {
        compatible = "holtek,ht1632c";
        label = "HT1632C";
        cs-gpios = <&#038;gpiob 3 0>;
        wr-gpios = <&#038;gpiob 5 0>;
        data-gpios = <&#038;gpiob 4 0>;
        commons-options = <0x00>;
    };
};
</pre>
<h3>Hardware delays</h3>
<p>The HT1632C datasheet provides the table with electrical parameters.</p>
<p>t<sub>CLK</sub> is 500 ns &#8211; it&#8217;s the pulse width of each WR signal<br />
t<sub>su</sub> is minimum 100 ns, I set it to 250 ns &#8211; it&#8217;s the delay between the setting the DATA pin and the WR pin going HIGH.</p>
<p>The function <i>ht1632c_ns_to_sys_clock_hw_cycles</i> converts nanoseconds to the processor clock cycles that must pass during those nanoseconds.</p>
<pre>
/**
 * @brief Converts nanoseconds to the number of the processor system cycles
 *
 * @param uint32_t ns Nanoseconds
 *
 */
static inline uint32_t ht1632c_ns_to_sys_clock_hw_cycles(uint32_t ns)
{
    return ((uint64_t)sys_clock_hw_cycles_per_sec() * (ns) / NSEC_PER_SEC + 1);
}
</pre>
<p>That&#8217;s what I get for the Nucleo L452RE with the 80MHz clock.</p>
<pre>
Delay t<sub>CS</sub> 33
Delay t<sub>CLK</sub> 41
Delay t<sub>SU</sub> 21
Delay t<sub>H</sub> 21
Delay t<sub>SU1</sub> 25
Delay t<sub>H1</sub> 17
</pre>
<p>The function ht1632c_delay then delays execution counting cycles.</p>
<pre>
/**
 * @brief Delays the execution waiting for processor cycles
 *
 * @param dev Pointer to device data
 * @param uint32_t cycles_to_wait How many processor cycles to wait
 *
 */
static void ht1632c_delay(uint32_t cycles_to_wait)
{
    uint32_t start = k_cycle_get_32();

    // Wait until the given number of cycles have passed
    while (k_cycle_get_32() - start < cycles_to_wait) {
    }
}
</pre>
<p>Here is the function that writes a command to the HT1632C controller.</p>
<pre>
/**
 * @brief Writes a command to HT1632C
 *
 * @param dev Pointer to device data
 * @param uint8_t command Command without the first 3 bits 100
 *
 */
static void ht1632c_write_command(struct ht1632c_data *data, 
        uint8_t command)
{
    //CS down
    ht1632c_delay(data->delays->cs);
    ht1632c_set_cs_pin(data, true);
    ht1632c_delay(data->delays->su1);
    
    //100 - command mode
    ht1632c_write_bits(data, HT1632C_COMMAND_HEADER, BIT(2));
    //the command itself
    ht1632c_write_bits(data, command, BIT(7));
    //one extra bit
    ht1632c_write_bits(data, 0, BIT(0));

    //set the DATA pin low waiting for the next command
    ht1632c_set_data_pin(data, false);

    //CS UP
    ht1632c_delay(data->delays->h1);
    ht1632c_set_cs_pin(data, false);
}
</pre>
<h3>Sample program</h3>
<p>The sample program writes the letter M, changes the brightness, and then makes the HT1632C sleep when CONFIG_PM=y and CONFIG_PM_DEVICE=y in <i>app/prj.conf</i>.</p>
<p>It's interesting to see how the second row of the letter M is half-lighted in the photo. That's because the HT1632C constantly switches ROWs and COMs ON and OFF. The human eye can't catch it, but a photo camera can.</p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2021/07/ht132c_sample.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/07/ht132c_sample.png" alt="ht1632c sample program output" width="1600" height="1362" class="aligncenter size-full wp-image-626" /></a></p>
<h3>Useful links</h3>
<p><a href="https://interrupt.memfault.com/blog/building-drivers-on-zephyr?" rel="noopener" target="_blank">How to Build Drivers for Zephyr</a></p>
]]></content:encoded>
			<wfw:commentRss>https://hobby.farit.ru/ht1632-driver-rtos-zephyr-nucleo-stm32/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BMW E30 E36 White Flashlight Li-ion Battery 82119413147</title>
		<link>https://hobby.farit.ru/bmw-e30-e36-white-flashlight-li-ion-battery-82119413147/</link>
		<comments>https://hobby.farit.ru/bmw-e30-e36-white-flashlight-li-ion-battery-82119413147/#comments</comments>
		<pubDate>Wed, 23 Jun 2021 22:06:14 +0000</pubDate>
		<dc:creator><![CDATA[Farit]]></dc:creator>
				<category><![CDATA[bmw e30]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[e30]]></category>

		<guid isPermaLink="false">http://hobby.farit.ru/?p=563</guid>
		<description><![CDATA[The BMW E30, E32, E34, and E36 have space in the glove box for the white flashlight (torch) 63171375457 or 82119413147. The later BMW models provide the black flashlight 63316962052, which is not compatible because the flashlight contacts are male. The original electric circuit is extremely simple. There are two 1.2V NiMH coin cells, a [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The BMW E30, E32, E34, and E36 have space in the glove box for the white flashlight (torch) 63171375457 or 82119413147. The later BMW models provide the black flashlight 63316962052, which is not compatible because the flashlight contacts are male.</p>
<p>The original electric circuit is extremely simple. There are two 1.2V NiMH coin cells, a resistor to constantly charge them, an E10 2.4V bulb, and a switch.<br />
You can read an article about <a href="https://surfncircuits.com/2017/07/23/teardown-and-repair-of-the-simply-designed-bmw-e36-glovebox-flashlight/" rel="noopener" target="_blank">Teardown and Repair of the Simply Designed BMW E36 Glovebox Flashlight</a>. </p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2021/06/bmw-e30-flashlight-63171375457.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/06/bmw-e30-flashlight-63171375457.png" alt="bmw e30 e32 e34 e36 flashlight 63171375457" width="1600" height="1558" class="aligncenter size-full wp-image-564" /></a></p>
<p>All white flashlights that you can get now have dead batteries. You can replace the batteries with similar NiMH batteries, and they should work for a few years.</p>
<p>My project replaces the original circuit with a more sophisticated circuit that has a charger chip, Li-ion 4.2V coin cells, and an LED bulb.</p>
<h3>Electrical Circuit</h3>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2021/06/flashlight-charger-ltc4079.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/06/flashlight-charger-ltc4079.png" alt="flashlight charger ltc4079" width="1104" height="727" class="aligncenter size-full wp-image-651" /></a></p>
<p>The charging chip is <a href="https://www.analog.com/en/products/ltc4079.html" rel="noopener" target="_blank">LTC4079</a>. </p>
<blockquote><p>The LTC®4079 is a low quiescent current, high voltage linear charger for most battery chemistry types including Li-Ion/Polymer, LiFePO4, Lead-Acid or NiMH battery stacks up to 60V. The maximum charge current is adjustable from 10mA  to  250mA  with  an  external  resistor.  The  battery  charge voltage is set using an external resistor divider.</p></blockquote>
<p>The chip is tiny, but it&#8217;s possible to solder the QFN chip using hot air.</p>
<p>Two ⌀24.5mm <a href="https://www.illinoiscapacitor.com/ic_search/battery_products_detail.aspx?icpartnumber=16" rel="noopener" target="_blank">RJD2450ST1</a> 200 mAh rechargeable coin cells are used. </p>
<blockquote><p>Charging Current &#8211; Standard: 95 mA<br />
Charging Voltage &#8211; Maximum: 4.2 V</p></blockquote>
<p>The RJD2450ST1 has contacts for soldered wires. But it requires cutting two small slots in the plastic circle in the middle of the flashlight. The RJD2450 without contacts can be used if there is a battery spot welder for the original contacts.</p>
<p>The resistor divider R2=1.54MΩ and R4=249kΩ provides the 8.4V charging voltage.<br />
The resistor divider R1=1.2MΩ and R3=130kΩ disables charging when the battery voltage goes down to less than 12.17V. V<sub>IN(REG)</sub> = 1.190 × (1 + 1200000 ÷ 130000).<br />
The resistor R5=12kΩ sets the charging current to 25mA. R<sub>PROG</sub> = 297.5 ÷ 0.025. The maximum charging current for the coin cells is 95mA. When I tested this amperage by using a 3kΩ resistor, the LTC4079 was very hot as the PCB is too tiny to dissipate all heat.<br />
The timer capacitor C2=0.1µF is set to disable charging after approximately 5½ hours. C<sub>TIMER</sub> = 5.5 × 18.2.<br />
The 10k NTC thermistor is NHQM103B375T5.</p>
<h3>PCB</h3>
<p>I used a 4-layer 1.2mm-thick PCB. </p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2021/06/flashlight-charger-pcb.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/06/flashlight-charger-pcb.png" alt="flashlight charger pcb" width="1557" height="1024" class="aligncenter size-full wp-image-652" /></a></p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2021/06/flashlight-charger-pcb-3d.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/06/flashlight-charger-pcb-3d.png" alt="flashlight charger pcb 3d LTC4079" width="1469" height="973" class="aligncenter size-full wp-image-653" /></a></p>
<h3>LED bulb</h3>
<p>The flashlight uses E10 bulbs. </p>
<p>The default polarity of the BMW E30 flashlight bulb is to have &#8211; (negative or ground) at the tip of the bulb and to have + (positive) at the screw body. Most LED E10 bulbs have the opposite polarity: + at the tip and &#8211; at the body. </p>
<p>It&#8217;s relatively easy to change the wires, but the original connectors around the coin cells must be isolated well.</p>
<p>I checked a 1W LED light. It was really hot when it was on. The body of the flashlight is plastic and there is no airflow, so the plastic can melt.</p>
<p>I selected <a href="https://www.aliexpress.com/item/1005002604945130.html" rel="noopener" target="_blank">this LED</a>: 0.5W, Screw E10, Nopolar, 12V Warm White(4300K). It can be connected to &#8211; and + both ways. It doesn&#8217;t get warm. It also has the same height as the original bulb: 22mm. It even has a lens.</p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2021/06/e10-led.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/06/e10-led.png" alt="e10 led" width="1145" height="1145" class="aligncenter size-full wp-image-582" /></a></p>
<h3>Pictures</h3>
<p>The flashlight is pretty bright and works for more than 10 hours on one charge.</p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2021/06/rjd2450st1.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/06/rjd2450st1.png" alt="rjd2450st1" width="1600" height="1045" class="aligncenter size-full wp-image-586" /></a><br />
<a href="http://hobby.farit.ru/wp-content/uploads/2021/06/flashlight-inside.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/06/flashlight-inside.png" alt="flashlight-inside" width="1600" height="1000" class="aligncenter size-full wp-image-587" /></a><br />
<a href="http://hobby.farit.ru/wp-content/uploads/2021/06/flashlight-inside-led.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/06/flashlight-inside-led.png" alt="flashlight-inside-led" width="2548" height="1420" class="aligncenter size-full wp-image-588" /></a><br />
<a href="http://hobby.farit.ru/wp-content/uploads/2021/06/e30-flashlight-led.png"><img src="http://hobby.farit.ru/wp-content/uploads/2021/06/e30-flashlight-led.png" alt="e30-flashlight-led" width="1600" height="1369" class="aligncenter size-full wp-image-589" /></a></p>
]]></content:encoded>
			<wfw:commentRss>https://hobby.farit.ru/bmw-e30-e36-white-flashlight-li-ion-battery-82119413147/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>3D-printed BMW E30, E32, E34, E36 connector 61130007441 61130007442</title>
		<link>https://hobby.farit.ru/bmw-e30-connector-61130007441/</link>
		<comments>https://hobby.farit.ru/bmw-e30-connector-61130007441/#comments</comments>
		<pubDate>Mon, 24 May 2021 05:21:59 +0000</pubDate>
		<dc:creator><![CDATA[Farit]]></dc:creator>
				<category><![CDATA[bmw e30]]></category>
		<category><![CDATA[e30]]></category>

		<guid isPermaLink="false">http://hobby.farit.ru/?p=503</guid>
		<description><![CDATA[Many 2-pole (2-pin) and 3-pole (3-pin) electrical connectors in the BMW E30 and other classic BMWs (E32, E34, E36) use 2.5 mm female contacts. There are BMW outer plastic housings for 2 and 3 poles. But they require watertight rubber housing inserts for each contact terminal. BMW offers the sockets and wires with the housing [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Many 2-pole (2-pin) and 3-pole (3-pin) electrical connectors in the BMW E30 and other classic BMWs (E32, E34, E36) use 2.5 mm female contacts.</p>
<p>There are BMW outer plastic housings for 2 and 3 poles. But they require watertight rubber housing inserts for each contact terminal. </p>
<p>BMW offers the sockets and wires with the housing inserts already molded around them:  <a href="https://www.realoem.com/bmw/enUS/part?id=1113-USA-02-1991-E30-BMW-325i&#038;mg=61&#038;sg=15&#038;diagId=61_2489&#038;q=61130007441" rel="noopener" target="_blank">61130007441</a> and <a href="https://www.realoem.com/bmw/enUS/part?id=1113-USA-02-1991-E30-BMW-325i&#038;mg=61&#038;sg=15&#038;diagId=61_2489&#038;q=61130007442" rel="noopener" target="_blank">61130007442</a>. You have to solder them to your existing wires and use shrink wraps to isolate them. They are pretty expensive: $8-9.</p>
<p>If you want to go the DIY way, rubber contact housing inserts can be 3D-printed and regular inexpensive contact sockets can be inserted in them and sealed with a glue. Contact will also look much better without soldered green-wire extensions.</p>
<p>This article is only about straight contacts. There are also 90° contacts, but I didn&#8217;t look for sockets for them. Some BMW sockets should be usable.</p>
<h3>Contact Socket</h3>
<p>The contact socket is made by TE Connectivity (formerly AMP).<br />
At the time of writing, the silver sockets cost $0.27 each for quantities over 10. The gold sockets are of course 10 times more expensive.</p>
<p><a href="https://www.te.com/usa-en/product-T2030002008-000.html" rel="noopener" target="_blank">T2030002008-000</a></p>
<blockquote><p>
    TE Internal #: T2030002008-000<br />
    TE Internal Description: CEF-0.75<br />
    Contact Type : Socket<br />
    Contact Mating Area Plating Material : Silver<br />
    Wire Contact Termination Area Plating Material : Silver<br />
    Wire Size (AWG): 18<br />
    Wire Size (mm²): .75<br />
    Contact Current Rating (Max) (A): 16
</p></blockquote>
<p>This one has a slightly bigger hole for a wire: <a href="https://www.te.com/usa-en/product-T2030002010-000.html" rel="noopener" target="_blank">T2030002010-000</a></p>
<blockquote><p>
    TE Internal #: T2030002010-000<br />
    TE Internal Description: CEF-1.0<br />
    Contact Type : Socket<br />
    Contact Mating Area Plating Material : Silver<br />
    Wire Contact Termination Area Plating Material : Silver<br />
    Wire Size (AWG): 18<br />
    Wire Size (mm²): 1.0<br />
    Contact Current Rating (Max) (A): 16
</p></blockquote>
<p>Check the inner hole diameters yourself: T2030002005-000 &#8211; Ø1.15mm, T2030002008-000 &#8211; Ø1.30mm, T2030002010-000 &#8211; Ø1.45mm.</p>
<p>There are also smaller and gold-plated sockets in the series.</p>
<p>There are similar contacts from other companies: <a href="https://www.digikey.com/en/products/filter/heavy-duty-connectors-contacts/337?s=N4IgjCBcoMwdIDGUBmBDANgZwKYBoQB7KAbRBhgBYBOMakAXQIAcAXKEAZVYCcBLAHYBzEAF8CAJgpRQySOmz4ipEJQAMlAGwB2AKyMW7SF16CR4kAFoJMpFF4BXJcUhl9DUZ6A" rel="noopener" target="_blank">Digikey heavy-duty sockets</a></p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2021/05/T2030002010-000.png"><img src="//hobby.farit.ru/wp-content/uploads/2021/05/T2030002010-000.png" alt="TE AMP T2030002010-000 CEF" width="1016" height="849" class="aligncenter size-full wp-image-510" /></a></p>
<h3>3D-printed housing</h3>
<p>The material is TPU (Thermoplastic polyurethane), which is flexible.</p>
<p>Only the upper part is cut to accommodate insertion of the socket.<br />
The bottom part is a solid circle that wraps around the male part providing good sealing. If it were cut and glued, the adhesive bond could easily break under the stress of insertion.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2021/05/contact.stl">Download the 3D model</a></p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2021/05/contact.jpg"><img src="//hobby.farit.ru/wp-content/uploads/2021/05/contact-854x802.jpg" alt="contact" width="854" height="802" class="aligncenter size-medium wp-image-736" /></a></p>
<h3>Sculpteo 3D printing</h3>
<p>I used the 3D-printing service provided by <a href="https://www.sculpteo.com" rel="noopener" target="_blank">sculpteo.com</a><br />
The material was TPU (flexible), HP Multi Jet Fusion Fusion (Plastic).<br />
The price was $20 for 20 contacts plus shipping, $1 per contact.</p>
<p>It&#8217;s cheaper to attach more contacts to the existing design in a 3D-program if you need more contacts than to print multiple designs. The model can be joined in Freecad to produce more contacts at once. Use Boolean operation &#8211; there are YouTube videos explaining how to do it.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2021/05/scuplteo_multijet_tpu.png"><img src="//hobby.farit.ru/wp-content/uploads/2021/05/scuplteo_multijet_tpu.png" alt="scuplteo multijet tpu" width="1342" height="1153" class="aligncenter size-full wp-image-517" /></a></p>
<p>Here is the result.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2021/05/3dprinted.png"><img src="//hobby.farit.ru/wp-content/uploads/2021/05/3dprinted.png" alt="3dprinted contacts" width="1024" height="441" class="aligncenter size-full wp-image-519" /></a></p>
<p>Of course, there are other online services that provide 3D printing. But the printing material must be flexible, not rigid.</p>
<h3>Contact installation</h3>
<p>The 3D-insert crevices were cleaned of the excessive material dust using a knife and picks.</p>
<p>The wires were inserted into the sockets T2030002008-000 and they were crimped. The contact holes for wires were tight for the headlight wire gauge. The wiring diagram showed 1 mm² (16 AWG), though.</p>
<p>The sockets are pretty cheap to have an assortment and match different wire gauges perfectly. The biggest socket that will fit into the 3D-printed insert is T2030002015-000.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2021/05/T2030002008-000.png"><img src="//hobby.farit.ru/wp-content/uploads/2021/05/T2030002008-000.png" alt="T2030002008-000 crimped" width="1024" height="762" class="aligncenter size-full wp-image-520" /></a></p>
<p>The sockets were inserted into the 3D-printed housing inserts.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2021/05/housing.png"><img src="//hobby.farit.ru/wp-content/uploads/2021/05/housing.png" alt="Contact housing inserted" width="1024" height="906" class="aligncenter size-full wp-image-521" /></a></p>
<p>The open parts of the housing inserts were glued together using the shoe cement &#8220;Petronio&#8221;. After the glue settled a little bit, the sides were pressed together. Probably, any flexible glue should be good enough. If you wish to use Super Glue, it should be used on both sides ignoring the glue instructions.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2021/05/contact_glue.png"><img src="//hobby.farit.ru/wp-content/uploads/2021/05/contact_glue.png" alt="contact glue" width="1024" height="645" class="aligncenter size-full wp-image-522" /></a></p>
<p>A day passed waiting until the glue hardened.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2021/05/contact_glued.png"><img src="//hobby.farit.ru/wp-content/uploads/2021/05/contact_glued.png" alt="contact_glued" width="1024" height="703" class="aligncenter size-full wp-image-523" /></a></p>
<p>The contacts were installed successfully.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2021/05/installed.png"><img src="//hobby.farit.ru/wp-content/uploads/2021/05/installed.png" alt="installed" width="1024" height="619" class="aligncenter size-full wp-image-533" /></a></p>
<h3>BMW E30, E32, E34, E36 connector plastic housings</h3>
<p>The 3D-printed housing insert described in the article is compatible only with the straight contact terminal plastic housings.</p>
<ul>
<li>White 2-pole: <a href="https://www.realoem.com/bmw/enUS/part?id=1113-USA-02-1991-E30-BMW-325i&#038;mg=61&#038;sg=15&#038;diagId=61_0534&#038;q=61131378401" rel="noopener" target="_blank">61131378401</a></li>
<li>Gray 2-pole: <a href="https://www.realoem.com/bmw/enUS/partxref?id=1113-USA-02-1991-E30-BMW-325i&#038;diagId=61_0534&#038;q=61131378402" rel="noopener" target="_blank">61131378402</a></li>
<li>Yellow 2-pole: <a href="https://www.realoem.com/bmw/enUS/partxref?id=1113-USA-02-1991-E30-BMW-325i&#038;diagId=61_0534&#038;q=61131378403" rel="noopener" target="_blank">61131378403</a></li>
<li>Black 2-pole: <a href="https://www.realoem.com/bmw/enUS/partxref?id=1113-USA-02-1991-E30-BMW-325i&#038;mg=13&#038;sg=15&#038;diagId=13_0335&#038;q=61131378400&#038;series=E30" rel="noopener" target="_blank">61131378400</a>
<li>Black 3-pole: <a href="https://www.realoem.com/bmw/enUS/part?id=1113-USA-02-1991-E30-BMW-325i&#038;mg=61&#038;sg=15&#038;diagId=61_0534&#038;q=61131378410" rel="noopener" target="_blank">61131378410</a></li>
</ul>
<p><a href="//hobby.farit.ru/wp-content/uploads/2021/05/housings.png"><img src="//hobby.farit.ru/wp-content/uploads/2021/05/housings.png" alt="BMW E30 housing 61131378401 61131378402 61131378403 61131378410" width="2564" height="1652" class="aligncenter size-full wp-image-535" /></a></p>
<p>The other housings require angled contact terminals: 61131378416 (black), 61131378417 (white), 61131378418 (gray), 61131378419 (yellow). </p>
]]></content:encoded>
			<wfw:commentRss>https://hobby.farit.ru/bmw-e30-connector-61130007441/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Custom bracket to install 6-speed transmission in BMW E30</title>
		<link>https://hobby.farit.ru/custom-bracket-to-install-6-speed-transmission-in-bmw-e30/</link>
		<comments>https://hobby.farit.ru/custom-bracket-to-install-6-speed-transmission-in-bmw-e30/#comments</comments>
		<pubDate>Fri, 26 Feb 2021 00:56:39 +0000</pubDate>
		<dc:creator><![CDATA[Farit]]></dc:creator>
				<category><![CDATA[bmw e30]]></category>
		<category><![CDATA[e30]]></category>
		<category><![CDATA[gs6-37dz]]></category>

		<guid isPermaLink="false">http://hobby.farit.ru/?p=475</guid>
		<description><![CDATA[This transmission bracket (cross member) can be used for an installation of a 6-speed transmission in a BMW E30. It should work with the Getrag 420G, ZF GS6-37DZ and ZF GS6-37BZ. Weld all parts together and paint them. Download 3D model The 6-speed transmission bracket for the E30 dimensions. Use 4 square-headed M8X18 bolts (23711130250) [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This transmission bracket (cross member) can be used for an installation of a 6-speed transmission in a BMW E30. It should work with the Getrag 420G, ZF GS6-37DZ and ZF GS6-37BZ.</p>
<p>Weld all parts together and paint them.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2021/02/transbracket.stl">Download 3D model</a></p>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2021/02/transbracket.jpg"><img src="//hobby.farit.ru/wp-content/uploads/2021/02/transbracket-854x449.jpg" alt="transbracket" width="854" height="449" class="aligncenter size-medium wp-image-738" /></a></p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2021/02/transbracket_e30_6-speed.pdf">The 6-speed transmission bracket for the E30 dimensions.</a></p>
<p>Use 4 square-headed M8X18 bolts (<a href="https://www.realoem.com/bmw/enUS/part?id=1113-USA-02-1991-E30-BMW-325i&#038;mg=23&#038;sg=10&#038;diagId=23_0380&#038;q=23711130250" rel="noopener" target="_blank">23711130250</a>) to connect the bracket to the chassis.</p>
]]></content:encoded>
			<wfw:commentRss>https://hobby.farit.ru/custom-bracket-to-install-6-speed-transmission-in-bmw-e30/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>BMW E30 325i auto to manual 6-speed ZF GS6-37DZ transmission swap</title>
		<link>https://hobby.farit.ru/e30-325i-manual-swap-to-6-speed-gs6-37dz/</link>
		<comments>https://hobby.farit.ru/e30-325i-manual-swap-to-6-speed-gs6-37dz/#comments</comments>
		<pubDate>Wed, 25 Mar 2020 21:01:47 +0000</pubDate>
		<dc:creator><![CDATA[Farit]]></dc:creator>
				<category><![CDATA[bmw e30]]></category>
		<category><![CDATA[e30]]></category>

		<guid isPermaLink="false">http://hobby.farit.ru/?p=177</guid>
		<description><![CDATA[A typical E30 325i automatic transmission swap to manual with the Getrag 260 A typical manual transmission swap uses the 5-speed Getrag 260 transmission from a manual E30. Here is the list of the parts that are required for a swap: Transmission input shaft seal Engine rear main seal Transmission Transmission oil Transmission crossmember 23711176574 [&#8230;]]]></description>
				<content:encoded><![CDATA[<h2>A typical E30 325i automatic transmission swap to manual with the Getrag 260</h2>
<p>A typical manual transmission swap uses the 5-speed Getrag 260 transmission from a manual E30.<br />
Here is the list of the parts that are required for a swap:</p>
<ul>
<li>Transmission input shaft seal</li>
<li>Engine rear main seal</li>
<li>Transmission</li>
<li>Transmission oil</li>
<li>Transmission crossmember 23711176574</li>
<li>Transmission mounts 23711175939 x2</li>
<li>Transmission mount nuts 07119905515 x4</li>
<li>Washer 33311108205 x2</li>
<li>Washer 07119904115 x2</li>
<li>Shifter assembly</li>
<li>Selector rod | Shift link w/washers and clips</li>
<li>Shift handle</li>
<li>Shift knob and emblem</li>
<li>Nylon cup and bushing</li>
<li>Shift lever insulating rubber boot</li>
<li>Shift lever leather boot</li>
<li>Lock pin for support arm</li>
<li>Bushing mounting nut</li>
<li>Transmission to block bolts (set, you can reuse the bolts that came off your auto)</li>
<li>Giubo bolts</li>
<li>Giubo</li>
<li>Manual driveshaft</li>
<li>Center bearing assembly</li>
<li>Reverse light switch</li>
<li>M/T reverse lamps wiring harness BMW 23141220263</li>
<li>Clutch cruise control switch and wiring</li>
<li>Flywheel</li>
<li>Flywheel spacer plate</li>
<li>Flywheel bolts x8 (need new)</li>
<li>Throwout bearing</li>
<li>Clutch/Pressure Plate assembly</li>
<li>Clutch fork</li>
<li>Clutch fork bearing</li>
<li>Clutch master cylinder</li>
<li>Clutch master fluid line connector</li>
<li>Clutch slave cylinder</li>
<li>Clutch hardline</li>
<li>Firewall grommet</li>
<li>Clutch soft line</li>
<li>Brake pedal 35211154729</li>
<li>Clutch pedal 35311156838</li>
<li>Clutch and brake pedal rubber pads 35211108634</li>
<li>Hex bolt for the pedals M10x175 07119912721</li>
</ul>
<p>The most expensive parts are the Getrag 260, manual driveshaft, shifter and selector rod, flywheel, and clutch. It&#8217;s very difficult to find a Getrag 260 that doesn&#8217;t need a rebuild. BMW sells a refurbished one for $3,500.</p>
<p>If you have to change so many parts, isn&#8217;t it better to install a newer 6-speed transmission with its driveshaft, shifter, clutch, differential, and linking parts? </p>
<h2>GS6-37DZ transmission</h2>
<p>A newer one can be the European diesel transmission <a href="https://en.wikipedia.org/wiki/ZF_S6-37_transmission" target="_blank">GS6-37DZ</a>. This swap was pioneered by <a href="https://www.r3vlimited.com/board/forum/e30-technical-forums/24v-engine-swaps/m54-s54/183875-my-24v-long-term-swap-s54-i-love/page7" target="_blank">Wanganstyle.</a> </p>
<p>This article describes only the <em><strong>Project Research stage</strong></em>. I&#8217;m trying to collect as much information as possible. I don&#8217;t know what will work and what won&#8217;t.</p>
<p>The GS6-37 is a 6-speed manual transmission manufactured by ZF Friedrichshafen AG and Getrag. It is designed for longitudinal engine applications and is rated to handle up to 370 newton metres (273 lbf⋅ft) of torque.</p>
<h3>Gear ratios</h3>
<table>
<tbody>
<tr>
<th colspan="7">Gear ratios for Getrag 260</th>
</tr>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
<th></th>
<th>4</th>
<th>5</th>
<th>R</th>
</tr>
<tr>
<td>3.83</td>
<td>2.20</td>
<td>1.40</td>
<td></td>
<td>1.00</td>
<td>0.81</td>
<td>3.71</td>
</tr>
<tr>
<th colspan="7">Gear ratios for diesel GS6-37<strong>DZ</strong></th>
</tr>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>R</th>
</tr>
<tr>
<td>5.14</td>
<td>2.83</td>
<td>1.79</td>
<td>1.26</td>
<td>1.00</td>
<td>0.83</td>
<td>4.64</td>
</tr>
<tr>
<th colspan="7">Gear ratios for gasoline GS6-37<strong>BZ</strong></th>
</tr>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>R</th>
</tr>
<tr>
<td>4.350</td>
<td>2.496</td>
<td>1.665</td>
<td>1.234</td>
<td>1.000</td>
<td>0.851</td>
<td>3.926</td>
</tr>
</tbody>
</table>
<h3>Differential</h3>
<p>Which differential ratio is the best?</p>
<ul>
<li>The acceleration in the 2, 3, 4 gears should be similar to the Getrag 260 + a 4.10 or 3.73 differential.</li>
<li>The 6th gear should be good for low-RPM freeway cruising.</li>
<li>The 1st gear should be usable.</li>
</ul>
<p>The Getrag 260 with a 4.10 differential compared to the GS6-37DZ with a 3.15 differential:</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/differential_ratios_4.1-3.15.png"><img class="aligncenter size-full wp-image-293" src="//hobby.farit.ru/wp-content/uploads/2020/03/differential_ratios_4.1-3.15.png" alt="Differential ratios 4.1 3.15" width="828" height="752" /></a></p>
<p>The Getrag 260 with a 3.73 differential compared to the GS6-37DZ with a 3.07 differential:</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/differential_ratios_3.73-3.07.png"><img class="aligncenter size-full wp-image-297" src="//hobby.farit.ru/wp-content/uploads/2020/03/differential_ratios_3.73-3.07.png" alt="Differential ratios 3.73 3.07" width="830" height="751" /></a></p>
<p>It&#8217;s possible to find Z3 3.07 and 3.15 medium 188mm differentials. They have Torsen LSDs and require little maintenance for regular driving. They are more modern and have few miles as the regular Z3 was a weekend car. The Z3M had a 3.23 clutch-type LSD differential.</p>
<h3>Getrag 260 and GS6-37DZ bellhousing comparison</h3>
<p>Looking at the different variants of the GS6-37DZ transmission, only the earlier variants GS6-37DZ — THES (<a href="https://www.realoem.com/bmw/enUS/part?id=AS72-EUR-01-2005-E46-BMW-320d&amp;mg=23&amp;sg=05&amp;diagId=23_0918&amp;q=23007562730" target="_blank" rel="noopener">23007562730</a>) and GS6-37DZ — TJEM (<a href="https://www.realoem.com/bmw/enUS/part?id=NC31-EUR---E60-BMW-520d&amp;mg=23&amp;sg=05&amp;diagId=23_0918&amp;q=23007565194" target="_blank" rel="noopener">23007565194</a>) can be used.</p>
<p>Compatible transmissions were installed with the M47 engine:</p>
<p>GS6-37DZ — TJEM</p>
<ul>
<li>BMW E87 (118d, 120d)</li>
<li>BMW 320Cd E46</li>
<li>BMW E90/E91 (318d (M47N2), 320d (M47N2))</li>
<li>BMW E60/E61 (520d)</li>
<li>BMW E60 LCI/E61 LCI (520d (M47N2))</li>
</ul>
<p>GS6-37DZ — THES</p>
<ul>
<li>BMW 120d E87</li>
<li>BMW E46 (320Cd/td, 320d (M47N))</li>
<li>BMW E90/E91 (320d M47N2)</li>
<li>BMW E60/E61 (520d)</li>
</ul>
<p>The newer versions of the GS6-37DZ (TJEF, TJEJ) that came with the engine N47 have the starter protrusion at the bottom, not at the top. They are not compatible.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/gs6-37DZ-TJEJ.png"><img src="//hobby.farit.ru/wp-content/uploads/2020/03/gs6-37DZ-TJEJ.png" alt="gs6-37DZ-TJEJ" width="1022" height="972" class="aligncenter size-full wp-image-399" /></a></p>
<p>The main advantage of the GS6-37DZ (D &#8211; diesel) over its sibling GS6-37BZ (B &#8211; benzin, petrol, gasoline) is the slant(tilt) degree of 20°. The slant degree of the M20 engine in the 325i is the same. The engine doesn&#8217;t stand vertically to save on the height. The GS6-37BZ has the slant degree of 30° &#8211; it&#8217;s compatible with the M30, M50, etc.</p>
<div><a href="//hobby.farit.ru/wp-content/uploads/2020/03/getrag-260-gs6-37dz.png"><img class="aligncenter size-full wp-image-213" src="//hobby.farit.ru/wp-content/uploads/2020/03/getrag-260-gs6-37dz.png" alt="Getrag 260 and GS6-37DZ bellhousing comparison" width="1471" height="715" /></a></div>
<p>As you can see, the GS6-37DZ has more bellhousing holes than the Getrag 260: 2 at the bottom and 1 pin at the top.</p>
<p>The transmission will be mated with the BMW M20 engine. The top pin interferes with the starter. But the M20 starter won&#8217;t probably work with the GS6-37DZ flywheel, so it&#8217;ll be replaced anyway.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/m20.png"><img class="aligncenter size-full wp-image-224" src="//hobby.farit.ru/wp-content/uploads/2020/03/m20.png" alt="BMW M20 engine rear" width="823" height="800" /></a></p>
<p>The bottom part of the M20 engine can be disconnected. It&#8217;s called the Bowl reinforcement (<a href="https://www.realoem.com/bmw/enUS/part?id=1123-USA---E30-BMW-325i&amp;mg=11&amp;sg=10&amp;diagId=11_0119&amp;q=11141286342" target="_blank" rel="noopener">11141286342</a>). An additional hole can be drilled and tapped in it, but there is no casting for it in the back of the reinforcement. Maybe, a nut can be used.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/bowl_reinforcement.png"><img class="aligncenter size-full wp-image-219" src="//hobby.farit.ru/wp-content/uploads/2020/03/bowl_reinforcement.png" alt="bowl_reinforcement" width="1215" height="343" /></a></p>
<h3>Transmission drive shaft differences</h3>
<p>The driveshaft in the Getrag 260 has 10 splines, the driveshaft of the GS6-37DZ has 22 splines. So, a clutch disk should have 22 splines too.<br />
The driveshaft in the Getrag 260 is longer and its pilot bearing is inserted into the crankshaft of the engine.<br />
The driveshaft in the GS6-37DZ is shorter and its pilot bearing is in the flywheel.</p>
<h2>Rear transmission mount brace (cross member)</h2>
<p>The GS6-37DZ is mounted differently. The top <a href="https://www.realoem.com/bmw/enUS/part?id=VC11-EUR---E90-BMW-318d&amp;mg=22&amp;sg=10&amp;diagId=22_0104&amp;q=22316760303" target="_blank">(22316760303)</a> E90 Transmission supporting bracket is available. Then, the mounting style and dimensions should be similar to the 6-speed Getrag 420G, for which some companies create braces.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/gs6-37dz_rear_mount.png"><img class="aligncenter size-full wp-image-227" src="http://hobby.farit.ru/wp-content/uploads/2020/03/gs6-37dz_rear_mount.png" alt="GS6-37DZ rear mounting brace" width="1055" height="800" /></a></p>
<p><a href="//hobby.farit.ru/custom-bracket-to-install-6-speed-transmission-in-bmw-e30/">A custom bracket for a 6-speed transmission in a BMW E30</a></p>
<h2>Drive Shaft</h2>
<h3>The automatic E36 M3 driveshaft</h3>
<p>The GS6-37DZ is 635 mm long. It is 120 mm longer than the Getrag 260. The automatic transmission ZF HP4-22 is 685 mm long.<br />
The length of the drive shaft for the GS6-37DZ must be close to 1367 mm. </p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/gs6-37bz-dimensions.jpg"><img src="//hobby.farit.ru/wp-content/uploads/2020/03/gs6-37bz-dimensions.jpg" alt="gs6-37bz dimensions" width="1509" height="1062" class="aligncenter size-full wp-image-328" /></a></p>
<p>The E36 M3 automatic drive shaft (<a href="https://www.realoem.com/bmw/enUS/part?id=CD03-USA-02-1998-E36-BMW-M3&amp;mg=26&amp;sg=05&amp;diagId=26_0284&amp;q=26112228212" target="_blank" rel="noopener">26112228212</a>) should be compatible with its length of 1346 mm. It&#8217;s about 20 mm short.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/26112228212.png"><img src="//hobby.farit.ru/wp-content/uploads/2020/03/26112228212.png" alt="E36 M3 auto drive shaft 26112228212" width="485" height="475" class="aligncenter size-full wp-image-357" /></a></p>
<p>Also, the European E36 automatic drive shaft (<a href="https://www.realoem.com/bmw/enUS/part?id=BJ81-EUR---E36-BMW-323i&amp;mg=26&amp;sg=05&amp;diagId=26_0284&amp;q=26111227441" target="_blank" rel="noopener">26111227441</a>) should be compatible too with its length of 1345 mm.</p>
<p>It seems that many 4-bolt E36 drive shafts have the same rear half. It&#8217;s only the front half that has different lengths. Both u-joints are located in the rear half, and they wear out. The front half is just a pipe with connectors.</p>
<p>Some people indicate that the manual Z4 front part(<a href="https://www.realoem.com/bmw/enUS/partxref?q=26117514468&#038;series=E85" rel="noopener" target="_blank">26117514468</a>) can be used with the rear E36 part to provide the perfect length.</p>
<p>The M3 giubo (<a href="https://www.realoem.com/bmw/enUS/partxref?id=CD03-USA-02-1998-E36-BMW-M3&#038;mg=26&#038;sg=10&#038;diagId=26_0286&#038;q=26112226527&#038;series=E36" target="_blank" rel="noopener">26112226527</a>) is 96mm in diameter, 35 mm wide, and it is connected using M12 bolts.</p>
<p>The drive shaft center support mount must be from the E30 (<a href="https://www.realoem.com/bmw/enUS/part?id=1123-USA-02-1991-E30-BMW-325i&amp;mg=26&amp;sg=10&amp;diagId=26_0122&amp;q=26121226723" target="_blank" rel="noopener">26121226723</a>). Probably, it should be mounted backwards.</p>
<h3>The front section of the E46 320d driveshaft + the rear section of the E30 rear driveshaft</h3>
<p>The rear section of all E30 driveshafts is the same, so a good automatic E30 driveshaft can be used.</p>
<p>The front section must come from a European e46 320d produced from 03/2003 (<a href="https://www.realoem.com/bmw/enUS/part?id=AZ12-EUR-02-2005-E46-BMW-320d&#038;mg=26&#038;sg=05&#038;diagId=26_0183&#038;q=26117523929" rel="noopener" target="_blank">26117523929</a>). The 6-speed E46 330i and M3 driveshafts are not compatible.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/e46_320d_26117523929.png"><img src="//hobby.farit.ru/wp-content/uploads/2020/03/e46_320d_26117523929.png" alt="e46 320d 26117523929 + e30 drive shaft" width="4618" height="2827" class="aligncenter size-full wp-image-450" /></a></p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/e46_320d_front.png"><img src="//hobby.farit.ru/wp-content/uploads/2020/03/e46_320d_front.png" alt="e46 320d drive shaft 7523929" width="1600" height="465" class="aligncenter size-full wp-image-452" /></a></p>
<h2>Shifter</h2>
<p>The shifter carrier and selector rod for this conversion must be custom.</p>
<h3>Shifter carrier and Selector rod</h3>
<p>Zionsville <a href="https://www.zionsvilleautosport.com/store/bmw-e36-6-speed-conversion-shift-arm-support-bracket/" target="_blank" rel="noopener">BMW E36 6 Speed Conversion Shift Arm Support Bracket</a>.<br />
<a href="//hobby.farit.ru/wp-content/uploads/2020/03/zionsville_shifter_carrier.png"><img class="aligncenter size-full wp-image-245" src="//hobby.farit.ru/wp-content/uploads/2020/03/zionsville_shifter_carrier.png" alt="Zionsville shifter carrier" width="731" height="339" /></a></p>
<p>A longer shifter carrier can be shortened and welded.<br />
<a href="//hobby.farit.ru/wp-content/uploads/2020/03/gs6-37-shifting-arm.png"><img src="//hobby.farit.ru/wp-content/uploads/2020/03/gs6-37-shifting-arm.png" alt="gs6-37 Shifting carrier welded" width="1520" height="960" class="aligncenter size-full wp-image-360" /></a></p>
<p>Here is a shifter carrier and selector rod for the E36 + GS6-37BZ. It should be compatible, too. I believe the rod should be bent instead of being straight for better clearance. The arm is aluminum, the rod is steel.<br />
<a href="https://www.turnermotorsport.com/p-1135813-e36-gs6-37-6-speed-conversion-shifter-carrier-black/">GS6-37 6 Speed Conversion Shifter Carrier for sale</a></p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/reboot-engineering-gs6-37-shifter-carrier1.png"><img src="//hobby.farit.ru/wp-content/uploads/2020/03/reboot-engineering-gs6-37-shifter-carrier1.png" alt="E36 GS6-37BZ" width="1200" height="1634" class="aligncenter size-full wp-image-647" /></a></p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/gearshiftrod.stl">Download 3D model for Gear Shift Rod</a></p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/gearshiftrod.jpg"><img src="//hobby.farit.ru/wp-content/uploads/2020/03/gearshiftrod-854x743.jpg" alt="gearshiftrod" width="854" height="743" class="aligncenter size-medium wp-image-741" /></a></p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/gearshiftarm.stl">Download 3D model for Gear Shift Arm</a></p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/gearshiftarm.jpg"><img src="//hobby.farit.ru/wp-content/uploads/2020/03/gearshiftarm-854x446.jpg" alt="gearshiftarm" width="854" height="446" class="aligncenter size-medium wp-image-742" /></a></p>
<p>But this bent gear shift rod is more appropriate.<br />
<a href="https://hobby.farit.ru/wp-content/uploads/2020/03/gearshiftrodbent.jpg"><img src="https://hobby.farit.ru/wp-content/uploads/2020/03/gearshiftrodbent.jpg" alt="gearshiftrodbent" width="700" height="576" class="aligncenter size-full wp-image-745" /></a></p>
<h2>Flywheel and Clutch</h2>
<p>The LuK dual-mass flywheel.<br />
<a href="//hobby.farit.ru/wp-content/uploads/2020/03/LuK_DMF053.png"><img class="aligncenter size-full wp-image-250" src="//hobby.farit.ru/wp-content/uploads/2020/03/LuK_DMF053.png" alt="LuK DMF053 twin-mass flywheel" width="1200" height="600" /></a></p>
<p>The original M20 flywheel.<br />
<a href="//hobby.farit.ru/wp-content/uploads/2020/03/m20_flywheel.png"><img class="aligncenter size-full wp-image-251" src="//hobby.farit.ru/wp-content/uploads/2020/03/m20_flywheel.png" alt="M20 flywheel" width="864" height="400" /></a></p>
<p>These items should work:</p>
<ul>
<li>Clutch Kit (<a href="https://www.realoem.com/bmw/enUS/part?id=VC31-EUR-03-2007-E90-BMW-320d&#038;mg=21&#038;sg=05&#038;diagId=21_0234&#038;q=21207626561" rel="noopener" target="_blank">21207626561</a>). Sachs Clutch K70436-01</li>
<li>Dual Mass Flywheel (<a href="https://www.realoem.com/bmw/enUS/partxref?id=AV53-USA---E46-BMW-330i&#038;diagId=11_3607&#038;q=21207533868" rel="noopener" target="_blank">21207533868</a>). Sachs Manual Transmission Flywheel DMF91175</li>
<li>8 M12x1.5&#215;29.15 Flywheel Screws (<a href="https://www.realoem.com/bmw/enUS/part?id=AV53-USA---E46-BMW-330i&#038;mg=11&#038;sg=20&#038;diagId=11_3607&#038;q=11227519572" rel="noopener" target="_blank">11227519572</a>)</li>
<li>Clutch Ball Pin (<a href="https://www.realoem.com/bmw/enUS/part?id=VC31-EUR---E90-BMW-320d&#038;mg=21&#038;sg=05&#038;diagId=21_0234&#038;q=21511223328" rel="noopener" target="_blank">21511223328</a>). <a href="https://leogranderacing.com/products/greasable-stainless-steel-clutch-fork-pivot-pin" rel="noopener" target="_blank">Greasable Stainless Steel Clutch Fork Pivot Pin</a></li>
</ul>
<p>There are aftermarket flywheel and clutch kits.<br />
<a href="http://www.clutchmasters.com/2003-2006-3-0l-e46-6-speed/" rel="noopener" target="_blank">Clutch Masters 2003-2006 : 3.0L E46 (6-Speed)</a></p>
<h2>Clutch Slave Cylinder</h2>
<p>The master clutch cylinder is from the E30. The slave clutch cylinder is from the E36 325i(<a href="https://www.realoem.com/bmw/enUS/part?id=CB33-USA-02-1995-E36-BMW-325i&#038;mg=21&#038;sg=10&#038;diagId=21_0289&#038;q=21521159045" rel="noopener" target="_blank">21521159045</a>). There should be other compatible clutch cylinders.</p>
<h2>Starter</h2>
<p>The starter from the E46(<a href="https://www.realoem.com/bmw/enUS/part?id=EV53-USA-01-2005-E46-BMW-330i&amp;mg=12&amp;sg=25&amp;diagId=12_1092&amp;q=12412354693" target="_blank" rel="noopener">12412354693</a>) is compatible with the E46 flywheel.</p>
<p>The Bosch SR0448N from the E46 has the threaded holes for the bolts, no E30-style nuts will be needed.</p>
<p>The E30 starter(<a href="https://www.realoem.com/bmw/enUS/part?id=1123-USA-02-1991-E30-BMW-325i&amp;mg=12&amp;sg=25&amp;diagId=12_1506&amp;q=12411726504" target="_blank" rel="noopener">12411726504</a>) specifications:<br />
Rated Power [kW]: 1,4<br />
Voltage [V]: 12<br />
Number of Teeth: 9<br />
Rotation Direction: Clockwise rotation<br />
Number of mounting bores: 2<br />
Flange Ø [mm]: 76<br />
Number of Thread Bores 0<br />
Plug Type ID: M6<br />
Clamp: M8<br />
Length 3 [mm]: 25<br />
Length [mm]: 184.21</p>
<p>The E46 starter(<a href="https://www.realoem.com/bmw/enUS/part?id=EV53-USA-01-2005-E46-BMW-330i&amp;mg=12&amp;sg=25&amp;diagId=12_1092&amp;q=12412354693" target="_blank" rel="noopener">12412354693</a>) specifications:<br />
Rated Power [kW]: 1,4<br />
Voltage [V]: 12<br />
Number of Teeth: 9<br />
Rotation Direction: Clockwise rotation<br />
Number of mounting bores: 3<br />
Flange Ø [mm]: 76<br />
Number of Thread Bores: 2<br />
Plug Type ID: M6<br />
Clamp: M8<br />
Length 3 [mm]: 23<br />
Length [mm]: 173.21</p>
<h2>Reverse Switch</h2>
<p>The E30 reverse switch(<a href="https://www.realoem.com/bmw/enUS/part?id=1254-USA-08-1985-E30-BMW-325e&amp;mg=23&amp;sg=15&amp;diagId=23_1101&amp;q=23141354071" target="_blank" rel="noopener">23141354071</a>) has a correct connector.</p>
<h2>Lube and Oil</h2>
<p>The transmission splines must be lubed.</p>
<h2>Rebuilding the GS6-37DZ transmission</h2>
<p>The transmission bellhousing can be opened using <a href="https://www.drive2.com/l/9405101/" target="_blank" rel="noopener">this crude technology.</a><br />
It seems that the bellhousings of the GS6-37DZ and GS6-37BZ can be exchanged to get the gasoline engine gear ratios.</p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/gs6-37bz_bellhousing.jpg"><img class="aligncenter size-full wp-image-260" src="//hobby.farit.ru/wp-content/uploads/2020/03/gs6-37bz_bellhousing.jpg" alt="gs6-37bz bellhousing open" width="804" height="1081" /></a></p>
<p>In addition to <a href="https://www.realoem.com/bmw/enUS/partgrp?id=EV53-USA-01-2005-E46-BMW-330i&amp;mg=23" target="_blank" rel="noopener">the new seals and new bolts</a>, these bearings are required for a rebuild:</p>
<ul>
<li>2 bearings for the input and main shafts NSK 35TM10-A-1CG28U01 (BMW 23111224806) 35x80x20mm</li>
<li>1 bearing for the main shaft by ZF. 1833728 IC 32272-MB90A IC 0735298254 ZF 1833728 DAF, 5001847341 DAF 42535016 IVECO 5001847341 IVECO 8869673 IVECO, 8869673EB12-6460 IVECO 32272-MB90A NISSAN 322754716R RVI, 50 01 847 341 RVI 23&#215;40,40x21mm</li>
<li>1 bearing for the lay shaft SKF BA2B 633910 C (BMW 23111224808) 29.8x67x31mm</li>
<li>1 bearing INA 712 0613 10 (INA F-223773) 27x44x23.2mm</li>
</ul>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/gs6-37bz_rebuild.jpg"><img class="aligncenter size-full wp-image-259" src="//hobby.farit.ru/wp-content/uploads/2020/03/gs6-37bz_rebuild.jpg" alt="NSK 35TM10-A-1CG28U01, SKF BA2B 633910 C(23111224808)" width="720" height="1546" /></a></p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/NSK35TM10-A-1CG28U01.png"><img src="//hobby.farit.ru/wp-content/uploads/2020/03/NSK35TM10-A-1CG28U01.png" alt="NSK 35TM10-A-1CG28U01 (BMW 23111224806)" width="2202" height="598" class="aligncenter size-full wp-image-425" /></a></p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/SKFBA2B633910C.png"><img src="//hobby.farit.ru/wp-content/uploads/2020/03/SKFBA2B633910C.png" alt="SKF BA2B 633910 C (BMW 23111224808)" width="1708" height="804" class="aligncenter size-full wp-image-423" /></a></p>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/INA712061310.png"><img src="//hobby.farit.ru/wp-content/uploads/2020/03/INA712061310.png" alt="bearing INA 712 0613 10 (INA F-223773)" width="2672" height="968" class="aligncenter size-full wp-image-419" /></a></p>
<h2>Schematics of the GS6-37DZ</h2>
<p><a href="//hobby.farit.ru/wp-content/uploads/2020/03/gs6-37dz_schematics.png"><img class="aligncenter size-full wp-image-272" src="//hobby.farit.ru/wp-content/uploads/2020/03/gs6-37dz_schematics.png" alt="gs6-37dz schematics" width="1005" height="2673" /></a></p>
]]></content:encoded>
			<wfw:commentRss>https://hobby.farit.ru/e30-325i-manual-swap-to-6-speed-gs6-37dz/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
