<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://bigjungle.net/feed.xml" rel="self" type="application/atom+xml" /><link href="https://bigjungle.net/" rel="alternate" type="text/html" /><updated>2025-06-04T16:00:13+00:00</updated><id>https://bigjungle.net/feed.xml</id><title type="html">BigJungle Ltd</title><subtitle>BigJungle Ltd - Technology, IoT, and Innovation</subtitle><entry><title type="html">FarmBot is an open-source CNC farming machine</title><link href="https://bigjungle.net/blog/2016/06/07/farmbot-is-an-open-source-cnc-farming-machine/" rel="alternate" type="text/html" title="FarmBot is an open-source CNC farming machine" /><published>2016-06-07T19:55:49+00:00</published><updated>2016-06-07T19:55:49+00:00</updated><id>https://bigjungle.net/blog/2016/06/07/farmbot-is-an-open-source-cnc-farming-machine</id><content type="html" xml:base="https://bigjungle.net/blog/2016/06/07/farmbot-is-an-open-source-cnc-farming-machine/"><![CDATA[<blockquote>
  <p>“With hopes of reinventing the way food is grown, Rory Aronson has developed humanity’s first open-source CNC farming machine. The FarmBot Genesis — which will begin taking pre-orders in July — is capable of planting seeds and then watering them precisely.”</p>

  <p>— https://blog.arduino.cc/2016/06/07/farmbot-is-an-open-source-cnc-farming-machine/</p>
</blockquote>

<p>Arduino.cc have a nice write up of what looks to be a nice open source project; <a href="https://farmbot.io/">FarmBot Genesis</a></p>

<div class="embed-responsive embed-responsive-16by9">
  <iframe src="https://www.youtube.com/embed/uNkADHZStDE" frameborder="0" allowfullscreen="">
  </iframe>
</div>

<p>The FarmBot Genesis represents an exciting development in agricultural automation, combining open-source hardware with precision farming techniques. This CNC-style farming machine can autonomously plant seeds, water crops, and tend to gardens with minimal human intervention.</p>

<p>Key features of the FarmBot Genesis include:</p>

<ul>
  <li><strong>Open Source Design</strong>: Complete hardware and software designs are freely available</li>
  <li><strong>Precision Agriculture</strong>: Computer-controlled planting and watering systems</li>
  <li><strong>Modular Construction</strong>: Expandable and customizable for different garden sizes</li>
  <li><strong>Web Interface</strong>: Monitor and control your FarmBot remotely</li>
  <li><strong>Arduino-based</strong>: Built on familiar open-source hardware platforms</li>
</ul>

