changeset 200:3a7e9e83ad71

Add assembly instructions for version 5
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Wed, 07 Dec 2016 21:09:14 +0100
parents e70d0fba0fc9
children 2e3dc44ed08c
files doc/assembly_v5.rst doc/index.rst fritzing/servo-horn.svg start/IRLremote-1.7.3/examples/Demos/Receive_Blocking/Receive_Blocking.ino start/battery.ino start/creep.ino start/ir.ino start/servos.ino
diffstat 8 files changed, 272 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/assembly_v5.rst	Wed Dec 07 21:09:14 2016 +0100
@@ -0,0 +1,255 @@
+Assembly Instructions for PCB Version 5
+***************************************
+
+Those instructions are for version 5 of the PCB. You can tell you have this
+version, because it's red and has a "Tote v5" written on it. Start by preparing
+all the components. At the minimum, you will need these:
+
+.. image:: images/v5/IMG_20161115_121104.jpg.jpg
+    :align: center
+
+
+Solder the Microcontroller Board Directly
+=========================================
+
+We are going to start with the hardest part -- soldering the microcontroller
+board to the main board. Align the Pro Mini board with the holes carefully, and
+put a piece of solder wire through the hole:
+
+.. image:: images/v5/IMG_20161115_121309.jpg
+    :align: center
+
+It's recommended to start not with the corner hole, like in the photo above,
+but with the two holes in the center. You can insert some pins into other holes
+to make sure they remain properly aligned. Now touch the solder wire with your
+hot soldering iron:
+
+
+.. image:: images/v5/IMG_20161115_121423.jpg
+    :align: center
+
+Then cut the wire a couple of millimeters from the board, and repeat for other
+holes. Now flip the board on the other side, and touch the wires with your
+iron:
+
+.. image:: images/v5/IMG_20161115_122206.jpg
+    :align: center
+
+Once you finish all 24 holes, the microcontroller board is soldered.
+
+The Servo Headers
+=================
+
+You will need six pin male pin headers, with six pins each. You can obtain four
+of them headers by breaking in half the pin headers that were added to your Pro
+Mini module, however, you will need at least two more.
+
+.. image:: images/v5/IMG_20161115_122701.jpg
+    :align: center
+
+The best way to hold the pins in place during soldering is to simply use a breadboard. If you don't have a breadboard, you can use a sticky tape or simply hold
+them with your hand (be careful to not burn yourself).
+
+.. image:: images/v5/IMG_20161115_122809.jpg
+    :align: center
+
+Place the board over the pins, apply some flux to them, and then touch one of
+the pins with your soldering iron. When it becomes hot, touch the solder wire
+to the pin, and let it melt and fill the hole around the pin. Repeat for all the pins.
+
+.. image:: images/v5/IMG_20161115_123054.jpg
+    :align: center
+
+Repeat that for all six of the headers.
+
+.. image:: images/v5/IMG_20161115_123319.jpg
+    :align: center
+
+
+Infra-red Sensor
+================
+
+Insert the sensor exactly the way shown on this photo -- the order of its pins
+is important:
+
+.. image:: images/v5/IMG_20161115_123417.jpg
+    :align: center
+
+Solder it the same way as the pins, then cut off the excess wires:
+
+.. image:: images/v5/IMG_20161115_123508.jpg
+    :align: center
+
+
+Power Switch
+============
+
+Bend the legs of the power switch sideways, and place it on the board so that
+it sticks out a little bit. This time it doesn't matter which way you place it:
+
+.. image:: images/v5/IMG_20161115_124005.jpg
+    :align: center
+
+Solder it the same way as the pins.
+
+
+Battery Connector
+=================
+
+Depending on the batteries you are going to use, you may either prefer a pin
+header:
+
+.. image:: images/v5/IMG_20161115_124005.jpg
+    :align: center
+
+Or just solder the wires directly. Make sure to use the red wire for the plus,
+and the brown (or black) wire for the minus:
+
+.. image:: images/v5/IMG_20161115_124425.jpg
+    :align: center
+
+Your finished board should look like this:
+
+.. image:: images/v5/IMG_20161115_124441.jpg
+    :align: center
+
+
+Optional Piezo Beeper
+=====================
+
+If you want your robot to make sounds, you can add a piezo beeper to it:
+
+.. image:: images/v5/IMG_20161115_124425.jpg
+    :align: center
+
+
+Optional Battery Monitoring Circuit
+===================================
+
+Since the battery has higher voltage than the 3.3V our Pro Mini uses, we need
+to lower it to be able to measure it, using a voltage divider. This circuit
+consists of two 47kΩ resistors and one 47nF capacitor in the upper left corner
+of the board:
+
+.. image:: images/v4/IMG_20150811_103216.jpg
+    :align: center
+
+Place each of the parts in the right spot, and solder one end of it:
+
+.. image:: images/v4/IMG_20150811_103500.jpg
+    :align: center
+
+When it's in the right position, solder the other end:
+
+.. image:: images/v4/IMG_20150811_103528.jpg
+    :align: center
+
+Repeat that for each of the parts:
+
+.. image:: images/v4/IMG_20150811_103713.jpg
+    :align: center
+
+This is only needed if you are using a LiPo battery. You will also need to
+uncomment the battery monitoring code in the robot's program.
+
+
+Optional Anti-brownout Capacitor
+================================
+
+This capacitor makes sure that the microcontroller has enough current even when
+the servos momentarily use all the battery can give. It has its place in the
+upper right corner of the board. Pay attention to the markings on the capacitor
+and the board, to make sure the negative lead goes into the right hole --
+electrolytic capacitors are polarized and connecting them wrong may make them
+explode.
+
+.. image:: images/v4/IMG_20150811_103845.jpg
+    :align: center
+
+The negative lead is usually marked with a dark strip.
+
+.. image:: images/v4/IMG_20150811_104035.jpg
+    :align: center
+
+Cut off the excess leads from the other side.
+
+
+Servo Horns
+===========
+
+Instead of using the large screws that came with your servos, it's much better
+to get some M1.2x4mm screws, and use those. If you still want to use the servo
+screws, you will need to enlarge the holes in the PCB and in the servo horns.
+You can do it with a metal file.
+
+.. image:: images/v5/IMG_20161127_142711.jpg
+    :align: center
+
+Attach the horns with two screws each:
+
+.. image:: images/v5/IMG_20161127_142757.jpg
+    :align: center
+
+Programming
+===========
+
+To program the microcontroller, you will need to connect the USB programmer to
+the header at the top of the board:
+
+.. image:: images/v5/IMG_20161115_145015.jpg
+    :align: center
+
+The connections are:
+
+ * RX ↔ TX
+ * TX ↔ RX
+ * GND ↔ GND
+ * VCC ↔ 3V3
+ * DTR ↔ DTR (if available)
+
+If your programmer doesn't have a DTR pin, you will need to press the reset
+button on the board manually, just after your program compiles but before it
+starts programming. This may require several tries.
+
+I usually don't solder the header to the programming pins, because you only
+use them once -- you can get good enough connection by just putting them in
+the holes and pressing with your hand. Once programmed, you can remove them.
+
+To program, open in Arduino IDE the ``v5/v5.ino`` file. For assembly and tuning,
+you will want to edit the file and change the ``robot_mode`` variable to ``2``.
+This will make the robot simply stand still in its home position, making it
+easier for you to arrange all the servos properly.
+
+Once you have the legs all fine-tuned, you can re-program it with
+``robot_mode`` set to ``1`` for normal walking.
+
+
+Legs
+====
+
+Now it's time to assemble the robot's legs. You will need 12 small servos, with all the screws and the horns that come with them.
+
+You can use the same 1.2mm screws to connect the horns for the femurs:
+
+.. image:: images/v5/IMG_20161127_143126.jpg
+    :align: center
+
+For the tibias, it's best to use the original, large servo screw. Cut off on side of the "cross" horn, and use the screw to fix it to the servo's "ear".
+
+.. image:: images/v5/IMG_20161127_143252.jpg
+    :align: center
+
+Make sure the servos are all at their center positions, and then assemble the
+legs by gluing two servos, and putting on the servo horns:
+
+.. image:: scad/assembly03.png
+
+You will need two pairs of legs, one pair normal, and the other the mirror
+image of the first pair. Attach them to the body at 45° like this:
+
+.. image:: scad/assembly04.png
+
+You will probably need to adjust the horns, so that the robot is in its home
+position when it starts.
+
+
--- a/doc/index.rst	Sat Nov 21 16:54:40 2015 +0100
+++ b/doc/index.rst	Wed Dec 07 21:09:14 2016 +0100
@@ -28,6 +28,7 @@
    tools.rst
    assembly_v2.rst
    assembly_v4.rst
