Is there a way to attach a speed sensor, slotted or reflective, to this motor?

bertus

Joined Apr 5, 2008
23,023
Hello,

At what distance did you have the reflective part?
The datasheet shows that the sensor is the most sensitive at 5 mm (0.2 inch).

Bertus
 

Attachments

MisterBill2

Joined Jan 23, 2018
28,502
The drawing shows a 100K resistor, which I think is way to much. I suggest a 4r7K, that is, 4700 ohms, as the load resistor for the photo transistor. That allows 1mA in the conducting state , which should work much better. And you certainly will need to adjust for the best response, you can do that with the motor stopped and the sensor pointing at a white area. And use a digital voltmeter to monitor the output voltage.
 

dendad

Joined Feb 20, 2016
4,642
You may have to drive the opto into a Schmidt trigger before the processor pin as it could respond a bit to the black.
The applications a quick search found for it has it used as an analog signal, not switching.
 

Thread Starter

Xavier Pacheco Paulino

Joined Oct 21, 2015
728
My guess is that your voltmeter is causing a voltage drop in the resistor because it has a low input resistance. My guess is that you are using an analog multimeter to check the voltage.
I'm using an oscilloscope to see the signal, and it's between 1.4 and 0V. Which is wrong. Without the sensor connected I should see 3.3V at the microcontroller input as it is connected to the 10K pull up resistor.
 

MisterBill2

Joined Jan 23, 2018
28,502
Not only may ambient light be a cause of the lower voltage, it may well be that the black is also reflecting a fair amount of light. So try it with a non-reflective material right against the sensor package and see what the voltage is with no light at all reflected.It may be that you need to put the reflective material in those ribs, so that there is nothing to reflect between them.
 

Thread Starter

Xavier Pacheco Paulino

Joined Oct 21, 2015
728
Not only may ambient light be a cause of the lower voltage, it may well be that the black is also reflecting a fair amount of light. So try it with a non-reflective material right against the sensor package and see what the voltage is with no light at all reflected.It may be that you need to put the reflective material in those ribs, so that there is nothing to reflect between them.
I'm sorry if I haven't said the issue clearly. The low voltage appears without the sensor connected. It's not the sensor fault then. It's another issue I have to look into now.
 

Reloadron

Joined Jan 15, 2015
7,976
I would measure both sides of the 10K pull up resistor. Curious as to if the LED Emitter is somehow pulling down your 3.3 volt supply. Assuming you are measuring the Vout terminal with a high impedance voltmeter I can see no way a 10 K pull up would measure 3.3V on one side and 1.4 V on the other side which is your Vout.

You are DC coupling your scope right? Even using the scope with a 1 Meg input impedance (not a 10X probe) you should see a 3.3 VDC shift in your trace. I would try a good DMM if you have one.

Ron
 

MisterBill2

Joined Jan 23, 2018
28,502
I would measure both sides of the 10K pull up resistor. Curious as to if the LED Emitter is somehow pulling down your 3.3 volt supply. Assuming you are measuring the Vout terminal with a high impedance voltmeter I can see no way a 10 K pull up would measure 3.3V on one side and 1.4 V on the other side which is your Vout.

Ron
That depends entirely on the value of the load resistor, and if that is indeed 10K, the drop is one volt per hundred micro amps. AND, if any reflected light is hitting the phototransistor then 200 microamps is fairly reasonable. Hence my suggestion of putting the reflective material on the web sections. And my comments that shiny black is a fair reflector. I have done the photo sensor thing a few times, and I have seen some problems. Shiny black is one of them, especially with IR. I didn't pay attention to what wavelength the sensor used, often they are IR.
 

Bernard

Joined Aug 7, 2008
5,784
To rule out photo transistor, disconnect it and re measure. With a similar photo detector, Vcc 4.1V.
9k1 load using 20k ohms /V meter , dark 3.7 V, light .1V, 10 Meg meter, 4.1 V light .1V.
Post # 51 sensor is the photo transistor ?
 
Last edited:

MisterBill2

Joined Jan 23, 2018
28,502
The attachment in post #42 calls it a phototransistor. Also, that is the symbol used. Post #51 tells me that there is another problem as well. If a ecent oscilloscope is being used to read the voltage then several possibilities exist, including calibration error, reading error, scope probe fault, bad resistor error, and also a power supply problem. Thus there are a lot of places that things can go wrong. Connecting the negative scope lead to the LED + terminal would subtract over a volt as well. But some light on the sensor is the most likely, except that now it is reported to be happening without the sensor connected. That sounds like a wiring issue to me.
 

Reloadron

Joined Jan 15, 2015
7,976
That depends entirely on the value of the load resistor, and if that is indeed 10K, the drop is one volt per hundred micro amps. AND, if any reflected light is hitting the phototransistor then 200 microamps is fairly reasonable. Hence my suggestion of putting the reflective material on the web sections. And my comments that shiny black is a fair reflector. I have done the photo sensor thing a few times, and I have seen some problems. Shiny black is one of them, especially with IR. I didn't pay attention to what wavelength the sensor used, often they are IR.
I agree but he clearly states:
I'm sorry if I haven't said the issue clearly. The low voltage appears without the sensor connected. It's not the sensor fault then. It's another issue I have to look into now.
So my read is he has a 10K resistor hanging out there on 3.3 Volts measuring 1.4 Volts at his Vout. Leaves me wondering? There is no sensor in the circuit so we eliminate that. Beats the heck out of me.

Ron
 

Thread Starter

Xavier Pacheco Paulino

Joined Oct 21, 2015
728
The problem about the 1.4V has been solved. As I was trying to pull up the pin to 3.3V, at the same time, another thing was trying to pull it down. So, pull-up vs pull down, they were fighting. Now I can peacely get back to the sensor.
 

MisterBill2

Joined Jan 23, 2018
28,502
OK, if there is not much current flowing into the 10Megohm input of the scope used for measuring, then either the resistor value is way off, like perhaps 10 meg not ten K, or the scope DC calibration is way off, which is quite possible. Or perhaps the power supply connection is not quite correct. I don't recall any mention of what sort of power supply is involved. A very logical next step is to measure the voltage at the supply end of the resistor and see what it is. That is a very simple thing to do, and it may provide an interesting explanation. So I am asking
Xavier Pacheco Paulino Thread Starter to use the same setup and measure the voltage at both ends of thet 10K ohm resistor, and let us know what it is.
 

Reloadron

Joined Jan 15, 2015
7,976
OK, if there is not much current flowing into the 10Megohm input of the scope used for measuring, then either the resistor value is way off, like perhaps 10 meg not ten K, or the scope DC calibration is way off, which is quite possible. Or perhaps the power supply connection is not quite correct. I don't recall any mention of what sort of power supply is involved. A very logical next step is to measure the voltage at the supply end of the resistor and see what it is. That is a very simple thing to do, and it may provide an interesting explanation. So I am asking
Xavier Pacheco Paulino Thread Starter to use the same setup and measure the voltage at both ends of thet 10K ohm resistor, and let us know what it is.
Uh Bill, he solved it. :)

Ron
 
Top