<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.techno-innov.fr/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nathael</id>
	<title>Techno-Innov&#039;s Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.techno-innov.fr/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nathael"/>
	<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php/Special:Contributions/Nathael"/>
	<updated>2026-05-27T01:00:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=File:PiRTC_RTC.png&amp;diff=107</id>
		<title>File:PiRTC RTC.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=File:PiRTC_RTC.png&amp;diff=107"/>
		<updated>2025-02-24T11:38:44Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=File:PiRTC_Composants.png&amp;diff=106</id>
		<title>File:PiRTC Composants.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=File:PiRTC_Composants.png&amp;diff=106"/>
		<updated>2025-02-24T11:38:21Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=File:PiRTC_RPI_P1.png&amp;diff=105</id>
		<title>File:PiRTC RPI P1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=File:PiRTC_RPI_P1.png&amp;diff=105"/>
		<updated>2025-02-24T11:38:10Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=File:PiRTC_Connectors.png&amp;diff=104</id>
		<title>File:PiRTC Connectors.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=File:PiRTC_Connectors.png&amp;diff=104"/>
		<updated>2025-02-24T11:37:49Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=File:PiRTC_Cotes.png&amp;diff=103</id>
		<title>File:PiRTC Cotes.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=File:PiRTC_Cotes.png&amp;diff=103"/>
		<updated>2025-02-24T11:36:55Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiRTC&amp;diff=102</id>
		<title>Products/PiRTC</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiRTC&amp;diff=102"/>
		<updated>2025-02-24T11:35:25Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiRTC&amp;quot; Extention}}&lt;br /&gt;
RTC with Supercapacitor backup and 64 bytes NVMEM&lt;br /&gt;
&lt;br /&gt;
[[Image:PiRTC.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiRTC&amp;quot; Extention is an RTC (PCF85363) with Super-capacitor power backup and 64 bytes of non-volatile RAM (provided by the RTC chip).&lt;br /&gt;
&lt;br /&gt;
The Board uses the 26 pins version of the common extention connector found on many SBC with a form factor close to the original Raspberry Pi, often compatible with the pinout of the 40 pin connector.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael// On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
By purchasing one of our products, you become the owner .Therefore, you have some rights and obligations according to the following licences :&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiRTC hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiRTC, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiRTC are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Waranties ==&lt;br /&gt;
Because it is impossible for Techno-Innov to know the purposes for which you acquired this product or the uses to which you will put this product, you assume full responibility for the selection of the product and for its installation and use.&amp;lt;br /&amp;gt;&lt;br /&gt;
While every reasonnable effort has been made to insure that you will receive a product that you can use and enjoy, Techno-Innov does not warrant that the functions of the product will meet your requirements or that the operation of the product will be uninterruped or error-free. Techno-Innov is not responsible for problems caused by the interaction of the product with any other software or hardware.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:PiRTC_Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figure 1 gives the different dimensions and the position of the main elements of the PiRTC board.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:PiRTC_Connectors.png|Fig 2 - Connectors|360px|right]]&lt;br /&gt;
The PIRTC has one 2.54mm pitch headers numbered P1 (26 pins Pi connector).&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : 26 pins, 2.54mm pitch header. Used to connect to PI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 Connector ===&lt;br /&gt;
[[Image:PiRTC_RPI_P1.png|300px|right]]&lt;br /&gt;
P1 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 13 pins.&amp;lt;br /&amp;gt;&lt;br /&gt;
P1 connector is used to connect to the PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| Pi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from Pi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V from Pi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V from Pi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10 to 13&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15 to 19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21 to 24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:PiRTC_Composants.png|500px|right]]&lt;br /&gt;
The PiRTC Board has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC_Schematics.7z here].&lt;br /&gt;
&lt;br /&gt;
=== Main Components Description ===&lt;br /&gt;
* U1 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U2 : TI LP2985 DC-DC step-down converter.&lt;br /&gt;
* SC1 : Bussmann 1 Farad supercapacitor.&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiRTC uses the only I²C bus from the 26 pins Pi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the PiRTC board.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:PiRTC_RTC.png|300px|right]]&lt;br /&gt;
The PiRTC uses a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
 CONFIG_RTC_DRV_PCF85363=m&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree already contains the corresponding information.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC with the &#039;&#039;&#039;hwclock&#039;&#039;&#039; command (from the &#039;&#039;&#039;util-linux&#039;&#039;&#039; package on Debian based GNU/Linux distributions) as one of the &#039;&#039;&#039;/dev/rtcN&#039;&#039;&#039; (replace &#039;N&#039; with the appropriate RTC number).&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock - NVMem ====&lt;br /&gt;
The RTC clock selected also holds 64 bytes of RAM available to the user to store data as long as the RTC chip is powered (which includes the super-capacitor backup power).&amp;lt;br /&amp;gt;&lt;br /&gt;
To get access to this memory you will need to activate the following conigurations in your kernel :&lt;br /&gt;
 CONFIG_RTC_NVMEM=y&lt;br /&gt;
 CONFIG_NVMEM=y&lt;br /&gt;
 CONFIG_NVMEM_SYSFS=y&lt;br /&gt;
When booted with a kernel with NVMEM support activated (with the PCF85363 RTC support, either built-in or as module with module loaded) you will get access to the RAM bytes under &amp;lt;code&amp;gt;/sys&amp;lt;/code&amp;gt; in the following file :&lt;br /&gt;
 /sys/bus/nvmem/devices/pcf85363-0/nvmem&lt;br /&gt;
You can then use it as a regular file with a limited size of 64 bytes.&lt;br /&gt;
 echo &amp;quot;NVMEM Test&amp;quot; &amp;gt; /sys/bus/nvmem/devices/pcf85363-0/nvmem&lt;br /&gt;
 cat /sys/bus/nvmem/devices/pcf85363-0/nvmem&lt;br /&gt;
As it is a regular file, it can be accessed using regular file access mechanisms using any language (C, python, ...)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== RTC support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected (example on RaspberryPi 4, your I2C bus number may have to be adapted to your board :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== dtb information ===&lt;br /&gt;
Here is an example entry in the device tree for the PCF85363 RTC support.&lt;br /&gt;
 &amp;amp;i2c0 {&lt;br /&gt;
    status = &amp;quot;okay&amp;quot;; &lt;br /&gt;
    pcf85363: pcf85363@51 {&lt;br /&gt;
        compatible = &amp;quot;nxp,pcf85363&amp;quot;;&lt;br /&gt;
        reg = &amp;lt;0x51&amp;gt;; &lt;br /&gt;
        status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
    };&lt;br /&gt;
 };  &lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [https://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC.pdf here]&lt;br /&gt;
* Schematics : [https://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC_Schematics.pdf here]&lt;br /&gt;
* Board layout : [https://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [https://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC_Schematics.7z here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Move RTC GPIO Pin to P1 pin7 instead of P1 pin 8 (which is used as UART Tx on some boards).&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiRTC&amp;diff=101</id>
		<title>Products/PiRTC</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiRTC&amp;diff=101"/>
		<updated>2025-02-24T11:34:36Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Electronic components */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiRTC&amp;quot; Extention}}&lt;br /&gt;
RTC with Supercapacitor backup and 64 bytes NVMEM&lt;br /&gt;
&lt;br /&gt;
[[Image:PiRTC.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiRTC&amp;quot; Extention is an RTC (PCF85363) with Super-capacitor power backup and 64 bytes of non-volatile RAM (provided by the RTC chip).&lt;br /&gt;
&lt;br /&gt;
The Board uses the 26 pins version of the common extention connector found on many SBC with a form factor close to the original Raspberry Pi, often compatible with the pinout of the 40 pin connector.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael// On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
By purchasing one of our products, you become the owner .Therefore, you have some rights and obligations according to the following licences :&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiRTC hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiRTC, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiRTC are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Waranties ==&lt;br /&gt;
Because it is impossible for Techno-Innov to know the purposes for which you acquired this product or the uses to which you will put this product, you assume full responibility for the selection of the product and for its installation and use.&amp;lt;br /&amp;gt;&lt;br /&gt;
While every reasonnable effort has been made to insure that you will receive a product that you can use and enjoy, Techno-Innov does not warrant that the functions of the product will meet your requirements or that the operation of the product will be uninterruped or error-free. Techno-Innov is not responsible for problems caused by the interaction of the product with any other software or hardware.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:PiRTC_Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figure 1 gives the different dimensions and the position of the main elements of the PiRTC board.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:PiRTC_Connectors.png|Fig 2 - Connectors|360px|right]]&lt;br /&gt;
The PIRTC has one 2.54mm pitch headers numbered P1 (26 pins Pi connector).&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : 26 pins, 2.54mm pitch header. Used to connect to PI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 Connector ===&lt;br /&gt;
[[Image:PiRTC_RPI_P1.png|300px|right]]&lt;br /&gt;
P1 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 13 pins.&amp;lt;br /&amp;gt;&lt;br /&gt;
P1 connector is used to connect to the PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| Pi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from Pi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V from Pi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V from Pi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10 to 13&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15 to 19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21 to 24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:PiRTC_Composants.png|500px|right]]&lt;br /&gt;
The PiRTC Board has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC_Schematics.7z here].&lt;br /&gt;
&lt;br /&gt;
=== Main Components Description ===&lt;br /&gt;
* U1 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U2 : TI LP2985 DC-DC step-down converter.&lt;br /&gt;
* SC1 : Bussmann 1 Farad supercapacitor.&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiRTC uses the only I²C bus from the 26 pins Pi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the PiRTC board.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:PiRTC_RTC.png|300px|right]]&lt;br /&gt;
The PiRTC uses a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
 CONFIG_RTC_DRV_PCF85363=m&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree already contains the corresponding information.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC with the &#039;&#039;&#039;hwclock&#039;&#039;&#039; command (from the &#039;&#039;&#039;util-linux&#039;&#039;&#039; package on Debian based GNU/Linux distributions) as one of the &#039;&#039;&#039;/dev/rtcN&#039;&#039;&#039; (replace &#039;N&#039; with the appropriate RTC number).&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock - NVMem ====&lt;br /&gt;
The RTC clock selected also holds 64 bytes of RAM available to the user to store data as long as the RTC chip is powered (which includes the super-capacitor backup power).&amp;lt;br /&amp;gt;&lt;br /&gt;
To get access to this memory you will need to activate the following conigurations in your kernel :&lt;br /&gt;
 CONFIG_RTC_NVMEM=y&lt;br /&gt;
 CONFIG_NVMEM=y&lt;br /&gt;
 CONFIG_NVMEM_SYSFS=y&lt;br /&gt;
When booted with a kernel with NVMEM support activated (with the PCF85363 RTC support, either built-in or as module with module loaded) you will get access to the RAM bytes under &amp;lt;code&amp;gt;/sys&amp;lt;/code&amp;gt; in the following file :&lt;br /&gt;
 /sys/bus/nvmem/devices/pcf85363-0/nvmem&lt;br /&gt;
You can then use it as a regular file with a limited size of 64 bytes.&lt;br /&gt;
 echo &amp;quot;NVMEM Test&amp;quot; &amp;gt; /sys/bus/nvmem/devices/pcf85363-0/nvmem&lt;br /&gt;
 cat /sys/bus/nvmem/devices/pcf85363-0/nvmem&lt;br /&gt;
As it is a regular file, it can be accessed using regular file access mechanisms using any language (C, python, ...)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== RTC support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected (example on RaspberryPi 4, your I2C bus number may have to be adapted to your board :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== dtb information ===&lt;br /&gt;
Here is an example entry in the device tree for the PCF85363 RTC support.&lt;br /&gt;
 &amp;amp;i2c0 {&lt;br /&gt;
    status = &amp;quot;okay&amp;quot;; &lt;br /&gt;
    pcf85363: pcf85363@51 {&lt;br /&gt;
        compatible = &amp;quot;nxp,pcf85363&amp;quot;;&lt;br /&gt;
        reg = &amp;lt;0x51&amp;gt;; &lt;br /&gt;
        status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
    };&lt;br /&gt;
 };  &lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [https://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC.pdf here]&lt;br /&gt;
* Schematics : [https://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC_Schematics.pdf here]&lt;br /&gt;
* Board layout : [https://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [https://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC_Schematics.7z here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Move RTC GPIO Pin to P1 pin7 instead of P1 pin 8 (UART Tx).&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiRTC&amp;diff=100</id>
		<title>Products/PiRTC</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiRTC&amp;diff=100"/>
		<updated>2025-01-25T16:38:07Z</updated>

		<summary type="html">&lt;p&gt;Nathael: Created page with &amp;quot;{{DISPLAYTITLE:&amp;quot;PiRTC&amp;quot; Extention}} RTC with Supercapacitor backup and 64 bytes NVMEM  right  == Description == The &amp;quot;PiRTC&amp;quot; Extention is an RTC (PCF85363) with Super-capacitor power backup and 64 bytes of non-volatile RAM (provided by the RTC chip).  The Board uses the 26 pins version of the common extention connector found on many SBC with a form factor close to the original Raspberry Pi, often compatible with the pinout of the 40 pin connector....&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiRTC&amp;quot; Extention}}&lt;br /&gt;
RTC with Supercapacitor backup and 64 bytes NVMEM&lt;br /&gt;
&lt;br /&gt;
[[Image:PiRTC.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiRTC&amp;quot; Extention is an RTC (PCF85363) with Super-capacitor power backup and 64 bytes of non-volatile RAM (provided by the RTC chip).&lt;br /&gt;
&lt;br /&gt;
The Board uses the 26 pins version of the common extention connector found on many SBC with a form factor close to the original Raspberry Pi, often compatible with the pinout of the 40 pin connector.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael// On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
By purchasing one of our products, you become the owner .Therefore, you have some rights and obligations according to the following licences :&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiRTC hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiRTC, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiRTC are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Waranties ==&lt;br /&gt;
Because it is impossible for Techno-Innov to know the purposes for which you acquired this product or the uses to which you will put this product, you assume full responibility for the selection of the product and for its installation and use.&amp;lt;br /&amp;gt;&lt;br /&gt;
While every reasonnable effort has been made to insure that you will receive a product that you can use and enjoy, Techno-Innov does not warrant that the functions of the product will meet your requirements or that the operation of the product will be uninterruped or error-free. Techno-Innov is not responsible for problems caused by the interaction of the product with any other software or hardware.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:PiRTC_Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figure 1 gives the different dimensions and the position of the main elements of the PiRTC board.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:PiRTC_Connectors.png|Fig 2 - Connectors|360px|right]]&lt;br /&gt;
The PIRTC has one 2.54mm pitch headers numbered P1 (26 pins Pi connector).&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : 26 pins, 2.54mm pitch header. Used to connect to PI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 Connector ===&lt;br /&gt;
[[Image:PiRTC_RPI_P1.png|300px|right]]&lt;br /&gt;
P1 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 13 pins.&amp;lt;br /&amp;gt;&lt;br /&gt;
P1 connector is used to connect to the PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| Pi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from Pi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V from Pi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V from Pi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10 to 13&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15 to 19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21 to 24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:PiRTC_Composants.png|500px|right]]&lt;br /&gt;
The PiRTC Board has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC_Schematics.7z here].&lt;br /&gt;
&lt;br /&gt;
=== Main Components Description ===&lt;br /&gt;
* U1 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U2 : TI LP2985 DC-DC step-down converter.&lt;br /&gt;
* SC1 : Bussmann 1 Farad supercapacitor.&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiRTC uses the only I²C bus from the 26 pins Pi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the PiRTC board.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:PiRTC_RTC.png|300px|right]]&lt;br /&gt;
The PiRTC uses a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
 CONFIG_RTC_DRV_PCF85363=m&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree already contains the corresponding information.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC with the &#039;&#039;&#039;hwclock&#039;&#039;&#039; command (from the &#039;&#039;&#039;util-linux&#039;&#039;&#039; package on Debian based GNU/Linux distributions) as one of the &#039;&#039;&#039;/dev/rtcN&#039;&#039;&#039; (replace &#039;N&#039; with the appropriate RTC number).&lt;br /&gt;
&lt;br /&gt;
The RTC clock selected also holds 64 bytes of RAM available to the user to store data as long as the RTC chip is powered (which includes the super-capacitor backup power).&amp;lt;br /&amp;gt;&lt;br /&gt;
To get access to this memory you will need to activate the following conigurations in your kernel :&lt;br /&gt;
 CONFIG_RTC_NVMEM=y&lt;br /&gt;
 CONFIG_NVMEM=y&lt;br /&gt;
 CONFIG_NVMEM_SYSFS=y&lt;br /&gt;
When booted with a kernel with NVMEM support activated (with the PCF85363 RTC support, either built-in or as module with module loaded) you will get access to the RAM bytes under &amp;lt;code&amp;gt;/sys&amp;lt;/code&amp;gt; in the following file :&lt;br /&gt;
 /sys/bus/nvmem/devices/pcf85363-0/nvmem&lt;br /&gt;
You can then use it as a regular file with a limited size of 64 bytes.&lt;br /&gt;
 echo &amp;quot;NVMEM Test&amp;quot; &amp;gt; /sys/bus/nvmem/devices/pcf85363-0/nvmem&lt;br /&gt;
 cat /sys/bus/nvmem/devices/pcf85363-0/nvmem&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== RTC support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected (example on RaspberryPi 4, your I2C bus number may have to be adapted to your board :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== dtb information ===&lt;br /&gt;
Here is an example entry in the device tree for the PCF85363 RTC support.&lt;br /&gt;
 &amp;amp;i2c0 {&lt;br /&gt;
    status = &amp;quot;okay&amp;quot;; &lt;br /&gt;
    pcf85363: pcf85363@51 {&lt;br /&gt;
        compatible = &amp;quot;nxp,pcf85363&amp;quot;;&lt;br /&gt;
        reg = &amp;lt;0x51&amp;gt;; &lt;br /&gt;
        status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
    };&lt;br /&gt;
 };  &lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [https://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC.pdf here]&lt;br /&gt;
* Schematics : [https://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC_Schematics.pdf here]&lt;br /&gt;
* Board layout : [https://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [https://techdata.techno-innov.fr/Adapters/PiRTC/PiRTC_Schematics.7z here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Move RTC GPIO Pin to P1 pin7 instead of P1 pin 8 (UART Tx).&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products&amp;diff=99</id>
		<title>Products</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products&amp;diff=99"/>
		<updated>2025-01-25T13:28:09Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* RPi and clones */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Products list}}&lt;br /&gt;
== RPi and clones ==&lt;br /&gt;
* [[Products/PiSerialPower|&amp;quot;PiSerialPower&amp;quot; Hat]]&lt;br /&gt;
[[Image:PiserialPower.jpg|100px|left]]&lt;br /&gt;
: Power-supply Hat for RaspberryPi (and pin-compatible competitors).&lt;br /&gt;
: Includes many other cool features !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Products/PiRTC|&amp;quot;PiRTC&amp;quot; Hat]]&lt;br /&gt;
[[Image:PiRTC.jpg|100px|left]]&lt;br /&gt;
: RTC Extention for SBC with an extention connector compatible with the original Pi 26 or 40 pins connector.&lt;br /&gt;
: Includes 64 bytes of NVMEM and supercapacitor power backup for RTC and NVMEM.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Development Modules ==&lt;br /&gt;
* [[Products/Module_GPIO_Demo|GPIO-Demo Module]]&lt;br /&gt;
[[Image:Module_GPIO_Demo.jpg|100px|left]]&lt;br /&gt;
: The GPIO-Demo module is intended to help prototyping, learning and development of communication modules for the DomoTab project.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Products/LPC1224BO|LPC1224 Break-Out]]&lt;br /&gt;
[[Image:LPC1224-BO.jpg|100px|left]]&lt;br /&gt;
: Another development board for the LPC1224, closer to a full Break-Out than the GPIO-Demo module which is specific to the DomoTab project.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Products/LPC1224mbed|LPC1224-mbed]]&lt;br /&gt;
[[Image:LPC1224-mbed.jpg|100px|left]]&lt;br /&gt;
: An &amp;quot;mbed ready&amp;quot; equivalent of the LPC1224 Break-Out board.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Products/USB_UART|USB-UART Adaptator]]&lt;br /&gt;
[[Image:USBtoUART.jpg|100px|left]]&lt;br /&gt;
: USB to UART Adaptator, with possible UEXT connector support.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Communication Modules ==&lt;br /&gt;
* [[Products/Module_RFSub1G|RF Sub-1GHz Module]]&lt;br /&gt;
[[Image:Module_RFSub1G.jpg|100px|left]]&lt;br /&gt;
: The Sub-1GHz RF module, Standalone, USB, or UEXT version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
== Projet &amp;quot;DomoTab&amp;quot; ==&lt;br /&gt;
* [[Products/DTPlug|The DTPlug]]&lt;br /&gt;
[[Image:DTPlug.png|100px|left]]&lt;br /&gt;
: DTPlug Gateway : Ethernet ---&amp;gt; 4x UEXT communication modules&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Products/PSMC|PSMC Module : Power Supply Monitor &amp;amp; Control]]&lt;br /&gt;
[[Image:PSMC.jpg|100px|left]]&lt;br /&gt;
: PSMC module, monitor power usage and control power output of an outlet (Requires a communication module).&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=File:PiRTC.jpg&amp;diff=98</id>
		<title>File:PiRTC.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=File:PiRTC.jpg&amp;diff=98"/>
		<updated>2025-01-25T13:27:51Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products&amp;diff=97</id>
		<title>Products</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products&amp;diff=97"/>
		<updated>2025-01-25T13:27:18Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* RPi and clones */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Products list}}&lt;br /&gt;
== RPi and clones ==&lt;br /&gt;
* [[Products/PiSerialPower|&amp;quot;PiSerialPower&amp;quot; Hat]]&lt;br /&gt;
[[Image:PiserialPower.jpg|100px|left]]&lt;br /&gt;
: Power-supply Hat for RaspberryPi (and pin-compatible competitors).&lt;br /&gt;
: Includes many other cool features !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Products/PiRTC|&amp;quot;PiRTC&amp;quot; Hat]]&lt;br /&gt;
[[Image:PiRTC.jpg|100px|left]]&lt;br /&gt;
: RTC Extention for SBC with an extention connector compatible with the original Pi 26 or 40 pins connector.&lt;br /&gt;
: Includes 64 bytes of NVMEM and supercapacitor power backup for RTC and NVMEM&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Development Modules ==&lt;br /&gt;
* [[Products/Module_GPIO_Demo|GPIO-Demo Module]]&lt;br /&gt;
[[Image:Module_GPIO_Demo.jpg|100px|left]]&lt;br /&gt;
: The GPIO-Demo module is intended to help prototyping, learning and development of communication modules for the DomoTab project.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Products/LPC1224BO|LPC1224 Break-Out]]&lt;br /&gt;
[[Image:LPC1224-BO.jpg|100px|left]]&lt;br /&gt;
: Another development board for the LPC1224, closer to a full Break-Out than the GPIO-Demo module which is specific to the DomoTab project.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Products/LPC1224mbed|LPC1224-mbed]]&lt;br /&gt;
[[Image:LPC1224-mbed.jpg|100px|left]]&lt;br /&gt;
: An &amp;quot;mbed ready&amp;quot; equivalent of the LPC1224 Break-Out board.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Products/USB_UART|USB-UART Adaptator]]&lt;br /&gt;
[[Image:USBtoUART.jpg|100px|left]]&lt;br /&gt;
: USB to UART Adaptator, with possible UEXT connector support.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Communication Modules ==&lt;br /&gt;
* [[Products/Module_RFSub1G|RF Sub-1GHz Module]]&lt;br /&gt;
[[Image:Module_RFSub1G.jpg|100px|left]]&lt;br /&gt;
: The Sub-1GHz RF module, Standalone, USB, or UEXT version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
== Projet &amp;quot;DomoTab&amp;quot; ==&lt;br /&gt;
* [[Products/DTPlug|The DTPlug]]&lt;br /&gt;
[[Image:DTPlug.png|100px|left]]&lt;br /&gt;
: DTPlug Gateway : Ethernet ---&amp;gt; 4x UEXT communication modules&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Products/PSMC|PSMC Module : Power Supply Monitor &amp;amp; Control]]&lt;br /&gt;
[[Image:PSMC.jpg|100px|left]]&lt;br /&gt;
: PSMC module, monitor power usage and control power output of an outlet (Requires a communication module).&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products&amp;diff=96</id>
		<title>Products</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products&amp;diff=96"/>
		<updated>2025-01-25T13:26:54Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* RPi and clones */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Products list}}&lt;br /&gt;
== RPi and clones ==&lt;br /&gt;
* [[Products/PiSerialPower|&amp;quot;PiSerialPower&amp;quot; Hat]]&lt;br /&gt;
[[Image:PiserialPower.jpg|100px|left]]&lt;br /&gt;
: Power-supply Hat for RaspberryPi (and pin-compatible competitors).&lt;br /&gt;
: Includes many other cool features !&lt;br /&gt;
&lt;br /&gt;
* [[Products/PiRTC|&amp;quot;PiRTC&amp;quot; Hat]]&lt;br /&gt;
[[Image:PiRTC.jpg|100px|left]]&lt;br /&gt;
: RTC Extention for SBC with an extention connector compatible with the original Pi 26 or 40 pins connector.&lt;br /&gt;
: Includes 64 bytes of NVMEM and supercapacitor power backup for RTC and NVMEM&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Development Modules ==&lt;br /&gt;
* [[Products/Module_GPIO_Demo|GPIO-Demo Module]]&lt;br /&gt;
[[Image:Module_GPIO_Demo.jpg|100px|left]]&lt;br /&gt;
: The GPIO-Demo module is intended to help prototyping, learning and development of communication modules for the DomoTab project.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Products/LPC1224BO|LPC1224 Break-Out]]&lt;br /&gt;
[[Image:LPC1224-BO.jpg|100px|left]]&lt;br /&gt;
: Another development board for the LPC1224, closer to a full Break-Out than the GPIO-Demo module which is specific to the DomoTab project.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Products/LPC1224mbed|LPC1224-mbed]]&lt;br /&gt;
[[Image:LPC1224-mbed.jpg|100px|left]]&lt;br /&gt;
: An &amp;quot;mbed ready&amp;quot; equivalent of the LPC1224 Break-Out board.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Products/USB_UART|USB-UART Adaptator]]&lt;br /&gt;
[[Image:USBtoUART.jpg|100px|left]]&lt;br /&gt;
: USB to UART Adaptator, with possible UEXT connector support.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Communication Modules ==&lt;br /&gt;
* [[Products/Module_RFSub1G|RF Sub-1GHz Module]]&lt;br /&gt;
[[Image:Module_RFSub1G.jpg|100px|left]]&lt;br /&gt;
: The Sub-1GHz RF module, Standalone, USB, or UEXT version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
== Projet &amp;quot;DomoTab&amp;quot; ==&lt;br /&gt;
* [[Products/DTPlug|The DTPlug]]&lt;br /&gt;
[[Image:DTPlug.png|100px|left]]&lt;br /&gt;
: DTPlug Gateway : Ethernet ---&amp;gt; 4x UEXT communication modules&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Products/PSMC|PSMC Module : Power Supply Monitor &amp;amp; Control]]&lt;br /&gt;
[[Image:PSMC.jpg|100px|left]]&lt;br /&gt;
: PSMC module, monitor power usage and control power output of an outlet (Requires a communication module).&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=95</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=95"/>
		<updated>2024-04-19T09:10:23Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* RTC Clock */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat is a power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
By purchasing one of our products, you become the owner .Therefore, you have some rights and obligations according to the following licences :&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Waranties ==&lt;br /&gt;
Because it is impossible for Techno-Innov to know the purposes for which you acquired this product or the uses to which you will put this product, you assume full responibility for the selection of the product and for its installation and use.&amp;lt;br /&amp;gt;&lt;br /&gt;
While every reasonnable effort has been made to insure that you will receive a product that you can use and enjoy, Techno-Innov does not warrant that the functions of the product will meet your requirements or that the operation of the product will be uninterruped or error-free. Techno-Innov is not responsible for problems caused by the interaction of the product with any other software or hardware.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://en.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|200px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|200px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.&amp;lt;br /&amp;gt;&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.&amp;lt;br /&amp;gt;&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
Some hints and links are provided in the software section below, but activating the primary UART is highly dependent on your RPi version and the GNU/Linux distribution you will be using (some may even ship with this UART activated !)&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
CONFIG_RTC_DRV_PCF85363=m&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
The RTC clock selected also holds 64 bytes of RAM available to the user to store data as long as the RTC chip is powered (which includes the supercapacitor backup power).&amp;lt;br /&amp;gt;&lt;br /&gt;
To get access to this memory you will need to activate the following conigurations in your kernel :&lt;br /&gt;
 CONFIG_RTC_NVMEM=y&lt;br /&gt;
 CONFIG_NVMEM=y&lt;br /&gt;
 CONFIG_NVMEM_SYSFS=y&lt;br /&gt;
When booted with a kernel with NVMEM support activated (with the PCF85363 RTC support, either built-in or as module with module loaded) you will get access to the RAM bytes under &amp;lt;code&amp;gt;/sys&amp;lt;/code&amp;gt; in the following file :&lt;br /&gt;
 /sys/bus/nvmem/devices/pcf85363-0/nvmem&lt;br /&gt;
You can then use it as a regular file with a limited size of 64 bytes.&lt;br /&gt;
 echo &amp;quot;NVMEM Test&amp;quot; &amp;gt; /sys/bus/nvmem/devices/pcf85363-0/nvmem&lt;br /&gt;
 cat /sys/bus/nvmem/devices/pcf85363-0/nvmem&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== Activate main (debug) UART ===&lt;br /&gt;
