
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
<title>Master Brick – Tinkerforge</title>

<!--<link type="text/css" rel="stylesheet" href="http://www.tinkerforge.com/static/base_tf.css" />-->
<link type="text/css" rel="stylesheet" href="http://www.tinkerforge.com/static/jquery.lightbox-0.5.css" />
<meta name="keywords" content="Tinkerforge, Open Source Hardware, Bricks, Bricklets, USB Controllable, USB Sensing, USB Controlling" />
<meta name="description" content="Easy-to-use open source hardware. Control motors and sense the environment over USB, Ethernet or Wi-Fi/WLAN with C/C++, C#, Delphi/Lazarus, Java, JavaScript, LabVIEW, Mathematica, MATLAB/Octave, Perl, PHP, Python, Ruby, Shell, Visual Basic .NET or directly over TCP/IP." />
<meta name="copyright" content="Tinkerforge GmbH" />
<!--<script type="text/javascript">document.write('<style>.noscript { display: none; }</style>');</script>-->


    
    <link rel="stylesheet" href="../../_static/documentation_tf.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '1.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="top" title="Tinkerforge" href="../../index.html" />
    <link rel="up" title="Bricks" href="Bricks.html" />
    <link rel="next" title="RED Brick" href="RED_Brick.html" />
    <link rel="prev" title="IMU Brick" href="IMU_Brick.html" />

<script type="text/javascript" src="http://www.tinkerforge.com/static/jquery.lightbox-0.5.js"></script>
<script type="text/javascript">$(function() { $('#gallery a').lightBox(); });</script>
<script type="text/javascript">$(function() { $(".sphinxsidebarwrapper").filter(function() { return $.trim($(this).text()).length == 0; }).parent().hide(); });</script>


  </head>
  <body>
<div id="wrapper">
	<div id="tfcontent">
		<div class="boxContent3">


<div class="toctree">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../Getting_Started.html">Getting Started</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Primer.html">Primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Tutorials.html">Tutorials</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../FAQ.html">FAQ</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="reference internal" href="../../Hardware.html">Hardware</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="Bricks.html">Bricks</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="DC_Brick.html">DC Brick</a></li>
<li class="toctree-l3"><a class="reference internal" href="Debug_Brick.html">Debug Brick</a></li>
<li class="toctree-l3"><a class="reference internal" href="IMU_Brick.html">IMU Brick</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="">Master Brick</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#features">Features</a></li>
<li class="toctree-l4"><a class="reference internal" href="#description">Description</a></li>
<li class="toctree-l4"><a class="reference internal" href="#technical-specifications">Technical Specifications</a></li>
<li class="toctree-l4"><a class="reference internal" href="#resources">Resources</a></li>
<li class="toctree-l4"><a class="reference internal" href="#connectivity">Connectivity</a></li>
<li class="toctree-l4"><a class="reference internal" href="#test-your-master-brick">Test your Master Brick</a></li>
<li class="toctree-l4"><a class="reference internal" href="#programming-interface">Programming Interface</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="RED_Brick.html">RED Brick</a></li>
<li class="toctree-l3"><a class="reference internal" href="Servo_Brick.html">Servo Brick</a></li>
<li class="toctree-l3"><a class="reference internal" href="Stepper_Brick.html">Stepper Brick</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../Bricklets/Bricklets.html">Bricklets</a></li>
<li class="toctree-l2"><a class="reference internal" href="../Master_Extensions/Master_Extensions.html">Master Extensions</a></li>
<li class="toctree-l2"><a class="reference internal" href="../Power_Supplies/Power_Supplies.html">Power Supplies</a></li>
<li class="toctree-l2"><a class="reference internal" href="../Accessories/Accessories.html">Accessories</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Timeline.html">Timeline</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../Software.html">Software</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Software/Brickd.html">Brick Daemon (brickd)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Software/Brickv.html">Brick Viewer (brickv)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Software/API_Bindings.html">API Bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Software/Firmwares_And_Plugins.html">Firmwares and Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Software/Device_Identifier.html">Device Identifier</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Source_Code.html">Source Code and Bug Tracking</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Programming_Interface.html">Programming Interface</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../Kits.html">Starter Kits</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Kits/WeatherStation/WeatherStation.html">Weather Station</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Kits/HardwareHacking/HardwareHacking.html">Hardware Hacking</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Kits/ServerRoomMonitoring/ServerRoomMonitoring.html">Server Room Monitoring</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Kits/Blinkenlights/Blinkenlights.html">Blinkenlights</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Kits/InternetOfThings/InternetOfThings.html">Internet of Things</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Kits/CameraSlider/CameraSlider.html">Camera Slider</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../Embedded.html">Embedded Boards</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Embedded/Raspberry_Pi.html">Raspberry Pi</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../Specifications.html">Specifications</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Technical_Data.html">Technical Data</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Low_Level_Protocols/TCPIP.html">TCP/IP Protocol</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Low_Level_Protocols/Modbus.html">Modbus Protocol</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Low_Level_Protocols/Wireshark_Dissector.html">Wireshark Dissector</a></li>
</ul>
</li>
</ul>

