Read Me First!

Sandblaster is a variation on Blue Buggy remixing the original Cox International gas-powered sand buggy - scaled-down, converted to electric, and 3D printable!

You can use it to explore obstacle avoidance, autonomous navigation, driverless vehicle design, or assisted Remote Control. Or… build in the morning and race in the afternoon!

Crazy fun for your local hackerspace / makerspace or family night!

Cost can be reduced significantly with a group-buy… what colors are you going to use? 

I would recommend reading through the entire guide first... it's an advanced project and will take at least a weekend to complete.

Tools / Materials

3D Printing

Fire-up your 3D printer... a 6X6 inch build volume is the absolute minimum needed - printers with more elbow room are recommended.

Parts can be printed in whatever material you like. I used PLA, 3 shells, solid infill, and support material. 

Wheny you're ready, download the archive and get started!

Or edit / re-mix the model on Tinkercad!

Don't be intimidated by all the parts... I'll walk you though assembly of the wheels, chassis/body, and electronics.

Knolling is a great way to make sure you have everything you need!

Screw the wheel servos into the chassis... one with the label facing up and the other label facing down.

If the plastic is stubborn, warm it with a torch first - slow and steady!

Steering servo is easy.

Clip the shorter of the two long arms off...

Use a 2mm drill bit to open the hole in the servo arm. Set it aside until we assemble the steering.

Front Wheels

Grab a 14mm socket-cap screw, 3X10X4mm bearing, M3 washer, and an M3 nut.

Wheel bearing assembled... 

Insert the bearing into the wheel - you'll need a set for the right...

And left.

Grab a thin hub and four short plastic screws.

Make sure it's nice and tight... wibbly wobbly wheels are worrisome!

Spin the bearing around a bit to make sure that it's free and clear.

Rear Wheels

Cut the continuous rotation servo arms down to about 4mm each.

Trim long... you can always remove more if it's not enough.

If the fit of the servo horn is too tight, warm the wheel with a torch and press it into place.

Until the back of the servo horn is flush with the back of the wheel.

Use the thick wheel hub and long plastic screws.

Tighten the screws evenly - keeping the wheel perpendicular to the servo.

It may be easier to guage depth from the back side of the wheel. 

Rough-up the PLA a little with some sandpaper... it will improve adhesion.

'Dab' a little RTV Silicone Adhesive on the crown of the rim, and slip the Grifiti band on.

It will take about an hour before the adhesive sets.

Press the wheel (servo horn) onto the servo.

You could hook-up a servo tester at this point to make sure that the wheel rotates without wobbling.

When everything looks good, install the set-screw.

Heat your threaded insert and press it into place - up to the flange.

Heat a 14mm socket cap screw and screw into place... but not too tight. 

The screw should be flush with the back of the steering rack.

Use the short plastic screws or 8mm socket cap screws to secure the axles to the chassis.

Use Loctite or super glue to keep the screws in-place. 

Center the steering servo and install the servo horn.

Set screw for the servo horn and one for the steering rack.

Install the front wheels... 

Right down to the flange.

Distance Sensor

Sharp Distance Sensors come in lots of flavors... 10cm - 80cm,  4cm - 30cm ... 

... and 2cm - 15cm.

Mounting points for both are included on the chassis. Use 8mm M3 screws to mount the larger sensors and servo set screws for the smaller.

Headlights

Love... love... love this stuff - but be careful! A little bit goes a very long way.

Clean-up the headlight mount and orientation post... until it fits 'just right' on the Sandblaster body.

Also, do a test-fit of the headlight lens - adjust as needed.

Apply just a tidbit of glue on each of the four corners.

And press the headlight lens into place.

Sand the headlight mount with a small piece of sandpaper - leaving the dust behind (it will help fill gaps).

A good drop on both sides of the mount...

And hold the headlight in-place for twenty or so seconds - repeat for the headlight on the other side!

FYI, the void in the headlight is just big enough for a Breadboard Friendly Neopixel... the wires can be passed through the mounting hole into the body.

But that's just a coincidence... right?