+   assembly_v5.rst
    electronics.rst
    software.rst
    hacking.rst
--- a/fritzing/servo-horn.svg	Sat Nov 21 16:54:40 2015 +0100
+++ b/fritzing/servo-horn.svg	Wed Dec 07 21:09:14 2016 +0100
@@ -36,9 +36,9 @@
      borderopacity="1.0"
      inkscape:pageopacity="0.0"
      inkscape:pageshadow="2"
-     inkscape:zoom="0.7"
-     inkscape:cx="321.34084"
-     inkscape:cy="-120.90975"
+     inkscape:zoom="1.4"
+     inkscape:cx="100.38184"
+     inkscape:cy="9.5693217"
      inkscape:document-units="px"
      inkscape:current-layer="layer1"
      showgrid="false"
@@ -59,7 +59,7 @@
         <dc:format>image/svg+xml</dc:format>
         <dc:type
            rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
+        <dc:title />
       </cc:Work>
     </rdf:RDF>
   </metadata>
@@ -69,9 +69,10 @@
      id="layer1"
      transform="translate(-173.09978,-53.432974)">
     <path
-       style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:9.00000095;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
-       d="m 280.6072,75.583303 a 60.356613,60.356613 0 0 0 -85.35829,0 60.356613,60.356613 0 0 0 0.001,85.356907 60.356613,60.356613 0 0 0 64.32601,13.61318 l 112.63714,112.63714 c 10.68428,10.68428 27.88755,10.68291 38.57184,-0.001 10.68428,-10.68428 10.68428,-27.88617 0,-38.57045 L 296.12902,133.96243 A 60.356613,60.356613 0 0 0 280.6072,75.583303 Z"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="m 258.9305,246.49839 c -3.2e-4,24.03233 19.15405,43.51446 42.78205,43.51413 23.62747,-3.4e-4 42.78107,-19.48216 42.78086,-43.51393 L 319.07585,91.925802 c 0,-10.893309 -8.62305,-19.662529 -19.33291,-19.662722 -10.71005,0 -19.33173,8.769215 -19.33173,19.662523 z"
        id="rect4145"
