Homepage

 

 

 

Microcontrollers   PCs — Embedded Electronics

 

 

 

 

Voltage-Level Translation in MCU Projects

 

 

 

 

 

 

 

 Projects Home

 Workspace Pictures

 ReAl Computer Projects

 ReAl Computer Architecture

 Site in German  

 Imprint

 Mail

 

 

 

 

 

 

 

 


24-V microcontrollers and CPLDs

It emerged as some kind of business idea. (Yes, it is free. The terms of the CERN Open Hardware License Version 2 – Permissive apply.) Small PLCs and IoT modules are based on PCBs that contain at least one microcontroller and some level-translation ICs. Why not have it all together in a single IC powered by 24 volts, in other words, a 24-V microcontroller?

Outside the ICs, signal levels should be well above the noise floor,  caused by crosstalk, ground shift, and power line interference. Cables carrying logic signals could be as long as 5 ft (1.5 m) or more. In such an environment, the well-known 5 V may be considered a proven minimum.  It is not without reason that 5-V microcontrollers are still manufactured and even new devices developed. So it is only a logical step to imagine a microcontroller with 24-V supply voltage and signal levels.

A second strain of thought led to the idea of a 24-V CPLD to  implement logic functions at the 24-V level.

24-V mcirocontrollers and CPLDs may become useful building blocks for Internet-of-Things (IoT) projects.

What impedes casting such an idea in silicon is, to put it simply, the size of transistors and the resulting die size. The processor core of a small (8-bit) microcontroller requires a few thousand transistors, the memories much more. When all components are laid out to cope with 24 V, then the die would be much too large. So it makes sense to distribute the tasks of processing and 24-V I/O on different dies and to provide for the necessary level translation. Maybe, that chiplet technologies will lead to 24-V IoT systems in a single package. Today's projects, however, must be implemented on PCBs. Our 24-V device would be a small PCB containing an off-the-shelf microcontroller or CPLD together with industrial-grade level translation and 24-V I/O ICs, accompanied by the necessary power supply circuits.  Boards of this kind will be typically small, having only a few inputs and outputs. Overvoltage and ESD protection depend solely on the provisions built into the level-translation circuits.

24-V logic
Sometimes, there is a need for such functions, for example, for diagnostic purposes or because they are necessary to comply with safety requirements. For example, relay X must not be energized if one of the switches A or B is closed and relay contact C is open.  This could be done by appropriate programming. However, we know that programs may fail, not to speak of malfunctions caused intentionally by injecting malware via network connections.

Sometimes the most simple solution would be best, hard-wired logic that will not be affected by a software crash and cannot be sabotaged via the Internet.

Occasionally, logic preprocessing of 24-V signals is preferred only to get by with the number of the PLC's terminals.

Some decades ago (we speak of the Fifties and Sixties), control equipment manufacturers offered transistorized pluggable modules performing logic functions, like gates, flip-flops, counters, and so on. The modern equivalents are essentially very small PLCs, down to programmable relays. Occasionally, however,  the need arises to implement hard-wired logic functions at the 24-V level without resorting to PLC programming. The problem can be solved by developing application-specific modules or by  tinkering with diodes, transistors, driver modules, and so on.

In industrial practice, there seems to be an everlasting demand for such application-specific solutions. This we recognize by the multitude of components offered by the PLC manufacturers, like adapter boards, cardholders, diode modules,  logic modules, and so on. These components allow adapting the field wiring to application-specific, purpose-built circuitry.

Two examples of diode modules:

A small diode module and an uncomA small diode module and an uncommitted module that allows creating application-specific circuits simply by using the soldering iron:

This is an AND gate to be clipped on a DIN rail. A 24-V CPLD could be housed in a similar form factor (of course, having somewhat more terminals):

Interfacing modules. Field wiring terminals are connected to pin headers, Centronics connectors, or the like.

A pre-built cable with ferrules.

Two cardholders:

An application example: Diode logic to implement AND and OR functions. The V330 is a quad high-side driver IC (smart power solid state relay), driving resistive or inductive loads connected to ground ([D20]). To invert signals, we can use transistor stages, low-side driver ICs or solid-state relay modules.

The 24-V CPLD could be the principal alternative
It goes without saying that we can implement only very elementary functions the way depicted above. In comparison, a CPLD can support logic (Boolean) functions of nearly unlimited complexity.  

With appropriate 24-V devices, we could add a new layer of safety and diagnostic functions based on pure logic, far above the capabilities of a few gates. Perhaps, such functions are useful to augment and supervise artificial intelligence. A perspicacious example is traffic control. One can easily imagine controlling traffic lights through AI. Such systems will learn and adapt to provide for an even more smooth flow of traffic. Under no circumstances, however, is it acceptable to switch on the green lights on intersecting lanes simultaneously. It is easy to see that such restrictions can be described in terms of Boolean functions. In practice, they may be by far not as straightforward as in the example.  By computing such functions, the decisions of the AI algorithms may be checked and supervised. The salient point is that modules of the kind proposed here should be, in such applications, totally independent of the IoT infrastructure and software. Thus the safety and diagnostic functions cannot be impaired by faulty programming or attacks from outside.

Supervising traffic light control – a considerably simplified but plausible example of 24-V logic. NS = North/South, WE = West/East.

A sophisticated AI-based system controls the traffic lights on an intersection. What must never occur is that all the green lights on the intersection lanes switch on simultaneously. Here, all red lights will switch on if this fault occurs. Improvements are obvious. For example, a timing relay could, after an appropriate time period, disable all the lights. Thus the traffic may resume whereby the drivers have to heed the right of way as stipulated in the traffic regulations. A microcontroller-CPLD combo could do much more than a few logic gates. For example, it could take over the traffic light control and keep the traffic going by an unsophisticated and stupid but guaranteed error-free algorithm.

Two flavors of a 24-V CPLD
The purpose of our device is to implement combinational and sequential Boolean functions.This can be done by providing a real CPLD connected to level-translating circuitry. To program CPLDs and FPGAs, however, we need dedicated design software, like the systems delivered by the circuit manufacturers.  After the design has been entered – as a schematic or in a hardware description language –  a process will be run called Boolean synthesis. Synthesizing a circuit out of a description, however, may be a time-consuming process. Even after the most simple design change the synthesis must be executed again.

A CLPD is very fast, switching in nanoseconds. In comparison, typical 24-V circuitry operates by far slower. Here we speak of milliseconds. This fact leads quite naturally to the idea to do without the CPLD and, instead, to emulate the Boolean functions on a microcontroller. Such a 24-V CPLD would be a 24-V microcontroller appropriately programmed. So each engineering change would be a straightforward software update.

The microcontroller-CPLD combo
To combine both on one PCB is an obvious idea, too. It goes without saying that FPGAs would be the next logical step to implement even more sophisticated devices. It is, however, a much tougher design challenge. For our small devices, however, it may be more purposeful to combine two components that are inexpensive and comparatively easy to work with.

 

 

 

MORE ...

 

 

 


October 1, 2021

 

Translating 24 volts

Level translation between logic signals

Integrated level translators

The 24-V companion - an educational example

Level translation with discrete or SSI components


References and sources

Back to first page