Actually, there are ways to reduce the number of wires there. Here, for example, four-bit mode. Anyway a lot? There are display modules with I 2 C. But there is no limit to perfection, and if you have an extra Arduino (which appears sooner or later for many), the display can be attributed to a certain distance from the data source and connected with a two-wire cable.
One of the ways to transfer power and data over the same pair of wires is as follows. The data signal is modulated with a high frequency and combined, and at the opposite end of the line is divided for supply to the demodulator using chokes and capacitors. But when powered by direct current, you can use a simpler method, similar to that used in intercom keys. A modulator and a demodulator are not required in this case, on the transmitting side there is enough a key that commutes the power circuit: ')
Transistors - AO3400A and AO3401A. The second of them can withstand 5 A (according to other data - 4), and here it only has to switch 200 mA. The stream of serial data to the key can be submitted from any microcontroller, but since the design is experimental, the author used a PC running the Python script and a USB-UART converter.
The author's power breaker turned out to be inconspicuous, but very strong:
At the opposite end of the line, the pulsating voltage is applied to a half-wave rectifier with a filter (although rectification is not required in this case, it’s just necessary that the voltage to the diode remain pulsating and then not) from which the Arduino and the display module are powered. Arduino converts serial data into parallel data needed by the module. Attention, for modules on KB1013VG6, the socle can be non-standard. Ripple voltage to the diode is supplied to one of the Arduino digital inputs.
So it looks like in real life:
The firmware is simplified as much as possible; it does not even generate initialization commands for the display controller (and all other commands), so the transmitting side must submit them. But at the same time she recognizes the simplest single-byte commands addressed directly to her. Here x is the junior nibble, the command is the senior nibble:
0xA [x] - send a nibble of x to pins 4 - 7 of the module 0xB [x] - submit the low-order bit of the nibble x to the input of the RS module 0xC [x] - submit the low-order bit of the nibble x to the EN input of the module 0xD [x] - set the backlight brightness (regulated by PWM) in proportion to the nibble x
All necessary software is here . To show how everything works, the author has compiled the following scenario: