In another post I had some small second hand motors that I wanted to see if the included IR photo coupler on the back shaft of the motor were working. Turns out I managed to get a signal form one of them. Now I would like to understand what is going on with the trace I have captured on my scope. And the last question is about a bit of maths on how I can calculate the motor RPM from the Hz of the motor
Here is the mentioned post. https://www.electronicspoint.com/my-ir-photo-interupter-dead-can-you-test-them-t267013.html
I want to use the motor and the signal that the sensor gives off and feed that into an input pin on the arduino that I have.
So I guess I need to make sure that the voltages are not too high and that the current is not to large either. I do not know if I can read current off my scope, because with a multimeter you need to put it in series in the actual circuit, and you don't do this with a scope. Which brings me to another thought, will my cheap digital multimeter be able to read how many mA the sensor uses if it is spinning on the motor? Will my meter be able to detect it quickly enough.
Here are the scope images:
This is me turning the motor shaft very slowly. You can clearly see when I hit a blanked out part in the encoder disc which blocks the light beam that nothing pretty much happens and there is a flat line. And when the light beam is visible to the sensor it gives an output.
This capture is with the motor running off a 6v battery to give a a constant speed. Zoomed in I see that it still has the flat line part but that the rest of the signal is like a sine wave or AV wave going up and down crossing over that flat line part.
So one question is why is there a sine wave. Obviously this is just what the output of the IR sensor give you to work with. I think that the IR LED actually pulses the light ie 38Khz or Mhz or what ever it is. does this have something to do with it or is it something to do with the receiver side sensor?
Here is what I am after regarding the voltages. To me that is like an AC voltage? does this mean for me to input this into my arduino I would need to clean up this signal or something? Or do I need to make a little circuit that detects each time that wave simply crosses over that middle flat line? Well it might have to be every 2nd line cross over, but then I guess you could program that in the arduino software.
Here is top of wave
Here is bottom of wave
Here is flat line
Delta Y in the top of the wave is 120mV, delta Y in the bottom of the wave is 0. So is that then right that the maximum total voltage is only 120mV?
Because if you then look at the delta Y when the cursor is on the flat line it too says its 0v. Ahh hang on a minute, I must have adjusted the vertical position as the top and bottom waves have the same vertical position but the flat line is adjusted up to 0.
Can you still work out from here what the voltage is on the flat line, is it truely 0v or what?
Then if it is that would mean that I have a positive voltage and also an negative voltage going on here. Which like I mentioned before how the scope looks like an AC wave.
I just fiddled on the scope again. What exactly does it do when I adjust my vertical position up and down. What is that little yellow flag/tag on the left hand side of the screen that has the number 1 in it? and what do you do with it? If I adjust it on the screen to POS=0v it it now zeroed in on the center horizontal line on the scope screen. Is this then what 0v is? Anything above is POS, anything below is NEG? If that is the case then I am getting a dead 0v when on the flat line?
Also I see I have two cursors on the screen too.
I think that are called: A->Y and B->Y why do I have two of these, I mean I only need one for the info I am after right? I guess you would use two so that you can compare two values etc?
And I have a 1/DeltaX: = 5.00Hz This is the reading of the Hertz which is the frequency??? The time between say one upper peak to another upper peak, ie one full wave cycle? What is the maths then for me to work out the motor RPM from that 5Hz?
Do I need to count how many open gaps there are in one revolution of the motor encoder disc.? Then what?
Here is the mentioned post. https://www.electronicspoint.com/my-ir-photo-interupter-dead-can-you-test-them-t267013.html
I want to use the motor and the signal that the sensor gives off and feed that into an input pin on the arduino that I have.
So I guess I need to make sure that the voltages are not too high and that the current is not to large either. I do not know if I can read current off my scope, because with a multimeter you need to put it in series in the actual circuit, and you don't do this with a scope. Which brings me to another thought, will my cheap digital multimeter be able to read how many mA the sensor uses if it is spinning on the motor? Will my meter be able to detect it quickly enough.
Here are the scope images:
This is me turning the motor shaft very slowly. You can clearly see when I hit a blanked out part in the encoder disc which blocks the light beam that nothing pretty much happens and there is a flat line. And when the light beam is visible to the sensor it gives an output.
This capture is with the motor running off a 6v battery to give a a constant speed. Zoomed in I see that it still has the flat line part but that the rest of the signal is like a sine wave or AV wave going up and down crossing over that flat line part.
So one question is why is there a sine wave. Obviously this is just what the output of the IR sensor give you to work with. I think that the IR LED actually pulses the light ie 38Khz or Mhz or what ever it is. does this have something to do with it or is it something to do with the receiver side sensor?
Here is what I am after regarding the voltages. To me that is like an AC voltage? does this mean for me to input this into my arduino I would need to clean up this signal or something? Or do I need to make a little circuit that detects each time that wave simply crosses over that middle flat line? Well it might have to be every 2nd line cross over, but then I guess you could program that in the arduino software.
Here is top of wave
Here is bottom of wave
Here is flat line
Delta Y in the top of the wave is 120mV, delta Y in the bottom of the wave is 0. So is that then right that the maximum total voltage is only 120mV?
Because if you then look at the delta Y when the cursor is on the flat line it too says its 0v. Ahh hang on a minute, I must have adjusted the vertical position as the top and bottom waves have the same vertical position but the flat line is adjusted up to 0.
Can you still work out from here what the voltage is on the flat line, is it truely 0v or what?
Then if it is that would mean that I have a positive voltage and also an negative voltage going on here. Which like I mentioned before how the scope looks like an AC wave.
I just fiddled on the scope again. What exactly does it do when I adjust my vertical position up and down. What is that little yellow flag/tag on the left hand side of the screen that has the number 1 in it? and what do you do with it? If I adjust it on the screen to POS=0v it it now zeroed in on the center horizontal line on the scope screen. Is this then what 0v is? Anything above is POS, anything below is NEG? If that is the case then I am getting a dead 0v when on the flat line?
Also I see I have two cursors on the screen too.
I think that are called: A->Y and B->Y why do I have two of these, I mean I only need one for the info I am after right? I guess you would use two so that you can compare two values etc?
And I have a 1/DeltaX: = 5.00Hz This is the reading of the Hertz which is the frequency??? The time between say one upper peak to another upper peak, ie one full wave cycle? What is the maths then for me to work out the motor RPM from that 5Hz?
Do I need to count how many open gaps there are in one revolution of the motor encoder disc.? Then what?