Are there any cheap optical encoder modules with direction output pin? - Page 1
Forum section: electronics / beginners

author: LinuxHata
author_rank: Frequent Contributor
timestamp: July 12, 2024, 06:43:14 am
content: Hello.I need an optical encoder module, simple, no super high speed or resolution. (reference shown on the attached picture)But it should have two outputs, pulse and dir, like pulse outputs pulses, and dir outputs say 1, when turned CW, and 0 when CCW. Or there might be two pulse outputs, A and B, when A outputting pulses only when turned CW, and B outputting pulses when turned CCW.Yes I know it can be done in software (Arduino/MCU/etc)No I don't want to go that way, I need ready to use module as described.Thanks in advance!

author: jonpaul
author_rank: Super Contributor
timestamp: July 12, 2024, 06:45:32 am
content: logic with ICs can detect itj

author: perieanuo
author_rank: Frequent Contributor
timestamp: July 12, 2024, 08:37:52 am
content: You mean a quadrature encoder.br

author: mikerj
author_rank: Super Contributor
timestamp: July 12, 2024, 10:38:05 am
content: Quote from: perieanuo on July 12, 2024, 08:37:52 amHe specifically does not want a quadrature output, but I don't know if the device he wants actually exists. There is a single chip solution that would let him use a quadrature encoder; the LS7804 Quadrature Clock Converter.

author: kripton2035
author_rank: Super Contributor
timestamp: July 12, 2024, 10:41:53 am
content: it is the LS7084 (and not 7804)and at more than $5 each, it is cheaper to program a small pic or even use a whole arduino nano for this !

author: LinuxHata
author_rank: Frequent Contributor
timestamp: July 12, 2024, 11:57:59 am
content: As said, this should be readily available module, with no additional circuit or programming required.Whenever there is a complete device which integrates any of solutions mentioned, I'll be glad to know the part number.

author: kripton2035
author_rank: Super Contributor
timestamp: July 12, 2024, 12:08:56 pm
content: there are also the LS7183 LS7184 in the same serie, or also the HCTL-2000 with parallel outputthese are old chips

author: langwadt
author_rank: Super Contributor
timestamp: July 12, 2024, 12:10:18 pm
content: if you don't mind it being prone to a few step of errors when changing direction, you can use a quadrature encoder. Use one channel as direction the other as clock

author: Ian.M
author_rank: Super Contributor
timestamp: July 12, 2024, 01:45:52 pm
content: These are quadrature optical encoders, so have no contact bounce so you don't need a full state machine to track their movement - it can be done with fairly simple logic, at most four gates and a flipflip.First, unless it already has them onboard you need some Schmidt input buffers to get square edges on the quadrature A and B signals. 74LVC2G17 will do the job. Alternatively you'll need some gates later so use two gates from a 74HC132 quad Schmidt NAND as inverting buffers. You've now got buffered A and B (doesn't really matter if they are inverted). Trigger a D type flipflop (e.g. 74LVC1G74 ) from B to latch A when B rises. Use its Q and /Q outputs ANDed (or ORed) with A as your up and down pulses. For idling high, low going pulses, you can use the other two gates of the 74HC132. otherwise you'll be better off with a 74LVC2G32 dual OR gate for idle low, active high pulses. You'll probably get a runt pulse on either UP or DOWN when you change directions.However I'd personally throw a PIC10F320 (SOT23-6) at the problem. Just enough pins for two inputs and two outputs, and just capable enough to program in C using Microchip's XC8 compiler. For one-offs or small volume program them yourself, but for production you can upload your (fully tested) firmware to MicrochipDirect and have them program them for you for a small fee, so from the point of view of your assembler its just a dedicated custom chip. There are many alternative 8 bit MCUs that can do the job, so it comes down to what toolchains you are familiar with and the setup and per unit costs of the manufacturer's programming service,

author: MarkF
author_rank: Super Contributor
timestamp: July 12, 2024, 03:09:39 pm
content: I saved this circuit years ago. Don't know how well it works.It's close to what you want. As others have said, it's probablycheaper and simpler circuit to use a small MCU instead.But, you get the idea how to do it in hardware.

