<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[pxbee-trigger]]></title><description><![CDATA[<p dir="auto"><a href="https://github.com/exsilium/pxbee-trigger" rel="nofollow ugc">Github Project</a></p>
<p dir="auto">The project uses Programmable XBee connected to a relay. When appropriate signal is received, the relay is operated for 125ms signaling the connected device to operate. To control this device through iPhone "Home" app the following full setup is used:</p>
<div class="mermaid">graph LR
iPhone --&gt; Apple[Apple Servers]
Apple --&gt; Home[Home Router]
Home --&gt; AppleTV
AppleTV --&gt;RaspberryPi
RaspberryPi --&gt; XBee[XBee Coordinator]
XBee --&gt; XBee-Trigger
</div>
<p dir="auto">Potentially with SmartThings:</p>
<div class="mermaid">graph LR
iPhone --&gt; STServers[SmartThings Servers]
STServers --&gt; Home[Home Router]
Home --&gt; SmartThings
SmartThings --&gt; XBee-Trigger
</div>
<p dir="auto">For the latter flow to work, the XBee-Trigger would need to operate as a standard ZigBee HA device so that it would successfully pair with SmartThings Hub. Some additional discovery work is needed to understand what is needed to make this work.</p>
]]></description><link>https://sten.pw/bb/topic/18/pxbee-trigger</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Mar 2026 04:03:23 GMT</lastBuildDate><atom:link href="https://sten.pw/bb/topic/18.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Jun 2017 08:35:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to pxbee-trigger on Sat, 17 Apr 2021 14:07:48 GMT]]></title><description><![CDATA[<p dir="auto">Moving from Eagle to Fusion 360</p>
<p dir="auto">Migration video: <a href="https://www.youtube.com/watch?v=tClWJg8zxZc" rel="nofollow ugc">https://www.youtube.com/watch?v=tClWJg8zxZc</a></p>
<p dir="auto">Benefits of the Fusion 360</p>
<ul>
<li>F allows one schematic to reference multiple board layouts! e.g. TH vs SMD?</li>
</ul>
]]></description><link>https://sten.pw/bb/post/122</link><guid isPermaLink="true">https://sten.pw/bb/post/122</guid><dc:creator><![CDATA[exile]]></dc:creator><pubDate>Sat, 17 Apr 2021 14:07:48 GMT</pubDate></item><item><title><![CDATA[Reply to pxbee-trigger on Thu, 25 Mar 2021 18:37:44 GMT]]></title><description><![CDATA[<p dir="auto">Apparently the 24VAC to DC circuit does not work correctly because the DC/DC conversion to 3.3V doesn't seem to properly work. Is the full bridge rectifier with wrong specs? <a href="https://rayshobby.net/wordpress/24vac-to-5vdc-conversion/" rel="nofollow ugc">https://rayshobby.net/wordpress/24vac-to-5vdc-conversion/</a></p>
<p dir="auto">Ok, some clarity is beginning to form around where I went wrong... ouch.</p>
<h1>Simulators</h1>
<ul>
<li><a href="http://lushprojects.com/circuitjs/circuitjs.html" rel="nofollow ugc">http://lushprojects.com/circuitjs/circuitjs.html</a></li>
<li><a href="http://www.spectrum-soft.com/download/download.shtm" rel="nofollow ugc">http://www.spectrum-soft.com/download/download.shtm</a></li>
</ul>
<h1>Signal strength</h1>
<p dir="auto">RSSI - Receiver Signal Strength Indication<br />
LQI - Link Quality Index</p>
<p dir="auto">EDGE interrupt for HIGH and LOW (gpio.c):</p>
<pre><code>#ifdef KBI1PE_KBIPE3_XPIN
#ifdef KBI1PE_KBIPE3_XPIN /* XPIN_19 */
		if (irqcandidate &amp; 0x08) {
			if (kbimod1_reg &amp; 0x08) {
				KBI1ES_KBEDG3 = !KBI1ES_KBEDG3;
				if (~(kbi1_val ^ kbiedg1_reg) &amp; 0x08)
				if (~(kbi1_val ^ kbiedg1_reg) &amp; 0x08) {
					/* Edge irq on active slope */
					puts("IRQ EDGE: Active slope");
					gpio_irq_handler_KBI1PE_KBIPE3_XPIN();
				}
				else {
				  puts("IRQ EDGE: Inactive slope");
				}
			} else {
				gpio_irq_handler_KBI1PE_KBIPE3_XPIN();		/* Level irq */
			}
		}
