https://Robo.Fish/wiki/index.php?title=LT0&feed=atom&action=history LT0 - Revision history 2024-03-29T16:00:06Z Revision history for this page on the wiki MediaWiki 1.41.0 https://Robo.Fish/wiki/index.php?title=LT0&diff=2921&oldid=prev Kai: /* Parts */ 2019-08-09T06:29:18Z <p><span dir="auto"><span class="autocomment">Parts</span></span></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 2019-08-09T07:29:18</td> </tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l20">Line 20:</td> <td colspan="2" class="diff-lineno">Line 20:</td></tr> <tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr> <tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Parts ===</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Parts ===</div></td></tr> <tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* [[Core Module]] with [[Raspberry Pi]] 2 and Pi NoIR camera v1</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [[Core Module]] with [[Raspberry Pi]] 2 <ins style="font-weight: bold; text-decoration: none;">(or 3 or 4) </ins>and Pi NoIR camera v1</div></td></tr> <tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* RSA circuit board (see [[#Electrical_Design | Electrical Design]] below) with</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* RSA circuit board (see [[#Electrical_Design | Electrical Design]] below) with</div></td></tr> <tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** [http://www.watterott.com/de/Wattuino-pro-mini-3V3-8MHz Wattuino Pro Mini] board (3.3 V, 8 MHz)</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** [http://www.watterott.com/de/Wattuino-pro-mini-3V3-8MHz Wattuino Pro Mini] board (3.3 V, 8 MHz)</div></td></tr> </table> Kai https://Robo.Fish/wiki/index.php?title=LT0&diff=2920&oldid=prev Kai: /* Introduction */ 2019-08-09T06:27:32Z <p><span dir="auto"><span class="autocomment">Introduction</span></span></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 2019-08-09T07:27:32</td> </tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td> <td colspan="2" class="diff-lineno">Line 1:</td></tr> <tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;br /&gt;</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;br /&gt;</div></td></tr> <tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== &lt;br/&gt;Introduction ===</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== &lt;br/&gt;Introduction ===</div></td></tr> <tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>LT0 ("el tee zero") is a robot equipped with a camera and capable of turning around the vertical axis to keep the camera pointing at a tracked moving object. LT0 may not be a robot in the popular sense but nevertheless it's a computerized device that controls a mechanical actuator to autonomously fulfill a task. LT0 is a cheap test device for the software that will power the submersible [[RF0]]. LT0 has a servo motor that can rotate the body, including the [[Core Module | Core module]] with its front-facing camera. The photos below show the prototypical LT0 unit I built.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>LT0 ("el tee zero") is a robot equipped with a camera and capable of turning around the vertical axis to keep the camera pointing at a tracked moving object. LT0 may not be a robot in the popular sense but nevertheless it's a computerized device that controls a mechanical actuator to autonomously fulfill a task. LT0 is a cheap test device for the software that will power the submersible [[RF0]]. LT0 has a servo motor that can rotate the body, including the [[Core Module<ins style="font-weight: bold; text-decoration: none;">#Core Raspi </ins>| Core <ins style="font-weight: bold; text-decoration: none;">Raspi </ins>module]] with its front-facing camera. The photos below show the prototypical LT0 unit I built.</div></td></tr> <tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;br /&gt;</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;br /&gt;</div></td></tr> <tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;gallery mode=&quot;packed&quot; style=&quot;background-color:#e0e0e0&quot;&gt;</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;gallery mode=&quot;packed&quot; style=&quot;background-color:#e0e0e0&quot;&gt;</div></td></tr> <tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l18">Line 18:</td> <td colspan="2" class="diff-lineno">Line 18:</td></tr> <tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;br /&gt;</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;br /&gt;</div></td></tr> <tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;br /&gt;</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;br /&gt;</div></td></tr> <tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr> <tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Parts ===</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Parts ===</div></td></tr> <tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Core Module]] with [[Raspberry Pi]] 2 and Pi NoIR camera v1</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Core Module]] with [[Raspberry Pi]] 2 and Pi NoIR camera v1</div></td></tr> </table> Kai https://Robo.Fish/wiki/index.php?title=LT0&diff=2572&oldid=prev Kai: /* Parts */ 2017-04-07T19:21:06Z <p><span dir="auto"><span class="autocomment">Parts</span></span></p> <p><b>New page</b></p><div>&lt;br /&gt;<br /> === &lt;br/&gt;Introduction ===<br /> LT0 (&quot;el tee zero&quot;) is a robot equipped with a camera and capable of turning around the vertical axis to keep the camera pointing at a tracked moving object. LT0 may not be a robot in the popular sense but nevertheless it&#039;s a computerized device that controls a mechanical actuator to autonomously fulfill a task. LT0 is a cheap test device for the software that will power the submersible [[RF0]]. LT0 has a servo motor that can rotate the body, including the [[Core Module | Core module]] with its front-facing camera. The photos below show the prototypical LT0 unit I built.<br /> &lt;br /&gt;<br /> &lt;gallery mode=&quot;packed&quot; style=&quot;background-color:#e0e0e0&quot;&gt;<br /> File:LT0-diagonal.jpg<br /> File:LT0-left.jpg<br /> File:LT0-front.jpg<br /> File:LT0-right.jpg<br /> File:LT0-back.jpg<br /> File:LT0-top.jpg<br /> File:LT0-bottom.jpg<br /> &lt;/gallery&gt;<br /> The design of LT0 follows the concept of splitting the hardware into two parts: (1) a robot body that is specific to the application and whose actuators and sensors are controlled by a [[Robot State Agent]] (RSA), (2) a reusable [[Core Module | Core]] with a [[Robot Task Controller]] (RTC) that runs the higher-level control software and communicates with the RSA. The RTC unit in LT0 is implemented with a [[Raspberry Pi]], and the RSA unit is an [[Arduino]] microcontroller with sensors, actuators, and power control circuitry. In LT0, the RSA is actually redundant. The Raspberry Pi is capable of controlling the servo motor and reading sensor data while simultaneously processing the images from the camera. However, LT0 is a test platform for more complex designs ([[LT1]] and [[RF1]]) in which the split between RTC and RSA is more meaningful because the RTC could be overwhelmed by the processing sensor data and controlling actuators in real time.<br /> &lt;br /&gt;<br /> &lt;br /&gt;<br /> The project files are available [https://github.com/robo-fish/Robots/tree/master/LT0/ on GitHub].<br /> &lt;br /&gt;<br /> &lt;br /&gt;<br /> === Parts ===<br /> * [[Core Module]] with [[Raspberry Pi]] 2 and Pi NoIR camera v1<br /> * RSA circuit board (see [[#Electrical_Design | Electrical Design]] below) with<br /> ** [http://www.watterott.com/de/Wattuino-pro-mini-3V3-8MHz Wattuino Pro Mini] board (3.3 V, 8 MHz)<br /> *** microcontroller: ATmega328 with 30 KB Flash, 2 KB RAM<br /> ** [http://www.recom-international.com/pdf/Innoline/R-78xx-1.0.pdf RECOM R-785.0-1.0] switching voltage regulator (5 V, 1 A output)<br /> ** [[DS18B20]] temperature sensor<br /> ** [[MPU-9250]] gyro/accelerometer/magnetometer (a.k.a. IMU)<br /> ** FET and BJT transistors for power control<br /> ** resistors<br /> * [http://www.produktinfo.conrad.com/datenblaetter/400000-424999/404753-da-01-en-MODELCRAFT_STANDARD_SERVO_410.pdf BMS-410C] servo motor to rotate the Core around its long axis<br /> * 7.4 V LiPo battery<br /> * Arca-Swiss mount with push button for turning the power to the Core on or off<br /> &lt;br /&gt;<br /> <br /> === Mechanical Design ===<br /> {| style=&quot;border-width: 0&quot;<br /> | style=&quot;text-align: right&quot; | [[File:LT0-mechanical-design-blender.png | x380px ]]<br /> | style=&quot;text-align: left&quot; | [[File:LT0-mechanical-design.png | x400px ]]<br /> |}<br /> I first designed the structure using [[Blender]] (left image). Later I switched to [[FreeCAD]] as my 3D modeling tool (right image).<br /> &lt;br /&gt;<br /> &lt;br /&gt;<br /> The servo motor is able to rotate the upper body of the device so that the camera of the Core module can track a slow moving object.<br /> &lt;br /&gt;<br /> &lt;br /&gt;<br /> === Electrical Design ===<br /> Design tool: [[KiCad]]<br /> &lt;br /&gt;<br /> &lt;br /&gt;<br /> The PCB layout is realized on a 50x50 mm circuit board with header pins for connecting to the GPIO pins of the Raspberry Pi, to the servo motor, to the battery, and to the push button. The three layers of connecting tracks in the design (red, yellow, green) do not apply to the hand-soldered prototype seen in the photos.<br /> {| style=&quot;border-width: 0;&quot;<br /> | style=&quot;text-align: right&quot; | [[File:LT0-circuit-schematic.png | x380px]]<br /> | style=&quot;text-align: left&quot; | [[File:LT0-circuit-board-design.png | x380px]]<br /> |}<br /> The BS170 and TIP125 switching transistors are used in conjunction to control the power to the Raspberry Pi. The Arduino is programmed so that the [[Circuit_Recipe:_Powering_A_Module | power gate]] is toggled when the push button is pressed. When the BS170 is switched on, the value of the resistor &#039;&#039;&#039;R8&#039;&#039;&#039; affects the current that flows to the base of the TIP125, and, therefore, the current that flows from the battery to the 5V regulator &#039;&#039;&#039;U1&#039;&#039;&#039; (and the RPi). I tried a couple of values for R8 to find one that keeps the idle current low yet does not restrict the current flow to the regulator much. 470 ohms for R8 seems to be the sweet spot.<br /> &lt;br /&gt;<br /> {| style=&quot;width:13em&quot;<br /> ! R8<br /> ! I&lt;sub&gt;R8&lt;/sub&gt;<br /> |-<br /> | 47 &amp;#8486; || 22 mA<br /> |-<br /> | 470 &amp;#8486; || 3.1 mA<br /> |-<br /> | 1 k&amp;#8486; || 1.4 mA<br /> |-<br /> | 1.5 k&amp;#8486; || 1.0 mA<br /> |}<br /> &lt;br /&gt;<br /> In the prototype, the expensive Arduino and IMU boards are not soldered on the RSA directly. Pin sockets are soldered on the board instead, allowing the Arduino and IMU to be removed and reused in other circuits.<br /> {| style=&quot;border-width: 0;&quot;<br /> | style=&quot;text-align: right&quot; | [[File:LT0-RSA-circuit-board-with-Arduino-IMU.jpg | x260px]]<br /> | style=&quot;text-align: left&quot; | [[File:LT0-RSA-circuit-board-without-Arduino-IMU.jpg | x260px]]<br /> |}<br /> &lt;br /&gt;<br /> <br /> === Software ===<br /> The software is available [https://github.com/robo-fish/Robots/tree/master/LT0/software on GitHub], along with the hardware design documents for LT0.<br /> &lt;br /&gt;<br /> &lt;br /&gt;<br /> ==== RTC ====<br /> The LT0 RTC will be equipped with a pre-trained [[FishNet#FishNet_B | FishNet B]] neural network to detect humans in upright standing posture. For this purpose the RTC will be capable to connect with an external [[Deep Learning | deep learning]] workstation and stream its camera captures.<br /> &lt;br /&gt;<br /> &lt;br /&gt;<br /> The [https://github.com/robo-fish/Robots/tree/master/LT0/software/RTC RTC software] is written in C++ for running on a Raspberry Pi. The following libraries are used:<br /> * [http://wiringpi.com wiringPi] for accessing the GPIO pins<br /> * [https://sourceforge.net/projects/raspicam/ raspicam] for accessing the RPi camera<br /> &lt;br /&gt;<br /> The Raspberry Pi camera needs to be enabled for the software to work. Use the command-line tool &#039;&#039;raspi-config&#039;&#039; to enable or disable the camera.<br /> &lt;br /&gt;<br /> &lt;br /&gt;<br /> Also make sure the libraries can be found by the library loader during runtime. Assuming they have been installed under &#039;&#039;/usr/local/&#039;&#039; (the default location for &#039;&#039;make install&#039;&#039;), the file &#039;&#039;/etc/ld.so.conf&#039;&#039; should include the line<br /> &lt;pre class=&quot;code&quot;&gt;<br /> include /usr/local/lib<br /> &lt;/pre&gt;<br /> &lt;br /&gt;<br /> <br /> ==== RSA ====<br /> The RSA software runs on an ATmega328 microcontroller (on a board that is compatible to Arduino Pro Mini).<br /> &lt;br /&gt;<br /> &lt;br /&gt;<br /> <br /> ==== RTC&amp;#8644;RSA ====<br /> RTC and RSA communicate via [[SPI]] according to this octet-sized protocol:<br /> {|<br /> ! colspan=&quot;3&quot; style=&quot;text-align: center&quot; | RTC commands<br /> ! colspan=&quot;3&quot; style=&quot;text-align: center&quot; | RSA responses<br /> |-<br /> | style=&quot;font-weight:bold&quot; | symbol<br /> | style=&quot;font-weight:bold&quot; | code<br /> | style=&quot;font-weight:bold&quot; | parameter (5 bits)<br /> | style=&quot;font-weight:bold&quot; | symbol<br /> | style=&quot;font-weight:bold&quot; | code<br /> | style=&quot;font-weight:bold&quot; | parameter (6 bits) <br /> |-<br /> | GET_GYRO || 0x20 || - || BUSY || 0x00 || -<br /> |-<br /> | GET_TEMP || 0x40 || external (0) / CPU (1) || READY || 0x40 || -<br /> |-<br /> | SET_SERVO || 0x60 || angle || ACK || 0x80 || command code<br /> |-<br /> | GET_COMPASS || 0x80 || - || RSP || 0xC0 || value<br /> |-<br /> | SLEEP || 0xA0 || duration || || ||<br /> |-<br /> | RESPOND || 0xC0 || - || || ||<br /> |}<br /> Commands (from the RTC to the RSA) are 8 bits long. The most significant 3 bits are the command type. The remaining 5 bits are for the command parameter, if any. Responses from the RSA to the RTC are also 8 bits long, where the most significant 2 bits denote the response type. The remaining 6 bits are used to pass numeric values. Floating point values are passed as quantized values within a predefined range. Temperature values are quantized as steps of 1&amp;deg; C, in the range from 15&amp;deg; C to 78&amp;deg; C.<br /> &lt;br /&gt;<br /> &lt;br /&gt;<br /> If the RSA responds with BUSY, the RTC will try again after a short delay. The RSA will be busy while it processes the collected sensor data (to reduce noise, for example).<br /> &lt;br /&gt;<br /> &lt;br /&gt;<br /> [[File:LT0_SPI_Communication.png | x360px]]<br /> &lt;br /&gt;<br /> &lt;br /&gt;<br /> <br /> === Manufacturing ===<br /> I made the structural parts with a 3D printer and soldered the components on the circuit board by hand &amp;#128553;<br /> &lt;br /&gt;<br /> &lt;br /&gt;<br /> === Roadmap ===<br /> * Structural design &lt;span style=&quot;color:#008800&quot;&gt;&amp;#10003;&lt;/span&gt;<br /> * Electrical design &lt;span style=&quot;color:#008800&quot;&gt;&amp;#10003;&lt;/span&gt;<br /> * Manufacturing &lt;span style=&quot;color:#008800&quot;&gt;&amp;#10003;&lt;/span&gt;<br /> * &lt;span style=&quot;color:#888&quot;&gt;Basic functional software&lt;/span&gt;<br /> * &lt;span style=&quot;color:#888&quot;&gt;Testing and debugging&lt;/span&gt;</div> Kai