Hi, I have a beam sensor and I am trying to find a way to convert the output voltage of this beam sensor to around 4volts(plus or minus half a volt).
When I power this beam sensor, I used 12vdc power supply.
I measured how much voltage is comming out from the beam sensor by measuring it with a multimeter.
The multimeter shows 75.6mV when the beam is not interrupted.
When the beam is interrupted, the multimeter shows 0.816v.
I assume if use 24vdc power supply, the voltage comming from the beam sensor would be the twice this current reading. But, it is not enough.
I need 4 volts from this beam sensor when the beam is interrupted.
I came to know that using a pull up resistor(10k or less) will do the job but I wasn't sure of how to connect it to the beam sensor.
Could you take a look at this drawing and tell me whether it is ok?
Also, since arduino already has internal pull up resistors on each digital, analog pins, I think using them would be better rather than using external pull up resistors.
In this case, how can I connect the beam sensor to arduino to convert the output voltage of the beam sensor to around 4volts?
The specification of the beam sensor is as below.
Type : NPN
Detection type : Direct reflection type
Connection type : Code withrawal type
Detection distance(max) : 500mm
Operating voltage : 12~24VDC +or- 10% Ripple P-P below 10%
Current consumption : Below 35mA
Iluminance : Under sun light(10,000Lx),
Under illuminate light(3,000Lx)
Hi mingki, I thought you said you could adjust the output voltage with a control on the detector. If that's the case and you can wind it up to at least 3 volts but less than 5 volts (4 volts is a safe target) then you can read the value using digitalRead instead of analogRead.
The advantages of digital read:
you can use any Arduino pin, not just the analog ones.
Its faster
Its more logical to use digitalRead because you are treating signal as a digital value (its either on or off)
But if its difficult to get a four volt output suitable for digitalRead then its not a problem to keep using analog
I thought you said you could adjust the output voltage with a control on the detector
oh.. i must have mis informed you. What I mean was I could reverse the values from beam sensor reading by adjusting a controlling some kind of lever in the beam sensor. It was like a normal open and normal close of a switch thing I think.
So, when we did the test, i coul reverse the readings from small values(when there is no interruption) to large values(when there is interruption) and vise versa.
The advantages of digital read:
you can use any Arduino pin, not just the analog ones.
Its faster
Its more logical to use digitalRead because you are treating signal as a digital value (its either on or off)
Thank you.
I have a voltage regulator(MC7805) right now.
I also want to try to test using a voltage regulator and a resistor to get 4v from the beam sensor.
Please take a look at this drawing.
So, i use the 12v to convert it to 5v and then i limit the current to get the 4v in the end.
Is this OK?
I thought pull up resistor is another type of resistor. ;D
I just realized that I could use normal 10k ohm resistor for this application.
So, I used 10k ohm resistor I have and I made up a circuit like this. http://www.flickr.com/photos/34955071@N02/3982384746/sizes/o/
I measured the output from the MC7805 and the multimeter shows exactly 5v. But, the meter measured 75.6mV when beam is not interrupted and measured 0.816v when the beam is interrupted which is the same as before. I probed the red circle area when I measure the voltage.
Could you advise me which part should be corrected in the circuit?
Hi, I am sorry for the picture.
Here is the link.
Yes, I've been testing it and the beam sensor works ok on analog pin.
I did more test with a sketch I modified last night. I pasted it in the old etherpad.
But, when I continuously interrupt the beam at the same pot value, the LED on that pin sometimes doesn't flash although the serial monitor shows the enter and the exit status of the cup.
This also happens even when I interrupt the beam at random pot value.
So I was thinking maybe it is something to do using analog pin although the output from the beam sensor is digital.
A datasheet of the beam sensor would help - the voltage levels you mentioned are a bit suspicious for me (75mV and 860 mV).
If the sensor is properly connected, a solution could be an analog comparator like LM393 (with compare threshold set to about 400 mV).
Mingki, if you are getting the correct enter and exit messages then the problem is not with the beam. It may be easier to see what is happening if you can connect up the remote display using the Processing sketch.
Pepe34, there was a link to the datasheet posted in another thread, unfortunately is in Korean but there is a circuit diagram : http://www.santec.co.kr/pro_09_03c.htm