The main UART (Serial / tty) used by the Linux kernel and base system to output messages (primary UART, where a login console will also be present at the end of the boot process) is not active by default on most distributions.&amp;lt;br /&amp;gt;&lt;br /&gt;
On the Raspberry Pi, if this UART is activated it will be present on GPIO 14 (transmit) and 15 (receive). Note that GPIO 14 is pin 8 on the GPIO header, while GPIO 15 is pin 10 (P5 Connector in Connectors section above).&lt;br /&gt;
&lt;br /&gt;
Follow these steps to configure (Note that this may vary, depending on your distribution, Linux kernel, and RaspberryPi version.&lt;br /&gt;
* Edit config.txt on your SD card first partition (&amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt;), and add&lt;br /&gt;
** &amp;lt;code&amp;gt;enable_uart=1&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;dtoverlay=uart0&amp;lt;/code&amp;gt; (for RPi 4)&lt;br /&gt;
** &amp;lt;code&amp;gt;dtoverlay=pi3-miniuart-bt&amp;lt;/code&amp;gt; (for RPi 3)&lt;br /&gt;
* Make sure you have the overly files in &amp;lt;code&amp;gt;/boot/overlays/&amp;lt;/code&amp;gt; on your SD card first partition&lt;br /&gt;
** &amp;lt;code&amp;gt;uart0.dtbo&amp;lt;/code&amp;gt; (for RPi 4)&lt;br /&gt;
** &amp;lt;code&amp;gt;pi3-miniuart-bt.dtbo&amp;lt;/code&amp;gt; (for RPi 3)&lt;br /&gt;
&lt;br /&gt;
You will find more informations [https://www.raspberrypi.org/documentation/configuration/uart.md here] and [https://www.raspberrypi.org/documentation/configuration/device-tree.md#part4.6 here] or even [https://raspberrypi.stackexchange.com/questions/104464/where-are-the-uarts-on-the-raspberry-pi-4 here] (more accurate and up to date). Also refer to your distribution documentation.&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [https://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Schematics : [https://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.pdf here]&lt;br /&gt;
* Board layout : [https://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [https://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=94</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=94"/>
		<updated>2024-04-19T08:47:08Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* License */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat is a power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
By purchasing one of our products, you become the owner .Therefore, you have some rights and obligations according to the following licences :&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Waranties ==&lt;br /&gt;
Because it is impossible for Techno-Innov to know the purposes for which you acquired this product or the uses to which you will put this product, you assume full responibility for the selection of the product and for its installation and use.&amp;lt;br /&amp;gt;&lt;br /&gt;
While every reasonnable effort has been made to insure that you will receive a product that you can use and enjoy, Techno-Innov does not warrant that the functions of the product will meet your requirements or that the operation of the product will be uninterruped or error-free. Techno-Innov is not responsible for problems caused by the interaction of the product with any other software or hardware.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://en.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|200px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|200px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.&amp;lt;br /&amp;gt;&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.&amp;lt;br /&amp;gt;&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
Some hints and links are provided in the software section below, but activating the primary UART is highly dependent on your RPi version and the GNU/Linux distribution you will be using (some may even ship with this UART activated !)&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== Activate main (debug) UART ===&lt;br /&gt;
The main UART (Serial / tty) used by the Linux kernel and base system to output messages (primary UART, where a login console will also be present at the end of the boot process) is not active by default on most distributions.&amp;lt;br /&amp;gt;&lt;br /&gt;
On the Raspberry Pi, if this UART is activated it will be present on GPIO 14 (transmit) and 15 (receive). Note that GPIO 14 is pin 8 on the GPIO header, while GPIO 15 is pin 10 (P5 Connector in Connectors section above).&lt;br /&gt;
&lt;br /&gt;
Follow these steps to configure (Note that this may vary, depending on your distribution, Linux kernel, and RaspberryPi version.&lt;br /&gt;
* Edit config.txt on your SD card first partition (&amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt;), and add&lt;br /&gt;
** &amp;lt;code&amp;gt;enable_uart=1&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;dtoverlay=uart0&amp;lt;/code&amp;gt; (for RPi 4)&lt;br /&gt;
** &amp;lt;code&amp;gt;dtoverlay=pi3-miniuart-bt&amp;lt;/code&amp;gt; (for RPi 3)&lt;br /&gt;
* Make sure you have the overly files in &amp;lt;code&amp;gt;/boot/overlays/&amp;lt;/code&amp;gt; on your SD card first partition&lt;br /&gt;
** &amp;lt;code&amp;gt;uart0.dtbo&amp;lt;/code&amp;gt; (for RPi 4)&lt;br /&gt;
** &amp;lt;code&amp;gt;pi3-miniuart-bt.dtbo&amp;lt;/code&amp;gt; (for RPi 3)&lt;br /&gt;
&lt;br /&gt;
You will find more informations [https://www.raspberrypi.org/documentation/configuration/uart.md here] and [https://www.raspberrypi.org/documentation/configuration/device-tree.md#part4.6 here] or even [https://raspberrypi.stackexchange.com/questions/104464/where-are-the-uarts-on-the-raspberry-pi-4 here] (more accurate and up to date). Also refer to your distribution documentation.&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [https://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Schematics : [https://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.pdf here]&lt;br /&gt;
* Board layout : [https://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [https://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=93</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=93"/>
		<updated>2024-04-18T21:06:01Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Schematics, sources and PDF of documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat is a power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://en.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|200px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|200px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.&amp;lt;br /&amp;gt;&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.&amp;lt;br /&amp;gt;&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
Some hints and links are provided in the software section below, but activating the primary UART is highly dependent on your RPi version and the GNU/Linux distribution you will be using (some may even ship with this UART activated !)&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== Activate main (debug) UART ===&lt;br /&gt;
The main UART (Serial / tty) used by the Linux kernel and base system to output messages (primary UART, where a login console will also be present at the end of the boot process) is not active by default on most distributions.&amp;lt;br /&amp;gt;&lt;br /&gt;
On the Raspberry Pi, if this UART is activated it will be present on GPIO 14 (transmit) and 15 (receive). Note that GPIO 14 is pin 8 on the GPIO header, while GPIO 15 is pin 10 (P5 Connector in Connectors section above).&lt;br /&gt;
&lt;br /&gt;
Follow these steps to configure (Note that this may vary, depending on your distribution, Linux kernel, and RaspberryPi version.&lt;br /&gt;
* Edit config.txt on your SD card first partition (&amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt;), and add&lt;br /&gt;
** &amp;lt;code&amp;gt;enable_uart=1&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;dtoverlay=uart0&amp;lt;/code&amp;gt; (for RPi 4)&lt;br /&gt;
** &amp;lt;code&amp;gt;dtoverlay=pi3-miniuart-bt&amp;lt;/code&amp;gt; (for RPi 3)&lt;br /&gt;
* Make sure you have the overly files in &amp;lt;code&amp;gt;/boot/overlays/&amp;lt;/code&amp;gt; on your SD card first partition&lt;br /&gt;
** &amp;lt;code&amp;gt;uart0.dtbo&amp;lt;/code&amp;gt; (for RPi 4)&lt;br /&gt;
** &amp;lt;code&amp;gt;pi3-miniuart-bt.dtbo&amp;lt;/code&amp;gt; (for RPi 3)&lt;br /&gt;
&lt;br /&gt;
You will find more informations [https://www.raspberrypi.org/documentation/configuration/uart.md here] and [https://www.raspberrypi.org/documentation/configuration/device-tree.md#part4.6 here] or even [https://raspberrypi.stackexchange.com/questions/104464/where-are-the-uarts-on-the-raspberry-pi-4 here] (more accurate and up to date). Also refer to your distribution documentation.&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [https://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Schematics : [https://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.pdf here]&lt;br /&gt;
* Board layout : [https://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [https://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Main_Page&amp;diff=92</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Main_Page&amp;diff=92"/>
		<updated>2021-09-22T09:50:21Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Welcome on Techno-Innov&#039;s Community Wiki}}&lt;br /&gt;
&amp;lt;div id=&amp;quot;mainpage_topbox&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mainpage_boxcontents&amp;quot;&amp;gt;&lt;br /&gt;
This wiki is intended help us share information and knowledge about our products.&lt;br /&gt;
&lt;br /&gt;
Y&#039;ou&#039;ll find pages related to each of our products, some technical pages with a broader technical focus, and, if I find time to translate them, the papers I wrote about the making-of of the GPIO-Demo module.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| role=&amp;quot;presentation&amp;quot; style=&amp;quot;border:0; margin: 0; width: 100%; border-spacing: 10px;&amp;quot;&lt;br /&gt;
| style=&amp;quot;vertical-align: top;&amp;quot; class=&amp;quot;mainpage_hubbox&amp;quot; |&lt;br /&gt;
&amp;lt;div class=&amp;quot;mainpage_boxcontents&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Products.png|80px|center|link=Products]]&lt;br /&gt;
&amp;lt;div title=&amp;quot;Products&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong class=&amp;quot;mainpage_boxcontents_title&amp;quot;&amp;gt;&lt;br /&gt;
[[Products|Products Documentations]]&lt;br /&gt;
&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
The [[Products/PiSerialPower|&amp;quot;RPi Power and Serial Hat&amp;quot;]]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[[Products/Module_GPIO_Demo|GPIO-Demo module]]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
And [[Products|all other products]]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: top;&amp;quot; class=&amp;quot;mainpage_hubbox&amp;quot; |&lt;br /&gt;
&amp;lt;div class=&amp;quot;mainpage_boxcontents&amp;quot;&amp;gt;&lt;br /&gt;
[[File:API.png|80px|center|link=Technique]]&lt;br /&gt;
&amp;lt;div title=&amp;quot;API&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong class=&amp;quot;mainpage_boxcontents_title&amp;quot;&amp;gt;&lt;br /&gt;
[[Tech/Soft|Software Documentation]]&lt;br /&gt;
&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Techno-Innov&#039;s [[Tech/Soft/API|Software API documentation]] for ARM Cortex-M* microcontrollers&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
How to [[Tech/Soft/API/New_App|Create a new app with our API]]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[[Tech/Soft/Compilation|Compile apps using &amp;quot;Techno-Innov&#039;s API&amp;quot; under Linux]]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| role=&amp;quot;presentation&amp;quot; style=&amp;quot;border:0; margin: 0; width: 100%; border-spacing: 10px;&amp;quot;&lt;br /&gt;
| style=&amp;quot;vertical-align: top;&amp;quot; class=&amp;quot;mainpage_hubbox&amp;quot; |&lt;br /&gt;
&amp;lt;div class=&amp;quot;mainpage_boxcontents&amp;quot;&amp;gt;&lt;br /&gt;
[[File:TechData.png|80px|center|link=Technique]]&lt;br /&gt;
&amp;lt;div title=&amp;quot;Infos Techniques&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong class=&amp;quot;mainpage_boxcontents_title&amp;quot;&amp;gt;&lt;br /&gt;
[[Tech|Technical Information]]&lt;br /&gt;
&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[[Tech/Soft/Embedded|Embedded Systems]] (GNU/Linux - Devuan)&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[[Tech/Elec/Kicad|Use Kicad]] to [[Tech/Elec/DIY|design your own boards]]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: top;&amp;quot; class=&amp;quot;mainpage_hubbox&amp;quot; |&lt;br /&gt;
&amp;lt;div class=&amp;quot;mainpage_boxcontents&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Articles.png|x80px|center|link=Papers]]&lt;br /&gt;
&amp;lt;div title=&amp;quot;Papers&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong class=&amp;quot;mainpage_boxcontents_title&amp;quot;&amp;gt;&lt;br /&gt;
[[Papers|User&#039;s papers]]&lt;br /&gt;
&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
The [[Papers/Nathael|&amp;quot;Making-of&amp;quot; of the GPIO-Demo module]] (to be translated from the French community wiki)&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Wiki Techno-Innov EN:About|About this Wiki]]&#039;&#039;&#039; |&lt;br /&gt;
&#039;&#039;&#039;[[Wiki_Techno-Innov_EN:Copyrights|Copyrights]]&#039;&#039;&#039; |&lt;br /&gt;
&#039;&#039;&#039;[[Contributors|Contributors]]&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/Module_GPIO_Demo&amp;diff=91</id>
		<title>Products/Module GPIO Demo</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/Module_GPIO_Demo&amp;diff=91"/>
		<updated>2021-03-25T00:59:30Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Connectors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:GPIO-Demo Module}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;WORK IN PROGRESS&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The GPIO-Demo module is intended to help prototyping with the LPC1224 microcontroller from NXP and has been designed as a base for the development of communication modules for the DomoTab project in order to validate mechanical and other common specifications of the modules.&lt;br /&gt;
&lt;br /&gt;
[[Image:Module_GPIO_Demo.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The GPIO-Demo module is a development board for the [https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1200-cortex-m0/32kb-flash-4kb-sram-lqfp48-package:LPC1224FBD48 LPC1224 microcontroller] from [http://www.nxp.com/ NXP], an ARM Cortex-M0 based microcontroller.&lt;br /&gt;
&lt;br /&gt;
* USB powered&lt;br /&gt;
* two rows of 2.54mm (0.1 inch) connectors for use on rapid prototyping boards&lt;br /&gt;
* UEXT connector&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the first UART using a simple USB cable or to connect the board directly to your computer depending on the USB connector option you choose.&lt;br /&gt;
* an I²C EEPROM&lt;br /&gt;
* an I²C temperature sensor (TMP101 from Texas Instrument)&lt;br /&gt;
* Reset and ISP buttons&lt;br /&gt;
* a bicolor (green and red) user Led&lt;br /&gt;
&lt;br /&gt;
The board comes either fully assembled and tested or as a CMS kit so you can test CMS assembly at home. &lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-sa/4.0/legalcode Creative Commons CC BY-SA 4.0]&lt;br /&gt;
* Hardware : The GPIO-Demo module hardware and schematics are under [https://creativecommons.org/licenses/by-sa/4.0/legalcode Creative Commons CC BY-SA 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, and sell them for profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the GPIO-Demo module are under GPLv3 License.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes_USBA.png|Fig 1 - USB A board&lt;br /&gt;
Image:Cotes_mUSB.png|Fig 2 - micro-USB board&lt;br /&gt;
Image:Cotes_Conn.png|Fig 3 - Headers and UEXT connector&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (Led, buttons, connectors) of the GPIO-Demo module.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:GPIO_Demo_Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The Module has one USB connector numbered P6 (micro-USB female) or P7 (USB A male) depending on the board type, one UEXT connector (P1), four 2.54mm headers on the sides, and another 2.54mm header to give extra access to the UART. Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : 2x5 pins, 2.54mm pitch header : [https://en.wikipedia.org/wiki/UEXT UEXT connector]&lt;br /&gt;
* P2 : 10 pins, 2.54mm pitch header. Provides +5V from USB, ground, and 8 GPIO from port 0.&lt;br /&gt;
* P3 : 10 pins, 2.54mm pitch header. Provides 10 GPIO from port 0.&lt;br /&gt;
* P4 : 6 pins, 2.54mm pitch header. Provides 6 ADC inputs (can be used as GPIO).&lt;br /&gt;
* P5 : 2 pins, 2.54mm pitch header. Provides +3.3V and ground.&lt;br /&gt;
* P6 : USB microB female connector, available only on micro USB board type.&lt;br /&gt;
* P7 : USB A male connector, available only on USB A board type.&lt;br /&gt;
* P8 : 2 pins, 2.54mm pitch header. Provides access to Rx/Tx on USB to UART bridge.&lt;br /&gt;
&lt;br /&gt;
=== P1 Connector ===&lt;br /&gt;
P1 connector is an [https://en.wikipedia.org/wiki/UEXT UEXT connector], as specified by [http://www.olimex.com/ Olimex]. The UEXT connector gives access to power and to three serial buses : UART, I²C and SPI.&amp;lt;br /&amp;gt;&lt;br /&gt;
P1 connector uses a standard 2.54mm (0.1 inch) pitch header, with 2 rows of 5 pins. It can be either male or female, and mounted either on top or on bottom of the board. If mounted on top, other components prevent the use of the common plastic keyed-shroud used for common UEXT connectors. The key would be on the odd pins side, with the module name and Techno-Innov mascot (tibug).&amp;lt;br /&amp;gt;&lt;br /&gt;
All P1 pins are connected to related pins on the LPC micro-controller. UART Pins are connected to UART 0 through J3 and J4 selector which allows selection of master or device function for the module. This is transparent for the SPI and I²C bus.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V : 3.3V from USB to UART bridge or 3.3V input power&lt;br /&gt;
| +3.3V&lt;br /&gt;
| pins 44 and 47&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 43 and 48&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Tx : Tx from USB to UART bridge&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Rx : Rx to USB to UART bridge&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|I²C SCL - Clock for I²C bus&lt;br /&gt;
|I²C SCL - PIO0_10&lt;br /&gt;
| pin 25&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|I²C SDA - Bidirectional serial data for I²C bus&lt;br /&gt;
|I²C SDA - PIO0_11&lt;br /&gt;
| pin 26&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P2 Connector ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P3 Connector ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
P5 connector is a common 2.54mm (0.1 inch) header which provides power and ground to breadboards when used for prototyping.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V : 3.3V from USB to UART bridge or 3.3V input power&lt;br /&gt;
| +3.3V&lt;br /&gt;
| Pins 44 and 47&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 43 and 48&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P6 Connector ===&lt;br /&gt;
P6 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://en.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P7 Connector ===&lt;br /&gt;
P7 is a male USB type A connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://en.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P8 Connector ===&lt;br /&gt;
P8 connector is a common 2.54mm (0.1 inch) header which provides access to the Rx and Tx UART signals from the USB-to-UART bridge or the UEXT connector. Removing J3 and J4 jumpers removes any connection to the LPC1224 micro-controller.&amp;lt;br /&amp;gt;&lt;br /&gt;
This allows the connection of the USB-to-UART bridge to UART 1 on connector P2, or to any other UART on another device, provided that you also connect the ground to that other device.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P8 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Tx : Tx from USB to UART bridge&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Rx : Rx from USB to UART bridge&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:GPIO_Demo_Composants.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.nxp.com/documents/user_manual/UM10441.pdf&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=90</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=90"/>
		<updated>2021-03-25T00:57:37Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Connectors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat is a power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://en.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|200px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|200px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.&amp;lt;br /&amp;gt;&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.&amp;lt;br /&amp;gt;&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
Some hints and links are provided in the software section below, but activating the primary UART is highly dependent on your RPi version and the GNU/Linux distribution you will be using (some may even ship with this UART activated !)&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== Activate main (debug) UART ===&lt;br /&gt;
The main UART (Serial / tty) used by the Linux kernel and base system to output messages (primary UART, where a login console will also be present at the end of the boot process) is not active by default on most distributions.&amp;lt;br /&amp;gt;&lt;br /&gt;
On the Raspberry Pi, if this UART is activated it will be present on GPIO 14 (transmit) and 15 (receive). Note that GPIO 14 is pin 8 on the GPIO header, while GPIO 15 is pin 10 (P5 Connector in Connectors section above).&lt;br /&gt;
&lt;br /&gt;
Follow these steps to configure (Note that this may vary, depending on your distribution, Linux kernel, and RaspberryPi version.&lt;br /&gt;
* Edit config.txt on your SD card first partition (&amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt;), and add&lt;br /&gt;
** &amp;lt;code&amp;gt;enable_uart=1&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;dtoverlay=uart0&amp;lt;/code&amp;gt; (for RPi 4)&lt;br /&gt;
** &amp;lt;code&amp;gt;dtoverlay=pi3-miniuart-bt&amp;lt;/code&amp;gt; (for RPi 3)&lt;br /&gt;
* Make sure you have the overly files in &amp;lt;code&amp;gt;/boot/overlays/&amp;lt;/code&amp;gt; on your SD card first partition&lt;br /&gt;
** &amp;lt;code&amp;gt;uart0.dtbo&amp;lt;/code&amp;gt; (for RPi 4)&lt;br /&gt;
** &amp;lt;code&amp;gt;pi3-miniuart-bt.dtbo&amp;lt;/code&amp;gt; (for RPi 3)&lt;br /&gt;
&lt;br /&gt;
You will find more informations [https://www.raspberrypi.org/documentation/configuration/uart.md here] and [https://www.raspberrypi.org/documentation/configuration/device-tree.md#part4.6 here] or even [https://raspberrypi.stackexchange.com/questions/104464/where-are-the-uarts-on-the-raspberry-pi-4 here] (more accurate and up to date). Also refer to your distribution documentation.&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Schematics : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.pdf here]&lt;br /&gt;
* Board layout : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=89</id>
		<title>Products/USB UART</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=89"/>
		<updated>2021-03-25T00:57:22Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Connectors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:USB-UART Adapter}}&lt;br /&gt;
[[Image:USBtoUART.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The USB-UART adapter is pretty simple but usefull and ressourcefull. It provides access to a serial link (3.3V UART) from an USB port, either USB male or micro-USB female which is one of the cool special features of this adapter. Another cool feature is the 3.3V and 5V power both available on 2.54mm headers, usefull for most prototyping needs.&lt;br /&gt;
&lt;br /&gt;
This adapter uses an FTDI FT230XS, with most signals available on the UEXT-like connector, and should thus support I2C, SPI, and other protocols or data busses using the bitbanging capabilities of the FTDI chips, though this would require software support on your side as we did not have time to do so yet (We&#039;ll keep you up-to-date as soon as we have more information on these).&lt;br /&gt;
&lt;br /&gt;
== How-to use ==&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
=== P1 Connector ===&lt;br /&gt;
[[Image:USB_UART_V02_P1.png|300px|right]]&lt;br /&gt;
P1 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 5 pins.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| FT230XS signal&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +3.3V from FT230XS&lt;br /&gt;
| +3.3V Out&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND - Ground&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| UART Tx&lt;br /&gt;
| TxD&lt;br /&gt;
| FT230XS pin 1&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| UART Rx&lt;br /&gt;
| RxD&lt;br /&gt;
| FT230XS pin 4&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| I2C SCL&lt;br /&gt;
| RTS&lt;br /&gt;
| FT230XS pin 2&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| I2C SDA&lt;br /&gt;
| CTS&lt;br /&gt;
| FT230XS pin 6&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| SPI MISO&lt;br /&gt;
| Sleep&lt;br /&gt;
| FT230XS pin 16&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| SPI MOSI&lt;br /&gt;
| TxDEN&lt;br /&gt;
| FT230XS pin 15&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| SPI CLK&lt;br /&gt;
| RxLed&lt;br /&gt;
| FT230XS pin 14&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| SPI CS&lt;br /&gt;
| Tx Led&lt;br /&gt;
| FT230XS pin 7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P2 Connector ===&lt;br /&gt;
[[Image:USB_UART_V02_P2.png|300px|right]]&lt;br /&gt;
P2 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 2 pins, which provides access to 5V power from USB.&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : Be careful, never connect them together as if they were for a jumper config, it would short-circuit the USB power and burn the ferite bread on the board.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P2 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +5V&lt;br /&gt;
| +5V from USB&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND&lt;br /&gt;
| Ground&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P3 : micro USB debug connector ===&lt;br /&gt;
P3 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://en.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P4 : USB type A debug connector ===&lt;br /&gt;
P4 is a male USB type A port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://en.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Technical documentation&lt;br /&gt;
* I2C and SPI support using the bit-banging capabilities of the FTDI chip (Host side software support)&lt;br /&gt;
* SWD and/or JTAG support&lt;br /&gt;
* RS232 version&lt;br /&gt;
* Low voltage (1.8V) version (microprocessors and SWD/JTAG debug support)&lt;br /&gt;
&lt;br /&gt;
== Technical Documentation and Schematics ==&lt;br /&gt;
The technical documentation has not been written yet ...&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
=== V0.1 ===&lt;br /&gt;
First version.&lt;br /&gt;
* 24mm x 30mm&lt;br /&gt;
* Two USB connectors (USB type A male and micro-USB B female)&lt;br /&gt;
* Two push buttons for ISP/Reset&lt;br /&gt;
* 6 pins on P1 connector (standard 2.54mm (0.1 inch) pitch header, with 2 rows of 3 pins).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| FT230XS signal&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +3.3V from FT230XS&lt;br /&gt;
| +3.3V Out&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND - Ground&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| UART Tx&lt;br /&gt;
| TxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| UART Rx&lt;br /&gt;
| RxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Reset&lt;br /&gt;
| RTS&lt;br /&gt;
| Also connected to SW1 push button&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| ISP&lt;br /&gt;
| TxDEN&lt;br /&gt;
| Also connected to SW2 push button&lt;br /&gt;
|}&lt;br /&gt;
=== V0.2 ===&lt;br /&gt;
Second (and current) version.&lt;br /&gt;
* 18mm x 30mm&lt;br /&gt;
* Two USB connectors (USB type A male and micro-USB B female)&lt;br /&gt;
* Removed push buttons&lt;br /&gt;
* 10 pins on P1 connector (standard 2.54mm (0.1 inch) pitch header, with 2 rows of 5 pins).&lt;br /&gt;
* Access to USB power on P2 connector (standard 2.54mm (0.1 inch) pitch header, with 1 row of 2 pins).&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=88</id>
		<title>Products/USB UART</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=88"/>
		<updated>2021-03-25T00:29:19Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Version history */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:USB-UART Adapter}}&lt;br /&gt;
[[Image:USBtoUART.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The USB-UART adapter is pretty simple but usefull and ressourcefull. It provides access to a serial link (3.3V UART) from an USB port, either USB male or micro-USB female which is one of the cool special features of this adapter. Another cool feature is the 3.3V and 5V power both available on 2.54mm headers, usefull for most prototyping needs.&lt;br /&gt;
&lt;br /&gt;
This adapter uses an FTDI FT230XS, with most signals available on the UEXT-like connector, and should thus support I2C, SPI, and other protocols or data busses using the bitbanging capabilities of the FTDI chips, though this would require software support on your side as we did not have time to do so yet (We&#039;ll keep you up-to-date as soon as we have more information on these).&lt;br /&gt;
&lt;br /&gt;
== How-to use ==&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
=== P1 Connector ===&lt;br /&gt;
[[Image:USB_UART_V02_P1.png|300px|right]]&lt;br /&gt;
P1 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 5 pins.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| FT230XS signal&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +3.3V from FT230XS&lt;br /&gt;
| +3.3V Out&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND - Ground&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| UART Tx&lt;br /&gt;
| TxD&lt;br /&gt;
| FT230XS pin 1&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| UART Rx&lt;br /&gt;
| RxD&lt;br /&gt;
| FT230XS pin 4&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| I2C SCL&lt;br /&gt;
| RTS&lt;br /&gt;
| FT230XS pin 2&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| I2C SDA&lt;br /&gt;
| CTS&lt;br /&gt;
| FT230XS pin 6&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| SPI MISO&lt;br /&gt;
| Sleep&lt;br /&gt;
| FT230XS pin 16&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| SPI MOSI&lt;br /&gt;
| TxDEN&lt;br /&gt;
| FT230XS pin 15&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| SPI CLK&lt;br /&gt;
| RxLed&lt;br /&gt;
| FT230XS pin 14&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| SPI CS&lt;br /&gt;
| Tx Led&lt;br /&gt;
| FT230XS pin 7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P2 Connector ===&lt;br /&gt;
[[Image:USB_UART_V02_P2.png|300px|right]]&lt;br /&gt;
P2 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 2 pins, which provides access to 5V power from USB.&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : Be careful, never connect them together as if they were for a jumper config, it would short-circuit the USB power and burn the ferite bread on the board.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P2 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +5V&lt;br /&gt;
| +5V from USB&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND&lt;br /&gt;
| Ground&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P3 : micro USB debug connector ===&lt;br /&gt;
P3 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P4 : USB type A debug connector ===&lt;br /&gt;
P4 is a male USB type A port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Technical documentation&lt;br /&gt;
* I2C and SPI support using the bit-banging capabilities of the FTDI chip (Host side software support)&lt;br /&gt;
* SWD and/or JTAG support&lt;br /&gt;
* RS232 version&lt;br /&gt;
* Low voltage (1.8V) version (microprocessors and SWD/JTAG debug support)&lt;br /&gt;
&lt;br /&gt;
== Technical Documentation and Schematics ==&lt;br /&gt;
The technical documentation has not been written yet ...&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
=== V0.1 ===&lt;br /&gt;
First version.&lt;br /&gt;
* 24mm x 30mm&lt;br /&gt;
* Two USB connectors (USB type A male and micro-USB B female)&lt;br /&gt;
* Two push buttons for ISP/Reset&lt;br /&gt;
* 6 pins on P1 connector (standard 2.54mm (0.1 inch) pitch header, with 2 rows of 3 pins).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| FT230XS signal&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +3.3V from FT230XS&lt;br /&gt;
| +3.3V Out&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND - Ground&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| UART Tx&lt;br /&gt;
| TxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| UART Rx&lt;br /&gt;
| RxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Reset&lt;br /&gt;
| RTS&lt;br /&gt;
| Also connected to SW1 push button&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| ISP&lt;br /&gt;
| TxDEN&lt;br /&gt;
| Also connected to SW2 push button&lt;br /&gt;
|}&lt;br /&gt;
=== V0.2 ===&lt;br /&gt;
Second (and current) version.&lt;br /&gt;
* 18mm x 30mm&lt;br /&gt;
* Two USB connectors (USB type A male and micro-USB B female)&lt;br /&gt;
* Removed push buttons&lt;br /&gt;
* 10 pins on P1 connector (standard 2.54mm (0.1 inch) pitch header, with 2 rows of 5 pins).&lt;br /&gt;
* Access to USB power on P2 connector (standard 2.54mm (0.1 inch) pitch header, with 1 row of 2 pins).&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=87</id>
		<title>Products/USB UART</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=87"/>
		<updated>2021-03-25T00:27:17Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Connectors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:USB-UART Adapter}}&lt;br /&gt;
[[Image:USBtoUART.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The USB-UART adapter is pretty simple but usefull and ressourcefull. It provides access to a serial link (3.3V UART) from an USB port, either USB male or micro-USB female which is one of the cool special features of this adapter. Another cool feature is the 3.3V and 5V power both available on 2.54mm headers, usefull for most prototyping needs.&lt;br /&gt;
&lt;br /&gt;
This adapter uses an FTDI FT230XS, with most signals available on the UEXT-like connector, and should thus support I2C, SPI, and other protocols or data busses using the bitbanging capabilities of the FTDI chips, though this would require software support on your side as we did not have time to do so yet (We&#039;ll keep you up-to-date as soon as we have more information on these).&lt;br /&gt;
&lt;br /&gt;
== How-to use ==&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
=== P1 Connector ===&lt;br /&gt;
[[Image:USB_UART_V02_P1.png|300px|right]]&lt;br /&gt;
P1 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 5 pins.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| FT230XS signal&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +3.3V from FT230XS&lt;br /&gt;
| +3.3V Out&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND - Ground&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| UART Tx&lt;br /&gt;
| TxD&lt;br /&gt;
| FT230XS pin 1&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| UART Rx&lt;br /&gt;
| RxD&lt;br /&gt;
| FT230XS pin 4&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| I2C SCL&lt;br /&gt;
| RTS&lt;br /&gt;
| FT230XS pin 2&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| I2C SDA&lt;br /&gt;
| CTS&lt;br /&gt;
| FT230XS pin 6&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| SPI MISO&lt;br /&gt;
| Sleep&lt;br /&gt;
| FT230XS pin 16&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| SPI MOSI&lt;br /&gt;
| TxDEN&lt;br /&gt;
| FT230XS pin 15&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| SPI CLK&lt;br /&gt;
| RxLed&lt;br /&gt;
| FT230XS pin 14&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| SPI CS&lt;br /&gt;
| Tx Led&lt;br /&gt;
| FT230XS pin 7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P2 Connector ===&lt;br /&gt;
[[Image:USB_UART_V02_P2.png|300px|right]]&lt;br /&gt;
P2 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 2 pins, which provides access to 5V power from USB.&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : Be careful, never connect them together as if they were for a jumper config, it would short-circuit the USB power and burn the ferite bread on the board.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P2 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +5V&lt;br /&gt;
| +5V from USB&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND&lt;br /&gt;
| Ground&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P3 : micro USB debug connector ===&lt;br /&gt;
P3 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P4 : USB type A debug connector ===&lt;br /&gt;
P4 is a male USB type A port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Technical documentation&lt;br /&gt;
* I2C and SPI support using the bit-banging capabilities of the FTDI chip (Host side software support)&lt;br /&gt;
* SWD and/or JTAG support&lt;br /&gt;
* RS232 version&lt;br /&gt;
* Low voltage (1.8V) version (microprocessors and SWD/JTAG debug support)&lt;br /&gt;
&lt;br /&gt;
== Technical Documentation and Schematics ==&lt;br /&gt;
The technical documentation has not been written yet ...&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
=== V0.1 ===&lt;br /&gt;
First version.&lt;br /&gt;
* 24mm x 30mm&lt;br /&gt;
* Two USB connectors (USB type A male and micro-USB B female)&lt;br /&gt;
* Two push buttons for ISP/Reset&lt;br /&gt;
* 6 pins on P1 connector (standard 2.54mm (0.1 inch) pitch header, with 2 row of 3 pins).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| FT230XS signal&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +3.3V from FT230XS&lt;br /&gt;
| +3.3V Out&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND - Ground&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| UART Tx&lt;br /&gt;
| TxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| UART Rx&lt;br /&gt;
| RxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Reset&lt;br /&gt;
| RTS&lt;br /&gt;
| Also connected to SW1 push button&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| ISP&lt;br /&gt;
| TxDEN&lt;br /&gt;
| Also connected to SW2 push button&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=86</id>
		<title>Products/USB UART</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=86"/>
		<updated>2021-03-25T00:26:50Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Connectors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:USB-UART Adapter}}&lt;br /&gt;
[[Image:USBtoUART.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The USB-UART adapter is pretty simple but usefull and ressourcefull. It provides access to a serial link (3.3V UART) from an USB port, either USB male or micro-USB female which is one of the cool special features of this adapter. Another cool feature is the 3.3V and 5V power both available on 2.54mm headers, usefull for most prototyping needs.&lt;br /&gt;
&lt;br /&gt;
This adapter uses an FTDI FT230XS, with most signals available on the UEXT-like connector, and should thus support I2C, SPI, and other protocols or data busses using the bitbanging capabilities of the FTDI chips, though this would require software support on your side as we did not have time to do so yet (We&#039;ll keep you up-to-date as soon as we have more information on these).&lt;br /&gt;
&lt;br /&gt;
== How-to use ==&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
=== P1 Connector ===&lt;br /&gt;
[[Image:USB_UART_V02_P1.png|300px|right]]&lt;br /&gt;
P1 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 5 pins.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| FT230XS signal&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +3.3V from FT230XS&lt;br /&gt;
| +3.3V Out&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND - Ground&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| UART Tx&lt;br /&gt;
| TxD&lt;br /&gt;
| FT230XS pin 1&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| UART Rx&lt;br /&gt;
| RxD&lt;br /&gt;
| FT230XS pin 4&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| I2C SCL&lt;br /&gt;
| RTS&lt;br /&gt;
| FT230XS pin 2&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| I2C SDA&lt;br /&gt;
| CTS&lt;br /&gt;
| FT230XS pin 6&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| SPI MISO&lt;br /&gt;
| Sleep&lt;br /&gt;
| FT230XS pin 16&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| SPI MOSI&lt;br /&gt;
| TxDEN&lt;br /&gt;
| FT230XS pin 15&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| SPI CLK&lt;br /&gt;
| RxLed&lt;br /&gt;
| FT230XS pin 14&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| SPI CS&lt;br /&gt;
| Tx Led&lt;br /&gt;
| FT230XS pin 7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P2 Connector ===&lt;br /&gt;
[[Image:USB_UART_V02_P2.png|300px|right]]&lt;br /&gt;
P2 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 2 pins, which provides access to 5V power from USB.&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : Be careful, never connect them together as if they were for a jumper config, it would short-circuit the USB power and burn the ferite bread on the board.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P2 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +5V&lt;br /&gt;
| +5V from USB&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND&lt;br /&gt;
| Ground&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P2 Connector ===&lt;br /&gt;
[[Image:USB_UART_V02_P2.png|300px|right]]&lt;br /&gt;
P2 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 2 pins, which provides access to 5V power from USB.&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : Be careful, never connect them together as if they were for a jumper config, it would short-circuit the USB power and burn the ferite bread on the board.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P2 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +5V&lt;br /&gt;
| +5V from USB&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND&lt;br /&gt;
| Ground&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P3 : micro USB debug connector ===&lt;br /&gt;
P3 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P4 : USB type A debug connector ===&lt;br /&gt;
P4 is a male USB type A port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Technical documentation&lt;br /&gt;
* I2C and SPI support using the bit-banging capabilities of the FTDI chip (Host side software support)&lt;br /&gt;
* SWD and/or JTAG support&lt;br /&gt;
* RS232 version&lt;br /&gt;
* Low voltage (1.8V) version (microprocessors and SWD/JTAG debug support)&lt;br /&gt;
&lt;br /&gt;
== Technical Documentation and Schematics ==&lt;br /&gt;
The technical documentation has not been written yet ...&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
=== V0.1 ===&lt;br /&gt;
First version.&lt;br /&gt;
* 24mm x 30mm&lt;br /&gt;
* Two USB connectors (USB type A male and micro-USB B female)&lt;br /&gt;
* Two push buttons for ISP/Reset&lt;br /&gt;
* 6 pins on P1 connector (standard 2.54mm (0.1 inch) pitch header, with 2 row of 3 pins).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| FT230XS signal&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +3.3V from FT230XS&lt;br /&gt;
| +3.3V Out&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND - Ground&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| UART Tx&lt;br /&gt;
| TxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| UART Rx&lt;br /&gt;
| RxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Reset&lt;br /&gt;
| RTS&lt;br /&gt;
| Also connected to SW1 push button&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| ISP&lt;br /&gt;
| TxDEN&lt;br /&gt;
| Also connected to SW2 push button&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=85</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=85"/>
		<updated>2021-03-25T00:21:14Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Connectors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat is a power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|200px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|200px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.&amp;lt;br /&amp;gt;&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.&amp;lt;br /&amp;gt;&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
Some hints and links are provided in the software section below, but activating the primary UART is highly dependent on your RPi version and the GNU/Linux distribution you will be using (some may even ship with this UART activated !)&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== Activate main (debug) UART ===&lt;br /&gt;
The main UART (Serial / tty) used by the Linux kernel and base system to output messages (primary UART, where a login console will also be present at the end of the boot process) is not active by default on most distributions.&amp;lt;br /&amp;gt;&lt;br /&gt;
On the Raspberry Pi, if this UART is activated it will be present on GPIO 14 (transmit) and 15 (receive). Note that GPIO 14 is pin 8 on the GPIO header, while GPIO 15 is pin 10 (P5 Connector in Connectors section above).&lt;br /&gt;
&lt;br /&gt;
Follow these steps to configure (Note that this may vary, depending on your distribution, Linux kernel, and RaspberryPi version.&lt;br /&gt;
* Edit config.txt on your SD card first partition (&amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt;), and add&lt;br /&gt;
** &amp;lt;code&amp;gt;enable_uart=1&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;dtoverlay=uart0&amp;lt;/code&amp;gt; (for RPi 4)&lt;br /&gt;
** &amp;lt;code&amp;gt;dtoverlay=pi3-miniuart-bt&amp;lt;/code&amp;gt; (for RPi 3)&lt;br /&gt;
* Make sure you have the overly files in &amp;lt;code&amp;gt;/boot/overlays/&amp;lt;/code&amp;gt; on your SD card first partition&lt;br /&gt;
** &amp;lt;code&amp;gt;uart0.dtbo&amp;lt;/code&amp;gt; (for RPi 4)&lt;br /&gt;
** &amp;lt;code&amp;gt;pi3-miniuart-bt.dtbo&amp;lt;/code&amp;gt; (for RPi 3)&lt;br /&gt;
&lt;br /&gt;
You will find more informations [https://www.raspberrypi.org/documentation/configuration/uart.md here] and [https://www.raspberrypi.org/documentation/configuration/device-tree.md#part4.6 here] or even [https://raspberrypi.stackexchange.com/questions/104464/where-are-the-uarts-on-the-raspberry-pi-4 here] (more accurate and up to date). Also refer to your distribution documentation.&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Schematics : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.pdf here]&lt;br /&gt;
* Board layout : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=84</id>
		<title>Products/USB UART</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=84"/>
		<updated>2021-03-25T00:19:47Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:USB-UART Adapter}}&lt;br /&gt;
[[Image:USBtoUART.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The USB-UART adapter is pretty simple but usefull and ressourcefull. It provides access to a serial link (3.3V UART) from an USB port, either USB male or micro-USB female which is one of the cool special features of this adapter. Another cool feature is the 3.3V and 5V power both available on 2.54mm headers, usefull for most prototyping needs.&lt;br /&gt;
&lt;br /&gt;
This adapter uses an FTDI FT230XS, with most signals available on the UEXT-like connector, and should thus support I2C, SPI, and other protocols or data busses using the bitbanging capabilities of the FTDI chips, though this would require software support on your side as we did not have time to do so yet (We&#039;ll keep you up-to-date as soon as we have more information on these).&lt;br /&gt;
&lt;br /&gt;
== How-to use ==&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
=== P1 Connector ===&lt;br /&gt;
[[Image:USB_UART_V02_P1.png|300px|right]]&lt;br /&gt;
P1 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 5 pins.\\&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| FT230XS signal&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +3.3V from FT230XS&lt;br /&gt;
| +3.3V Out&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND - Ground&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| UART Tx&lt;br /&gt;
| TxD&lt;br /&gt;
| FT230XS pin 1&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| UART Rx&lt;br /&gt;
| RxD&lt;br /&gt;
| FT230XS pin 4&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| I2C SCL&lt;br /&gt;
| RTS&lt;br /&gt;
| FT230XS pin 2&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| I2C SDA&lt;br /&gt;
| CTS&lt;br /&gt;
| FT230XS pin 6&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| SPI MISO&lt;br /&gt;
| Sleep&lt;br /&gt;
| FT230XS pin 16&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| SPI MOSI&lt;br /&gt;
| TxDEN&lt;br /&gt;
| FT230XS pin 15&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| SPI CLK&lt;br /&gt;
| RxLed&lt;br /&gt;
| FT230XS pin 14&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| SPI CS&lt;br /&gt;
| Tx Led&lt;br /&gt;
| FT230XS pin 7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Technical documentation&lt;br /&gt;
* I2C and SPI support using the bit-banging capabilities of the FTDI chip (Host side software support)&lt;br /&gt;
* SWD and/or JTAG support&lt;br /&gt;
* RS232 version&lt;br /&gt;
* Low voltage (1.8V) version (microprocessors and SWD/JTAG debug support)&lt;br /&gt;
&lt;br /&gt;
== Technical Documentation and Schematics ==&lt;br /&gt;
The technical documentation has not been written yet ...&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
=== V0.1 ===&lt;br /&gt;
First version.&lt;br /&gt;
* 24mm x 30mm&lt;br /&gt;
* Two USB connectors (USB type A male and micro-USB B female)&lt;br /&gt;
* Two push buttons for ISP/Reset&lt;br /&gt;
* 6 pins on P1 connector (standard 2.54mm (0.1 inch) pitch header, with 2 row of 3 pins).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| FT230XS signal&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +3.3V from FT230XS&lt;br /&gt;
| +3.3V Out&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND - Ground&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| UART Tx&lt;br /&gt;
| TxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| UART Rx&lt;br /&gt;
| RxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Reset&lt;br /&gt;
| RTS&lt;br /&gt;
| Also connected to SW1 push button&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| ISP&lt;br /&gt;
| TxDEN&lt;br /&gt;
| Also connected to SW2 push button&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=83</id>
		<title>Products/USB UART</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=83"/>
		<updated>2021-03-25T00:18:07Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* How-to use */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:USB-UART Adapter}}&lt;br /&gt;
[[Image:USBtoUART.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The USB-UART adapter is pretty simple but usefull and ressourcefull. It provides access to a serial link (3.3V UART) from an USB port, either USB male or micro-USB female which is one of the cool special features of this adapter. Another cool feature is the 3.3V and 5V power both available on 2.54mm headers, usefull for most prototyping needs.&lt;br /&gt;
&lt;br /&gt;
This adapter uses an FTDI FT230XS, with most signals available on the UEXT-like connector, and should thus support I2C, SPI, and other protocols or data busses using the bitbanging capabilities of the FTDI chips, though this would require software support on your side as we did not have time to do so yet (We&#039;ll keep you up-to-date as soon as we have more information on these).&lt;br /&gt;
&lt;br /&gt;
== How-to use ==&lt;br /&gt;
&lt;br /&gt;
== Connectors ===&lt;br /&gt;
=== P1 Connector ===&lt;br /&gt;
[[Image:USB_UART_V02_P1.png|300px|right]]&lt;br /&gt;
P1 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 5 pins.\\&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| FT230XS signal&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +3.3V from FT230XS&lt;br /&gt;
| +3.3V Out&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND - Ground&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| UART Tx&lt;br /&gt;
| TxD&lt;br /&gt;
| FT230XS pin 1&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| UART Rx&lt;br /&gt;
| RxD&lt;br /&gt;
| FT230XS pin 4&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| I2C SCL&lt;br /&gt;
| RTS&lt;br /&gt;
| FT230XS pin 2&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| I2C SDA&lt;br /&gt;
| CTS&lt;br /&gt;
| FT230XS pin 6&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| SPI MISO&lt;br /&gt;
| Sleep&lt;br /&gt;
| FT230XS pin 16&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| SPI MOSI&lt;br /&gt;
| TxDEN&lt;br /&gt;
| FT230XS pin 15&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| SPI CLK&lt;br /&gt;
| RxLed&lt;br /&gt;
| FT230XS pin 14&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| SPI CS&lt;br /&gt;
| Tx Led&lt;br /&gt;
| FT230XS pin 7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Technical documentation&lt;br /&gt;
* I2C and SPI support using the bit-banging capabilities of the FTDI chip (Host side software support)&lt;br /&gt;
* SWD and/or JTAG support&lt;br /&gt;
* RS232 version&lt;br /&gt;
* Low voltage (1.8V) version (microprocessors and SWD/JTAG debug support)&lt;br /&gt;
&lt;br /&gt;
== Technical Documentation and Schematics ==&lt;br /&gt;
The technical documentation has not been written yet ...&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
=== V0.1 ===&lt;br /&gt;
First version.&lt;br /&gt;
* 24mm x 30mm&lt;br /&gt;
* Two USB connectors (USB type A male and micro-USB B female)&lt;br /&gt;
* 6 pins on P1 connector (standard 2.54mm (0.1 inch) pitch header, with 2 row of 3 pins).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| FT230XS signal&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +3.3V from FT230XS&lt;br /&gt;
| +3.3V Out&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND - Ground&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
| UART Tx&lt;br /&gt;
| TxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| UART Rx&lt;br /&gt;
| RxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
| Reset&lt;br /&gt;
| RTS&lt;br /&gt;
| Also connected to SW1 push button&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
| ISP&lt;br /&gt;
| TxDEN&lt;br /&gt;
| Also connected to SW2 push button&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=82</id>
		<title>Products/USB UART</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=82"/>
		<updated>2021-03-24T23:58:47Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Version history */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:USB-UART Adapter}}&lt;br /&gt;
[[Image:USBtoUART.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The USB-UART adapter is pretty simple but usefull and ressourcefull. It provides access to a serial link (3.3V UART) from an USB port, either USB male or micro-USB female which is one of the cool special features of this adapter. Another cool feature is the 3.3V and 5V power both available on 2.54mm headers, usefull for most prototyping needs.&lt;br /&gt;
&lt;br /&gt;
This adapter uses an FTDI FT230XS, with most signals available on the UEXT-like connector, and should thus support I2C, SPI, and other protocols or data busses using the bitbanging capabilities of the FTDI chips, though this would require software support on your side as we did not have time to do so yet (We&#039;ll keep you up-to-date as soon as we have more information on these).&lt;br /&gt;
&lt;br /&gt;
== How-to use ==&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Technical documentation&lt;br /&gt;
* I2C and SPI support using the bit-banging capabilities of the FTDI chip (Host side software support)&lt;br /&gt;
* SWD and/or JTAG support&lt;br /&gt;
* RS232 version&lt;br /&gt;
* Low voltage (1.8V) version (microprocessors and SWD/JTAG debug support)&lt;br /&gt;
&lt;br /&gt;
== Technical Documentation and Schematics ==&lt;br /&gt;
The technical documentation has not been written yet ...&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
=== V0.1 ===&lt;br /&gt;
First version.&lt;br /&gt;
* 24mm x 30mm&lt;br /&gt;
* Two USB connectors (USB type A male and micro-USB B female)&lt;br /&gt;
* 6 pins on P1 connector (standard 2.54mm (0.1 inch) pitch header, with 2 row of 3 pins).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| FT230XS signal&lt;br /&gt;
| Note&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| +3.3V from FT230XS&lt;br /&gt;
| +3.3V Out&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| GND - Ground&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
| UART Tx&lt;br /&gt;
| TxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| UART Rx&lt;br /&gt;
| RxD&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
| Reset&lt;br /&gt;
| RTS&lt;br /&gt;
| Also connected to SW1 push button&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
| ISP&lt;br /&gt;
| TxDEN&lt;br /&gt;
| Also connected to SW2 push button&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=81</id>
		<title>Products/USB UART</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/USB_UART&amp;diff=81"/>
		<updated>2021-03-24T23:14:08Z</updated>

		<summary type="html">&lt;p&gt;Nathael: Created page with &amp;quot;{{DISPLAYTITLE:USB-UART Adapter}} right  == Description == The USB-UART adapter is pretty simple but usefull and ressourcefull. It provides acces...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:USB-UART Adapter}}&lt;br /&gt;
[[Image:USBtoUART.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The USB-UART adapter is pretty simple but usefull and ressourcefull. It provides access to a serial link (3.3V UART) from an USB port, either USB male or micro-USB female which is one of the cool special features of this adapter. Another cool feature is the 3.3V and 5V power both available on 2.54mm headers, usefull for most prototyping needs.&lt;br /&gt;
&lt;br /&gt;
This adapter uses an FTDI FT230XS, with most signals available on the UEXT-like connector, and should thus support I2C, SPI, and other protocols or data busses using the bitbanging capabilities of the FTDI chips, though this would require software support on your side as we did not have time to do so yet (We&#039;ll keep you up-to-date as soon as we have more information on these).&lt;br /&gt;
&lt;br /&gt;
== How-to use ==&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Technical documentation&lt;br /&gt;
* I2C and SPI support using the bit-banging capabilities of the FTDI chip (Host side software support)&lt;br /&gt;
* SWD and/or JTAG support&lt;br /&gt;
* RS232 version&lt;br /&gt;
* Low voltage (1.8V) version (microprocessors and SWD/JTAG debug support)&lt;br /&gt;
&lt;br /&gt;
== Technical Documentation and Schematics ==&lt;br /&gt;
The technical documentation has not been written yet ...&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=80</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=80"/>
		<updated>2020-09-27T01:50:06Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Activate main (debug) UART */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat is a power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|200px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|200px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.\\&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.\\&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
Some hints and links are provided in the software section below, but activating the primary UART is highly dependent on your RPi version and the GNU/Linux distribution you will be using (some may even ship with this UART activated !)&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== Activate main (debug) UART ===&lt;br /&gt;
The main UART (Serial / tty) used by the Linux kernel and base system to output messages (primary UART, where a login console will also be present at the end of the boot process) is not active by default on most distributions.&amp;lt;br /&amp;gt;&lt;br /&gt;
On the Raspberry Pi, if this UART is activated it will be present on GPIO 14 (transmit) and 15 (receive). Note that GPIO 14 is pin 8 on the GPIO header, while GPIO 15 is pin 10 (P5 Connector in Connectors section above).&lt;br /&gt;
&lt;br /&gt;
Follow these steps to configure (Note that this may vary, depending on your distribution, Linux kernel, and RaspberryPi version.&lt;br /&gt;
* Edit config.txt on your SD card first partition (&amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt;), and add&lt;br /&gt;
** &amp;lt;code&amp;gt;enable_uart=1&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;dtoverlay=uart0&amp;lt;/code&amp;gt; (for RPi 4)&lt;br /&gt;
** &amp;lt;code&amp;gt;dtoverlay=pi3-miniuart-bt&amp;lt;/code&amp;gt; (for RPi 3)&lt;br /&gt;
* Make sure you have the overly files in &amp;lt;code&amp;gt;/boot/overlays/&amp;lt;/code&amp;gt; on your SD card first partition&lt;br /&gt;
** &amp;lt;code&amp;gt;uart0.dtbo&amp;lt;/code&amp;gt; (for RPi 4)&lt;br /&gt;
** &amp;lt;code&amp;gt;pi3-miniuart-bt.dtbo&amp;lt;/code&amp;gt; (for RPi 3)&lt;br /&gt;
&lt;br /&gt;
You will find more informations [https://www.raspberrypi.org/documentation/configuration/uart.md here] and [https://www.raspberrypi.org/documentation/configuration/device-tree.md#part4.6 here] or even [https://raspberrypi.stackexchange.com/questions/104464/where-are-the-uarts-on-the-raspberry-pi-4 here] (more accurate and up to date). Also refer to your distribution documentation.&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Schematics : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.pdf here]&lt;br /&gt;
* Board layout : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=79</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=79"/>
		<updated>2020-09-27T01:39:04Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* USB to UART bridge */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat is a power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|200px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|200px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.\\&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.\\&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&amp;lt;br /&amp;gt;&lt;br /&gt;
Some hints and links are provided in the software section below, but activating the primary UART is highly dependent on your RPi version and the GNU/Linux distribution you will be using (some may even ship with this UART activated !)&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== Activate main (debug) UART ===&lt;br /&gt;
The main UART (Serial / tty) used by the Linux kernel and base system to output messages (primary UART, where a login console will also be present at the end of the boot process) is not active by default on most distributions.&amp;lt;br /&amp;gt;&lt;br /&gt;
On the Raspberry Pi, if this UART is activated it will be present on GPIO 14 (transmit) and 15 (receive). Note that GPIO 14 is pin 8 on the GPIO header, while GPIO 15 is pin 10 (P5 Connector in Connectors section above).&lt;br /&gt;
&lt;br /&gt;
Follow these steps to configure (Note that this may vary, depending on your distribution, Linux kernel, and RaspberryPi version.&lt;br /&gt;
* Edit config.txt on your SD card first partition, and add &amp;lt;code&amp;gt;enable_uart&amp;lt;/code&amp;gt;.&lt;br /&gt;
You will find more informations [https://www.raspberrypi.org/documentation/configuration/uart.md here] and [https://www.raspberrypi.org/documentation/configuration/device-tree.md#part4.6 here]&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Schematics : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.pdf here]&lt;br /&gt;
* Board layout : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=78</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=78"/>
		<updated>2020-09-27T01:36:24Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat is a power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|200px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|200px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.\\&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.\\&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== Activate main (debug) UART ===&lt;br /&gt;
The main UART (Serial / tty) used by the Linux kernel and base system to output messages (primary UART, where a login console will also be present at the end of the boot process) is not active by default on most distributions.&amp;lt;br /&amp;gt;&lt;br /&gt;
On the Raspberry Pi, if this UART is activated it will be present on GPIO 14 (transmit) and 15 (receive). Note that GPIO 14 is pin 8 on the GPIO header, while GPIO 15 is pin 10 (P5 Connector in Connectors section above).&lt;br /&gt;
&lt;br /&gt;
Follow these steps to configure (Note that this may vary, depending on your distribution, Linux kernel, and RaspberryPi version.&lt;br /&gt;
* Edit config.txt on your SD card first partition, and add &amp;lt;code&amp;gt;enable_uart&amp;lt;/code&amp;gt;.&lt;br /&gt;
You will find more informations [https://www.raspberrypi.org/documentation/configuration/uart.md here] and [https://www.raspberrypi.org/documentation/configuration/device-tree.md#part4.6 here]&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Schematics : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.pdf here]&lt;br /&gt;
* Board layout : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/Module_GPIO_Demo&amp;diff=77</id>
		<title>Products/Module GPIO Demo</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/Module_GPIO_Demo&amp;diff=77"/>
		<updated>2020-09-27T01:25:21Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:GPIO-Demo Module}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;WORK IN PROGRESS&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The GPIO-Demo module is intended to help prototyping with the LPC1224 microcontroller from NXP and has been designed as a base for the development of communication modules for the DomoTab project in order to validate mechanical and other common specifications of the modules.&lt;br /&gt;
&lt;br /&gt;
[[Image:Module_GPIO_Demo.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The GPIO-Demo module is a development board for the [https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1200-cortex-m0/32kb-flash-4kb-sram-lqfp48-package:LPC1224FBD48 LPC1224 microcontroller] from [http://www.nxp.com/ NXP], an ARM Cortex-M0 based microcontroller.&lt;br /&gt;
&lt;br /&gt;
* USB powered&lt;br /&gt;
* two rows of 2.54mm (0.1 inch) connectors for use on rapid prototyping boards&lt;br /&gt;
* UEXT connector&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the first UART using a simple USB cable or to connect the board directly to your computer depending on the USB connector option you choose.&lt;br /&gt;
* an I²C EEPROM&lt;br /&gt;
* an I²C temperature sensor (TMP101 from Texas Instrument)&lt;br /&gt;
* Reset and ISP buttons&lt;br /&gt;
* a bicolor (green and red) user Led&lt;br /&gt;
&lt;br /&gt;
The board comes either fully assembled and tested or as a CMS kit so you can test CMS assembly at home. &lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-sa/4.0/legalcode Creative Commons CC BY-SA 4.0]&lt;br /&gt;
* Hardware : The GPIO-Demo module hardware and schematics are under [https://creativecommons.org/licenses/by-sa/4.0/legalcode Creative Commons CC BY-SA 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, and sell them for profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the GPIO-Demo module are under GPLv3 License.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes_USBA.png|Fig 1 - USB A board&lt;br /&gt;
Image:Cotes_mUSB.png|Fig 2 - micro-USB board&lt;br /&gt;
Image:Cotes_Conn.png|Fig 3 - Headers and UEXT connector&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (Led, buttons, connectors) of the GPIO-Demo module.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:GPIO_Demo_Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The Module has one USB connector numbered P6 (micro-USB female) or P7 (USB A male) depending on the board type, one UEXT connector (P1), four 2.54mm headers on the sides, and another 2.54mm header to give extra access to the UART. Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : 2x5 pins, 2.54mm pitch header : [https://en.wikipedia.org/wiki/UEXT UEXT connector]&lt;br /&gt;
* P2 : 10 pins, 2.54mm pitch header. Provides +5V from USB, ground, and 8 GPIO from port 0.&lt;br /&gt;
* P3 : 10 pins, 2.54mm pitch header. Provides 10 GPIO from port 0.&lt;br /&gt;
* P4 : 6 pins, 2.54mm pitch header. Provides 6 ADC inputs (can be used as GPIO).&lt;br /&gt;
* P5 : 2 pins, 2.54mm pitch header. Provides +3.3V and ground.&lt;br /&gt;
* P6 : USB microB female connector, available only on micro USB board type.&lt;br /&gt;
* P7 : USB A male connector, available only on USB A board type.&lt;br /&gt;
* P8 : 2 pins, 2.54mm pitch header. Provides access to Rx/Tx on USB to UART bridge.&lt;br /&gt;
&lt;br /&gt;
=== P1 Connector ===&lt;br /&gt;
P1 connector is an [https://en.wikipedia.org/wiki/UEXT UEXT connector], as specified by [http://www.olimex.com/ Olimex]. The UEXT connector gives access to power and to three serial buses : UART, I²C and SPI.&amp;lt;br /&amp;gt;&lt;br /&gt;
P1 connector uses a standard 2.54mm (0.1 inch) pitch header, with 2 rows of 5 pins. It can be either male or female, and mounted either on top or on bottom of the board. If mounted on top, other components prevent the use of the common plastic keyed-shroud used for common UEXT connectors. The key would be on the odd pins side, with the module name and Techno-Innov mascot (tibug).&amp;lt;br /&amp;gt;&lt;br /&gt;
All P1 pins are connected to related pins on the LPC micro-controller. UART Pins are connected to UART 0 through J3 and J4 selector which allows selection of master or device function for the module. This is transparent for the SPI and I²C bus.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V : 3.3V from USB to UART bridge or 3.3V input power&lt;br /&gt;
| +3.3V&lt;br /&gt;
| pins 44 and 47&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 43 and 48&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Tx : Tx from USB to UART bridge&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Rx : Rx to USB to UART bridge&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|I²C SCL - Clock for I²C bus&lt;br /&gt;
|I²C SCL - PIO0_10&lt;br /&gt;
| pin 25&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|I²C SDA - Bidirectional serial data for I²C bus&lt;br /&gt;
|I²C SDA - PIO0_11&lt;br /&gt;
| pin 26&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P2 Connector ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P3 Connector ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
P5 connector is a common 2.54mm (0.1 inch) header which provides power and ground to breadboards when used for prototyping.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V : 3.3V from USB to UART bridge or 3.3V input power&lt;br /&gt;
| +3.3V&lt;br /&gt;
| Pins 44 and 47&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 43 and 48&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P6 Connector ===&lt;br /&gt;
=== P7 Connector ===&lt;br /&gt;
=== P8 Connector ===&lt;br /&gt;
P8 connector is a common 2.54mm (0.1 inch) header which provides access to the Rx and Tx UART signals from the USB-to-UART bridge or the UEXT connector. Removing J3 and J4 jumpers removes any connection to the LPC1224 micro-controller.&amp;lt;br /&amp;gt;&lt;br /&gt;
This allows the connection of the USB-to-UART bridge to UART 1 on connector P2, or to any other UART on another device, provided that you also connect the ground to that other device.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P8 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Tx : Tx from USB to UART bridge&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Rx : Rx from USB to UART bridge&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:GPIO_Demo_Composants.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.nxp.com/documents/user_manual/UM10441.pdf&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/Module_GPIO_Demo&amp;diff=76</id>
		<title>Products/Module GPIO Demo</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/Module_GPIO_Demo&amp;diff=76"/>
		<updated>2020-09-10T17:26:33Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Connectors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:GPIO-Demo Module}}&lt;br /&gt;
&lt;br /&gt;
The GPIO-Demo module is intended to help prototyping with the LPC1224 microcontroller from NXP and has been designed as a base for the development of communication modules for the DomoTab project in order to validate mechanical and other common specifications of the modules.&lt;br /&gt;
&lt;br /&gt;
[[Image:Module_GPIO_Demo.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The GPIO-Demo module is a development board for the [https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1200-cortex-m0/32kb-flash-4kb-sram-lqfp48-package:LPC1224FBD48 LPC1224 microcontroller] from [http://www.nxp.com/ NXP], an ARM Cortex-M0 based microcontroller.&lt;br /&gt;
&lt;br /&gt;
* USB powered&lt;br /&gt;
* two rows of 2.54mm (0.1 inch) connectors for use on rapid prototyping boards&lt;br /&gt;
* UEXT connector&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the first UART using a simple USB cable or to connect the board directly to your computer depending on the USB connector option you choose.&lt;br /&gt;
* an I²C EEPROM&lt;br /&gt;
* an I²C temperature sensor (TMP101 from Texas Instrument)&lt;br /&gt;
* Reset and ISP buttons&lt;br /&gt;
* a bicolor (green and red) user Led&lt;br /&gt;
&lt;br /&gt;
The board comes either fully assembled and tested or as a CMS kit so you can test CMS assembly at home. &lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-sa/4.0/legalcode Creative Commons CC BY-SA 4.0]&lt;br /&gt;
* Hardware : The GPIO-Demo module hardware and schematics are under [https://creativecommons.org/licenses/by-sa/4.0/legalcode Creative Commons CC BY-SA 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, and sell them for profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the GPIO-Demo module are under GPLv3 License.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes_USBA.png|Fig 1 - USB A board&lt;br /&gt;
Image:Cotes_mUSB.png|Fig 2 - micro-USB board&lt;br /&gt;
Image:Cotes_Conn.png|Fig 3 - Headers and UEXT connector&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (Led, buttons, connectors) of the GPIO-Demo module.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:GPIO_Demo_Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The Module has one USB connector numbered P6 (micro-USB female) or P7 (USB A male) depending on the board type, one UEXT connector (P1), four 2.54mm headers on the sides, and another 2.54mm header to give extra access to the UART. Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : 2x5 pins, 2.54mm pitch header : [https://en.wikipedia.org/wiki/UEXT UEXT connector]&lt;br /&gt;
* P2 : 10 pins, 2.54mm pitch header. Provides +5V from USB, ground, and 8 GPIO from port 0.&lt;br /&gt;
* P3 : 10 pins, 2.54mm pitch header. Provides 10 GPIO from port 0.&lt;br /&gt;
* P4 : 6 pins, 2.54mm pitch header. Provides 6 ADC inputs (can be used as GPIO).&lt;br /&gt;
* P5 : 2 pins, 2.54mm pitch header. Provides +3.3V and ground.&lt;br /&gt;
* P6 : USB microB female connector, available only on micro USB board type.&lt;br /&gt;
* P7 : USB A male connector, available only on USB A board type.&lt;br /&gt;
* P8 : 2 pins, 2.54mm pitch header. Provides access to Rx/Tx on USB to UART bridge.&lt;br /&gt;
&lt;br /&gt;
=== P1 Connector ===&lt;br /&gt;
P1 connector is an [https://en.wikipedia.org/wiki/UEXT UEXT connector], as specified by [http://www.olimex.com/ Olimex]. The UEXT connector gives access to power and to three serial buses : UART, I²C and SPI.&amp;lt;br /&amp;gt;&lt;br /&gt;
P1 connector uses a standard 2.54mm (0.1 inch) pitch header, with 2 rows of 5 pins. It can be either male or female, and mounted either on top or on bottom of the board. If mounted on top, other components prevent the use of the common plastic keyed-shroud used for common UEXT connectors. The key would be on the odd pins side, with the module name and Techno-Innov mascot (tibug).&amp;lt;br /&amp;gt;&lt;br /&gt;
All P1 pins are connected to related pins on the LPC micro-controller. UART Pins are connected to UART 0 through J3 and J4 selector which allows selection of master or device function for the module. This is transparent for the SPI and I²C bus.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V : 3.3V from USB to UART bridge or 3.3V input power&lt;br /&gt;
| +3.3V&lt;br /&gt;
| pins 44 and 47&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 43 and 48&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Tx : Tx from USB to UART bridge&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Rx : Rx to USB to UART bridge&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|I²C SCL - Clock for I²C bus&lt;br /&gt;
|I²C SCL - PIO0_10&lt;br /&gt;
| pin 25&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|I²C SDA - Bidirectional serial data for I²C bus&lt;br /&gt;
|I²C SDA - PIO0_11&lt;br /&gt;
| pin 26&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P2 Connector ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P3 Connector ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P1 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
P5 connector is a common 2.54mm (0.1 inch) header which provides power and ground to breadboards when used for prototyping.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V : 3.3V from USB to UART bridge or 3.3V input power&lt;br /&gt;
| +3.3V&lt;br /&gt;
| Pins 44 and 47&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 43 and 48&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P6 Connector ===&lt;br /&gt;
=== P7 Connector ===&lt;br /&gt;
=== P8 Connector ===&lt;br /&gt;
P8 connector is a common 2.54mm (0.1 inch) header which provides access to the Rx and Tx UART signals from the USB-to-UART bridge or the UEXT connector. Removing J3 and J4 jumpers removes any connection to the LPC1224 micro-controller.&amp;lt;br /&amp;gt;&lt;br /&gt;
This allows the connection of the USB-to-UART bridge to UART 1 on connector P2, or to any other UART on another device, provided that you also connect the ground to that other device.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P8 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Tx : Tx from USB to UART bridge&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Rx : Rx from USB to UART bridge&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:GPIO_Demo_Composants.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.nxp.com/documents/user_manual/UM10441.pdf&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/Module_GPIO_Demo&amp;diff=75</id>
		<title>Products/Module GPIO Demo</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/Module_GPIO_Demo&amp;diff=75"/>
		<updated>2020-09-10T04:29:20Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Connectors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:GPIO-Demo Module}}&lt;br /&gt;
&lt;br /&gt;
The GPIO-Demo module is intended to help prototyping with the LPC1224 microcontroller from NXP and has been designed as a base for the development of communication modules for the DomoTab project in order to validate mechanical and other common specifications of the modules.&lt;br /&gt;
&lt;br /&gt;
[[Image:Module_GPIO_Demo.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The GPIO-Demo module is a development board for the [https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1200-cortex-m0/32kb-flash-4kb-sram-lqfp48-package:LPC1224FBD48 LPC1224 microcontroller] from [http://www.nxp.com/ NXP], an ARM Cortex-M0 based microcontroller.&lt;br /&gt;
&lt;br /&gt;
* USB powered&lt;br /&gt;
* two rows of 2.54mm (0.1 inch) connectors for use on rapid prototyping boards&lt;br /&gt;
* UEXT connector&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the first UART using a simple USB cable or to connect the board directly to your computer depending on the USB connector option you choose.&lt;br /&gt;
* an I²C EEPROM&lt;br /&gt;
* an I²C temperature sensor (TMP101 from Texas Instrument)&lt;br /&gt;
* Reset and ISP buttons&lt;br /&gt;
* a bicolor (green and red) user Led&lt;br /&gt;
&lt;br /&gt;
The board comes either fully assembled and tested or as a CMS kit so you can test CMS assembly at home. &lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-sa/4.0/legalcode Creative Commons CC BY-SA 4.0]&lt;br /&gt;
* Hardware : The GPIO-Demo module hardware and schematics are under [https://creativecommons.org/licenses/by-sa/4.0/legalcode Creative Commons CC BY-SA 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, and sell them for profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the GPIO-Demo module are under GPLv3 License.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes_USBA.png|Fig 1 - USB A board&lt;br /&gt;
Image:Cotes_mUSB.png|Fig 2 - micro-USB board&lt;br /&gt;
Image:Cotes_Conn.png|Fig 3 - Headers and UEXT connector&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (Led, buttons, connectors) of the GPIO-Demo module.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:GPIO_Demo_Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The Module has one USB connector numbered P6 (micro-USB female) or P7 (USB A male) depending on the board type, one UEXT connector (P1), four 2.54mm headers on the sides, and another 2.54mm header to give extra access to the UART. Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : 2x5 pins, 2.54mm pitch (0.1 inch) header : [https://en.wikipedia.org/wiki/UEXT UEXT connector]&lt;br /&gt;
* P2 : 10 pins, 2.54mm pitch header. Provides +5V from USB, ground, and 8 GPIO from port 0.&lt;br /&gt;
* P3 : 10 pins, 2.54mm pitch header. Provides 10 GPIO from port 0.&lt;br /&gt;
* P4 : 6 pins, 2.54mm pitch header. Provides 6 ADC inputs (can be used as GPIO).&lt;br /&gt;
* P5 : 2 pins, 2.54mm pitch header. Provides +3.3V and ground.&lt;br /&gt;
* P6 : USB microB female connector, available only on micro USB board type.&lt;br /&gt;
* P7 : USB A male connector, available only on USB A board type.&lt;br /&gt;
* P8 : 2 pins, 2.54mm pitch header. Provides access to Rx/Tx on USB to UART bridge.&lt;br /&gt;
&lt;br /&gt;
=== P1 Connector ===&lt;br /&gt;
=== P2 Connector ===&lt;br /&gt;
=== P3 Connector ===&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
=== P6 Connector ===&lt;br /&gt;
=== P7 Connector ===&lt;br /&gt;
=== P8 Connector ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P8 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| LPC1224 signal&lt;br /&gt;
| LPC1224 Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V : 3.3V from USB to UART bridge or 3.3V input power&lt;br /&gt;
| +3.3V&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:GPIO_Demo_Composants.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.nxp.com/documents/user_manual/UM10441.pdf&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/Module_GPIO_Demo&amp;diff=74</id>
		<title>Products/Module GPIO Demo</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/Module_GPIO_Demo&amp;diff=74"/>
		<updated>2020-09-10T04:24:33Z</updated>

		<summary type="html">&lt;p&gt;Nathael: Created page with &amp;quot;{{DISPLAYTITLE:GPIO-Demo Module}}  The GPIO-Demo module is intended to help prototyping with the LPC1224 microcontroller from NXP and has been designed as a base for the devel...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:GPIO-Demo Module}}&lt;br /&gt;
&lt;br /&gt;
The GPIO-Demo module is intended to help prototyping with the LPC1224 microcontroller from NXP and has been designed as a base for the development of communication modules for the DomoTab project in order to validate mechanical and other common specifications of the modules.&lt;br /&gt;
&lt;br /&gt;
[[Image:Module_GPIO_Demo.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The GPIO-Demo module is a development board for the [https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1200-cortex-m0/32kb-flash-4kb-sram-lqfp48-package:LPC1224FBD48 LPC1224 microcontroller] from [http://www.nxp.com/ NXP], an ARM Cortex-M0 based microcontroller.&lt;br /&gt;
&lt;br /&gt;
* USB powered&lt;br /&gt;
* two rows of 2.54mm (0.1 inch) connectors for use on rapid prototyping boards&lt;br /&gt;
* UEXT connector&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the first UART using a simple USB cable or to connect the board directly to your computer depending on the USB connector option you choose.&lt;br /&gt;
* an I²C EEPROM&lt;br /&gt;
* an I²C temperature sensor (TMP101 from Texas Instrument)&lt;br /&gt;
* Reset and ISP buttons&lt;br /&gt;
* a bicolor (green and red) user Led&lt;br /&gt;
&lt;br /&gt;
The board comes either fully assembled and tested or as a CMS kit so you can test CMS assembly at home. &lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-sa/4.0/legalcode Creative Commons CC BY-SA 4.0]&lt;br /&gt;
* Hardware : The GPIO-Demo module hardware and schematics are under [https://creativecommons.org/licenses/by-sa/4.0/legalcode Creative Commons CC BY-SA 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, and sell them for profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the GPIO-Demo module are under GPLv3 License.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes_USBA.png|Fig 1 - USB A board&lt;br /&gt;
Image:Cotes_mUSB.png|Fig 2 - micro-USB board&lt;br /&gt;
Image:Cotes_Conn.png|Fig 3 - Headers and UEXT connector&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (Led, buttons, connectors) of the GPIO-Demo module.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The Module has one USB connector numbered P6 (micro-USB female) or P7 (USB A male) depending on the board type, one UEXT connector (P1), four 2.54mm headers on the sides, and another 2.54mm header to give extra access to the UART. Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : 2x5 pins, 2.54mm pitch (0.1 inch) header : [https://en.wikipedia.org/wiki/UEXT UEXT connector]&lt;br /&gt;
* P2 : 10 pins, 2.54mm pitch header. Provides +5V from USB, ground, and 8 GPIO from port 0.&lt;br /&gt;
* P3 : 10 pins, 2.54mm pitch header. Provides 10 GPIO from port 0.&lt;br /&gt;
* P4 : 6 pins, 2.54mm pitch header. Provides 6 ADC inputs (can be used as GPIO).&lt;br /&gt;
* P5 : 2 pins, 2.54mm pitch header. Provides +3.3V and ground.&lt;br /&gt;
* P6 : USB microB female connector, available only on micro USB board type.&lt;br /&gt;
* P7 : USB A male connector, available only on USB A board type.&lt;br /&gt;
* P8 : 2 pins, 2.54mm pitch header. Provides access to Rx/Tx on USB to UART bridge.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.nxp.com/documents/user_manual/UM10441.pdf&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=73</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=73"/>
		<updated>2020-09-10T03:56:04Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat is a power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|200px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|200px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.\\&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.\\&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Schematics : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.pdf here]&lt;br /&gt;
* Board layout : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=72</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=72"/>
		<updated>2020-09-04T16:49:17Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* P3 : 2.1mm barrel jack */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat Power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|200px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|200px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.\\&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.\\&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Schematics : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.pdf here]&lt;br /&gt;
* Board layout : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=71</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=71"/>
		<updated>2020-09-04T16:48:55Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* P3 : 2.1mm barrel jack */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat Power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|250px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|200px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.\\&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.\\&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Schematics : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.pdf here]&lt;br /&gt;
* Board layout : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=70</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=70"/>
		<updated>2020-09-04T16:48:27Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* P4 Connector */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat Power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|300px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|200px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.\\&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.\\&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Schematics : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.pdf here]&lt;br /&gt;
* Board layout : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=File:P5.png&amp;diff=69</id>
		<title>File:P5.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=File:P5.png&amp;diff=69"/>
		<updated>2020-09-04T16:48:08Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=File:P4.png&amp;diff=68</id>
		<title>File:P4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=File:P4.png&amp;diff=68"/>
		<updated>2020-09-04T16:48:00Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=File:P3.png&amp;diff=67</id>
		<title>File:P3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=File:P3.png&amp;diff=67"/>
		<updated>2020-09-04T16:47:49Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=66</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=66"/>
		<updated>2020-09-04T16:46:50Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Schematics, sources and PDF of documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat Power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|300px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|300px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.\\&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.\\&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Schematics : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.pdf here]&lt;br /&gt;
* Board layout : [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Board.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=65</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=65"/>
		<updated>2020-09-04T16:28:32Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Electronic components */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat Power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|300px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|300px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.\\&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.\\&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=64</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=64"/>
		<updated>2020-09-04T16:27:50Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Electronic components */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat Power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|300px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|300px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.\\&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.\\&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|500px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=63</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=63"/>
		<updated>2020-09-04T16:27:00Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* Electronic components */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat Power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|300px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|300px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.\\&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.\\&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|360px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|300px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|250px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|250px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|200px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|180px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=File:Composants.png&amp;diff=62</id>
		<title>File:Composants.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=File:Composants.png&amp;diff=62"/>
		<updated>2020-09-04T16:25:43Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=61</id>
		<title>Products/PiSerialPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=Products/PiSerialPower&amp;diff=61"/>
		<updated>2020-09-04T16:24:27Z</updated>

		<summary type="html">&lt;p&gt;Nathael: /* USB to UART bridge */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:&amp;quot;PiSerialPower&amp;quot; Hat}}&lt;br /&gt;
Raspberry Pi 4 Hat with 5-28VDC - 3A power with barrel jack input, Fan, RTC with Supercap backup, Debug UART, temp sensor and WS2812 RGB led&lt;br /&gt;
&lt;br /&gt;
[[Image:PiserialPower.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;quot;PiSerialPower&amp;quot; Hat Power-supply Hat for RaspberryPi (and pin-compatible competitors) which also provides a rich set of features :&lt;br /&gt;
* 5 to 28VDC barrel jack power input&lt;br /&gt;
* 5V - 3A voltage regulator to power the Raspberry Pi&lt;br /&gt;
* a Fan (PWM controlled)&lt;br /&gt;
* an RTC (PCF85363) with Super capacitor backup (about one month date/time retention, and will not need to be changed in a few years !)&lt;br /&gt;
* a USB to UART FTDI chip (FT230XS) to give you access to the debug console using a simple, common micro-USB cable&lt;br /&gt;
* a reset button&lt;br /&gt;
* a TMP101 temperature sensor&lt;br /&gt;
* and a WS2812 RGB led ... well, there was some place left on the PCB ...&lt;br /&gt;
&lt;br /&gt;
The serial and reset signals are also available on a 2.54mm header.&lt;br /&gt;
&lt;br /&gt;
Of course, the board uses the format specified by Raspberry Pi and allows access to both FPC connectors, and is provided with mounting screws.&lt;br /&gt;
&lt;br /&gt;
The board comes fully assembled and tested.&lt;br /&gt;
&lt;br /&gt;
== Where to buy ==&lt;br /&gt;
* [https://www.tindie.com/products/nathael/pi4-serial-and-power-board/ On Tindie]&lt;br /&gt;
* Directly from us using [http://paypal.me/TechnoInnov Paypal].&lt;br /&gt;
: Contact us by email before (sales *at* techno-innov.fr) to get a quotation which will include shipping costs and reduction for direct order.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
* Documentation : [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0]&lt;br /&gt;
* Hardware : The PiSerialPower RPi Hat hardware and schematics are under [https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode Creative Commons CC BY-SA-NC 4.0] License. You can produce your own original or modified version of the PiSerialPower RPi Hat, and use it however you like, but not sell them, even without profit.&lt;br /&gt;
* Software : All the software examples created by Techno-Innov for the PiSerialPower RPi Hat are under GPLv3 License.&lt;br /&gt;
: Note that most of the software you will use with this Hat has not been written by us and is covered by other licenses. Refer to each software for more information.&lt;br /&gt;
&lt;br /&gt;
== Hardware (Mechanical) ==&lt;br /&gt;
=== Dimensions ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cotes.png|Fig 1 - Mechanical&lt;br /&gt;
Image:Cotes_Conn.png|Fig 2 - Connectors&lt;br /&gt;
Image:Cotes_Fan.png|Fig 3 - Fan&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Figures 1, 2 and 3 give the different dimensions and the position of the main elements (FAN, connectors, reset button and user led) of the PiSerialPower RPi Hat.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
[[Image:Connectors.png|Fig 4 - Connectors|360px|right]]&lt;br /&gt;
The HAT has one USB connector numbered P1, a DC barel Jack connector numbered P3, and two 2.54mm pitch headers numbered P4 (Debug) and P5 (Raspberry Pi connector). Refer to figure 4 for connectors position.&amp;lt;br /&amp;gt;&lt;br /&gt;
Detailed description of the signals found on each connector pin follow.&lt;br /&gt;
* P1 : USB microB female connector.&lt;br /&gt;
* P3 : DC barrel jack. +Vin and ground input.&lt;br /&gt;
* P4 : 4 pins, 2.54mm pitch header. Provides Debug UART and Reset.&lt;br /&gt;
* P5 : 40 pins, 2.54mm pitch header. Provides access to RPI expansion header.&lt;br /&gt;
&lt;br /&gt;
=== P1 : USB debug connector ===&lt;br /&gt;
P1 is a female USB microB port.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the [http://fr.wikipedia.org/wiki/Universal_Serial_Bus Universal Serial Bus (USB)] page on Wikipedia for pinout and more information on the USB bus and connectors.&lt;br /&gt;
&lt;br /&gt;
=== P3 : 2.1mm barrel jack ===&lt;br /&gt;
[[Image:P3.png|300px|right]]&lt;br /&gt;
P3 connector is a standard 2.1mm barrel jack.&amp;lt;br /&amp;gt;&lt;br /&gt;
+Vin is on the central tip, and GND on the outer sleeve.&amp;lt;br /&amp;gt;&lt;br /&gt;
Insersion detection is not used.&amp;lt;br /&amp;gt;&lt;br /&gt;
P3 connector provides access to +Vin and Ground for the onboard step-down regulator. Despite the comment on the schematics, the input ranges from 5V to 24V (28V is the max allowed, and 30V the absolute max the step-down converter can handle) . This lets you power the board using a large variety of power sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : be very carefull when powering the board with a 24V power-supply, as the voltage can go well above 30V upon power-supply startup and destroy the step-down converter.&amp;lt;br /&amp;gt;&lt;br /&gt;
Future versions will include a 28V zener diode between Vin and GND to further protect the Hat.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P3 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +Vin : External unregulated input, +5V to +28V&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== P4 Connector ===&lt;br /&gt;
[[Image:P4.png|300px|right]]&lt;br /&gt;
P4 connector is a standard 2.54mm (0.1 inch) pitch header, with 1 row of 4 pins.\\&lt;br /&gt;
P4 connector provides access to Debug UART and Reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|P4 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
| RPi Pin&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|GND pins 6, 9, 14, 20, 25, 30, 34 and 39&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|pin 8&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|pin 10&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|5V enable (Reset)&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; : P4 connector allows direct access to the debug UART and to the power enable pin without powering&lt;br /&gt;
the USB-to-UART bridge. This option has been added to allow external access and control of clusters of&lt;br /&gt;
Raspberry Pi boards through a single UART concentrator with aditionnal GPIO to control the DC/DC enable&lt;br /&gt;
pin.&lt;br /&gt;
&lt;br /&gt;
=== P5 Connector ===&lt;br /&gt;
[[Image:P5.png|300px|right]]&lt;br /&gt;
P5 connector is a standard 2.54mm (0.1 inch) pitch header, with 2 row of 20 pins.\\&lt;br /&gt;
P5 connector provides access to the Raspberry PI expansion header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|P5 connector&lt;br /&gt;
|-&lt;br /&gt;
| Pin #&lt;br /&gt;
| Description&lt;br /&gt;
| RPi signal&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 1&lt;br /&gt;
|I2C1 SDA&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| +5V to RPi&lt;br /&gt;
| +5V&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|SCL : Clock for I²C bus 1&lt;br /&gt;
|I2C1 SCL&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|RTC GPIO&lt;br /&gt;
|GPIO 4&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|RPi TxD&lt;br /&gt;
|UART0 Tx&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|RPi RxD&lt;br /&gt;
|UART0 Rx&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Temp sensor GPIO&lt;br /&gt;
|GPIO 17&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|RGB Led&lt;br /&gt;
|GPIO 18 - PWM0&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
| +3.3V from RPi&lt;br /&gt;
| +3.3V&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|24&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|25&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|SDA : Bidirectional Serial Data for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SDA&lt;br /&gt;
|-&lt;br /&gt;
|28&lt;br /&gt;
|SCL : Clock for I²C bus 0 (EEPROM)&lt;br /&gt;
|I2C0 SCL&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|30&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Fan PWM&lt;br /&gt;
|GPIO 13 - PWM1&lt;br /&gt;
|-&lt;br /&gt;
|34&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|35&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|36&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|38&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|-&lt;br /&gt;
|39&lt;br /&gt;
|GND : Ground&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|40&lt;br /&gt;
| --&lt;br /&gt;
| --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Electronic components ==&lt;br /&gt;
[[Image:Composants.png|360px|right]]&lt;br /&gt;
The PiSerialPower RPi Hat has been created using [http://www.kicad-pcb.org/display/KICAD/ KiCad EDA software] suite for the creation of the schematics and printed circuit boards.&lt;br /&gt;
&lt;br /&gt;
See below for the full schematics. The sources for the schematics are available for download [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here].&lt;br /&gt;
&lt;br /&gt;
=== HAT Main Components Description ===&lt;br /&gt;
* U1 : TI TPS54302 DC-DC step-down converter.&lt;br /&gt;
* U2 : FTDI FT230XS USB to UART bridge.&lt;br /&gt;
* U5 : NXP PCF85363 RTC Clock.&lt;br /&gt;
* U6 : TI TMP101 I²C temperature sensor.&lt;br /&gt;
* U7 : ST M24C64 8KB EEPROM&lt;br /&gt;
* U8 : WS2812B user RGB led.&lt;br /&gt;
* D1 : Input power Presence.&lt;br /&gt;
* D2 : Green led : FTDI Rx activity.&lt;br /&gt;
* D3 : Orange led : FTDI Tx activity.&lt;br /&gt;
* D4 : USB FTDI Power OK.&lt;br /&gt;
* D5 : +3.3V Power from RPi.&lt;br /&gt;
* D6 : +5V to RPi.&lt;br /&gt;
* D7 : +5V from RPi.&lt;br /&gt;
* SW1 : Reset button.&lt;br /&gt;
* J1 : EEPROM write protection jumper (remove for write protection)&lt;br /&gt;
&lt;br /&gt;
=== USB to UART bridge ===&lt;br /&gt;
[[Image:Prog.png|450px|right]]&lt;br /&gt;
In order to ease the development process on Raspberry Pi the HAT provides an USB to UART bridge.&amp;lt;br /&amp;gt;&lt;br /&gt;
This bridge is made by a FTDI FT230XS chip, which is well supported on most operating systems so there is usually no configuration required to use it as a serial line on the host development system.&lt;br /&gt;
It provides a 3.3V regulated voltage for the UART interface but does not power the HAT or the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
The FTDI chip controls two &amp;quot;activity&amp;quot; leds for Rx (D2, the green one) and Tx (D3, orange one) data over the serial link.&lt;br /&gt;
&lt;br /&gt;
The USB to UART bridge is connected to UART0 (pins 8 and 10) on the RPi connector. On most variants of  the RPi boards this interface must be activated manually in the device tree or in the bootloader configuration on the first partition of the SD card. Refer to the Raspberry Pi User Manual and online documentation and other ressources for more information on how to activate this interface.&lt;br /&gt;
&lt;br /&gt;
=== I²C ===&lt;br /&gt;
The PiSerialPower RPi Hat uses both I²C busses from the RPi connector.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 0 holds the required EEPROM for HAT identification and configuration, at address 0x50.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bus 1 holds the TMP101 temperature sensor at address 0x4A and the PCF85363 RTC clock at address 0x51.&lt;br /&gt;
&lt;br /&gt;
The following table shows all the possible I²C Addresses for the I²C components used on the HAT.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|I²C Addresses&lt;br /&gt;
|-&lt;br /&gt;
| I²C Component&lt;br /&gt;
| 7 bits I²C address&lt;br /&gt;
| I²C Address + R / W bit&lt;br /&gt;
|-&lt;br /&gt;
|TMP101 Temperature sensor&lt;br /&gt;
|0x4A&lt;br /&gt;
|0x94 / 0x95&lt;br /&gt;
|-&lt;br /&gt;
|PCF85363 RTC Clock&lt;br /&gt;
|0x51&lt;br /&gt;
|0xA2 / 0xA3&lt;br /&gt;
|-&lt;br /&gt;
|24C64 EEPROM&lt;br /&gt;
|0x50&lt;br /&gt;
|0xA0 / 0xA1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RTC Clock ====&lt;br /&gt;
[[Image:RTC.png|360px|right]]&lt;br /&gt;
The HAT includes a PCF85363 RTC with super-capacitor power backup.&amp;lt;br /&amp;gt;&lt;br /&gt;
The use of a Super-capacitor for power backup lowers the environmental footprint and remove the need to replace (and dispose of) the battery at the expense of a shorter time retention, which is between one and two months, but should be enough for most applications.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the PCF85363 RTC in the rtc-pcf85363 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
After loading the rtc-pcf85363 module in the kernel, you must add the RTC to the list of devices on the I²C bus 1 :&lt;br /&gt;
 echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can the access the RTC from &amp;lt;code&amp;gt;/dev/rtc0&amp;lt;/code&amp;gt; or with the &amp;lt;code&amp;gt;hwclock&amp;lt;/code&amp;gt; command (from the &amp;lt;code&amp;gt;util-linux&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Temperature sensor ====&lt;br /&gt;
[[Image:TMP101.png|360px|right]]&lt;br /&gt;
The HAT has a TMP101 temperature sensor (from Texas Instrument) on the I²C bus 1 (address 0x94 / 0x95).&lt;br /&gt;
&lt;br /&gt;
This temperature sensor has an &amp;quot;alert&amp;quot; function available through a dedicated pin. This pin is routed to pin 11 of the RPI connector (GPIO0_17) which allows the temperature sensor to send an event to the Raspberry Pi.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual for more information on how to use this signal, and to the TMP101 documentation for more information on the temperature alert signal.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel has support for the TMP101 temperature sensor in the lm75 module.&amp;lt;br /&amp;gt;&lt;br /&gt;
Once the lm75 module is loaded in the kernel, you must add the TMP101 sensor to the list of devices on the I²C bus 1 :&amp;lt;br /&amp;gt;&lt;br /&gt;
 echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
This is not necessary if the device tree is loaded from the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can then read the temperature using the &amp;lt;code&amp;gt;sensors&amp;lt;/code&amp;gt; command, which is provided by the &amp;lt;code&amp;gt;lm-sensors&amp;lt;/code&amp;gt; package on Debian based GNU/Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== EEPROM ====&lt;br /&gt;
[[Image:EEPROM.png|360px|right]]&lt;br /&gt;
In order to respect the Pi HAT design requirements the HAT has a 24C64 (8Kbyte) EEPROM on I²C bus 0 at I²C address 0x50 (7bits).&amp;lt;br /&amp;gt;&lt;br /&gt;
This EEPROM holds identification data and the HAT device tree blob which is loaded by the Linux kernel to enable the components (RTC and temperature sensor) found on the HAT.&amp;lt;br /&amp;gt;&lt;br /&gt;
The EEPROM has a write protection pin which must be left floating or driven low to allow write operation. The control of the state of this write protection pin is made by the J1 jumper. When the jumper is present, the pin is driven low and the user can write to the EEPROM.&amp;lt;br /&amp;gt;&lt;br /&gt;
Removing the jumper disables write operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset Button ===&lt;br /&gt;
[[Image:Reset.png|360px|right]]&lt;br /&gt;
The module has a reset button, connected directly to the enable pin of the step down regulator.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pressing the button removes power from this power source, which will immediately shut down the Raspberry Pi if it has no other power source, or do nothing if the RPi is also powered from its type C USB connector or any other way.&lt;br /&gt;
&lt;br /&gt;
=== FAN ===&lt;br /&gt;
[[Image:Fan.png|360px|right]]&lt;br /&gt;
The module has a 25mm cooling FAN controlled by pin 33 of the RPI connector (GPIO_13 - PWM1).&amp;lt;br /&amp;gt;&lt;br /&gt;
This pin is PWM capable, which allows you to control the FAN speed, though the fan used has an internal controller which prevents direct control using PWM, so we added a simple charge pump to modulate the fan voltage, which has the effect of modifying the FAN speed.&lt;br /&gt;
&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control the PWM output.&lt;br /&gt;
&lt;br /&gt;
=== User RGB Led ===&lt;br /&gt;
[[Image:RGBLed.png|360px|right]]&lt;br /&gt;
The module has one WS2812B RGB Led connected to pin 12 of the RPI connector (GPIO_18 - PWM0). This Led is available for the user.&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to the Raspberry Pi User Manual and online documentation and other resources for more information on how to control this WS2812B RGB Led.&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Official and custom images ===&lt;br /&gt;
* [https://blog.cloudkernels.net/posts/rpi4-64bit-image/ Build a 64bit bootable image for a Raspberry Pi 4] (CloudKernels)&lt;br /&gt;
* [https://wiki.debian.org/RaspberryPi Raspberry Pi information on Debian wiki]&lt;br /&gt;
* [https://www.raspberrypi.org/downloads/ Raspberry Pi official images download] and [https://www.raspberrypi.org/documentation/installation/installing-images/README.md installation instructions]&lt;br /&gt;
&lt;br /&gt;
=== I2C : RTC, EEPROM and temperature sensor support ===&lt;br /&gt;
Kernel Modules (use modprobe to load them if they are not already loaded or included in the main kernel image) :&lt;br /&gt;
* RTC : rtc-pcf85363.ko&lt;br /&gt;
* TMP101 : lm75.ko&lt;br /&gt;
* EEPROM : at24.ko&lt;br /&gt;
&lt;br /&gt;
Check that the components are detected :&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 1&lt;br /&gt;
: [...]&lt;br /&gt;
: 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- -- &lt;br /&gt;
: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
* root@raspberrypi:~# i2cdetect 0&lt;br /&gt;
: [...]&lt;br /&gt;
: 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
: [...]&lt;br /&gt;
&lt;br /&gt;
* echo tmp101 0x4a &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
* echo 24c64 0x50 &amp;gt; /sys/bus/i2c/devices/i2c-0/new_device&lt;br /&gt;
* echo pcf85363 0x51 &amp;gt; /sys/bus/i2c/devices/i2c-1/new_device&lt;br /&gt;
&lt;br /&gt;
=== GPIO ===&lt;br /&gt;
GPIO support with Raspberry-Pi is a real pain.&amp;lt;br /&amp;gt;&lt;br /&gt;
Obviously, people do not understand what &amp;quot;stable&amp;quot; means, and try to create new interfaces for GPIO both from the kernel and from the userspace, each supposed to be the very best one, but none usable, making about every piece of information obsolete.&lt;br /&gt;
&lt;br /&gt;
==== PWM Support for FAN control ====&lt;br /&gt;
* Device tree information :&lt;br /&gt;
: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/pwm-overlay.dts&lt;br /&gt;
: https://www.raspberrypi.org/forums/viewtopic.php?t=222428&lt;br /&gt;
&lt;br /&gt;
* Solution using pigpio (pigpiod daemon) and pigs for hardware PWM&lt;br /&gt;
 pigpiod&lt;br /&gt;
 pigs hp 13 100000 0&lt;br /&gt;
 pigs hp 13 100000 30000&lt;br /&gt;
 pigs hp 13 100000 1000000&lt;br /&gt;
 killall pigpiod&lt;br /&gt;
Remember to kill pigpiod or it will burn your processor to death. PWM keeps running after pigpiod is killed.&lt;br /&gt;
&lt;br /&gt;
=== WS2812B Support ===&lt;br /&gt;
The WS2812B is connected to pin 12 of the Raspberry Pi connector, which is gpio 18 - PWM0 &amp;lt;br /&amp;gt;&lt;br /&gt;
I gathered various information, I hope it will be usefull :&lt;br /&gt;
* https://pinout.xyz/pinout/pin12_gpio18#&lt;br /&gt;
* https://github.com/pimoroni/unicorn-hat&lt;br /&gt;
* https://github.com/richardghirst/rpi_ws281x et https://github.com/jgarff/rpi_ws281x&lt;br /&gt;
&lt;br /&gt;
=== dtb generation and eeprom flash ===&lt;br /&gt;
DTB sources :&lt;br /&gt;
* [https://github.com/raspberrypi/linux/tree/rpi-4.19.y/arch/arm/boot/dts/overlays List of overlays] on Raspberry Pi&#039;s official git repository&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/overlay.dts overlay.dts]&lt;br /&gt;
&lt;br /&gt;
You will also need eepromutils to flash the EEPROM : &lt;br /&gt;
* [https://github.com/raspberrypi/hats/tree/master/eepromutils eepromutils from Raspberry Pi&#039;s official git repository]&lt;br /&gt;
* Our [http://techdata.techno-innov.fr/Adapters/PiSerialPower/eeprom_settings.txt eeprom_settings.txt]&lt;br /&gt;
&lt;br /&gt;
Generate the dtbo and flash the EEPROM (&#039;&#039;&#039;Note&#039;&#039;&#039; : the write protection jumper must be &amp;quot;on&amp;quot; in order to flash the EEPROM) :&lt;br /&gt;
 dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts&lt;br /&gt;
 dtoverlay overlay.dtbo&lt;br /&gt;
 ./eepmake eeprom_settings.txt myhat.eep overlay.dtbo&lt;br /&gt;
 ./eepflash.sh -w -f=myhat.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
You can erase the EEPROM with the following command (blank.eep is an 8Kb file filled with zeroes) :&lt;br /&gt;
 ./eepflash.sh -w -f=blank.eep -t=24c64 -a=50 -d=0&lt;br /&gt;
&lt;br /&gt;
== Links to various Raspberry Pi information ==&lt;br /&gt;
=== Raspberry Pi 4 specs ===&lt;br /&gt;
* https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/&lt;br /&gt;
&lt;br /&gt;
=== Hats mechanical data ===&lt;br /&gt;
* https://github.com/raspberrypi/hats/blob/master/designguide.md&lt;br /&gt;
* [https://github.com/raspberrypi/hats/blob/master/hat-board-mechanical.pdf hat-board-mechanical.pdf]&lt;br /&gt;
* https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/&lt;br /&gt;
&lt;br /&gt;
=== EEPROM ID ===&lt;br /&gt;
* https://www.raspberrypi.org/forums/viewtopic.php?t=108134&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Pinouts ===&lt;br /&gt;
* https://pinout.xyz/pinout/&lt;br /&gt;
&lt;br /&gt;
== TODO List ==&lt;br /&gt;
* Test over-voltage protection with 28V zener diode and/or add resetable fuse on power input&lt;br /&gt;
* Manage to sell a few (or many) boards ! Orders welcome !&lt;br /&gt;
&lt;br /&gt;
== Schematics, sources and PDF of documentation ==&lt;br /&gt;
* Current documentation (PDF subpart of what&#039;s on this page) [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower.pdf here]&lt;br /&gt;
* Sources for the schematics [http://techdata.techno-innov.fr/Adapters/PiSerialPower/PiSerialPower_Schematics.tar.bz2 here]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== v0.1 ===&lt;br /&gt;
This board revision has not been sold to public. First prototype version, produced on customer request.&lt;br /&gt;
=== v0.2 ===&lt;br /&gt;
Actual version sold as of writting of this documentation. Fixes v01 mistakes and adds PWM for the FAN and a RGB led.&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=File:RGBLed.png&amp;diff=60</id>
		<title>File:RGBLed.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=File:RGBLed.png&amp;diff=60"/>
		<updated>2020-09-04T16:23:46Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=File:Fan.png&amp;diff=59</id>
		<title>File:Fan.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=File:Fan.png&amp;diff=59"/>
		<updated>2020-09-04T16:23:31Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
	<entry>
		<id>https://wiki.techno-innov.fr/index.php?title=File:Reset.png&amp;diff=58</id>
		<title>File:Reset.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.techno-innov.fr/index.php?title=File:Reset.png&amp;diff=58"/>
		<updated>2020-09-04T16:23:16Z</updated>

		<summary type="html">&lt;p&gt;Nathael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nathael</name></author>
	</entry>
</feed>