</div>
<div class="breadcrumbs">
<a href="../../Hardware.html">Hardware</a> / <a href="./Bricks.html">Bricks</a> / Master Brick
</div>



<div id="shoplink_img">
	<a href="../../../shop/bricks/master-brick.html"><img alt="Shop" width="32" height="40" src="../../_images/Misc/cart-icon.png" /></a>
</div>
<div id="shoplink_a">
	<a href="../../../shop/bricks/master-brick.html">In Shop</a>
</div>



    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="master-brick">
<span id="id1"></span><h1>Master Brick<a class="headerlink" href="#master-brick" title="Permalink to this headline">¶</a></h1>
{% from "macros.html" import tfdocstart, tfdocimg, tfdocend %}
{{
    tfdocstart("Bricks/brick_master21_tilted_front_350.jpg",
               "Bricks/brick_master21_tilted_front_800.jpg",
               "Master Brick")
}}
{{
    tfdocimg("Bricks/brick_master_stack_front_big_100.jpg",
             "Bricks/brick_master_stack_front_big_800.jpg",
             "Master Brick in stack")
}}
{{
    tfdocimg("Bricks/brick_master_stack_back_big_100.jpg",
             "Bricks/brick_master_stack_back_big_800.jpg",
         "Master Brick in stack")
}}
{{
    tfdocimg("Bricks/brick_master_caption_100.jpg",
             "Bricks/brick_master_caption_800.jpg",
             "Master Brick with caption")
}}
{{
    tfdocimg("Bricks/brick_master21_top_100.jpg",
             "Bricks/brick_master21_top_800.jpg",
             "Master Brick top")
}}
{{
    tfdocimg("Bricks/brick_master21_bottom_100.jpg",
             "Bricks/brick_master21_bottom_800.jpg",
             "Master Brick bottom")
}}
{{
    tfdocimg("Dimensions/master_brick_dimensions_100.png",
             "Dimensions/master_brick_dimensions_600.png",
             "Outline and drilling plan")
}}
{{ tfdocend() }}<div class="section" id="features">
<h2>Features<a class="headerlink" href="#features" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Up to <strong>four</strong> Bricklets usable over USB</li>
<li>Is the basis to build stacks</li>
<li>Usable with cable based and wireless Master Extensions</li>
</ul>
</div>
<div class="section" id="description">
<span id="master-brick-description"></span><h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>The Master <a class="reference internal" href="../../Primer.html#primer-bricks">Brick</a> can be used for two purposes:
First of all it has <strong>four</strong> <a class="reference internal" href="../../Primer.html#primer-bricklets">Bricklet</a> ports
and therefore is ideally suited for applications where a many Bricklets are
used. These can be directly controlled over the <strong>USB</strong> interface of the Master
Brick. This way USB sensors, like temperature or humidity sensors, or USB
actors, like relays, can be created according to your individual needs.</p>
<p>Secondly, the Master Brick can be used for communication purposes. When
building a <a class="reference internal" href="../../Primer.html#primer-stack">stack</a> the lowermost Master Brick acts as the
master of the stack and routes all communication between the boards of the stack
and the controlling device. Other Master Bricks in the stack detect that are not
the lowermost Master and will only provide their attached Bricklets. This way
only one USB connection, the one to the lowermost Master Brick, is necessary.</p>
<p>The USB connection of the Master Brick can be changed with <a class="reference internal" href="../../Primer.html#primer-master-extensions">Master
Extensions</a>. There are Master Extensions
for cable based interfaces
(<a class="reference internal" href="../Master_Extensions/RS485_Extension.html#rs485-extension">RS485</a>, <a class="reference internal" href="../Master_Extensions/Ethernet_Extension.html#ethernet-extension">Ethernet</a>)
or wireless interfaces (<a class="reference internal" href="../Master_Extensions/WIFI_Extension.html#wifi-extension">WIFI</a>). Master Extensions
have to be plugged on top of a Master Brick and will be detected as new
interfaces. This way Bricks and Bricklets can be directly controlled from
devices inside a network (WIFI or Ethernet) or can be interconnected over
large distances (RS485).</p>
<p>The maximum stack consists of (bottom to top): 1x Step-Down Power Supply,
1x Master Brick, 8x arbitrary Bricks, 2x Master Extensions. With all Bricks
being Master Bricks in a stack up to 9 Master Bricks x 4 Bricklets each = 36
Bricklets can be connected to a single stack.</p>
</div>
<div class="section" id="technical-specifications">
<h2>Technical Specifications<a class="headerlink" href="#technical-specifications" title="Permalink to this headline">¶</a></h2>
<table border="1" class="docutils">
<colgroup>
<col width="35%" />
<col width="65%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Value</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>Bricklet Ports</td>
<td>4</td>
</tr>
<tr class="row-odd"><td>Dimensions (W x D x H)</td>
<td>40 x 40 x 19mm (1.57 x 1.57 x 0.75&quot;)</td>
</tr>
<tr class="row-even"><td>Weight</td>
<td>12g</td>
</tr>
<tr class="row-odd"><td>Current Consumption</td>
<td>68mA</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="resources">
<h2>Resources<a class="headerlink" href="#resources" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Schematic (<a class="reference external" href="https://github.com/Tinkerforge/master-brick/raw/master/hardware/master-schematic.pdf">Download</a>)</li>
<li>Outline and drilling plan (<a class="reference external" href="../../_images/Dimensions/master_brick_dimensions.png">Download</a>)</li>
<li>Source code and design files (<a class="reference external" href="https://github.com/Tinkerforge/master-brick/zipball/master">Download</a>)</li>
</ul>
</div>
<div class="section" id="connectivity">
<span id="master-brick-connectivity"></span><h2>Connectivity<a class="headerlink" href="#connectivity" title="Permalink to this headline">¶</a></h2>
<p>The following picture depicts the different connection possibilities of the
Master Brick.</p>
<a class="reference external image-reference" href="../../_images/Bricks/brick_master_caption_800.jpg"><img alt="Master Brick with caption" class="align-center" src="../../_images/brick_master_caption_600.jpg" style="width: 600.0px; height: 394.0px;" /></a>
</div>
<div class="section" id="test-your-master-brick">
<span id="master-brick-test"></span><h2>Test your Master Brick<a class="headerlink" href="#test-your-master-brick" title="Permalink to this headline">¶</a></h2>
<p>To test a Master Brick you need to have <a class="reference internal" href="../../Software/Brickd.html#brickd">Brick Daemon</a> and
<a class="reference internal" href="../../Software/Brickv.html#brickv">Brick Viewer</a> installed. Brick Daemon acts as a proxy between
the USB interface of the Bricks and the API bindings. Brick Viewer connects
to Brick Daemon. It helps to figure out basic information about the connected
Bricks and Bricklets and allows to test them.</p>
<p>Now connect the Brick to the PC over USB, you should see a new tab named
&quot;Master Brick&quot; in the Brick Viewer after a moment. Select this tab.</p>
<a class="reference external image-reference" href="../../_images/Bricks/master_brickv.jpg"><img alt="Master Brick in Brick Viewer" class="align-center" src="../../_images/master_brickv.jpg" style="width: 466.0px; height: 234.0px;" /></a>
<p>You should see that the Master Brick isn't measuring any stack voltages or
currents. This is because you have not attached a
<a class="reference internal" href="../../Primer.html#primer-power-supplies">Power Supply</a>. When attaching
such a board you should see the voltage applied to your stack and the current
flowing in.</p>
<p>After this test you can go on with writing your own application.
See the <a class="reference internal" href="#master-brick-programming-interface">Programming Interface</a>
section for the API of the Master Brick and examples in different programming
languages.</p>
</div>
<div class="section" id="programming-interface">
<span id="master-brick-programming-interface"></span><h2>Programming Interface<a class="headerlink" href="#programming-interface" title="Permalink to this headline">¶</a></h2>
<p>See <a class="reference internal" href="../../Programming_Interface.html#programming-interface">Programming Interface</a> for a detailed description.</p>
<table border="1" class="docutils">
<colgroup>
<col width="45%" />
<col width="18%" />
<col width="18%" />
<col width="18%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Language</th>
<th class="head">API</th>
<th class="head">Examples</th>
<th class="head">Installation</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>Modbus</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Modbus.html#master-brick-modbus-api">API</a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td>TCP/IP</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_TCPIP.html#master-brick-tcpip-api">API</a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td>C/C++</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_C.html#master-brick-c-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_C.html#master-brick-c-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_C.html#api-bindings-c">Installation</a></td>
</tr>
<tr class="row-odd"><td>C#</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_CSharp.html#master-brick-csharp-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_CSharp.html#master-brick-csharp-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_CSharp.html#api-bindings-csharp">Installation</a></td>
</tr>
<tr class="row-even"><td>Delphi/Lazarus</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Delphi.html#master-brick-delphi-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Delphi.html#master-brick-delphi-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Delphi.html#api-bindings-delphi">Installation</a></td>
</tr>
<tr class="row-odd"><td>Java</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Java.html#master-brick-java-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Java.html#master-brick-java-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Java.html#api-bindings-java">Installation</a></td>
</tr>
<tr class="row-even"><td>JavaScript</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_JavaScript.html#master-brick-javascript-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_JavaScript.html#master-brick-javascript-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_JavaScript.html#api-bindings-javascript">Installation</a></td>
</tr>
<tr class="row-odd"><td>LabVIEW</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_LabVIEW.html#master-brick-labview-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_LabVIEW.html#master-brick-labview-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_LabVIEW.html#api-bindings-labview">Installation</a></td>
</tr>
<tr class="row-even"><td>Mathematica</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Mathematica.html#master-brick-mathematica-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Mathematica.html#master-brick-mathematica-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Mathematica.html#api-bindings-mathematica">Installation</a></td>
</tr>
<tr class="row-odd"><td>MATLAB/Octave</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_MATLAB.html#master-brick-matlab-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_MATLAB.html#master-brick-matlab-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_MATLAB.html#api-bindings-matlab">Installation</a></td>
</tr>
<tr class="row-even"><td>Perl</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Perl.html#master-brick-perl-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Perl.html#master-brick-perl-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Perl.html#api-bindings-perl">Installation</a></td>
</tr>
<tr class="row-odd"><td>PHP</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_PHP.html#master-brick-php-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_PHP.html#master-brick-php-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_PHP.html#api-bindings-php">Installation</a></td>
</tr>
<tr class="row-even"><td>Python</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Python.html#master-brick-python-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Python.html#master-brick-python-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Python.html#api-bindings-python">Installation</a></td>
</tr>
<tr class="row-odd"><td>Ruby</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Ruby.html#master-brick-ruby-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Ruby.html#master-brick-ruby-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Ruby.html#api-bindings-ruby">Installation</a></td>
</tr>
<tr class="row-even"><td>Shell</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Shell.html#master-brick-shell-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_Shell.html#master-brick-shell-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_Shell.html#api-bindings-shell">Installation</a></td>
</tr>
<tr class="row-odd"><td>Visual Basic .NET</td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_VBNET.html#master-brick-vbnet-api">API</a></td>
<td><a class="reference internal" href="../../Software/Bricks/Master_Brick_VBNET.html#master-brick-vbnet-examples">Examples</a></td>
<td><a class="reference internal" href="../../Software/API_Bindings_VBNET.html#api-bindings-vbnet">Installation</a></td>
</tr>
</tbody>
</table>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
		<div id="tf_license">
			<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">
				<img alt="Creative Commons Licence" width="88" height="31" style="border-width:0" src="/static/images/cc_license_logo.png" />
			</a>
			The content of this page is licensed under
			<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution 3.0 Unported License</a>.
		</div>
		</div>
	</div>
</div>

  </body>
</html>