0

I need to design a circuit that reads the status of 6 switches and makes the status available over LAN for a professional project. The design should be implemented in hardware (no microprocessor.) My initial idea was:

  1. Read the discrete status of the 6 switches (0V or 24V)
  2. Levelshift from 24V to 3.3V or 5.0V for serial conveter
  3. Convert to serial (RS232 or RS485)
  4. Convert to LAN using Lantronix XPORT

This approach is inspired by the example circuits from datasheet for the KBDGRAY IC from AB Circuits. Replace the keypad by the switches.

Example circuit with KBDGRAY IC from AB Circuits

I don't feel comfortable using an IC from this manufacturer, but I haven't been able to find anything similar from TI, Analog Devices etc.

I think that I also need a shift register or some other IC between the discrete section and the serial converter before this can have a change of working.

Under all circumstances, this doesn't seem to be an elegant solution. Can you please point me in the direction of a solution to my problem?

JRE
  • 67,678
  • 8
  • 104
  • 179
Lunde
  • 75
  • 6
  • 1
    Why no MCU? The keyboard chip is a pre-programmed MCU, that's why almost nobody bothers to make them. Basically nothing you can do with an Arduino with program to scan matrix and output serial data. The Lantronix is also just a pre-programmed MCU. You are right, the keyboard chip can't be easily adapted as it scans the matrix, and you must convert 6 switches into matrix of 2x3 for example. But it only detects one button at a time, when it sees first button activated, scanning is stopped until button is released. – Justme Apr 28 '20 at 09:58
  • 2
    If there's a LAN there's always a microprocessor... in this case it's in the Xport. Why not just buy a product designed for this task - see for example [Moxa](https://www.moxa.com/en/products/industrial-edge-connectivity/controllers-and-ios/universal-controllers-and-i-os/iologik-r1200-series) ? – tomnexus Apr 28 '20 at 09:59
  • 1
    I am aware that these are microprocessors. What I specifically meant was that I do not want to include, for example an ATTiny85 or PIC MCU in the design. As stated in another reply, Moxa IO Logik could be a good choice, but I cannot use that due to cost and size constraints. – Lunde Apr 29 '20 at 07:55

1 Answers1

0

The problem has already been solved for you.

The Lantronix XPort Pro UG and probably other Lantronix products have digital IO pins that you can read over LAN.

All you have to do is implement a bit of software to talk to the Lantronix chip and ask it for the state of all its inputs.

You'll need to level shift your 24V signal to 5V or 3.3V, but that should be pretty trivial.


Some Lantronix devices have 2 general purpose IO pins, other have more. The protocol supports 32 pins, but I don't think any of their products actually have that many IO pins available.

Alternatively, there are companies like Moxa who sell boxes that do just what you need - including IOs that accept all kinds of voltage levels and can handle all kinds of bad things (over voltage and what have you.) Don't reinvent the wheel if you don't have to (say, because your company wants to make a competing product.)

JRE
  • 67,678
  • 8
  • 104
  • 179
  • I have indeed thought of a MOXA module, such as the ioLogik E1210, which does exactly what I need. However, this module is to expensive and also to big for the allowed solution size. But your suggestion of using the GPIOs of the Lantronix is brilliant, I don’t know how I missed those. There are however only 3 inputs available, so any suggestion on how to fit 6 inputs? Maybe an encoder can do the job. – Lunde Apr 28 '20 at 18:03
  • [Check out the Lantronix xPico.](https://www.lantronix.com/products/xpico-110/#tab-features) – JRE Apr 28 '20 at 18:50
  • This seems like the perfect solution. Simple, small and cheap. – Lunde Apr 29 '20 at 07:51