Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Project: Night Buzzer

Status
Not open for further replies.
here's the surce code of the PIC in mikroBasic
Code:
program beeper

dim light as  word
main:
  CMCON = 7
  ADCON1 = $00
  TRISA  = $FF
  TRISB  = $0
  PORTB = $FF
  Sound_Init(PORTB,2)
  
el:

light = ADC_read(2)

  If light < 200 then
   Sound_Play(10,10)
   delay_ms(5000)
  end if
  
goto el
end.

As for the conections there is an piezo speker on RB2 and the phototransistor output voltage to RA2.

The PIC is runing on its internal oscilator so no crystal

This one behaves like the one zatch made and as you see the code is very simple.

Il post the new code that has timing based on how fast do the lights get thurnded on.

btw:
what did you do whith your amp mether? (mine has an fused 200mA max input and an unfused 20A max input so its kinda hard to blow it)
 
Hey electro. Do you have microsoft instant messenger? Or AOL? I could redownload the AOL.

Not sure what I did with my ammeter. I think I connected across a 9volt battery while it was on a very small reading. Its a cheapo $3 one so i just got another one.
 
zachtheterrible said:
If you want revenge that won’t kill someone, just make them go insane, have I got the thing for you!! I whipped this device up over the last couple of days and couldnt be more satisfied :lol:

Place this in a room where somebody sleeps. While the light is on, this circuit will not make a peep. When the light turns off though, the circuit will stay quiet for about 10 seconds (determined by the 1000uf cap and the 22k resistor) and then turn on. When they hear it, they will get up and turn on the light to look for it, but of course it will turn off. Thinking that they are imagining things, they will turn off the light and go back to bed. 10 seconds later, they will hear it . . . it’s a vicious cycle :twisted:

How it works: When the LDR senses light, it turns Q1 on, which in turn makes Q2’s base more negative than positive: transistor (and buzzer) is off. When the LDR senses no light, it turns Q1 off. The capacitor discharges through the 22k resistor, all the while causing Q2’s base more negative than positive (the 10 sec delay). When it is done discharging, the 22k resistor biases the base of Q2 positively, which turns the transistor and the buzzer on. Simple as that :lol:

To make a longer delay, just increase the capacitance. Since the 22k resistor serves a dual purpose: draining the capacitor and biasing Q2, it should not be made a higher value to increase the length of the delay because it then won’t be able to bias Q2 correctly. Of course you can experiment. I think that the value can be increased a bit more. If you want to shorten the delay, by all means, decrease the value of that resistor, just as long as the value is so low that Q2 will receive too much current through the base and damage it. I’m not sure if this will happen with so low a supply voltage, but beter 2 be safe than sorry.

The 5k POT and the 2.2k resistor in series with it work very well with the 3-16 volt buzzer. If it is a small room, lowering the value of the POT will make the buzzer quieter and harder to find. If you use a different buzzer, you will just have to experiment to find the right value of resistor(s). Just make sure that you turn the buzzer WAAAY down to where u can barely hear it, that way, they will have a very hard time finding it.

Any small small signal NPN transistor will work for NPNs in the circuit, i personally used 2n3904's cuz i have a ton of them, but like i said, anything will work.

This circuit is EXTREMELY sensitive to light. Just turning on a flashlight in the room will turn it off.

If requested, I will provide a PCB, although u will have to make sure that the capacitor, the POT, and the buzzer will fit on it.

Have fun . . . and don’t be too cruel :cry:
where Do we give an input to the circuit?
 
Light is the input to the circuit. The Light Dependent Resistor's resistance changes a lot with the amount of light shining on it.
 
hmm.. a nasty project! lolz! nice and cool one! but it's kinda better if it trigger when he/she is in the middle of his/her dreams! :D about 5-10 minutes.
 
that could be done charle. only problem is you would need a rather large capacitor.

you could do it with a 555 and you wouldnt need so large a cap.
 
Re: Question?

electronic mind said:
how can a buzer which is (3-16) VDC be able to generate a sound when the Vcc is only 1.5 V (forgetting about the resistors)

Ummmm, i dunno, it just does :lol: Its not loud or anything.
 
pike said:
it just doesn't go at the specified frequency, i suppose. I'm assuming its a mechanical buzzer that is.

Is there a difference between mechanical and piezo? Cuz mine is piezo.
 
problem

:| i want to know..
that project have problem like noise..or others.. :roll: :wink: :wink:
 
Re: problem

res2 said:
:| i want to know..
that project have problem like noise..or others.. :roll: :wink: :wink:

Does it have problems like noise? How is noise a problem in this circuit? Noise is the what you want it to make.

I think you might have to clarify yourself a bit :lol:
 
This project has so many things that could be improved and made better, I would Like to see it evolve a sensor, maybe a microphone that could detect people within 3 metres and switch itself off or drop the volume to make it harder to find. :twisted: :twisted:
 
i've implemented each and every step and designed the circuit on a bradboard but it isn't working i dont know why could you please send me a tutorial which could help me in each and every step so that may be i'll be able to correct the mistake which i am doing in making this circuit
 
feejay said:
i've implemented each and every step and designed the circuit on a bradboard but it isn't working
The 2nd transistor doesn't have a current-limiting resistor in series with its base. So the 1st time you connect the battery, the capacitor charges through the base of the 2nd transistor with unlimited current and blows-out the base.
If the base does survive, does your buzzer work on the low voltage battery?
Disconnect the photoresistor to see if the circuit makes the buzzer work.
 
Night Buzzer Capacitor Questions

I'm interested in making the night buzzer that was posted some time ago. It uses two 1000 micro-farad capacitors along with the 9V power supply. I am aware of he energy storing potential of capacitors and want to verify that capacitors are discharged once I start playing with the system. Since this project uses rather large caps, I was wondering if anyone had input on using these safely. I assume I can put 22k capacitor accross the leads but just want to be sure.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top