Wednesday, September 17, 2014
555 SMD Circuit
I've been buying SMD components from eBay and finely built my first SMD circuit. Its a simple blink-blink 555 timer circuit. You can get an app from the App Store on Apple called Electronic Toolbox Pro to figure out the numbers on the SMD resistors. Here is the schematic, pictures, and the video on my first SMD project.
Tuesday, September 2, 2014
Monostable & Astable 555 Timer Circuit
This circuit, schematic, and video stemmed from a video I made awhile ago. I needed to make a monostable circuit, so I looked back on that video and seen that I had no schematic. Here is the schematic for a monostable and astable circuit.
Monostable:
Astable:
Video:
Monostable:
Astable:
Video:
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
}
}
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
}
}
Sunday, June 29, 2014
Forward and Reverse Circuit for a DC Motor
I've been wanting to build a robot that drove around and if it came to an object, it would sense it with a ping sensor and stop and turn the other way. I was in a hurry to build a circuit that would make a motor spin both ways, so it took a few hours to get it to work. I never looked to a schematic of an H-bridge. The hardest part was getting the transistors that controlled the two sets of transistors to work. The transistors do get hot, but I've never had one burn up.
Here is the schematic and the circuit on a breadboard on my robot.
Here is the video.
Wednesday, June 25, 2014
Parallax 2x16 3pin LCD
On my YouTube channel I was asked to send the code to this 3 pin LCD project to a fellow YouTuber. I tried to put the code in the comments, but it did not work so I started this blog to post codes and schematics.
On this project I used 2 normally open switches, 3 resisters (2 for pull downs for the buttons and one for the LED), 1 3 pin 2x16 Parallax LCD, and 1 Arduino UNO. The LED is connected to pin 11. The button for turning the LED on or off is connected to pin 9. TxPin is connected to pin 6, that is what controls the LCD. The button for the LCD back light is connected to pin 4. The only trouble I had with this is I couldn't figure out how to not delay the code for 2 seconds for turning the LCD on then off automatically. So if anyone has figured that out, that would be cool and remember to share the code.
// made by birdshotbrad@youtube.com
//for the 3 pin Parallax LCD ONLY
int led = 11;
int button = 9; //button to turn on or off LED
int val = 0;
int oldval = 0;
int state = 0;
int TxPin = 6; //lcd pin
int button2 = 4; //lcd backlight
int val2 = 0;
int oldval2 = 0;
#include <SoftwareSerial.h>
SoftwareSerial mySerial = SoftwareSerial(255, TxPin);
void setup()
{
pinMode(led, OUTPUT);
pinMode(button, INPUT);
pinMode(TxPin, OUTPUT);
digitalWrite(TxPin, HIGH);
pinMode(button2, INPUT);
}
void loop()
{
mySerial.begin(9600);
delay(100);
val = digitalRead(button);
val2 = digitalRead(button2);
if(val2 == HIGH){
mySerial.write(17); // backlight on
delay(2000);
mySerial.write(18); // backlight off
}
if((val == HIGH) && (oldval == LOW)){ //code to turn on or off LED and to show status of LED on lcd
state = 1 - state;
delay(5);
}
oldval = val;
if (state == 1) {
digitalWrite(led, HIGH);
mySerial.write(12);// refresh lcd
mySerial.print("LED ON");
mySerial.write(18);
}
else {
digitalWrite(led, LOW);
mySerial.write(12);
mySerial.print("LED OFF");
mySerial.write(18);
}
}
On this project I used 2 normally open switches, 3 resisters (2 for pull downs for the buttons and one for the LED), 1 3 pin 2x16 Parallax LCD, and 1 Arduino UNO. The LED is connected to pin 11. The button for turning the LED on or off is connected to pin 9. TxPin is connected to pin 6, that is what controls the LCD. The button for the LCD back light is connected to pin 4. The only trouble I had with this is I couldn't figure out how to not delay the code for 2 seconds for turning the LCD on then off automatically. So if anyone has figured that out, that would be cool and remember to share the code.
// made by birdshotbrad@youtube.com
//for the 3 pin Parallax LCD ONLY
int led = 11;
int button = 9; //button to turn on or off LED
int val = 0;
int oldval = 0;
int state = 0;
int TxPin = 6; //lcd pin
int button2 = 4; //lcd backlight
int val2 = 0;
int oldval2 = 0;
#include <SoftwareSerial.h>
SoftwareSerial mySerial = SoftwareSerial(255, TxPin);
void setup()
{
pinMode(led, OUTPUT);
pinMode(button, INPUT);
pinMode(TxPin, OUTPUT);
digitalWrite(TxPin, HIGH);
pinMode(button2, INPUT);
}
void loop()
{
mySerial.begin(9600);
delay(100);
val = digitalRead(button);
val2 = digitalRead(button2);
if(val2 == HIGH){
mySerial.write(17); // backlight on
delay(2000);
mySerial.write(18); // backlight off
}
if((val == HIGH) && (oldval == LOW)){ //code to turn on or off LED and to show status of LED on lcd
state = 1 - state;
delay(5);
}
oldval = val;
if (state == 1) {
digitalWrite(led, HIGH);
mySerial.write(12);// refresh lcd
mySerial.print("LED ON");
mySerial.write(18);
}
else {
digitalWrite(led, LOW);
mySerial.write(12);
mySerial.print("LED OFF");
mySerial.write(18);
}
}
This is me demonstrating the LCD above.
Subscribe to:
Posts (Atom)