Friday, July 22, 2011

Duty cycle and pulse-width modulation on the Arduino UNO with Linux



int PIN = 13;
float dutyCycle = .75; // between 0-1

void setup() {
pinMode(PIN, OUTPUT);
}

void loop() {
int state = 0;

while(1) {
if(state == 0) {
digitalWrite(PIN, LOW);
delay(1000 * (1-dutyCycle));
state = 1; }
else {
digitalWrite(PIN, HIGH);
delay(1000 * dutyCycle);
state = 0;
}
}
}

Tuesday, July 19, 2011

Square wave tutorial using Arduino UNO and Ubuntu/Linux

The following video was made as a tutorial on square waveform generation using an Arduino UNO and Ubuntu. It is a very basic video, and I hope to make another one soon on stepper motor controllers next.

The video was made with OpenShot Video Editor under Ubuntu Linux (similar to Microsoft Windows, Adobe products, or iMac).



int PIN = 13;

void setup() {
pinMode(PIN, OUTPUT);
}

void loop() {
int state = 0;

while(1) { if(state == 0) {
digitalWrite(PIN, LOW); state = 1;
}
else { digitalWrite(PIN, HIGH); state = 0;
}
delay(2000);
}

Tuesday, July 12, 2011

AOYUE 2702A+, SAC 305, and Throwing Star LAN Tap




The AOYUE 2702A+ arrived yesterday, which is a all-in-one digital hot air station with a soldering iron, a built-in smoke absorber, a desoldering gun, and a desoldering pen. Kelly found a great spot in the house where we immediately set up a workbench for electronics, jewelry crafting, and other similar manufacturing projects.

Since I had never soldered before, the first task was to assemble a DYI project called "Throwing Star LAN Tap". You can read more about this project at Michael Ossmann blog. The solder of choice for this task was the SAC 305, which is a lead free with a melting range of 217-221°C. In the photo, each of the four Ethernet connectors were soldered in counterclockwise fashion, starting at the 12-o'clock position.