-1
\$\begingroup\$

Can photoresistor be used for counting passing objects?## Heading ##

Hello i'm new to the electrical things


I wanted to ask if i can use the photoresistor sensor for counting passing objects if yes how can i use it and how do I connect it with arduino ?


my project is to count the number of passing cars and send it to the LCD screen on the arduino.


if it's not gonna work what other sensors or otherways that i can use to make it work because i tried to find ultrasonic and IR sensor but all of them sold out .

\$\endgroup\$
1
  • \$\begingroup\$ I would recommend installing a photo detector of some sort (photoresistor could work, but a phototransistor or photodiode may work better) in a piece of pipe to keep them together and shield the sensor, then bounce the laser off of a corner cube (e.g. Bike reflector). You might also want to consider modulating the laser at a few khz and then using a bandpass filter to remove background noise. \$\endgroup\$ Commented Apr 9, 2016 at 2:23

3 Answers 3

1
\$\begingroup\$

If you can cross the road then you can use it along with either a laser or a modulated IR LED. You can modulate at something like 38kHz (using a 555 timer chip, or you can hand build a bistable-multivibrator circuit - aka oscillator) and there are photo receivers built to pick up this kind of signal (used for TV remote controls, fairly cheap) which incorporate a phototransistor + 38kHz bandpass filter. 38kHz works particularly well for transmitting infrared signals for some reason.

Alternatively if you are set on the photoresistor, you could apply a filter to the output of your photoresistor to filter out constant sources, like sunlight. Ideally you would use a band-pass filter on the photoresistors output to get just the modulated signal.

That way as soon as something breaks the signal beam it knows, and it not overwhelmed by constant sunlight or just any other sources (car lights that are not crossing beam for example). This broken-signal can be amplified + inverted using an inverting amplifier, and drive an LED. This will light up each time a car passes.

If you need to count the number digitally, you could use the same signal you would use to drive the LED, and put it into a micro-controller. This could be used to count the number of times it goes off over a period of days.

This was very similar to a college project we had, except we could not put anything on the other side of the road. So instead we built IR transmitter/receiver combination to bounce the IR off passing cars. We tested with pieces of metal plate and some metal chair seats, and it worked up to like 20 feet.

However car paint is very different from car metal as we soon found out, and car paint absorbs almost all IR (no detection even at ridiculously close range). So we instead had to use computer vision + beagleboard to solve the problem.

\$\endgroup\$
0
\$\begingroup\$

Unless the cars block a significant amount of the light, a photoresistor won't be sufficient. Alternatively, you could focus a light beam on the sensor from across the road (or use a mirror) and detect changes in that.

Because of day/night differences, and temperature changes, you'll probably need to use the ADC input of your arduino to detect changes and filter out slowly moving ones (day/night, temperature) in order to detect sharp changes in light level caused by cars blocking the light.

\$\endgroup\$
0
\$\begingroup\$

@jp314 is right, but all is not lost. If you can set up a bright light which shines on the resistor, and have the passing objects break the beam, a very simple circuit

schematic

will do. You'll need to play around a bit to get the resistor value. Start by shining the light on the LDR, and measure the resistance, then use that for the resistor. Play around with different values an see what happens.

If you have not done so, buy a cheap DMM in order to measure resistances and voltages.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.