-       inkscape:connector-curvature="0" />
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="csccccc" />
   </g>
 </svg>
--- a/start/IRLremote-1.7.3/examples/Demos/Receive_Blocking/Receive_Blocking.ino	Sat Nov 21 16:54:40 2015 +0100
+++ b/start/IRLremote-1.7.3/examples/Demos/Receive_Blocking/Receive_Blocking.ino	Wed Dec 07 21:09:14 2016 +0100
@@ -37,4 +37,4 @@
     // resume reading to get new values
     IRLreset();
   }
-}
\ No newline at end of file
+}
--- a/start/battery.ino	Sat Nov 21 16:54:40 2015 +0100
+++ b/start/battery.ino	Wed Dec 07 21:09:14 2016 +0100
@@ -1,7 +1,8 @@
 #include "beep.h"
 
 #define BATTERY_PIN A3
-#define MIN_BATTERY 557  // About 3.59V.
+// #define MIN_BATTERY 557  // About 3.59V.
+#define MIN_BATTERY 367  // About 3.59V.
 
 extern int robot_mode;
 
--- a/start/creep.ino	Sat Nov 21 16:54:40 2015 +0100
+++ b/start/creep.ino	Wed Dec 07 21:09:14 2016 +0100
@@ -49,7 +49,7 @@
 double creep_dx = 0.0;          // Sideways.
 double creep_dy = 1.0;          // Forward.
 double creep_rotation = 0.0;    // Rotation.
-double creep_height = TIBIA; // Body height.
+double creep_height = TIBIA * 0.75; // Body height.
 double creep_spread = 0.0;      // Leg spread.
 
 /* Which legs are touching the ground? */
--- a/start/ir.ino	Sat Nov 21 16:54:40 2015 +0100
+++ b/start/ir.ino	Wed Dec 07 21:09:14 2016 +0100
@@ -35,6 +35,7 @@
 
 void ir_setup() {
     IRLbegin<IR_ALL>(IR_INTERRUPT);
+    pinMode(3, OUTPUT);
 }
 
 void ir_loop() {
@@ -86,7 +87,7 @@
             creep_height = min(TIBIA * 1.25, creep_height + 1);
             break;
         case KEY_CHLEVEL:
-            creep_height = TIBIA * 0.75;
+            creep_height = TIBIA * 0.80;
             break;
         case KEY_VOLDOWN:    // Volume down.
             creep_dx = max(-1.0, creep_dx - 0.25);
@@ -102,14 +103,7 @@
             robot_mode = 0;
             break;
         case KEY_SEARCH:    // Search.
-            switch (robot_mode) {
-                case 1:
-                    robot_mode = 2;
-                    break;
-                case 2:
-                    robot_mode = 1;
-                    break;
-            }
+            digitalWrite(3, !digitalRead(3));
             break;
         case KEY_HOME:    // Home.
             for (unsigned char leg=0; leg < 4; ++leg) {
--- a/start/servos.ino	Sat Nov 21 16:54:40 2015 +0100
+++ b/start/servos.ino	Wed Dec 07 21:09:14 2016 +0100
@@ -28,7 +28,7 @@
 };
 static const signed char SERVO_TRIM[SERVOS] = {
 // ankle, knee, hip
-    -10, -5, -10,    // front left
+    0, 5, -10,    // front left
     10, -5, -10,    // hind left
     0, 0, 10,    // hind right
     0, 0, 10     // front right