3
\$\begingroup\$

I got these Optical Encoders from a local vendor and connected it to my arduino in the following order;

  • (+)----> 5v
  • (-)---> Gnd
  • (01)--->2
  • (02)--->3

But, it burnt and smoked out as soon as I connected it. I am assuming it requires a current limiting resistor, but I couldn't find a datasheet on the product anywhere. There's just some chinese written behind it.
enter image description here enter image description here

Is there anyone who could shed some light on this?

Updates

Here are some photos of the internals, apparently there is a current limitting sensor inside. But there are no resistors on the output. Insides

\$\endgroup\$
  • \$\begingroup\$ I think the chances of finding someone on this website using this Chinese device is probably little to none. Did this encoder smoke or did the Arduino? These wires on this encoder are extremely close to each other. EDIT: Also important to note to always consult the seller before buying something if there is missing information. The Chinese don't do a good job at telling you everything you need to know so you really have to force the information out of them. (This is true in the business world as well...) \$\endgroup\$ – KingDuken May 13 '19 at 17:39
  • \$\begingroup\$ It's the encoder that burnt out. Specifically the emitter... That's why I assumed the current limiting resistor. \$\endgroup\$ – Samiul Hoque May 13 '19 at 17:40
  • 1
    \$\begingroup\$ Please put enough info in the question that it can be answered without following a link which may die in future. "No datasheet? No sale!" Are you sure you got the 5 V version? There's a 3.3 V version as well. \$\endgroup\$ – Transistor May 13 '19 at 17:40
  • \$\begingroup\$ Added photos to the question, i hope it's okay now. @Transistor \$\endgroup\$ – Samiul Hoque May 13 '19 at 17:45
  • \$\begingroup\$ @KingDuken I bought them from a physical shop (local) and found the link after some googling. This is apparently the only optical sensor this shop has... and it turns out to be the only shop in a hundred mile radius where I'm at right now. \$\endgroup\$ – Samiul Hoque May 13 '19 at 17:50
5
\$\begingroup\$

(This answer is appropriate for many opto sensors, but perhaps not for the one in the original question! Sorry! I'll leave it here in case it helps others.)


These encoders are usually similar to an optoisolator:

optoisolator

The difference, of course, is that a perforated wheel sits between the emitter and the sensor.

The emitter needs to be handled as any LED circuit. You'll need to figure out (from a datasheet, preferably) the LED's forward voltage and operating current. Then you can calculate how much resistance to put in series with the LED.

Since you don't have a datasheet, you'll have to do it with a multimeter and some ingenuity! There are already questions/answers on this site which could help.

Regarding the receiver, there are a few different types of output circuits. Here is an example using a common output type:

schematic

simulate this circuit – Schematic created using CircuitLab

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Arduino's interrupt pins are fine. It's the emitter that's gone. It had TTL written all over which is why I didn't add the resistor. The only assumption now is that I may have gotten the 3.3v version. I'll try buying another one and checking if that's the case. \$\endgroup\$ – Samiul Hoque May 13 '19 at 18:51
  • \$\begingroup\$ @SamiulHoque When it says TTL, it would be talking about the output. The input will still need a current limiting resistor. Please see my edited answer. \$\endgroup\$ – bitsmack May 13 '19 at 18:53
  • \$\begingroup\$ And, yes, I agree about the interrupt pins. I was incorrectly assuming you were driving the LED with an output pin. Sorry! \$\endgroup\$ – bitsmack May 13 '19 at 18:54
  • 1
    \$\begingroup\$ @SamiulHoque You only need an encoder if your BLDC motor is going to slip (miss) steps. If your motor is adequately sized you can simply count the steps (phase changes) from the BLDC drive solution. \$\endgroup\$ – Jack Creasey May 13 '19 at 19:16
  • 1
    \$\begingroup\$ If all else fails, I'll try using a hall sensor. But the difficulty there would be to get the neodymium magnets over here. Let's hope you guys were right about it being 3.3v. Fingers crossed to actually finding someone who used this sensor responding to this thread now. \$\endgroup\$ – Samiul Hoque May 13 '19 at 20:08
4
\$\begingroup\$

It says TTL compatible, but parts like this are notorious for being wrong. Encoders can be open collector or open drain. There is no datasheet, so if you want to use this part, do your own testing with resistors to Vcc and ground, measure the current/voltage across the resistor to find out what kind of transistor stage is on the output of the encoder.

Another problem you may be having is setting the ports on the microcontroller to push pull (output) instead of an high impedance (input). Either way, current limiting resistors should be used. Good luck.

| improve this answer | |
\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.