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.

how to solve this

Status
Not open for further replies.

watzmann

New Member
i have built a small circuit to detcet how much light in the room and i decide to use it in my robot to detcet the ambiant light . , and if the output of this circuit is high then my robot will light up some LEDs.......my problem is suppose that my circuit detced that there no light then the internal LEDs will light up and that mean they light detcteor circuit will detcet again that there are light in the room and then shutdown the internal light .

how to solve that .

bytheway i'm using 16f877 pic circuit to control that



here is the light detector circuit .
 

Attachments

  • sens.gif
    sens.gif
    4.5 KB · Views: 132
watzmann said:
i have built a small circuit to detcet how much light in the room and i decide to use it in my robot to detcet the ambiant light . , and if the output of this circuit is high then my robot will light up some LEDs.......my problem is suppose that my circuit detced that there no light then the internal LEDs will light up and that mean they light detcteor circuit will detcet again that there are light in the room and then shutdown the internal light .

how to solve that .

Make sure the light from the LED's can't reach the LDR, althought here seems little point having an LED to show if it's dark or not, your eyes can already do that?.
 
Turn off the LEDs and wait for 1mS.
Measure the room light.
Turn on the LEDs.
Your light detector looks fast but if 1mS is not enough time wait 5mS. It works for me and I am waiting less than 1mS! Your eye will not see the off time.
 
Problem using PicBasic Pro

i'm using PIC16F84A to made a clock with an alarm, but now i have a problem with the picbasic program.Every time i write PORTA.1 as porta pin 1 in the program, it show error message in asm file.how i define each pin in the program?
by default the program set the
PORTL VAR PORTB
PORTH VAR PORTA
TRISL VAR TRISB
TRISH VAR TRISA

let say if i want to use PORTA pin 1 to receive send signal to trigger the alarm,how should i write the code?
 
The coverage of ambient light is stronger and larger than a single LED or cluster of LEDs. Just as other said, point the LEDs away from the detector. Are your LEDs meant to serve as an small indicator or as a secondary source of room illumination? Is the detector and LEDs mounted close to each other on the board or inside a small cover?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top