Sunday, July 13, 2014

12'' Adjustable Wrench Hack

This is my first hack on this blog, its a tool I needed for my work. Its a 12'' adjustable wrench with a 1/2'' drive socket on the other end. I built it for tightening jack bolts on a tool to align metal for welding, the tool is called a dog and it is welded to your work and then you turn the jack bolt to align the two peaces of metal together. Sometimes  its to hard to turn the jack bolt with just an adjustable wrench so you need a cheater on the other end. The socket will let you put a 1/2'' beaker bar on the wrench.






Thursday, July 3, 2014

My First Arduino Robot

This is my first successful robot using an Arduino and a ping sensor. The forward and reverse circuit is the same as the forward and reverse circuit I have posted on this blog and YouTube. The motor is a set of motors i bought from Radio Shack. The big silver transistor is a NPN 2N3055 that controls the stearig motor. The code is at the bottom.








And here is the code.

// by BirdshoBrad @ YouTube & Blogger
const int pingPin = 7;
int pin1 = 10;
int pin2 = 11;
int pin3 = 12;



void setup() {

  Serial.begin(9600);  // initialize serial communication:
  pinMode(pin1, OUTPUT);
  pinMode(pin2, OUTPUT);
  pinMode(pin3, OUTPUT);
}

void loop()
{
  long duration;

  // The PING is triggered by a HIGH pulse of 5 microseconds.
  // Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
  pinMode(pingPin, OUTPUT);
  digitalWrite(pingPin, LOW);
  delayMicroseconds(2);
  digitalWrite(pingPin, HIGH);
  delayMicroseconds(5);
  digitalWrite(pingPin, LOW);

  // The same pin is used to read the signal from the PING, a HIGH
  // pulse whose duration is the time (in microseconds) from the sending
  // of the ping to the reception of its echo off of an object.
  pinMode(pingPin, INPUT);
  duration = pulseIn(pingPin, HIGH);
Serial.println(duration);
delay(100);

if (duration > 2500) // the distance....about 8-10 inches
{digitalWrite(pin1, LOW);
digitalWrite(pin2, LOW);
digitalWrite(pin3, HIGH); //forward
}

else {
  digitalWrite(pin3, LOW); // forward
  delay(1500); // rest
  digitalWrite(pin1, HIGH); // turnig transistor
digitalWrite(pin2, HIGH); // reverse
delay(3000);
digitalWrite(pin3, LOW);
digitalWrite(pin1, LOW);
digitalWrite(pin2, LOW);
delay(2000); //rest
}
 
}