Tuesday, 22 December 2015

Board Construction (Almost) Complete!

Over the past few days, I've spent a fair amount of time assembling the circuit boards for the StIRLing test bed.  I now have a complete sensor shield and an almost complete power and control board.  The next steps involve testing the boards and mounting them to the robot.

Sensor Shield
The sensor shield (shown the with accelerometer,
gyro sensor, and magnetometer installed)
The sensor shield mounts on top of the Arduino Mega, providing connections to all of the various sensors and electrical equipment on the robot.  This shield includes headers for an accelerometer, gyro sensor, magnetometer, force sensitive resistors (FSRs), and ambient light sensors.  The shield also includes ports for the jumper wires between the sensor shield and the power and control board.

This board took around three hours to solder together.  It is simply an Arduino Mega prototyping shield with all of the necessary headers soldered on, with the idea of providing an easier method of (dis)connecting sensors and other equipment.  The board also has built in resistors for the headlights and  FSRs, simplifying the wiring process.

Despite the utility provided by this design, there are a few significant issues.  One of which is the large amount of exposed wiring on the underside of the shield.  This was necessary in order to provide power to all of the components attached to the shield.  The original prototype shield lacked power busses, and my solution involved stripping a length of wire and soldering it to the +5v (or GND) terminals and another, unallocated, location on the shield.  This works (I haven't had any issues so far), but it seems like a really primitive solution.

Another issue is the difficulty in producing this board, this board took about three hours to solder and some creative wiring solutions were required in order to make all the necessary connections.  One of these wiring solutions involves having wire stick out the side of the shield, being routed around the pins the shield uses to attach to the Arduino Mega.  This has the effect of making the shield fit somewhat poorly.  I plan to avoid these issues by creating my own circuit board layout and making a custom board, but this will take time that I currently lack.  Future versions of the StIRLing Platform will include custom sensor shields.

Power and Control Board
The Power and Control Board (shown with the servo
controllers, relay and USB power adapter installed)
The power and control board handles all of the power supply and servo control needs of the StIRLing platform test bed's electronics.  It is almost complete, but lacks a few parts that I didn't own when I soldered the board together.  This board provides connections to a tether and battery as well as a voltage regulator on 5v USB power adapter.  These components are wired up in order to supply the Raspberry Pi with 5v (through a USB adapter with the aim of stabilizing the power output) and supply the Arduino with 7.2-7.5v (depending on the power supply in use).


This board is simply a prototype board with all of the components soldered in a very compact fashion.  I originally intended for the this board to mount on top of the sensor shield, but I decided against this for a number of reasons (the prototype board I had on hand was too small to function as a shield, a lacked right-angled headers, etc.).  Instead, this board will likely be mounted on its side, next to the Arduino.

This board took about three hours to solder together, with some of the soldering proving to be more difficult than it was on the sensor shield.  As I had a relatively small prototype board, I had to be very efficient when packing the board.  The result is a very densely-packed circuit board with more than a few soldering mistakes on the other side.

In future versions of the StIRLing Platform, this board will definitely be replaced by a custom circuit board, likely in the form of a shield.  This board was assembled with a fair amount of difficulty, as it was not assembled in ideal conditions (small prototype board, missing parts, etc.).  So far, this board looks okay (no accidental connections), but it has not been fully tested yet.

Overall
The StIRLing test bed so far, with electronics in position.
Both boards will work for now, but should be replaced by custom-etched PCBs in future versions of the StIRLing platform.  In their current configuration, the boards take up a fair amount of space on the robot, but future versions will likely improve this.  For now, these boards will suffice, allowing testing and software production to proceed, after a few more tests and improvements.

Friday, 18 December 2015

Body Assembly Complete

I have completed assembly of the main body of the test bed.  All of the legs are attached to the central platform.  The central platform is made up of six wedges and a locking ring, allowing it to be printed by smaller 3D printers.  
The Assembled Body
So far, no electronics have been installed.

The Wedges
The main body is made up of six wedges (each takes about 2.5 - 3 hours to print on my 3D printer).  These are locked together by a locking ring in the center of the platform.  The wedges are attached to this locking ring with 15mm M3 nuts and bolts with M4 washers to protect the 3D printed parts.

The Servo Mounts
Each base servo is attached to a wedge by three screws, despite the servos having four mounting holes.  I had to exclude the fourth screw in order to make room for the servo's cabling.

Next to each servo mount is a small, rectangular platform with two screw holes.  These platforms are for the electrical connections that provide a simple interface between the electronics mounted on each leg (three servos and one Force Sensitive Resistor) and the control electronics in the center of the body.  I will cover these in greater detail later.

Known Issues
With it's current design, the main body is susceptible to flexing along the lines between each wedge, as a result of the locking mechanism.  At the moment, this problem is being solved by using binder clips (not shown in the image) in the midpoints between each servo mount.  This works, but is only a temporary solution.  The next version of the body should address this issue (I'm aiming to have a top plate to connect all of the servos together, if possible).  Another solution to this issue would be to glue the wedges together, but I have not tested this.

