Category Archives: Arduino

Bose Wave Radio II Arduino Remote Clone

After recently reading the Clone a Remote with Arduino instructable by randofo, I was inspired to try to clone the remote of my Bose Wave Radio II. While this radio is outstanding from an acoustic perspective, the fact that it’s only means of control are by remote (only one remote is included) makes this single point of failure design far from ideal.

My goal was to essentially create a “backup” version of the included remote with only the basic functions necessary to operate the radio in the event that something should happen to the remote itself (lost, broken, dead battery, etc.).

I started with the Raw IR Decoder sketch on randofo’s ‘able, loading it onto my Duemilanove. Then I hooked up the IR transmitter and pushbutton to my Uno. From there it was mostly trial and error to find the minor differences between the actual remote’s timing and my clone’s timing. Once I had the numbers, I just transposed them all into randofo’s framework for sending IR commands.

This sketch is just the barebones commands, implement control as you wish (build yourself a second remote with a button for each function, send serial commands to the arduino, etc.). Commands are easily accessed, simple function calls.

Command List
Volume + –> volumeUp()
Volume – –> volumeDown()
On/Off –> power()
FM –> fm()
AUX –> aux()
Preset # –> preset#()
EX: Preset 1 –> preset1()
Tune Up (>) –> tuneUp()
Tune Down ( tuneDown()
Mute –> mute()

See instructables for the file download. Also, download the instructable as a PDF here.

Advertisements

Basic IR Motion Alarm with Arduino

Just a little side project I worked on to create a better version of the basic radioshack motion alarm. Arduino based (hackduino specifically), expandable, and a good project to start playing with Arduino and electronics.

Motion Alarm Diagram

And here’s the code (it’ll look better once you paste it into the Arduino IDE):

///////////////////////////////////////////////////////////////////////////////
///////////////////////////// PIR Motion Alarms ///////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/////////////////////////////// by loganemakf /////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

// VARIABLES

int ledPin = 12;
int pirPin = 3;
int alarmPin = 8;
long counter = 0;

// SETUP
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(pirPin, INPUT);
pinMode(alarmPin, OUTPUT);
digitalWrite(pirPin, LOW);

// warmup time
digitalWrite(ledPin, HIGH);
for (int i = 0; i = 180000){ // if the counter reaches 180 seconds
digitalWrite(alarmPin, LOW); // turn the alarm off
while(digitalRead(pirPin) == HIGH){ // while the motion continues
digitalWrite(ledPin, HIGH); // turn on the led until motion stops
}
digitalWrite(ledPin, LOW); // then turn the led off
counter = 0; // set the counter back to 0
}
else{ // otherwise (counter is less than),
if(digitalRead(pirPin) == LOW){ // check to see if there is motion
delay(2000); // and wait 2 seconds to ensure none
if(digitalRead(pirPin) == LOW){ // If there is still no motion
counter = 0; // reset counter
delay(40000); // and leave alarm on for 40 seconds
digitalWrite(alarmPin, LOW); // then turn the alarm off
}
else{ // and if there happens to be motion
goto label; // goto label (skip unneeded HIGH check)
}
}
}
}

}

Tagged , , ,