Author Topic: simple encoder/decoder I/O multiplexer solution  (Read 908 times)

0 Members and 1 Guest are viewing this topic.

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 18038
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
simple encoder/decoder I/O multiplexer solution
« on: November 29, 2018, 10:10:01 am »
I am devising a unit. I have one button and 4 LED's at present. So I need 6 wires. Is there a simple chip and/or protocol out there that con be used instead of 6 individual hard wires? The cable may be as long as 10m between control panel and system.

LIN bus time?
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3327
  • Country: gb
Re: simple encoder/decoder I/O multiplexer solution
« Reply #1 on: November 29, 2018, 10:53:44 am »
Sounds an ideal application for one of the numerous I2C I/O expander ICs. 
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2368
  • Country: de
    • Frank Buss
Re: simple encoder/decoder I/O multiplexer solution
« Reply #2 on: November 29, 2018, 10:55:43 am »
Maybe use 1-wire with a DS2408. It is not a cheap chip, but you could implement it with 2 wires. 1-wire has been tested up to 300 meter. Don't use I2C, anything longer than some cm is asking for trouble.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 18038
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: simple encoder/decoder I/O multiplexer solution
« Reply #3 on: November 29, 2018, 10:56:25 am »
I thought I2C meant IC to IC comms, ie on the same PCB. I do have the option of the ATmega3208 I am already using that has built in LIN
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1685
  • Country: gb
Re: simple encoder/decoder I/O multiplexer solution
« Reply #4 on: November 29, 2018, 11:04:40 am »
LINbus seems overkill for a few LEDs... why not just a small MCU running very slow serial?  Or even MIDI? 10m would be pushing TTL level serial but you could always try it with the cable you have.  There's always the simple PPM/PWM used in cheap RF remotes although given you have an input as well you could jsut use that for the LED's, and a single wire for the button, that way comms is oneway.
« Last Edit: November 29, 2018, 11:09:21 am by Buriedcode »
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 18038
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: simple encoder/decoder I/O multiplexer solution
« Reply #5 on: November 29, 2018, 11:11:53 am »
LIN bus works with serial hardware.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15360
  • Country: fr
Re: simple encoder/decoder I/O multiplexer solution
« Reply #6 on: November 29, 2018, 02:54:33 pm »
I would keep it simple and use an UART-based communication and RS-485 transceivers. That will allow you to use much longer cables than 10m and is dead simple.

 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 18038
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: simple encoder/decoder I/O multiplexer solution
« Reply #7 on: November 29, 2018, 02:57:36 pm »
i think I will leave this aspect alone and just use the 6 wires for now. We use CAN as a company and I am planning an optional CAN board attachment for this project so I'll just make it an excuse to start learning CAN.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf