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

<channel>
	<title>Programming Archives | Paul Bupe Jr, PhD</title>
	<atom:link href="https://paulbupejr.com/category/projects/programming/feed/" rel="self" type="application/rss+xml" />
	<link>https://paulbupejr.com/category/projects/programming/</link>
	<description>Hardware, software, and everything in between</description>
	<lastBuildDate>Tue, 02 Feb 2021 17:09:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://paulbupejr.com/wp-content/uploads/2019/07/cropped-paul_logo@2x-32x32.png</url>
	<title>Programming Archives | Paul Bupe Jr, PhD</title>
	<link>https://paulbupejr.com/category/projects/programming/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>ModBot:  A Modular Robotics  Test Platform</title>
		<link>https://paulbupejr.com/robotics-platform/</link>
					<comments>https://paulbupejr.com/robotics-platform/#respond</comments>
		
		<dc:creator><![CDATA[paulbupe]]></dc:creator>
		<pubDate>Thu, 24 May 2018 03:47:33 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[raspberry pi]]></category>
		<category><![CDATA[robotics]]></category>
		<category><![CDATA[Serial]]></category>
		<guid isPermaLink="false">http://paulbupejr.com/?p=82</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 4</span> <span class="rt-label rt-postfix">minutes</span></span>ModBot is a simple robotics platform created for testing sensors, algorithms, vision systems, and everything else in between</p>
<p>The post <a href="https://paulbupejr.com/robotics-platform/">ModBot:  A Modular Robotics  Test Platform</a> appeared first on <a href="https://paulbupejr.com">Paul Bupe Jr, PhD</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 4</span> <span class="rt-label rt-postfix">minutes</span></span>
<p>ModBot is a simple robotics platform created for testing sensors, algorithms, vision systems, and everything else in between. I designed this platform with modularity in mind (thus the name) which requires the compartmentalization of behaviors and functions into discrete and, ideally, interchangeable modules.  Since this is an experimental platform I opted not tie it to ROS (even though it still uses a Linux environment so ROS can be used) and created a very simple ASCII protocol for communication between modules. Lastly, I added teleoperation capabilities using a PlayStation DualShock 4 controller.</p>



<span id="more-82"></span>



<h2 class="wp-block-heading">Robotics Platform Block Diagram and Design</h2>



<p>The base is the fairly standard four-wheel differential drive design. A Raspberry Pi controls the motors via a dedicated Arduino Nano microcontroller that has motion profiles/velocity curves for each motor. </p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://paulbupejr.com/wp-content/uploads/2018/05/StackMod-1.png"><img fetchpriority="high" decoding="async" width="1024" height="722" src="http://paulbupejr.com/wp-content/uploads/2018/05/StackMod-1-1024x722.png" alt="" class="wp-image-165" srcset="https://paulbupejr.com/wp-content/uploads/2018/05/StackMod-1-1024x722.png 1024w, https://paulbupejr.com/wp-content/uploads/2018/05/StackMod-1-300x211.png 300w, https://paulbupejr.com/wp-content/uploads/2018/05/StackMod-1-768x541.png 768w, https://paulbupejr.com/wp-content/uploads/2018/05/StackMod-1.png 1152w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>ModBot Block Diagram</figcaption></figure></div>



