Project: RoboButler 3000 – Part 3

The next thing on my ToDo list is to get the frame painted.  I begun this by using a flappy-disc angle grinder attachment to sand back all of the shipping grease, fingerprints, welding flux, and rust that had accrued on the frame over the past week.  These things are AMAZING, I used an entire one sanding back the frame, but its totally worth it.  As a side note, you have to remove the guard from your angle grinder to use these things effectively, make sure to put it back afterwards, and mind your fingers!

Once the frame was all shiny, I broke out the primer.  I used multi surface primer from wilko’s, its only a fiver a can, and one can was just enough to do 3 light coats on the entire robot.  I chose to use primer over just paint because I’ve had issues before with paint flaking off improperly prepared surfaces before, so I figured better safe than sorry.

I did 3 coats total of primer, leaving 2 hours between coats.  Then I left it overnight to dry and make sure the primer was properly set before moving onto the main paint.  For the colour coats, I chose a Royal Blue (again from wilko’s).  I applied 3-4 coats, with 4 hours between, then left it again to dry.

All I have left to do paint-wise now is apply clear-coat this week, then we can start drilling holes to mount things!

Project: RoboButler 3000 – Part 2

My task for this week is to finish off the frame, and get it cleaned and painted with something. The frame is mainly there to hold the motors, batteries, and a club maté crate.

frame

Day one began with preparing a cut list, and using my Evolution RAGE saw to chop a LOAD of 20mm box section to size:

I then chucked together a quick mockup by balancing everthing on top of each other, to try and remember how it goes together.

My next step was technically to weld everything together. Unfortunately there was an issue here, I’d bought myself a No Gas MIG welder and all the PPE, but i’d never actually welded anything. I took an hour to chill in my lounge and watch YouTube videos on how to weld.

I did a few test welds on some leftover box section, and while my welding was crap, it seemed good enough to hold together when whacked with a hammer multiple times, so I figured time to go!

I welded together the 3 basic subframes, the top and bottom of the crate holding box, and the ‘spine’ that holds the batteries together.  The welds were getting better as I went along, which made me happy.

Next I put the ‘ribs’ down the middle of the bottom crate holder. As they’re only for the crate to rest on, they don’t have to be massively well welded, which is lucky because I completely failed at clamping them properly, so they’re a bit crap. Note to self: Buy more clamps.

I welded the spine to the outer edges of the base frame, and was in the process of filleting each rib to the spine when my welder cut out. Turns out these things only have a 20% duty cycle and it had overheated! I took it as a sign to pack up for the night, as I needed to acquire an angle grinder anyway to clean up the top welds before attaching the base frame to the top frame anyway.

On the plus side, the measurement for the club mate crate were correct, so it’ll fit!

The next day I added the uprights, and welded the base plate and top plate together.   I started by grinding flat the welds in the corners on the top and base plates, so I had a flat surface to weld the uprights to.  I then welded the 6 uprights to the top plate (as its far lighter), then welded that assembly to the base assembly.

I went round and cleaned up the welds all round, and started grinding the accessible ones back to make the joints as flat as possible.  Later I found out why my final welds were so crap.  I’d turned up the wire feed speed while testing, and forgotten to turn it down again later, so the wire was ‘stubbing’ and I was getting an irregular arc.  The joys of Flux-Core Arc Welding!

Plan for next weekend is to get the frame sanded back , cleaned off, and get the frame painted.

Project: RoboButler 3000 – Part 1

As our project for EMFCamp 2014 (August 29th – 31st near Bletchley), Jim and I have decided to build a robotic butler to bring us drinks and generally bounce around the field getting in the way.

bot5

I started off by spending some time CADing up a model using parts we have lying around, and also things bought from ebay:

  • Motors - Invacare Wheelchair Motors
  • Motor Control – Invacare Wheelchair Power Module
  • Wheels – 145/70-6 Quad Bike Wheels, 6″ Pneumatic Casters
  • Frame – 20mm Steel Box
  • Batteries - Hawker PC680 17Ah 12V lead acid batteries