Thursday, 3 December 2015

Leg Construction Complete and Printer Troubles

Since my last post, I have worked to print and put together all six legs for the first version of the StIRLing Platform.  I finally succeeded in this process, but it took longer than expected.

A Jammed Extruder
After the first test leg was tweaked and the design finalized, I decided to bulk print five of the first leg bracket.  This bracket connects the first servo (which provides allows the leg to move back and forth) to the second servo, which functions as a knee joint, allowing the leg to pivot up and down.  I set up a print in Repetier-Host made up of five of these brackets, a print that would take around 5-6 hours to complete.

A couple of hours in, the extruder jammed.  I stopped the print, removed the failed brackets and started to open the extruder.  I noticed that the extruder had managed to squeeze filament out through the threads between the barrel and the heater block, a defect called retrograde extrusion.  This, however, wasn't the biggest problem.  The main problem was a length of cold filament inside the barrel (the threaded tube that passes filament from the extruder motor to the hot end).

After much research, I found that I needed to isolate the barrel in order to remove this filament.  At first, this proved very difficult.  I spent hours with a couple sets of channel locks in an attempt to remove the barrel from the block with the heater (there may be a name for this, but I'll call it the heated block for now).  The retrograde extrusion had pushed filament through the threads connecting the barrel to the heated block, locking the two pieces together very firmly.  I eventually came up with the idea to heat the extruder to a low temperature (100 °C) in order to weaken the plastic, allowing me to unscrew the barrel.  I used two sets of channel locks (one set on the heated block and another set on the barrel).  After removing the heated block, I inserted a small 1.5mm drill bit into the barrel and hammered the two parts together, to push the filament out.

After clearing the barrel, I reassembled the extruder, almost.  The block of aluminum that holds the barrel under the extruder motor (I'm calling it the mounting block for now) has two holes in my case, one tapped (threaded) and one not tapped with a set screw.  I that the barrel was originally in the untapped barrel, but I lacked the screwdriver bit for the set screw (this later turned out not to be true), so I decided to put the barrel back into the tapped hole, assuming I could screw it in and reassemble the extruder.  After doing this, I realized that my barrel was on the wrong side of the extruder motor (in my defense, I was doing this at about 11:30 pm), something I hadn't anticipated when I decided to screw in the barrel.

Bearing this in mind, I took apart the extruder and began to unscrew the barrel.  Then, right as I was a few millimetres from freeing the barrel, it seized, having likely become cross-threaded.  Nothing I tried (heat treatment, channel locks, lubricant) could remove the barrel from the mounting block.  I was able to free it the next morning after C-clamping the barrel to a table and using channel locks to unscrew the mounting block.  When it finally came out, it was followed by a little sprinkle of metal dust, a testament to just how stuck the two parts were.

After I freed the barrel, I found the right screwdriver bit (a star-shaped bit works well in place of a small allen key) and put the barrel in the correct hole.  I reassembled the extruder and was just about ready to go back to printing.

Bed Leveling
Before I returned to printing, I had to level my print bed.  This is a key task in any 3D printer, one that must be completed after any major change to the structure (moved endstops, new printing surface, etc.).  I leveled the bed quickly, but was eager to return to printing.  The first thing I did was give my printer the exact same job as before, a five hour print containing all of the first brackets of my hexapod legs.  I later came back to find a jammed extruder.  This time, the cause was an un