<p>I utilized standard sockets and connectors so that controllers and other components could be swapped out without full disassembly of the robot. Notably, I used RJ45 Keystone jacks so that I can use standard Cat 5 cables as module interconnects. Multiple microcontrollers can be added to the system using the I2C protocol I created for communication.  </p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="768" src="http://paulbupejr.com/wp-content/uploads/2020/01/modbot_web-4-1024x768.jpg" alt="" class="wp-image-590" srcset="https://paulbupejr.com/wp-content/uploads/2020/01/modbot_web-4-1024x768.jpg 1024w, https://paulbupejr.com/wp-content/uploads/2020/01/modbot_web-4-300x225.jpg 300w, https://paulbupejr.com/wp-content/uploads/2020/01/modbot_web-4-768x576.jpg 768w, https://paulbupejr.com/wp-content/uploads/2020/01/modbot_web-4-1536x1152.jpg 1536w, https://paulbupejr.com/wp-content/uploads/2020/01/modbot_web-4-2048x1536.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>All the core components of this robotics platform are kept under the upper deck, which is used to hold whatever component or sensor is being tested. The ports for the Raspberry Pi and other components are oriented such that cables can be plugged in or removed without removing the cover.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="768" src="http://paulbupejr.com/wp-content/uploads/2020/01/modbot_web-6-1024x768.jpg" alt="" class="wp-image-592" srcset="https://paulbupejr.com/wp-content/uploads/2020/01/modbot_web-6-1024x768.jpg 1024w, https://paulbupejr.com/wp-content/uploads/2020/01/modbot_web-6-300x225.jpg 300w, https://paulbupejr.com/wp-content/uploads/2020/01/modbot_web-6-768x576.jpg 768w, https://paulbupejr.com/wp-content/uploads/2020/01/modbot_web-6-1536x1152.jpg 1536w, https://paulbupejr.com/wp-content/uploads/2020/01/modbot_web-6-2048x1536.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Serial Communication Protocol</h2>



<p>To help facilitate modularity, I created a simple serial protocol to abstract the transfer of data between modules. </p>



<h3 class="wp-block-heading">Why Create a Custom Protocol?</h3>



<p>As I started building more complex systems with multiple “brains” working together (Raspberry Pis, BeagleBones, and Arduinos), I founding myself needing a simple protocol that could be used to more easily facilitate communication to all these controllers over I2C. Over various projects I standardized formalized the following protocol.</p>



<p><em>There are a lot of full-featured and extensive protocols and libraries out there (<a rel="noreferrer noopener" href="https://github.com/firmata/protocol" target="_blank">Firmata</a>&nbsp;being at the top)&nbsp;and this does not attempt to replace or compete with those. It’s a simple single-purpose protocol with the sole focus of use for simple robotic systems with no overhead or fancy features.</em></p>



<h3 class="wp-block-heading">Robotics Platform Communication Protocol</h3>



<p>This I2C protocol is designed to be simple, human-readable, and is suitable for transmission over a serial bus. All data are passed as ASCII characters between 0x24 (36) and 0x7D (125).  The protocol is simple enough that it can be debugged without any special decoding as show in the screenshot from my oscilloscope below.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="800" height="480" src="http://paulbupejr.com/wp-content/uploads/2020/01/DS1Z_QuickPrint3.png" alt="" class="wp-image-587" srcset="https://paulbupejr.com/wp-content/uploads/2020/01/DS1Z_QuickPrint3.png 800w, https://paulbupejr.com/wp-content/uploads/2020/01/DS1Z_QuickPrint3-300x180.png 300w, https://paulbupejr.com/wp-content/uploads/2020/01/DS1Z_QuickPrint3-768x461.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /><figcaption>Protocol as captured on oscilloscope</figcaption></figure>



<p><strong><em>This is just a basic overview and not meant to be full documentation of the protocol.</em></strong> </p>



<h4 class="wp-block-heading"><strong>Packet Structure</strong></h4>



<p class="has-text-align-center has-small-font-size">&lt;START&gt;&lt;SRC_ADDRESS&gt;&lt;DST_ADDRESS&gt;&lt;ACTION&gt;&lt;COMMAND&gt;&lt;DATA&gt;&lt;END&gt;&lt;CHECKSUM&gt;</p>



<ul class="wp-block-list"><li>The <strong><code>START </code></strong>byte is ASCII &#8220;<code>{</code>&#8221; (123 decimal, 0x7B).</li><li>The <strong><code>SRC_ADDRESS </code></strong>byte is any value from 64 to 95 decimal (0x40 to 0x5F, ASCII “<code>@</code>” to “<code>_</code>”).</li><li>The <strong><code>DST_ADDRESS </code></strong>byte is any value from 64 to 95 decimal (0x40 to 0x5F, ASCII “<code>@</code>” to “<code>_</code>”).</li><li>The <strong><code>ACTION </code></strong>byte is an ASCII “<code>?</code>” for <code>GET</code> and ASCII “$” for <code>SET</code>.</li><li>The <strong><code>COMMAND </code></strong>bytes are three characters.</li><li>The <strong><code>DATA</code> </strong>bytes are variable length and are described in the Data section.</li><li>The <strong><code>END</code> </strong>byte is ASCII &#8220;<code>}</code>&#8221; (125 decimal, 0x7D).</li><li>The <strong><code>CHECKSUM </code></strong>is calculated by subtracting 32 from all the characters in the packet (excluding the start and end bytes) and summing them. The modulo 95 of this value is then calculated and 32 is added back to that value.</li></ul>