My second task was making something to connect the wheels, which had a standard 6 bolt pattern (3 of which hold the wheel together), with the keyed shaft of our motors.  I decided to 3d print the connector, as it should be plenty strong enough.  I based my design on the existing wheel hub for the old 4-bolt wheelchair motors, and made it in openscad:

I printed this out using 50% infill, with black PLA on the Mendel90 3D printer at Hackspace Manchester, a 15 hour print!  I assembled the wheel units using M8 bolts for holding the wheels on, and used the existing M6 allen bolt for mounting the hub to the shaft:

I’m pretty happy with how they came out, they seem strong enough to hold everything together, and the bolts go far enough through to hopefully stop delamination.

Project – Lil’ Buggers

IMG_20140511_184445We like to do occasional workshops at the Hackspace, so when MadLab asked us to make something ‘bug themed’ for a workshop, we jumped on it.  The first thought we had was to make up some bug-shaped PCBs with a circuit to flash LEDs, and run a soldering workshop.  When we found out the workshop was a week away, we panicked a little, as that’s not really enough time to get PCBs manufactured at a sensible price.

We decided instead to make little laser cut bugs with LED eyes, as they can be made with easily available materials, and infinitely customised.

Step one was to choose a material.  Our first experiments were with acrylic.  I whipped up some designs for ‘joints’, which would friction fit onto the side or top of a ‘body’.  I attached these to a curved path in inkscape for the legs, and bug #0 was born!

IMG_20140511_151815 Bug #0 had a couple of issues, mainly due to the material choice.  Acrylic thicknesses can be a bit variable, the tolerance can be as wide as ±10%, and it is fairly brittle.  the combination of these two issues caused at least one broken leg (hence #0 having 5 legs!).

We decided to have a go at laser MDF instead.  Laser MDF is basically MDF made with a glue that is less harmful to people and laser cutters than regular MDF.  It has the advantage of being very dimensionally accurate (our 3.2mm MDF was measured at 3.21mm), and having a bit of bend before it breaks.

Bug #1

 

Bug #1 was born.  It assembled a lot easier than #0, and has cool looking scorched edges.   At this point I started designing some add-on parts to allow attendees to customise their bugs, including wings, tails, hairy legs, and mandibles.

The only issue with #1 was losing the wide range of colours available from acrylic.  However, I had a flash of inspiration, and gave a sheet of laser MDF a light coat of red spraypaint.   This dries fast, and gives an awesome splash of colour.

#2

 

Bug #2 is alive!  This time sporting a lovely pair of wings and some antennae. #2 was done with just one side of the wood painted, which gives a cool effect. depending on what side of the bug you’re looking at.

Then things got a bit silly…

We now have a swarm of these delightful Lil’ Buggers invading the hackspace.  With a magnet and a dab of hotglue they’ll stick to anything metallic, and their LED eyes last for a couple of days on a coin cell.

We’ll be selling a kit soon with enough parts to make two of them through Inventory, and the Hackspace Website.

IMG_20140301_121939

45 Minute Project – £4.10 XBMC Remote Receiver

I’m a big fan of XBMC, and have an Ouya running XBMC set up in my lounge, streaming from my NAS. I normally use XBMC remote on my phone for controlling it, but this gets annoying when the phone is on charge, or I’m using it for something else.

I noticed that the majority of my TV remote is completely unused when the TV is in HDMI mode, and had a bit of a lightbulb moment!

Remote
Almost none of these buttons are used!

I already had an Arduino Pro Micro (£3) lying about i’d bought for testing out as an upgrade path for the minimus based projects i’ve been playing with.  It is leonardo compatible, small, cheap and pretty easily available.  I added an IR Receiver (£1.10) to the weekly Hackspace Farnell order to complete the parts list.

The pinout of the IR receiver makes it very easy to connect to the pro micro, using the RAW (VUSB), GND, and A3 pins.  I just bent the OUT pin (pin 1) on the receiver to the left a bit as follows:

 

