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 increase the sensitivity of LDR in my project

Status
Not open for further replies.

antoine magdi

New Member
-i effect on a 10 ldr's by 10 laser beams, desigining a game like a control system to protect the safety of a safe, i gave the player the opportunity
to interrupt the laser beams 3 times in the game.

-he must interrupt the first laser beam, and the final beam (to be sure that he arrived at the final of the area) ... (that's far of the 3 opportunity)

-MY problem is to sense the interruption of the electric beam the player must interrupt it for at least 0.5 second and that reduce the sensitivity of my game

this is the code of my project
where
-portb is to contorl a 7-seg (to appear the the remaining opportunities)
-portc.5, portc.6, portc.7 (to control 3 leds where every interruption one led activate)
-portc.4 is to control a sounder if the player ended his 3 opportunity
-portc.3 is to control the activation of a led if the player wins
-the first LDR is related by the LDR before the final one and the two are in series with resistor 10kΩ
-the second LDR is related by the final LDR and the two are in series with resistor 10kΩ
-each LDR is in series with a resistor 10kΩ

'*********************************************************
define adc_bits 8
define adc_sampleus 50
'*********************************************************
adcon0=%11000001
adcon1=%00000000
trisb=0
trisc=0
'*********************************************************
adc_result0 var byte
adc_result1 var byte
adc_result2 var byte
adc_result3 var byte
adc_result4 var byte
adc_result5 var byte
adc_result6 var byte
adc_result7 var byte
bn var byte
c var byte
d var byte
mask1 var byte
mask2 var byte
'*********************************************************
portb=%1001111
portc=0
bn=0
c=0
d=0
mask1=0
mask2=0
'*********************************************************
'******************** = = = = = = ***************************
'*********************************************************
main:
adcin 0,adc_result0
adcin 1,adc_result1
adcin 2,adc_result2
adcin 3,adc_result3
adcin 4,adc_result4
adcin 5,adc_result5
adcin 6,adc_result6
adcin 7,adc_result7
'*********************************************************
if adc_result0<140 then c=1
if adc_result1<180 then c=1
if adc_result2<180 then c=1
if adc_result3<140 then c=1
if adc_result4<140 then c=1
if adc_result5<140 then c=1
if adc_result6<140 then c=1
if adc_result7<140 then c=1

'*********************************************************

if adc_result0>140 then thebegining
if adc_result1>180 then again
if adc_result2>180 then again
if adc_result3>140 then again
if adc_result4>140 then again
if adc_result5>140 then again
if adc_result6>140 then again
if adc_result7>140 then mask1=5

goto main

Thebegining:
if mask2=10 then portc.4=1
mask2=10
if mask1=5 then portc.3=1


again:
if c=1 and d=1 then bn=bn+1
c=0
d=1

select case bn

case 0
portb=%1011011
portc.5=1

case 1
portb=%0000110
portc.6=1

case 2
portc.4=1
portb=%0111111
portc.7=1
pause 3500
portc.4=0
'******************
portb=0 '*
pause 4000 '*
portb=%1001111 '*
portc=0 '*
bn=0 '*
c=0 '*
mask1=0 '*
mask2=0 '*
d=0 '*
'******************

end select

goto main

'********************************************************************
goto main

end


if any one can help me in how to increase the sensitivity of the game plz send me the solution
sorry for the absence for a schematic


Thanks for your efforts
 
Last edited:
Photoresistors (LDRs) change resistance very slowly compared to your requirements. One example (LDR07): resistance at 10Lux 4-11KΩ, R01min 40KΩ (after 1 second darkness), R05min 120KΩ (after 5 seconds darkness), ton 50ms, toff 35ms.

Supposedly you can't get the circuit to switch in the 500ms time.

So better use photodiodes.

Boncuk
 
Status
Not open for further replies.

Latest threads

Back
Top