#endif
</code></pre>
]]></description><link>https://sten.pw/bb/post/103</link><guid isPermaLink="true">https://sten.pw/bb/post/103</guid><dc:creator><![CDATA[exile]]></dc:creator><pubDate>Thu, 25 Mar 2021 18:37:44 GMT</pubDate></item><item><title><![CDATA[Reply to pxbee-trigger on Fri, 27 Mar 2020 21:44:37 GMT]]></title><description><![CDATA[<p dir="auto">Useful Eagle commands:</p>
<ul>
<li><code>grid mm</code></li>
<li><code>grid mil</code></li>
<li><code>run length</code></li>
<li><code>via 'gnd'</code></li>
<li><code>ratsnest</code></li>
<li><code>ripup @;</code> - Changes routed wires back to airwires for all polygons (Usually GND plane)</li>
</ul>
]]></description><link>https://sten.pw/bb/post/99</link><guid isPermaLink="true">https://sten.pw/bb/post/99</guid><dc:creator><![CDATA[exile]]></dc:creator><pubDate>Fri, 27 Mar 2020 21:44:37 GMT</pubDate></item><item><title><![CDATA[Reply to pxbee-trigger on Fri, 17 Jul 2020 11:26:24 GMT]]></title><description><![CDATA[<p dir="auto">4 channel relay circuit driven by pxbee-trigger</p>
<h2>BOM</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Component</th>
<th>Manufacturer</th>
<th>Quantity</th>
<th>SKU / Part nr.</th>
<th>Specification</th>
<th>Option</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://www.digi.com/products/xbee-rf-solutions/rf-modules/xbee-zigbee#partnumbers" rel="nofollow ugc">Programmable XBee</a> (with RPSMA)</td>
<td><a href="https://www.digi.com" rel="nofollow ugc">Digi</a></td>
<td>1</td>
<td>XBP24CZ7SITB003</td>
<td><a href="http://www.digi.com/resources/documentation/digidocs/pdfs/90002002.pdf" rel="nofollow ugc">PDF</a></td>
<td></td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/512-DF005M" rel="nofollow ugc">Bridge Rectifier DF005M</a></td>
<td><a href="https://www.onsemi.com" rel="nofollow ugc">ON Semiconductor</a></td>
<td>1</td>
<td>Mouser No: 512-DF005M</td>
<td><a href="https://www.mouser.ee/datasheet/2/308/DF005M-1305280.pdf" rel="nofollow ugc">PDF</a></td>
<td></td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/436-MGFS1R5243R3" rel="nofollow ugc">DC/DC Isolated Converter Cosel MGFS1R5243R3</a></td>
<td><a href="https://www.coseleurope.eu" rel="nofollow ugc">Cosel</a></td>
<td>1</td>
<td>Mouser No: 436-MGFS1R5243R3</td>
<td><a href="https://www.mouser.ee/datasheet/2/622/SFE_MGFS-1115632.pdf" rel="nofollow ugc">PDF</a></td>
<td></td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/512-BC548BTA" rel="nofollow ugc">Bipolar Transistor BC548BTA</a></td>
<td><a href="https://www.onsemi.com" rel="nofollow ugc">ON Semiconductor</a></td>
<td>4</td>
<td>Mouser No: 512-BC548BTA</td>
<td><a href="https://www.mouser.ee/datasheet/2/308/BC548-1118644.pdf" rel="nofollow ugc">PDF</a></td>
<td></td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/863-1N4004RLG" rel="nofollow ugc">Diode 1N4004</a></td>
<td><a href="https://www.onsemi.com" rel="nofollow ugc">ON Semiconductor</a></td>
<td>4</td>
<td>Mouser No: 863-1N4004RLG</td>
<td><a href="https://www.mouser.ee/datasheet/2/308/1N4001-D-110363.pdf" rel="nofollow ugc">PDF</a></td>
<td></td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/769-APAN3103" rel="nofollow ugc">General Purpose Relay (APAN3103)</a></td>
<td><a href="https://industrial.panasonic.com" rel="nofollow ugc">Panasonic</a></td>
<td>4</td>
<td>Mouser No: 769-APAN3103</td>
<td><a href="https://www.mouser.ee/datasheet/2/315/mech_eng_pan-1299258.pdf" rel="nofollow ugc">PDF</a></td>
<td></td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/71-RN55D1801FB14" rel="nofollow ugc">Resistor RN55D1801FB14</a></td>
<td><a href="https://www.vishay.com" rel="nofollow ugc">Vishay</a></td>
<td>4</td>
<td>Mouser No: 71-RN55D1801FB14</td>
<td><a href="https://www.mouser.ee/datasheet/2/427/cmfmil-109690.pdf" rel="nofollow ugc">PDF</a></td>
<td></td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/855-M22-7131042" rel="nofollow ugc">10 pin header for XBee</a></td>
<td><a href="https://www.harwin.com" rel="nofollow ugc">Harwin</a></td>
<td>2</td>
<td>Mouser No: 855-M22-7131042</td>
<td><a href="https://www.mouser.ee/datasheet/2/181/M22-713-1134021.pdf" rel="nofollow ugc">PDF</a></td>
<td></td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/538-39501-1002" rel="nofollow ugc">2 pin Terminal Block (PCB)</a></td>
<td><a href="https://www.molex.com" rel="nofollow ugc">Molex</a></td>
<td>1</td>
<td>Mouser No: 538-39501-1002</td>
<td><a href="https://www.mouser.ee/datasheet/2/276/0395011002_TERMINAL_BLOCKS-163759.pdf" rel="nofollow ugc">PDF</a></td>
<td>A</td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/538-39500-0002" rel="nofollow ugc">2 pin Terminal Plug</a></td>
<td><a href="https://www.molex.com" rel="nofollow ugc">Molex</a></td>
<td>1</td>
<td>Mouser No: 538-39500-0002</td>
<td><a href="https://www.mouser.ee/datasheet/2/276/0395000002_TERMINAL_BLOCKS-136229.pdf" rel="nofollow ugc">PDF</a></td>
<td>A</td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/538-39501-1009" rel="nofollow ugc">9 pin Terminal Block (PCB)</a></td>
<td><a href="https://www.molex.com" rel="nofollow ugc">Molex</a></td>
<td>1</td>
<td>Mouser No: 538-39501-1009</td>
<td><a href="https://www.mouser.ee/datasheet/2/276/0395011009_TERMINAL_BLOCKS-163629.pdf" rel="nofollow ugc">PDF</a></td>
<td>A</td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/651-1908101" rel="nofollow ugc">9 pin Terminal Plug</a></td>
<td><a href="https://www.molex.com" rel="nofollow ugc">Molex</a></td>
<td>1</td>
<td>Mouser No: 651-1908101</td>
<td><a href="https://www.mouser.ee/datasheet/2/276/0395000009_TERMINAL_BLOCKS-163669.pdf" rel="nofollow ugc">PDF</a></td>
<td>A</td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/538-39357-0002" rel="nofollow ugc">2 pin Fixed Terminal Block (PCB)</a></td>
<td><a href="https://www.molex.com" rel="nofollow ugc">Molex</a></td>
<td>1</td>
<td>Mouser No: 538-39357-0002</td>
<td><a href="https://www.mouser.ee/datasheet/2/276/0393570002_TERMINAL_BLOCKS-227759.pdf" rel="nofollow ugc">PDF</a></td>
<td>B</td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/538-39357-0009" rel="nofollow ugc">9 pin Fixed Terminal Block (PCB)</a></td>
<td><a href="https://www.molex.com" rel="nofollow ugc">Molex</a></td>
<td>1</td>
<td>Mouser No: 538-39357-0009</td>
<td><a href="https://www.mouser.ee/datasheet/2/276/0393570009_TERMINAL_BLOCKS-136250.pdf" rel="nofollow ugc">PDF</a></td>
<td>B</td>
</tr>
<tr>
<td><a href="https://www.mouser.ee/ProductDetail/712-ANT-2.4-CW-RAH" rel="nofollow ugc">Antenna with RP-SMA Connector</a></td>
<td><a href="https://linxtechnologies.com" rel="nofollow ugc">Linx Technologies</a></td>
<td>1</td>
<td>Mouser No: 712-ANT-2.4-CW-RAH</td>
<td><a href="https://www.mouser.ee/datasheet/2/238/ant-2.4-cw-rah-ccc-1659143.pdf" rel="nofollow ugc">PDF</a></td>
<td></td>
</tr>
</tbody>
</table>
<p dir="auto">Standard 3.5 width headers are used. Option A) uses pluggable termination; <img src="https://sten.pw/bb/assets/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60e.png?v=khf2ggssp0s" class="not-responsive emoji emoji-emoji-one emoji--smiling_face_with_sunglasses" title="B)" alt="😎" /> Fixed screw termination; Components can be easily switched with other termination blocks or use direct wire soldering.</p>
<h2>Power consumption / characteristics</h2>
<ul>
<li>Relay 110mW</li>
<li>XBee ~ 400mW +14mA ~= 450mW</li>
<li>DI / DO 4mA with total of 40mA</li>
<li>Output 13mW @ 3.3V</li>
</ul>
<h2>Switching transistor circuit</h2>
<p dir="auto">The digital output pin power of XBee will be insufficient to drive the general purpose relay. A switching transistor circuit will be used to drive the relay.\(\raisebox{0.25em}{1}\)</p>
<ul>
<li>\(V_s =\) Load Supply Voltage</li>
<li>\(R_L =\) Load Resistance (APAN03 Coil resistance)</li>
<li>\(I_c =\) Load Current \(= V_s / R_L\)</li>
<li>\(I_{IC} =\) Maximum Output current from Integrated Circuit - 4mA</li>
</ul>
<p dir="auto">Due to the fact that the switched load consists a coil, a protection diode is required in the circuit.</p>
<h3>Transistor properties</h3>
<ul>
<li>Transistor's maximum collector current \(I_{c_{max}}\) must be greater than Load current:</li>
</ul>
<pre><code class="language-math">I_{c_{max}} &gt; \frac{\text{Supply Voltage } V_s}{\text{Load Resistance } R_L}\Longrightarrow 100mA &gt; \frac{3.3V}{82\Omega} \approxeq 40.24mA \Longrightarrow 100mA &gt; 40.24mA \Longrightarrow \textcolor{#228B22}{OK!}
</code></pre>
<ul>
<li>Transistor's minimum current gain \(h_{FE{min}}\) must be at least <strong>5</strong> times the load current \(I_c\) divided by the maximum output urrent from the Integrated Circuit:</li>
</ul>
<pre><code class="language-math">h_{FE{min}} &gt; 5 \cdot \frac{I_c}{I_{IC}} \Longrightarrow 110 &gt; 5 \cdot \frac{0.040243902}{0.004} \Longrightarrow 110 &gt; 50.3048775 \Longrightarrow \textcolor{#228B22}{OK!}
</code></pre>
<h3>Resistor properties</h3>
<p dir="auto">The transistor switch circuit relies on a single resistor which is sized as follows.</p>
<pre><code class="language-math">R_B = 0.2 \cdot R_L \cdot h_{FE} \Longrightarrow0.2 \cdot 82 \cdot 110 = 1804 \Omega \Longrightarrow \textcolor{#228B22}{1k8}
</code></pre>
<h2>User interfaces - Door opener</h2>
<p dir="auto">Altough the trigger hardware is generic to drive different use-cases, the userland should have more precise functionality. As main use case, the trigger will be used to drive swing and sliding gates.</p>
<h3>BFT Thalia P controller</h3>
<p dir="auto">AUX 2 (Pins 24 &amp; 25) - Free Contact; NO; Gate open light as default.</p>
<p dir="auto">Assumption is here, that when gate is closed, the contact remains open and closes when the gate is opened.</p>
<p dir="auto">For our project, it means that the STATUS GPIO acts as:</p>
<ul>
<li>Closed state = GPIO pin = 1</li>
<li>Opened state = GPIO pin = 0</li>
</ul>
<h3>SmartThings</h3>
<h4>General reference</h4>
<p dir="auto">Icon library reference: <a href="http://scripts.3dgo.net/smartthings/icons/" rel="nofollow ugc">http://scripts.3dgo.net/smartthings/icons/</a></p>
<h4>Door opener DH</h4>
<p dir="auto">SmartThings does not work nicely with different endpoints. A custom Device Handler (DH) must be written to have proper functioning tiles but operate as a single device:</p>
<ol>
<li>Main toggle switch (endpoint 0xEA, 0x0006)</li>
<li>Open gate (endpoint 0xEB, cluster 0x0006)</li>
<li>Close gate (endpoint 0xEC, cluster 0x0006)</li>
<li>Open pedestrian (endpoint 0xED, cluster 0x0006)</li>
</ol>
<h5>Binary Input Cluster (0x000F)</h5>
<p dir="auto">On endpoints 0xEA and 0EB, a status indicator can be queried (XBee in 18 and Pin 19), default state is OPEN</p>
<p dir="auto">On state change send the: 0x0055 (Present value attribute), bool<br />
Report Attributes (0x0A) command to target cluster 0x0001</p>
<h2>Pin layout</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>PIN</th>
<th>Assignment</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>GND</td>
<td>Common for Input pins</td>
</tr>
<tr>
<td>2</td>
<td>STATUS_1</td>
<td>Input</td>
</tr>
<tr>
<td>3</td>
<td>STATUS_2</td>
<td>Input</td>
</tr>
<tr>
<td>4</td>
<td>COMMON 1</td>
<td>Relays 1 &amp; 2</td>
</tr>
<tr>
<td>5</td>
<td>ACT 1</td>
<td>Relay 1</td>
</tr>
<tr>
<td>6</td>
<td>ACT 2</td>
<td>Relay 2</td>
</tr>
<tr>
<td>7</td>
<td>COMMON 2</td>
<td>Relays 3 &amp; 4</td>
</tr>
<tr>
<td>8</td>
<td>ACT 3</td>
<td>Relay 3</td>
</tr>
<tr>
<td>9</td>
<td>ACT 4</td>
<td>Relay 4</td>
</tr>
</tbody>
</table>
<h2>References</h2>
<p dir="auto">1: Transistor Circuits - <a href="https://electronicsclub.info/transistorcircuits.htm" rel="nofollow ugc">https://electronicsclub.info/transistorcircuits.htm</a><br />
2: SmartThings Classic - ZigBee Reference - <a href="https://docs.smartthings.com/en/latest/ref-docs/zigbee-ref.html#zigbee-ref" rel="nofollow ugc">https://docs.smartthings.com/en/latest/ref-docs/zigbee-ref.html#zigbee-ref</a><br />
3: Undocumented SmartThings Classic ZigBee Reference - <a href="https://community.smartthings.com/t/zigbee-something-commands-reference/110615/5" rel="nofollow ugc">https://community.smartthings.com/t/zigbee-something-commands-reference/110615/5</a></p>
]]></description><link>https://sten.pw/bb/post/93</link><guid isPermaLink="true">https://sten.pw/bb/post/93</guid><dc:creator><![CDATA[exile]]></dc:creator><pubDate>Fri, 17 Jul 2020 11:26:24 GMT</pubDate></item></channel></rss>