Reading rotary encoder

Hi, I have a E38S6G5-600B-G24N that is an industrial 600 pulse/revolution A/B bi-phase rotary encoder.
How to connect it to Arduino?
I have 5Vcc, 0V, GND, A, B.
I have the breadboard and the power supply module connected to a 5V source, but since encoder cables are free-ended I don't know how to connect them.


You won't need the separate power supply, encoders don't need much current, you can power direct from the Arduino.

5V and 0V connect to the 5V and GND pins of the Arduino. The cable shield can also be connected to ground, but it's not mandatory.

The A & B wires can be connected to 2 arduino digital pins. You forgot to say what model of arduino you are using, so I will assume Uno. You can connect the A/B wires to digital pins 2, 3 because they are external interrupt pins, which might be needed for such a high precision encoder.

The terminals are soft, I need an hard connector to install on my Mega2560

Hi, @gtsolid

Have you established if the A and B outputs are open collector or totem-pole configuration?

What is the voltage that it will work at?

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

I believe the question is how to connect stranded wire to a breadboard.

Firstly, start reading here. Read the Racing Wheel link as well.

Can you solder? It may be time to learn.

NPN open collector.

Attach male crimp pins to the wires from the encoder.
crimp-pins-male-housing-500x500

2 Likes

How? I have a solder, I think it's time to learn. Should I weld the connectors to the male crimps? I think I need an intermediate component

With crimp connectors there is no need to solder.

In fact, soldering with crimp connectors possibly might make the wires less flexible and durable.

For crimp connectors, you need a crimping tool.


I waited to reply to this until I did something to photograph. Steps below:

Use quality RMA solder no larger than .031. I use .020 SN63PB37. SN60PB40 is fine but requires a steadier hand because of the way it returns from liquid to solid. You can buy a small quantity such as below or buy a 1lb spool that will last a lifetime.
https://www.amazon.com/Kester-Rosin-Core-Solder-Dispense-Pak/dp/B00AYJ0B7Y/ref=sr_1_15?hvadid=580591001893&hvdev=c&hvlocphy=1026744&hvnetw=g&hvqmt=e&hvrand=8282717367991334486&hvtargid=kwd-54510374085&hydadcr=1615_13457780&keywords=kester+63%2F37+solder&qid=1686045491&sr=8-15

Alright, let's get to it. I'm going to solder Dupont jumpers to some motor wires.

Cut the jumpers in half and strip the ends. Any wire stripper for the size wire will do. You can use a sharp knife or exacto blade if a stripper isn't in your budget. Be careful not to cut the strands or yourself if not using designated wire strippers. I used my teeth when I was young and dumb.

Tin all wires. This means pre-solder the wires with a coat of solder

Don't forget to slide the properly sized shrink tubing on one wire prior to soldering them together. Electrical tape can be used but shrink is preferred. The solder joints can be covered with an epoxy if nothing else is handy. In a pinch I have coated it with a few layers of my wife's fingernail polish.

Solder the stripped and tinned jumper end to the motor wire. Make sure the shrink is in place prior to soldering. A stand like what I'm using is nice to have but not required. It takes steady hands and some creativity without it. I lived many years without one. Now I'm too old to live without one :frowning:

Repeat until complete

I hope someone finds this helpful

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.