The body of the receiver fits perfectly behind the USB plug, flat against the voltage regulator.  I used the IRremote arduino library to grab data from the remote using the IRrecvDemo sketch and mushed some buttons:

8B452AD
FFFFFFFF
FFFFFFFF
8B410EF
FFFFFFFF
FFFFFFFF
FFFFFFFF
8B4D22D
FFFFFFFF
8B4926D
FFFFFFFF
FFFFFFFF

My remote uses 0xFFFFFFFF as a ‘key repeat’ code, about every 200ms when the button is held down. I found that in practice I had to ignore the first of these, as it was repeating way too fast and doing double presses.

I tweaked the IRrecvDemo sample code, added in a bit of keyboard and came up with some working code:

#include

int RECV_PIN = A3;

IRrecv irrecv(RECV_PIN);

decode_results results;

int key;
int count;

void setup()
{
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
  if (irrecv.decode(&results)) {
    switch (results.value)
    {
      case 0x8B452AD: // up
        key = KEY_UP_ARROW;
        count = 0;
        break;
      case 0x8B410EF: // right
        key = KEY_RIGHT_ARROW;
        count = 0;
        break;
      case 0x8B4D22D: // down
        key = KEY_DOWN_ARROW;
        count = 0;
        break;
      case 0x8B4D02F: // left
        key = KEY_LEFT_ARROW;
        count = 0;
        break;
      case 0x8B4926D: // enter
        key = KEY_RETURN;
        count = 0;
        break;
      case 0x8B412ED: // red
        key = KEY_BACKSPACE;
        count = 0;
        break;
      case 0x8B4B24D: // green
        key = ' ';
        count = 0;
        break;
      case 0x8B44AB5: // yellow
        key = KEY_ESC;
        count = 0;
        break;
      case 0x8B450AF: // blue
        key = 's';
        count = 0;
        break;
      case 0xFFFFFFFF:
        count++;
        break;
      default:
        key = -1;
        break;
    }
    if ((key != -1) && (count!=1))  // if count = 1, it is the first key repeat, so ignore it.
      Keyboard.write(key);
    irrecv.resume(); // Receive the next value
  }
}

Total cost £4.10, total time 45 minutes. Sorted!

IMG_20140301_121939

New Robot – Electronics

Robot Electronics

Over the weekend I ordered the mainboard for the new robot. It contains an arduino, battery voltage monitoring, battery regulation and a pair of motor driver chips.

It is designed to sit on top of a hardcase 5Ah LIPO, with short leads going into the battery power output.

New Robot – Chassis Printed

Last night I retrieved the first chassis printout and did a test assembly with the parts that have arrived.  It looks good!

The axle distance is perfect, the chunks I carved out for the pi are all the right sizes, and it looks bitchin.  The only negative was that the mount for the raspberry pi camera was slightly too small, but I managed to modify it enough to fit with some snips and needle files.  I’ll modify it slightly for the final print, including adding some LEDs for lighting up the area in front of the camera.

Next step is to print the top chassis (currently in progress) and design a PCB for power regulation and monitoring, motor control, and other IO.

New Robot – First Printed Parts

Before leaving the hackspace on saturday, I set the wheels and motor mounts for my robot printing, as I figured these parts probably wont change while I finish the rest of the design.

IMG_20131130_220248

Tonight, I cleaned up the printed parts, and did a test assembly of the track sets:

IMG_20131202_193842

They looked about right, so I set the first version of the chassis printing before I left. Hopefully its right, as each chassis half costs about £4 to print!

IMG_20131202_193909

PHPExcel Conditional Formatting Empty Cell

I’ve spent about an hour trying to get this working, so i’ll post it here.

To get a spreadsheet automatically marking any empty cell in a column in dark red, use the following incantation:

$conditional = new PHPExcel_Style_Conditional();
$conditional->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS)
    ->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_EQUAL)
        ->addCondition(0);
$conditional->getStyle()->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getEndColor()->setARGB(PHPExcel_Style_Color::COLOR_DARKRED);