author: Ian.M
author_rank: Super Contributor
timestamp: July 12, 2024, 03:47:43 pm
content: Also seehttps://www.eevblog.com/forum/projects/quadrature-rotary-encoder/from back in 2017, where I presented a 'TTL' SSI/MSI logic implementation of the classic QEI state machine in five ICs if self-clocked or four if an external clock is available. Complete with LTspice sim.

author: LinuxHata
author_rank: Frequent Contributor
timestamp: July 12, 2024, 04:01:54 pm
content: Well, I don't know how to explain simpler.I don't want to solder or build or program ANYTHING.I'm looking for READY DEVICE, which will have outputs as I asked.

author: Gyro
author_rank: Super Contributor
timestamp: July 12, 2024, 04:21:17 pm
content: Quote from: LinuxHata on July 12, 2024, 04:01:54 pmTo the best of my knowledge, you're going to be out of luck then. It's the sort of thing that either needs a bit of S/W decode of a little bit of external logic. I doubt if there is a market for anything else.

author: SteveThackery
author_rank: Super Contributor
timestamp: July 13, 2024, 10:45:57 am
content: Quote from: LinuxHata on July 12, 2024, 04:01:54 pmThe closest you will get is the LS7084. It doesexactlywhat you want but it's a chip, not a module. It looks like you need to be a bit more flexible in your requirements.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: July 13, 2024, 04:32:16 pm
content: Quote from: LinuxHata on July 12, 2024, 04:01:54 pmThat's possible, but as these are not standard products, your best option is probably to pay someone else's salary to design and build it for you.

author: Kim Christensen
author_rank: Super Contributor
timestamp: July 13, 2024, 06:08:31 pm
content: Quote from: LinuxHata on July 12, 2024, 04:01:54 pmWhat are you trying to control with this device?Maybe there is another way that will work with your device.ie: What's the end goal?

author: StyxF2
author_rank: Contributor
timestamp: July 13, 2024, 09:48:02 pm
content: And here's a board you can use with the LS7084... Just gotta plug in your power, outputs and encoder...https://www.electronics-lab.com/project/cmos-ttl-quadrature-encoder-using-ls7084/

author: LinuxHata
author_rank: Frequent Contributor
timestamp: July 14, 2024, 06:42:48 am
content: I have no idea for what this device is for. Most likely, some sort of demo system.This is for university needs, and I'm in purchases, not in electronics design or manufacturing.

author: Kjelt
author_rank: Super Contributor
timestamp: July 14, 2024, 08:10:28 am
content: Well the most used application for a STEP and DIR signal is for controlling a motor or servo driver.And the most used piece of hardware between a quadrature output handwheel and a motordriver is a cnc controller.But to answer your question, no I don't know a ready to buy device like that.You could try searching for "manual servo driver tester" Perhaps on aliexpress.

author: Gyro
author_rank: Super Contributor
timestamp: July 14, 2024, 12:39:33 pm
content: Quote from: LinuxHata on July 14, 2024, 06:42:48 amIf you are in the purchasing department of a university, you really need to refer the responses received to your engineering department / requesting student. You cannot make a judgement of what is relevant to your requirement and what is not without technical knowledge.

author: Infraviolet
author_rank: Super Contributor
timestamp: July 15, 2024, 01:14:36 pm
content: "This is for university needs, and I'm in purchases, not in electronics design or manufacturing."There should be plenty of students, grad students, professors, lab instructors and technicians on hand who can all solve this for you. Most of them will suggest a solution involving buying a quadrature encoder module, then custom designing a PCB (most of them will know how to do this) and ordering it cheap ( from JLCPCB/PCBWay/a more expensive USA/EU manufacturer ) which will easily fit up against the commercial module (same size, same screw hole positions probably) which will have either a microcontroller (I might consider ATTiny85 for this) or a set of digital logic gate/latch ICs on it. The custom PCB will then output the desired form of signal. Let the person who designs the custom PCB give you the exact part numbers they need for the custom PCB(RS/Farnell/Digikey/Mouser make searching for those easy), then just buy those things and handle the payment (likely <£8) to the PCB fab (they person who understands the PCB will have to be the one who prepares the PCB order before payment as they'll know about layer needs, silkscreen requirements, leaded/unleaded/HASL/ENIG... choices as appropriate for the design).