Hi all this my first experience,, i have been working on this from months,,,At first i try to assemble everything,,but few days back i baught my arduino duemilanove .I tested some of the examples and my board is working fine.
Coming to my project,,, it is reading time from Ds1307,,,that is also done, done on LCD.My aim is to ring hte college bell at specified time for specified time interval.
My problem is, I have to use a buzzer that should give beeps at the time when predefined time matches with current time from RTC.
For this shall i want to use interrupts?
One more thing is where to connect buzzer,, i want to use SQW/OUT pin(pin7) of DS1307.
Again the buzzer has to beep for some time ie; say for 2min how to produce that delay ; is it by using Timer interrupts?
Plz help me ,, if possible give me the schematic,, :-[
regarding the SQW/OUT:
u should connect a pnp transistor's base to it via a resistor, because the datasheet doesnt say, how much current that built in NMOS can take...
with that PNP u can drive higher currents (like 200mA)...
or dont u need high currents?
where do u want to enter that sound signal?
is there already an announcement system installed?
i have read (i cant remember where),
that a 500Hz square wave interrupted by silence is very alarming (like: 1s 500Hz, 1s silence; but not more than 1 silence phase per second, because some human brains react very badly on sharp impulses of 2Hz to 5Hz; like light flashes on waves or in moving trees or a stick on a picket fence)...
the Arduino can produce such frequencies on its PWM outputs...
Hey the thing is ,, i have done everything regarding DS1307 and I can able to read and display on to my LCD.
My problem is i have to use a buzzer and that should give an alarm when the current time matches with the predefined time .
whow can i do that ,, i want schematic where i can connect my buzzer to ; whether it is to the Board or to my DS1307 RTC?
// This code just lets you turn a digital out pin on and off. That's
// all that is needed to verify a relay curcuit is working.
// Press the space bar to toggle the relay on and off.
#define RELAY_PIN 3
void setup()
{
pinMode(RELAY_PIN, OUTPUT);
Serial.begin(9600); // open serial
Serial.println("Press the spacebar to toggle relay on/off");
}
void loop()
{
static int relayVal = 0;
int cmd;
while (Serial.available() > 0)
{
cmd = Serial.read();
switch (cmd)
{
case ' ':
{
relayVal ^= 1; // xor current value with 1 (causes value to toggle)
if (relayVal)
Serial.println("Relay on");
else
Serial.println("Relay off");
break;
}
default:
{
Serial.println("Press the spacebar to toggle relay on/off");
}
}
if (relayVal)
digitalWrite(RELAY_PIN, HIGH);
else
digitalWrite(RELAY_PIN, LOW);
}
}
This is actually taken from http://www.glacialwanderer.com/hobbyrobotics/?p=9
Plz can any one tell me what might me the problem? the bulb not glowing,,
I am testing my relay because i have to connect 230v college bell through that.
Plz help :-[