Body Bits

Tolerances can get a little squirrelly with 3D-printed parts. If the cross-bars are too tight, you can use a 3mm drillbit to clean-up the hole.

Glue the cross-bars into place and then glue the entire roll-cage into the body.

An M3 Tap works a treat if you have one... 

Nice and slow - so that you don't crack the plastic.

Repeat the process for the other tail pipe!

Skip to the electronics step and get everything wired-up... then come back and use four short plastic screws to secure the chassis to the body.

Two of the screws go in mounting holes just behind the servos.

...and two near the axles.

Electronics

Use hook-up wire to carry GND and VIN to the front of the tiny breadboard.

Break-off three extra long headers... and trim one leg short.

Boosting two AAA batteries into 5V requires a step-up regulator... the Texas Instruments TPS6120x can provide ~600mA - which should be just enough to get the job done.

Regulators tend to get fairly hot when running them at peak output - be careful!

Solder the headers to the regulator leaving the shutdown pin empty.

Solder the battery leads to the headers on the under-side of the regulator.  

Insert the regulator...

  • Regulator VOUT - Metro VIN
  • Regulator GND - Metro GND

If you're worried about shorting add some shrink tube.

Add a bit of double sided tape to the battery case and slap it on the back of the chassis.

Extra-long headers can be used to turn sockets into pins... remove the servo leads from the connector.

Insert an extra-long header pin into the socket.

And add some shrink tubing - and repeat the process for each of the three servos.

For the distance sensor, you'll have to solder the leads to the extra-long headers.

Connect the servo and distance sensor to the Metro as follows:

  • A0 - Distance Sensor
  • D5 - Steering
  • D6 - Left Servo
  • D7 - Right Servo

Ready for some software?

Source Code

We have a little bit of work to do here... Sharp IR sensor output can be a little inconsistent from time to time.

Let's start by installing the Arduino SharpIR library or SharpIR by guillaume-rico. And then... check out the great article on linearizing Sharp distance sensor data

Here's a sample of how to drive the Sandblaster based on data from either the Sharp GP2Y0A02YK0F or GP2Y0A21YK distance sensor.

Servo and sensor connections are documented in-line.

Download: file
      #include <Adafruit_SoftServo.h>
#include <SharpIR.h>

#define ir A0
#define model 1080

Adafruit_SoftServo servo_rght;  // right wheel
Adafruit_SoftServo servo_left;  // left wheel
Adafruit_SoftServo servo_strr;  // steering

SharpIR sharp(ir, 30, 50, model);

unsigned long tme = 0;   // the last time we processed a distance check
unsigned long slc = 250; // milliseconds between distance checks
unsigned long ms = 0;    // a millis() time-slice

int dis = 0;  // last measured distance
int thr = 8;  // threshold to trigger reverse

void setup() {

  servo_rght.attach(7); // D7
  servo_left.attach(6); // D6
  servo_strr.attach(5); // D5

  pinMode (ir, INPUT);  // A0
}

void loop() {
  ms = millis();

  // distance samples every 250ms
  if ( tme + slc < ms ) {
    tme = ms;

    dis = sharp.distance();
  }

  // course correction!
  if (dis < thr) {

    // right or left... pick one and step back
    int lor = random(30, 100);
    for (int i = 0; i < 120; i++) {
      if (lor % 2 == 1) {
        servo_strr.write(40);
      } else {
        servo_strr.write(140);
      }
      servo_strr.refresh();
      servo_rght.write(140);
      servo_rght.refresh();
      servo_left.write(40);
      servo_left.refresh();

      delay(15);
    }
  } else {

    // full steam ahead! Although... you could mix a distance
    // calculation into this and steer around obstacles. Just
    // a thought.
    servo_strr.write(90);
    servo_strr.refresh();

    servo_rght.write(40);
    servo_rght.refresh();
    servo_left.write(140);
    servo_left.refresh();

    delay(15);
  }
}
    

Have fun!

This guide was first published on Dec 23, 2015. It was last updated on Dec 23, 2015.