0

I'm trying to measure the speed of a small DC motor using a rotary encoder and an OPTO sensor, and counter input on myDAQ.

Here's my circuit on the breadboard: enter image description here

enter image description here

enter image description here

enter image description here

The collector pin of the transistor is connected to the DIO1 port of the myDAQ.

And here's the LabVIEW code:

enter image description here

On the front panel, I only have the RPM numeric indicator.

When I run the program, with the rotary encoder spinning in the gap of the OPTO coupler, nothing happens. The RPM numeric indicator keeps showing 0.

I thought the problem was my OPTO coupler. I tested it through analog input and I successfully visualised the pulses, as shown here:

enter image description here

So the problem is not the OPTO coupler.

And I can't seem to figure out the source of the problem. I would really appreciate some help please.

  • 1
    Amplitude of **-5V**? I notice that breadboard connections to MyDaq use **blk** and **red** wires to the 5V power source. We usually connect **blk** to **GND** and **red** to **+5V**. You haven't followed this convention. – glen_geek Nov 27 '22 at 13:53
  • 2
    Show a schematic. Breadboard pictures do not constitute a circuit diagram. – Andy aka Nov 27 '22 at 14:11
  • Optocoupler is a word, not an abbreviation. There's no need to capitalize it or split it into two words. – Hearth Nov 27 '22 at 18:31

0 Answers0