<h2 class="wp-block-heading">Checksum Calculation</h2>



<pre class="wp-block-code"><code>int calculate_checksum(String packet) {
   int sum = 0;
   int c = packet.length();
   for (int i = 0; i &lt; c; i++) { sum += packet&#91;i] - 32;}
   return (sum % 95) + 32;
}</code></pre>



<h3 class="wp-block-heading">Example Commands</h3>



<p>The available commands for this revision are listed in the table below.</p>



<figure class="wp-block-table"><table><tbody><tr><th>Command</th><th>Description</th></tr><tr><td><code>ARM</code></td><td>Arm / Disarm System</td></tr><tr><td><code>MTR</code></td><td>Motor Speed</td></tr><tr><td><code>SRV</code></td><td>Servo Position / Speed</td></tr><tr><td><code>ULT</code></td><td>Ultrasonic Distance</td></tr><tr><td><code>IRS</code></td><td>IR Value</td></tr><tr><td><code>DGT</code></td><td>Digital Pin</td></tr><tr><td><code>ANL</code></td><td>Analog Pin</td></tr></tbody></table></figure>



<h4 class="wp-block-heading">Example <code>MTR&nbsp;GET</code> Command and Response</h4>



<p><code>MTR GET</code> command.&nbsp;This packet requests the speed of motor number 2.</p>



<pre class="wp-block-preformatted">{@e?MTR02}X</pre>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Character</th><th>Description</th></tr><tr><td>{</td><td>Start byte</td></tr><tr><td>@</td><td>Source address</td></tr><tr><td>e</td><td>Destination address</td></tr><tr><td>?</td><td>GET action</td></tr><tr><td>M</td><td>Command byte 1</td></tr><tr><td>T</td><td>Command byte 2</td></tr><tr><td>R</td><td>Command byte 3</td></tr><tr><td>0</td><td>Motor number byte 1</td></tr><tr><td>2</td><td>Motor number byte 2</td></tr><tr><td>}</td><td>End byte</td></tr><tr><td>X</td><td>Checksum</td></tr></tbody></table></figure>



<p><code>MTR GET</code> response.&nbsp;This packet returns the speed of motor number 2.</p>



<pre class="wp-block-preformatted">{e@?MTR02+078}C
</pre>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Character</th><th>Description</th></tr><tr><td>{</td><td>Start byte</td></tr><tr><td>e</td><td>Source address</td></tr><tr><td>@</td><td>Destination address</td></tr><tr><td>?</td><td>GET action</td></tr><tr><td>M</td><td>Command byte 1</td></tr><tr><td>T</td><td>Command byte 2</td></tr><tr><td>R</td><td>Command byte 3</td></tr><tr><td>0</td><td>Motor number byte 1</td></tr><tr><td>2</td><td>Motor number byte 2</td></tr><tr><td>+</td><td>Motor speed sign byte</td></tr><tr><td>0</td><td>Motor speed byte 1</td></tr><tr><td>7</td><td>Motor speed byte 2</td></tr><tr><td>8</td><td>Motor speed byte 3</td></tr><tr><td>}</td><td>End byte</td></tr><tr><td>C</td><td>Checksum</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Teleoperation Test Run</h2>



<p>Here&#8217;s a short clip of me testing the motion profiles and mixing of the inputs from the controller joystick. As you can probably tell there was still a bit of tweaking to be done when I took this video but overall the robotics platform was quite responsive. </p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="ModBot Teleop Test with DualShock 4 Controller" width="660" height="371" src="https://www.youtube.com/embed/hoT0-weHZBw?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>
<p>The post <a href="https://paulbupejr.com/robotics-platform/">ModBot:  A Modular Robotics  Test Platform</a> appeared first on <a href="https://paulbupejr.com">Paul Bupe Jr, PhD</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://paulbupejr.com/robotics-platform/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ultra-fast, Autonomous, Reconfigurable UAV Disaster Communication System</title>
		<link>https://paulbupejr.com/uav-disaster-communication-system/</link>
					<comments>https://paulbupejr.com/uav-disaster-communication-system/#respond</comments>
		
		<dc:creator><![CDATA[paulbupe]]></dc:creator>
		<pubDate>Fri, 12 Jun 2015 15:00:24 +0000</pubDate>
				<category><![CDATA[Electrical]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Serial]]></category>
		<guid isPermaLink="false">http://paulbupejr.com/?p=32</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> &#60; 1</span> <span class="rt-label rt-postfix">minute</span></span>Abstract The recent years have witnessed an increase in natural disasters in which the destruction of essential communication infrastructure has significantly affected the number of casualties. In 2005, Hurricane Katrina in the United States resulted in over 1,900 deaths, three million land-line phones disconnections, and more than 2000 cell sites going out of service. This &#8230; <a href="https://paulbupejr.com/uav-disaster-communication-system/" class="more-link">Continue reading <span class="screen-reader-text">Ultra-fast, Autonomous, Reconfigurable UAV Disaster Communication System</span></a></p>
