Let's Make Robots!

Setting up a QRB1134?

Does anyone know how to set up one of these things:


I can't seem to get it working.

Someone made a quick "tutorial" on LMR but I just don't get it.

I found a diagram here that just doesn't make sense. The wire colors are all messed up.

Then I found this:


...which I tried but it didn't work? It could be that I did something wrong or that my sensor is damaged...

Besides it's not easy to find examples of this, so a helping hand would be appreciated :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The schematic looks good. Wire colours and connection are ok and match with the datasheet. I don't have this sensor but use a similar one (CNY70) in many applications. Maybe the sensor is defect. You can check the IR Led with a digicam, it should glow violet. The analog output can be tested with a multimeter and ambient light.

Remember the output signal is analog. The maximum detection distance is only a few millimeter.

What is your application?



This should help : http://letsmakerobots.com/node/871


Sorry, i just noticed you had already posted it. 

Nothing appears wrong in either the schematic above, or the colors used in the Arduino link, though the placement of the wires on the sensor is switched around in the Arduino link.

The sensor should have a high (5 volt) output with nothing close by, or when within 1/8" of a dark surface. When about 1/8 inch (3 millimeters) from a white surface should produce a low, (0.6 volt) signal on the output between the collector and the 10K resistor.

Well I just seemed to be getting fluctuating random numbers no matter what I did, and since I couldn't find any diagram that confirmed my setup I presumed my setup was wrong and stopped testing out of fear of toasting my sensor.

BUT...I just tested it again and allthough the readings aren't quite as consistent as I'd like, it does seem to be working.

Here is an example of the readings when nothing is in front of the sensor (fluctuating between 0V and a litle less that5V):


Here is an example of the readings when a white surface is in front of the sensor (fluctuating between 0V and a litle over 1V):


These readings aren't very useful though since they seem to be resting on the same "plateau" (~1V), so I'll need a LOT of readings to tell the difference. Besides when I put a black object in front of the sensor the readings look the same as if it was a white object.

I plan to use it for an encoder like this:


...which will be placed on the wheels of a robot. So I'll need some more consistent readings...

Are you trying to get an analog reading? You just need a digital since it is either black or white.
You're right but it's an analog sensor so I thought I should do it like this and use code to determine whether it's black or white. I'll try connecting it to a digital pin though I think it will just randomly show high-low since both cases (see scopes above) occasionally dumps to 0V...

I just tried using a digital input instead of an analog input and it seems to be working. I (almost) got a straight 0V's with a white object and a straight 5V's with nothing in front of it. Don't understand why though, but as long as it works I guess... :D

The black objects I've tried still read as white objects, but I guess it has to be a matte pitch black surface that absorbs ALL light. I read that one should print out the encoder using a LASER printer and not an INK ditto like the one I have, so I can't test it right now.

Still any progress is good progress...thanks mate ;)

Try replacing your resistors with pots and see if you can dial in the proper sensitivity so black = black even when it isnt a matte finish.
Thanks for the tip (again). I may do that later ;)
Does anyone know how often this sensor can/should be read? I know that a GP2D12 Sharp sensor should be read max every 36ms, but I haven't found this info on the QRB1134...