<p>This project exemplifies the potential of combining traditional agriculture with modern IoT and automation technologies.</p>]]></content><author><name>Jeremy Poulter</name></author><category term="Smart Garden" /><category term="Arduino" /><category term="arduino" /><category term="smarthome" /><summary type="html"><![CDATA[“With hopes of reinventing the way food is grown, Rory Aronson has developed humanity’s first open-source CNC farming machine. The FarmBot Genesis — which will begin taking pre-orders in July — is capable of planting seeds and then watering them precisely.” — https://blog.arduino.cc/2016/06/07/farmbot-is-an-open-source-cnc-farming-machine/ Arduino.cc have a nice write up of what looks to be a nice open source project; FarmBot Genesis The FarmBot Genesis represents an exciting development in agricultural automation, combining open-source hardware with precision farming techniques. This CNC-style farming machine can autonomously plant seeds, water crops, and tend to gardens with minimal human intervention. Key features of the FarmBot Genesis include: Open Source Design: Complete hardware and software designs are freely available Precision Agriculture: Computer-controlled planting and watering systems Modular Construction: Expandable and customizable for different garden sizes Web Interface: Monitor and control your FarmBot remotely Arduino-based: Built on familiar open-source hardware platforms This project exemplifies the potential of combining traditional agriculture with modern IoT and automation technologies.]]></summary></entry><entry><title type="html">EmonCMS and multiple OpenTRV nodes</title><link href="https://bigjungle.net/blog/2016/04/13/emoncms-and-multiple-opentrv-nodes/" rel="alternate" type="text/html" title="EmonCMS and multiple OpenTRV nodes" /><published>2016-04-13T19:55:49+00:00</published><updated>2016-04-13T19:55:49+00:00</updated><id>https://bigjungle.net/blog/2016/04/13/emoncms-and-multiple-opentrv-nodes</id><content type="html" xml:base="https://bigjungle.net/blog/2016/04/13/emoncms-and-multiple-opentrv-nodes/"><![CDATA[<p>As a follow up on my initial experiments with getting data from <a href="http://bigjungle.net/blog/2016/3/9/experiments-with-node-red">OpenTRV to Open Energy Monitor</a>, this post is going to build on that and add support for parsing data received from the other OpenTRV nodes other than the one directly connected via the USB serial.</p>

<h2 id="the-hardware">The Hardware</h2>

<p>The hardware I am using is a Rev 2 board as the receiver as described <a href="http://bigjungle.net/blog/2016/3/9/experiments-with-node-red">previously</a> and the transmitters are two Rev 11 boards. Due to the design of the firmware however this should work the same on any of the devices.</p>

<h2 id="firmware">Firmware</h2>

<p>To get these to talk to each other we need to ensure the firmware for on the receiver device has the <code class="language-plaintext highlighter-rouge">ENABLE_STATS_RX</code> build option defined and on the transmitting end <code class="language-plaintext highlighter-rouge">ENABLE_STATS_TX</code> needs to be defined.</p>

<h3 id="testing">Testing</h3>

<p>With the new firmware built and flashed it is time to power up and see what we get. Load up the Node-RED UI with the work sheet we created last time. Turn off all the debug nodes apart from the last one of the switch node. This will now only show the console output we are not parsing, (you may need to wait about 10 mins to see anything).</p>

<p>You should see some JSON output that looks suspiciously like the end of the status lines from last time. It is probably of no surprise that in fact in is the same format as the JSON part of the status text. So we already have the code to parse this text.</p>

<h2 id="parsing-the-output">Parsing The Output</h2>

<p>First things first though, we need to separate out the JSON lines from the rest of the unhandled Lines. Double click on the switch node and add a new entry above the otherwise entry. Set this to look for a regex and enter the following:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>^{
</code></pre></div></div>

<p>This will now pull out the JSON by detecting the opening <code class="language-plaintext highlighter-rouge">{</code>.</p>

<p>Now connect a new function node to a new switch output and grab the JSON code we wrote before:</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">obj</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="dl">'</span><span class="s1">{</span><span class="dl">'</span><span class="o">+</span><span class="nx">parts</span><span class="p">[</span><span class="mi">16</span><span class="p">]</span><span class="o">+</span><span class="dl">'</span><span class="s1">}</span><span class="dl">'</span><span class="p">);</span>
<span class="k">for</span><span class="p">(</span><span class="kd">var</span> <span class="nx">i</span> <span class="k">in</span> <span class="nx">obj</span><span class="p">)</span> 
<span class="p">{</span>
    <span class="k">switch</span><span class="p">(</span><span class="nx">i</span><span class="p">)</span>
    <span class="p">{</span>
        <span class="k">case</span> <span class="dl">'</span><span class="s1">@</span><span class="dl">'</span><span class="p">:</span>
            <span class="k">break</span><span class="p">;</span>
        <span class="k">case</span> <span class="dl">'</span><span class="s1">T|C16</span><span class="dl">'</span><span class="p">:</span>
            <span class="k">break</span><span class="p">;</span>
        <span class="nl">default</span><span class="p">:</span>
    <span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>

<p>We have to make a few changes to make this stand alone. First the JSON is coming from <code class="language-plaintext highlighter-rouge">msg.payload</code> rather than parts[16] and we are going to write the parsed output back directly to <code class="language-plaintext highlighter-rouge">msg.payload</code>. The reason for this will become clear soon.</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">json</span> <span class="o">=</span> <span class="nx">msg</span><span class="p">.</span><span class="nx">payload</span><span class="p">;</span>
<span class="nx">msg</span><span class="p">.</span><span class="nx">payload</span> <span class="o">=</span> <span class="p">{};</span>

<span class="kd">var</span> <span class="nx">obj</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">json</span><span class="p">);</span>
<span class="k">for</span><span class="p">(</span><span class="kd">var</span> <span class="nx">i</span> <span class="k">in</span> <span class="nx">obj</span><span class="p">)</span> 
<span class="p">{</span>
    <span class="k">switch</span><span class="p">(</span><span class="nx">i</span><span class="p">)</span>
    <span class="p">{</span>
        <span class="k">case</span> <span class="dl">'</span><span class="s1">@</span><span class="dl">'</span><span class="p">:</span>
            <span class="k">break</span><span class="p">;</span>
        <span class="k">case</span> <span class="dl">'</span><span class="s1">T|C16</span><span class="dl">'</span><span class="p">:</span>
            <span class="k">break</span><span class="p">;</span>
        <span class="nl">default</span><span class="p">:</span>
    <span class="p">}</span>
<span class="p">}</span>

<span class="k">return</span> <span class="nx">msg</span><span class="p">;</span>
</code></pre></div></div>

<h2 id="sending-to-emoncms">Sending to EmonCMS</h2>

<p>Now all that is left to do disconnect the function output to the EmonCMS node, or is it? You may have noticed I the previous example that we entered the EmonCMS node ID in the settings of the EmonCMS node in Node-RED. Now we are receiving from more than one OpenTRV device we need to translate the OpenTRV ID to an EmonCMS node ID. So we need to write a function to map the IDs from one system to another.</p>

<p>Place a function node after the two parsing nodes and before the EmonCMS node:</p>

<p>Our parsing code is writing the OpenTRV ID in to <code class="language-plaintext highlighter-rouge">msg.nodeid</code> and if the <code class="language-plaintext highlighter-rouge">Node</code> setting is left blank the EmonCMS node will use <code class="language-plaintext highlighter-rouge">msg.nodegroup</code> for the <code class="language-plaintext highlighter-rouge">Node</code>. This can be done with the following:</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">nodeMapping</span> <span class="o">=</span> <span class="p">{</span>
    <span class="dl">'</span><span class="s1">f9ea</span><span class="dl">'</span><span class="p">:</span> <span class="mi">26</span><span class="p">,</span>
    <span class="dl">'</span><span class="s1">a7de</span><span class="dl">'</span><span class="p">:</span> <span class="mi">27</span>
<span class="p">};</span>

<span class="k">if</span><span class="p">(</span><span class="nx">msg</span><span class="p">.</span><span class="nx">nodeid</span> <span class="o">&amp;&amp;</span> <span class="nx">nodeMapping</span><span class="p">[</span><span class="nx">msg</span><span class="p">.</span><span class="nx">nodeid</span><span class="p">])</span> <span class="p">{</span>
    <span class="nx">msg</span><span class="p">.</span><span class="nx">nodegroup</span> <span class="o">=</span> <span class="nx">nodeMapping</span><span class="p">[</span><span class="nx">msg</span><span class="p">.</span><span class="nx">nodeid</span><span class="p">];</span>
<span class="p">}</span>

<span class="k">return</span> <span class="nx">msg</span><span class="p">;</span>
</code></pre></div></div>

<p>You will need to alter the content of <code class="language-plaintext highlighter-rouge">nodeMapping</code> for your environment.</p>

<p>As we are dealing with more than just <code class="language-plaintext highlighter-rouge">msg.payload</code> it is handy to debug the whole <code class="language-plaintext highlighter-rouge">msg object</code>. To do this you can open a debug node’s settings (double click it) and change the Output to <code class="language-plaintext highlighter-rouge">complete msg object</code>.</p>

<p>The other change we need to make is to clear the fixed <code class="language-plaintext highlighter-rouge">Node</code> setting in the EmonCMS node. Open the EmonCMS node settings and delete anything in the <code class="language-plaintext highlighter-rouge">Node</code> setting. Don’t worry if the setting highlights red, this can be ignored as we are passing in the setting for this value. A warning may also be given when deploying, this too can be ignored.</p>

<p>We can now deploy the sheet and it should look something like this.</p>

<p>If all is working you should now see all the OpenTRV nodes showing data in your EmonCMS.</p>

<h2 id="making-improvements">Making Improvements</h2>

<p>We could leave it there, but there is a bit of tidy up we can do to help reduce the maintenance. For example the newer versions of the firmware send the battery level using <code class="language-plaintext highlighter-rouge">B|cV</code>. To add support for this we would have to edit two similar pieces of code. We can easily update the code to put all the JSON parsing in a single node.</p>

<p>Instead of parsing the JSON in the <code class="language-plaintext highlighter-rouge">OpenTRV Parse Status</code> we can pass the JSON along to the <code class="language-plaintext highlighter-rouge">OpenTRV Parse JSON</code> node so it can be parse there. Let’s disconnect the output of the <code class="language-plaintext highlighter-rouge">OpenTRV Parse Status</code> from the EmonCMS node and to the input of the <code class="language-plaintext highlighter-rouge">OpenTRV Parse JSON</code> so we have a unified parsing approach.</p>

<p>This approach provides a more maintainable solution for handling multiple OpenTRV nodes and ensures consistent data processing across all connected devices.</p>]]></content><author><name>Jeremy Poulter</name></author><category term="Smart Home" /><category term="Energy Monitoring" /><category term="opentrv" /><category term="emoncms" /><category term="iot" /><category term="node-red" /><summary type="html"><![CDATA[As a follow up on my initial experiments with getting data from OpenTRV to Open Energy Monitor, this post is going to build on that and add support for parsing data received from the other OpenTRV nodes other than the one directly connected via the USB serial. The Hardware The hardware I am using is a Rev 2 board as the receiver as described previously and the transmitters are two Rev 11 boards. Due to the design of the firmware however this should work the same on any of the devices. Firmware To get these to talk to each other we need to ensure the firmware for on the receiver device has the ENABLE_STATS_RX build option defined and on the transmitting end ENABLE_STATS_TX needs to be defined. Testing With the new firmware built and flashed it is time to power up and see what we get. Load up the Node-RED UI with the work sheet we created last time. Turn off all the debug nodes apart from the last one of the switch node. This will now only show the console output we are not parsing, (you may need to wait about 10 mins to see anything). You should see some JSON output that looks suspiciously like the end of the status lines from last time. It is probably of no surprise that in fact in is the same format as the JSON part of the status text. So we already have the code to parse this text. Parsing The Output First things first though, we need to separate out the JSON lines from the rest of the unhandled Lines. Double click on the switch node and add a new entry above the otherwise entry. Set this to look for a regex and enter the following: ^{ This will now pull out the JSON by detecting the opening {. Now connect a new function node to a new switch output and grab the JSON code we wrote before: var obj = JSON.parse('{'+parts[16]+'}'); for(var i in obj) { switch(i) { case '@': break; case 'T|C16': break; default: } } We have to make a few changes to make this stand alone. First the JSON is coming from msg.payload rather than parts[16] and we are going to write the parsed output back directly to msg.payload. The reason for this will become clear soon. var json = msg.payload; msg.payload = {}; var obj = JSON.parse(json); for(var i in obj) { switch(i) { case '@': break; case 'T|C16': break; default: } } return msg; Sending to EmonCMS Now all that is left to do disconnect the function output to the EmonCMS node, or is it? You may have noticed I the previous example that we entered the EmonCMS node ID in the settings of the EmonCMS node in Node-RED. Now we are receiving from more than one OpenTRV device we need to translate the OpenTRV ID to an EmonCMS node ID. So we need to write a function to map the IDs from one system to another. Place a function node after the two parsing nodes and before the EmonCMS node: Our parsing code is writing the OpenTRV ID in to msg.nodeid and if the Node setting is left blank the EmonCMS node will use msg.nodegroup for the Node. This can be done with the following: var nodeMapping = { 'f9ea': 26, 'a7de': 27 }; if(msg.nodeid &amp;&amp; nodeMapping[msg.nodeid]) { msg.nodegroup = nodeMapping[msg.nodeid]; } return msg; You will need to alter the content of nodeMapping for your environment. As we are dealing with more than just msg.payload it is handy to debug the whole msg object. To do this you can open a debug node’s settings (double click it) and change the Output to complete msg object. The other change we need to make is to clear the fixed Node setting in the EmonCMS node. Open the EmonCMS node settings and delete anything in the Node setting. Don’t worry if the setting highlights red, this can be ignored as we are passing in the setting for this value. A warning may also be given when deploying, this too can be ignored. We can now deploy the sheet and it should look something like this. If all is working you should now see all the OpenTRV nodes showing data in your EmonCMS. Making Improvements We could leave it there, but there is a bit of tidy up we can do to help reduce the maintenance. For example the newer versions of the firmware send the battery level using B|cV. To add support for this we would have to edit two similar pieces of code. We can easily update the code to put all the JSON parsing in a single node. Instead of parsing the JSON in the OpenTRV Parse Status we can pass the JSON along to the OpenTRV Parse JSON node so it can be parse there. Let’s disconnect the output of the OpenTRV Parse Status from the EmonCMS node and to the input of the OpenTRV Parse JSON so we have a unified parsing approach. This approach provides a more maintainable solution for handling multiple OpenTRV nodes and ensures consistent data processing across all connected devices.]]></summary></entry><entry><title type="html">Experiments with Node-RED</title><link href="https://bigjungle.net/blog/2016/03/09/experiments-with-node-red/" rel="alternate" type="text/html" title="Experiments with Node-RED" /><published>2016-03-09T20:31:00+00:00</published><updated>2016-03-09T20:31:00+00:00</updated><id>https://bigjungle.net/blog/2016/03/09/experiments-with-node-red</id><content type="html" xml:base="https://bigjungle.net/blog/2016/03/09/experiments-with-node-red/"><![CDATA[<p>After getting my <a href="/blog?tag=emoncms">heating and power usage/generation into EmonCMS</a> I wanted to start pulling other sources of data into EmonCMS, so I started looking for a more expandable method to bring multiple sources of data into EmonCMS.</p>

<p>Open Energy Monitor, the folks behind EmonCMS, have recently started <a href="http://openenergymonitor.blogspot.co.uk/2015/11/node-red-emoncms-node.html">looking at Node-RED</a> so I decided to also have a look at this.</p>

<p>It is also getting colder and I wanted to get a bit more information on the operation of my OpenTRV board that has been sitting underused since the spring when I installed it on the radiator in the office.</p>

<h2 id="getting-started">Getting Started</h2>

<p>I won’t go into detail about downloading/installing Node-RED as there are good instructions in the Node-RED <a href="http://nodered.org/docs/getting-started/installation.html">documentation</a> and the <a href="http://openenergymonitor.blogspot.co.uk/2015/11/node-red-emoncms-node.html">Node-RED EmonCMS Node</a> blog post includes instructions on installing the EmonCMS specific components.</p>

<p>First of all we need to get the data from the OpenTRV devices. In my setup this is via a USB to TTL adapter connected to the serial data port on the OpenTRV.</p>

<p>That is it for the hardware, but how do we get the data into Node-RED? For this we need the Serial node.</p>

<h2 id="setting-up-the-serial-connection">Setting Up the Serial Connection</h2>

<p>Drag one of these nodes to the workspace and double click to open the settings. You’ll need to configure:</p>

<ul>
  <li><strong>Serial Port</strong>: The COM port your USB-TTL adapter is connected to</li>
  <li><strong>Baud Rate</strong>: Typically 4800 for OpenTRV devices</li>
  <li><strong>Data Bits</strong>: 8</li>
  <li><strong>Parity</strong>: None</li>
  <li><strong>Stop Bits</strong>: 1</li>
</ul>

<h2 id="data-processing">Data Processing</h2>

<p>The OpenTRV devices output status information in a structured format that includes temperature readings, valve positions, and other sensor data. Node-RED provides excellent tools for parsing this data:</p>

<h3 id="switch-node">Switch Node</h3>
<p>Use a switch node to route different types of messages based on content patterns.</p>

<h3 id="function-nodes">Function Nodes</h3>
<p>Create custom JavaScript functions to parse the OpenTRV status strings and extract meaningful data points.</p>

<h3 id="debug-nodes">Debug Nodes</h3>
<p>Essential for monitoring data flow and troubleshooting your Node-RED flows.</p>

<h2 id="integration-with-emoncms">Integration with EmonCMS</h2>

<p>Once you have the data parsed and formatted, the EmonCMS node makes it simple to send the data to your EmonCMS instance:</p>

<ol>
  <li><strong>Install the EmonCMS Node</strong>: Use the Node-RED palette manager</li>
  <li><strong>Configure Connection</strong>: Set your EmonCMS server URL and API key</li>
  <li><strong>Map Data</strong>: Ensure your parsed data matches the expected EmonCMS format</li>
</ol>

<h2 id="benefits-of-node-red">Benefits of Node-RED</h2>

<p>Using Node-RED for IoT data integration provides several advantages:</p>

<ul>
  <li><strong>Visual Programming</strong>: Flow-based programming makes complex data processing easier to understand</li>
  <li><strong>Extensive Library</strong>: Thousands of contributed nodes for different protocols and services</li>
  <li><strong>Real-time Processing</strong>: Live data transformation and routing</li>
  <li><strong>Easy Debugging</strong>: Built-in debugging tools and message inspection</li>
  <li><strong>Flexible Deployment</strong>: Can run on Raspberry Pi, local servers, or cloud platforms</li>
</ul>

<h2 id="next-steps">Next Steps</h2>

<p>This initial experiment with Node-RED has opened up many possibilities for expanding my home automation and monitoring system. Future posts will explore:</p>

<ul>
  <li>Handling multiple OpenTRV nodes</li>
  <li>Adding other sensor data sources</li>
  <li>Creating custom dashboard interfaces</li>
  <li>Advanced data processing and alerting</li>
</ul>

<p>Node-RED proves to be an excellent tool for bridging different IoT protocols and services, making it much easier to create comprehensive monitoring and automation systems.</p>]]></content><author><name>Jeremy Poulter</name></author><category term="Smart Home" /><category term="Node-RED" /><category term="node-red" /><category term="emoncms" /><category term="opentrv" /><category term="iot" /><summary type="html"><![CDATA[After getting my heating and power usage/generation into EmonCMS I wanted to start pulling other sources of data into EmonCMS, so I started looking for a more expandable method to bring multiple sources of data into EmonCMS. Open Energy Monitor, the folks behind EmonCMS, have recently started looking at Node-RED so I decided to also have a look at this. It is also getting colder and I wanted to get a bit more information on the operation of my OpenTRV board that has been sitting underused since the spring when I installed it on the radiator in the office. Getting Started I won’t go into detail about downloading/installing Node-RED as there are good instructions in the Node-RED documentation and the Node-RED EmonCMS Node blog post includes instructions on installing the EmonCMS specific components. First of all we need to get the data from the OpenTRV devices. In my setup this is via a USB to TTL adapter connected to the serial data port on the OpenTRV. That is it for the hardware, but how do we get the data into Node-RED? For this we need the Serial node. Setting Up the Serial Connection Drag one of these nodes to the workspace and double click to open the settings. You’ll need to configure: Serial Port: The COM port your USB-TTL adapter is connected to Baud Rate: Typically 4800 for OpenTRV devices Data Bits: 8 Parity: None Stop Bits: 1 Data Processing The OpenTRV devices output status information in a structured format that includes temperature readings, valve positions, and other sensor data. Node-RED provides excellent tools for parsing this data: Switch Node Use a switch node to route different types of messages based on content patterns. Function Nodes Create custom JavaScript functions to parse the OpenTRV status strings and extract meaningful data points. Debug Nodes Essential for monitoring data flow and troubleshooting your Node-RED flows. Integration with EmonCMS Once you have the data parsed and formatted, the EmonCMS node makes it simple to send the data to your EmonCMS instance: Install the EmonCMS Node: Use the Node-RED palette manager Configure Connection: Set your EmonCMS server URL and API key Map Data: Ensure your parsed data matches the expected EmonCMS format Benefits of Node-RED Using Node-RED for IoT data integration provides several advantages: Visual Programming: Flow-based programming makes complex data processing easier to understand Extensive Library: Thousands of contributed nodes for different protocols and services Real-time Processing: Live data transformation and routing Easy Debugging: Built-in debugging tools and message inspection Flexible Deployment: Can run on Raspberry Pi, local servers, or cloud platforms Next Steps This initial experiment with Node-RED has opened up many possibilities for expanding my home automation and monitoring system. Future posts will explore: Handling multiple OpenTRV nodes Adding other sensor data sources Creating custom dashboard interfaces Advanced data processing and alerting Node-RED proves to be an excellent tool for bridging different IoT protocols and services, making it much easier to create comprehensive monitoring and automation systems.]]></summary></entry><entry><title type="html">Raspberry Pi FTDI Shim</title><link href="https://bigjungle.net/blog/2015/08/20/raspberry-pi-ftdi-shim/" rel="alternate" type="text/html" title="Raspberry Pi FTDI Shim" /><published>2015-08-20T15:30:00+00:00</published><updated>2015-08-20T15:30:00+00:00</updated><id>https://bigjungle.net/blog/2015/08/20/raspberry-pi-ftdi-shim</id><content type="html" xml:base="https://bigjungle.net/blog/2015/08/20/raspberry-pi-ftdi-shim/"><![CDATA[<p>When working with embedded systems and IoT projects, having reliable serial communication is essential. The Raspberry Pi’s GPIO header provides UART functionality, but sometimes you need the convenience and isolation of an FTDI USB-to-serial adapter.</p>

<h2 id="the-problem">The Problem</h2>

<p>While the Raspberry Pi has built-in UART pins on the GPIO header, there are several scenarios where an external FTDI adapter is preferable:</p>

<ul>
  <li><strong>Isolation</strong>: Protecting your Pi from potential voltage issues</li>
  <li><strong>Convenience</strong>: Easy plug-and-play serial access</li>
  <li><strong>Multiple Connections</strong>: Using the Pi’s UART for other purposes</li>
  <li><strong>Development</strong>: Easier debugging and logging during development</li>
</ul>

<h2 id="the-solution-ftdi-shim">The Solution: FTDI Shim</h2>

<p>An FTDI shim is a small adapter board that bridges the gap between standard FTDI breakout boards and the Raspberry Pi GPIO header. This simple but effective solution provides:</p>

<h3 id="key-features">Key Features</h3>

<ul>
  <li><strong>Direct GPIO Connection</strong>: Plugs directly into the Pi’s GPIO header</li>
  <li><strong>Standard FTDI Pinout</strong>: Compatible with common FTDI breakout boards</li>
  <li><strong>Power Options</strong>: Can provide 3.3V or 5V power to connected devices</li>
  <li><strong>Compact Design</strong>: Minimal footprint and low profile</li>
  <li><strong>Easy Access</strong>: Other GPIO pins remain accessible</li>
</ul>

<h3 id="pinout-mapping">Pinout Mapping</h3>

<p>The shim typically maps the following connections:</p>

<table>
  <thead>
    <tr>
      <th>FTDI Pin</th>
      <th>Pi GPIO Pin</th>
      <th>Function</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>GND</td>
      <td>GND</td>
      <td>Ground</td>
    </tr>
    <tr>
      <td>VCC</td>
      <td>3.3V/5V</td>
      <td>Power</td>
    </tr>
    <tr>
      <td>RX</td>
      <td>GPIO 14</td>
      <td>TX</td>
    </tr>
    <tr>
      <td>TX</td>
      <td>GPIO 15</td>
      <td>RX</td>
    </tr>
    <tr>
      <td>DTR</td>
      <td>Not used</td>
      <td>-</td>
    </tr>
    <tr>
      <td>CTS/RTS</td>
      <td>Optional</td>
      <td>Flow Control</td>
    </tr>
  </tbody>
</table>

<h2 id="use-cases">Use Cases</h2>

<p>This setup is particularly useful for:</p>

<h3 id="opentrv-development">OpenTRV Development</h3>
<p>When working with OpenTRV thermostatic radiator valves, the FTDI connection provides:</p>
<ul>
  <li>Easy firmware flashing</li>
  <li>Real-time status monitoring</li>
  <li>Debug output capture</li>
  <li>Configuration updates</li>
</ul>

<h3 id="arduino-communication">Arduino Communication</h3>
<p>For projects involving Arduino boards:</p>
<ul>
  <li>Programming ATmega microcontrollers</li>
  <li>Serial debugging and monitoring</li>
  <li>Data logging from sensors</li>
  <li>Bootloader installation</li>
</ul>

<h3 id="general-serial-devices">General Serial Devices</h3>
<p>Any device requiring serial communication:</p>
<ul>
  <li>GPS modules</li>
  <li>Sensor networks</li>
  <li>Display modules</li>
  <li>Custom embedded projects</li>
</ul>

<h2 id="assembly-and-installation">Assembly and Installation</h2>

<p>The FTDI shim is typically a simple PCB that requires minimal assembly:</p>

<ol>
  <li><strong>Solder Headers</strong>: Attach male pins for GPIO connection and female socket for FTDI board</li>
  <li><strong>Check Connections</strong>: Verify pinout matches your specific FTDI breakout</li>
  <li><strong>Power Selection</strong>: Ensure voltage levels match your target device</li>
  <li><strong>Install</strong>: Plug into Pi GPIO header and connect FTDI board</li>
</ol>

<h2 id="software-configuration">Software Configuration</h2>

<p>To use the FTDI connection with your Raspberry Pi:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># Check for USB serial device</span>
lsusb | <span class="nb">grep </span>FTDI

<span class="c"># List serial devices</span>
<span class="nb">ls</span> /dev/ttyUSB<span class="k">*</span>

<span class="c"># Connect using screen</span>
screen /dev/ttyUSB0 9600

<span class="c"># Or use minicom</span>
minicom <span class="nt">-D</span> /dev/ttyUSB0 <span class="nt">-b</span> 9600
</code></pre></div></div>

<h2 id="benefits">Benefits</h2>

<p>The FTDI shim approach offers several advantages:</p>

<ul>
  <li><strong>Flexibility</strong>: Easy to connect/disconnect serial devices</li>
  <li><strong>Reliability</strong>: Proven FTDI chips provide stable communication</li>
  <li><strong>Debugging</strong>: Excellent for development and troubleshooting</li>
  <li><strong>Isolation</strong>: Protects Pi from electrical issues</li>
  <li><strong>Portability</strong>: FTDI connection works with any computer</li>
</ul>

<h2 id="conclusion">Conclusion</h2>

<p>The Raspberry Pi FTDI shim is a simple but valuable tool for anyone working with serial communication in IoT and embedded projects. Its ease of use and reliability make it an essential component in the embedded developer’s toolkit.</p>

<p>Whether you’re flashing firmware, debugging sensor networks, or monitoring data streams, this small adapter can significantly improve your development workflow and system reliability.</p>]]></content><author><name>Jeremy Poulter</name></author><category term="Hardware" /><category term="Raspberry Pi" /><category term="raspberry-pi" /><category term="ftdi" /><category term="hardware" /><category term="serial" /><summary type="html"><![CDATA[When working with embedded systems and IoT projects, having reliable serial communication is essential. The Raspberry Pi’s GPIO header provides UART functionality, but sometimes you need the convenience and isolation of an FTDI USB-to-serial adapter. The Problem While the Raspberry Pi has built-in UART pins on the GPIO header, there are several scenarios where an external FTDI adapter is preferable: Isolation: Protecting your Pi from potential voltage issues Convenience: Easy plug-and-play serial access Multiple Connections: Using the Pi’s UART for other purposes Development: Easier debugging and logging during development The Solution: FTDI Shim An FTDI shim is a small adapter board that bridges the gap between standard FTDI breakout boards and the Raspberry Pi GPIO header. This simple but effective solution provides: Key Features Direct GPIO Connection: Plugs directly into the Pi’s GPIO header Standard FTDI Pinout: Compatible with common FTDI breakout boards Power Options: Can provide 3.3V or 5V power to connected devices Compact Design: Minimal footprint and low profile Easy Access: Other GPIO pins remain accessible Pinout Mapping The shim typically maps the following connections: FTDI Pin Pi GPIO Pin Function GND GND Ground VCC 3.3V/5V Power RX GPIO 14 TX TX GPIO 15 RX DTR Not used - CTS/RTS Optional Flow Control Use Cases This setup is particularly useful for: OpenTRV Development When working with OpenTRV thermostatic radiator valves, the FTDI connection provides: Easy firmware flashing Real-time status monitoring Debug output capture Configuration updates Arduino Communication For projects involving Arduino boards: Programming ATmega microcontrollers Serial debugging and monitoring Data logging from sensors Bootloader installation General Serial Devices Any device requiring serial communication: GPS modules Sensor networks Display modules Custom embedded projects Assembly and Installation The FTDI shim is typically a simple PCB that requires minimal assembly: Solder Headers: Attach male pins for GPIO connection and female socket for FTDI board Check Connections: Verify pinout matches your specific FTDI breakout Power Selection: Ensure voltage levels match your target device Install: Plug into Pi GPIO header and connect FTDI board Software Configuration To use the FTDI connection with your Raspberry Pi: # Check for USB serial device lsusb | grep FTDI # List serial devices ls /dev/ttyUSB* # Connect using screen screen /dev/ttyUSB0 9600 # Or use minicom minicom -D /dev/ttyUSB0 -b 9600 Benefits The FTDI shim approach offers several advantages: Flexibility: Easy to connect/disconnect serial devices Reliability: Proven FTDI chips provide stable communication Debugging: Excellent for development and troubleshooting Isolation: Protects Pi from electrical issues Portability: FTDI connection works with any computer Conclusion The Raspberry Pi FTDI shim is a simple but valuable tool for anyone working with serial communication in IoT and embedded projects. Its ease of use and reliability make it an essential component in the embedded developer’s toolkit. Whether you’re flashing firmware, debugging sensor networks, or monitoring data streams, this small adapter can significantly improve your development workflow and system reliability.]]></summary></entry></feed>