<p>The post <a href="https://paulbupejr.com/uav-disaster-communication-system/">Ultra-fast, Autonomous, Reconfigurable UAV Disaster Communication System</a> appeared first on <a href="https://paulbupejr.com">Paul Bupe Jr, PhD</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> &lt; 1</span> <span class="rt-label rt-postfix">minute</span></span></p>
<div class="bs-callout bs-callout-info">
<h4>Abstract</h4>
<p>The recent years have witnessed an increase in natural disasters in which the destruction of essential communication infrastructure has significantly affected the number of casualties. In 2005, Hurricane Katrina in the United States resulted in over 1,900 deaths, three million land-line phones disconnections, and more than 2000 cell sites going out of service. This incident highlighted an urgent need for a quick-deployment, efficient communication network for emergency relief purposes. In this research, a fully autonomous system to deploy Unmanned Aerial Vehicles (UAVs) as the first phase disaster recovery communication network for wide-area relief is presented. As part of this system, an automation algorithm has been developed to control the deployment and positioning of the UAVs based on a traditional cell network structure utilizing 7-cell clusters in a hexagonal pattern. In addition to the software algorithm, a fully functional control interface was developed which allowed for full control of the system both locally and over an internet connection. This system represents a novel approach for handling a large-scale autonomous deployment of a UAV communications networks.</p>
</div>
<p><span id="more-32"></span></p>
<h4>Project Summary</h4>
<ul>
<li>Successfully developed a system and protocol to autonomously deploy multiple UAVs for emergency (or planned) communication relief in an outdoor setting.</li>
<li>Designed and developed a fully functional web-based flight control graphical user interface for system.</li>
<li>Created an algorithm for UAV swarming in a hexagonal cell pattern using GPS localization.</li>
<li>Developed a fly-by-wire system to autonomously control multiple UAVs by modifying open source flight control software.</li>
<li>Designed parts and equipment in SolidWorks to facilitate project.</li>
<li>Properly utilized the 915 MHz ISM band for telemetry.</li>
</ul>
<p><a href="http://digitalcommons.georgiasouthern.edu/etd/1253/" target="_blank">Download a copy of the complete thesis here.</a></p>
<p>The post <a href="https://paulbupejr.com/uav-disaster-communication-system/">Ultra-fast, Autonomous, Reconfigurable UAV Disaster Communication System</a> appeared first on <a href="https://paulbupejr.com">Paul Bupe Jr, PhD</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://paulbupejr.com/uav-disaster-communication-system/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)

Served from: paulbupejr.com @ 2026-04-14 17:25:09 by W3 Total Cache
-->