element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum DPDT Demuxer Logic Emulator ?
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 0 replies
  • Subscribers 301 subscribers
  • Views 1048 views
  • Users 0 members are here
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

DPDT Demuxer Logic Emulator ?

juanpc2021
juanpc2021 over 4 years ago

This is a crazy question for Logic Experts...

 

i know this can be done very easy with Arduino / Atmel Studio,

or a real DPDT switch, or FPGA, but i'm looking other ways to Emulate DPDT Switch with Logic,

 

Long Story Short:
found a very old 1980s or 1990s Rotary Contact Encoder,

same size & pins as Arduino KY-040, same push button,

but is Not standard 2-Bit Quadratic 90°, Nor Gray.

 

the output is:

CW = A Only,

CCW = B Only.

vs.

90° 2-Bit Quadratic:

CW = A 0°, B 90°

CCW = B 0°, A 90°.

 

I have Not found a replacement for that strange Encoder,

so i need to make a converter from 2-Bit Quadratic to Dual 1-Bit.

 

90° Quadratic Rotary Encoder can be emulated very easy using 2x momentary push buttons,

CW = press ButttonA and Hold, then press ButtonB hold & release both.

CCW = press ButttonB and Hold, then press ButtonA hold & release both.

i'm looking the opposite...

to emulate independent Dual Push buttons with 90° Quadratic Rotary Encoder.

 

This circuit can be viewed in different ways...

like DPDT switch.

like a USB Mouse Wheel Incremental Rotational Encoder, But Not optical,

like independent push buttons.

like an Electric Ratchet Circuit.

or a Quadrature Decoder HCTL-2020

or like an Inhibit circuit.

 

When A is 0° High, Inhibits B 90°, Sets B Low.

When B is 0° High. Inhibits A 90°, Sets A Low.

 

 

when viewed as DPDT switch:

Switch Up,

Center Left "Pin 2" connected to Pin 1 "Left Up", connected to A Out.

Center Right "Pin 5" connected to Pin 6 "Right Up" connected to GND.

 

Switch Down:

Center Left "Pin 2" connected to Pin 3 "Left Down", connected to GND.

Center Right "Pin 5" connected to Pin 6 "Right Down" connected to B Out.

 

but the idea of using Logic is to make the DPDT Switch Automatic.

when detects:

A 0° = Up,

B 0° = Down.

 

 

in Arduino can be done very easy,

creating a Encoder Script to detect 2-Bit Encoder State,

00 = 0

10 = CW

01 = CCW

11 = Error / Ignore.

 

CW = Pulse Out1,

CCW = Pulse to Ou2.

Pulse can be 1ms or 0.1ms.

 

problem with Arduino is that

Uno is a Big PCB,

i need a very small sollution,

Atmel has very small 8-Bit MCU, ATTiny88

but Arduino code must be converted to Atmel/MPLab Studio 7.c

Atmel requires setting manual switches,

needs another programmer, like Atmel STK600 & Routing cards for ATTiny pinout.

ATTiny does Not have USB to serial interface IC, needs to be programmed by other methods,

because its a MCU, may be sucepticle to bad power, or interferences, or may create interferences to the circuit i want to replace / repair.

needs PCB design in Autodesk Eagle or Target3001! or KiCAD "i try to avoid KiCAD because does Not have CNC G-Code for DIY home made prototype"

i try to avoid China PCB Factories.

CNC needs special software, MATCH4 / 3 is a nightmare to install, license is Node locked, and has limited activations,

found another CNC software in Europe

i own Match4+Parallel port plugin but i try to avoid it, requires a dedicated computer, that cannot be repaired, upgraded or updated,

Node Locked with Limited Activations per Year / Lifetime, is an Absurd Licensing Method.

is unknown if works in ReactOS, Needs Discontinued WindowsXP or 7 32-Bit Only.... A Nightmare.-

 

Atmel / MPLab Studio 7 does Not work in Linux or Mac only Windows.

Moving Windows to another HHD / SSD, is Not as easy as cloning Linux or OSX,

Windows does Not boot from USB3.0, Nor Thunderbolt2/3,

etc...

i try to avoid windows.

and Chinese PCB factories.

 

i would like to try Logic before doing the Atmel ATTiny.

too much problems to replace a Potentiometer / Encoder.

  • Sign in to reply
  • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube