Home » today » Technology » DIY EL Wire Tutorial: How to Make a Glowing Neon Tubing using an Inverter and ESP32-LPKit

DIY EL Wire Tutorial: How to Make a Glowing Neon Tubing using an Inverter and ESP32-LPKit

White and yellow envelopes with 3V rubber glowing LED earthworms for a few bucks have already flooded the Czech Republic and arrived in the inbox of every true DIYer, but earthworm mania it definitely doesn’t end. We almost forgot about the older, but no less effective technology EL wires.

Compared to thirty-centimeter rubber bands, they can be many meters long and shine with continuous light along the entire length and in all directions. That’s why we’re going to try it out today five meter wirewhich you can get, for example, on the Czech LaskaKit for 94 crowns.

The e-shop sells it under the name flexible neon tubethe word neon is, however, a little misleading, on the inside PVC cable with an average 2.3 millimeters (similar to LED worms) there is no such gas. EL wires only glow with a similar brightness to old advertising banners.

Watch a step-by-step video of what we will build today and how the EL wire glows in broad daylight, in complete darkness and under a microscope:

  • 00:30 EL wire for a hundred
  • 01:16 12V inverter to produce 110 VAC
  • 02:00 Neon Shield a ESP32-LPKit
  • 03:45 A box from a 3D printer (Tinkercad)
  • 04:18 First test
  • 06:52 How an EL wire glows in total darkness
  • 07:14 Red, green, blue and yellow EL wire
  • 08:13 EL wire under the microscope

Electroluminescent wire

In fact, it is a so-called EL wire (EL Wire), i.e. an electroluminescent cable composed of several layers. The PVC surface layer gives the cable its final color and rigidity, but in reality the inner electroluminescent core composed of pair of electrodeswhich separates dielectric layers made of phosphorus.

Click for larger image
Basic diagram of EL wire

When we apply a weak alternating current to the electrodes high frequency current a voltage of at least several tens of volts, a strong electric field will be created on the electrodes, which will excite the phosphorus atoms and their electrons. They begin to release and recombine again, releasing energy in the form of photons.

The phosphor layer begins to glow weakly with white to bluish light, which, passing through the PVC surface cover, acquires its final shade. An ordinary EL Wire for a few ten crowns will definitely not reach the brightness of LED worms, but it shines very nicely in the dark and at night.

Click for larger imageClick for larger image
Electroluminescence under the editorial magnifying glass. Note the bluish glow inside the exposed cable. We’ll talk more about it in the video

The wire does not heat up, electroluminescence is not a resistance light, and EL wire behaves more like a long capacitor with a capacity of 6 nF per meter, so in shorter lengths that do not require such a high voltage, it can also be part of clothes, you can make some kind of glowing logo out of it, glowing elements on a car, etc.

Alternating current is produced by a high-frequency inverter

An oscillating signal for exciting the phosphorus atoms in the EL wires is produced by a special inverter. Our cable is 5 meters long, so we ordered a cheap and nameless model on LaskaKit for 78 crowns. The inverter can be powered from a 12V DC source, after which it produces alternating current with a frequency of up to 3 kHz a voltage of 110 V.

Click for larger image
A cheap inverter that produces 110 VAC from 12 VDC at a frequency of up to around 3 kHz

Be prepared for that with a frequency in the order of thousands of Hz the coils inside the inverter will make a faint whistleso it is definitely not suitable for a bed and without additional sound insulation or for an irradiated dog house.

It also runs at lower frequencies and voltages

110V AC is no longer child’s play. While it’s still not a 50Hz 230V signal from a home power outlet, it’s still not the best idea to touch live contacts.

The inverter used can also handle a lower input voltage, so if you respect anything that produces more than 12 volts like I do, you can power it from a 9V battery, for example, or even several pencil batteries in series.

Click for larger imageClick for larger imageClick for larger image
Different daylight brightness according to inverter power supply (5-12V)

In this case, the inverter will produce an alternating current with a voltage of only a few tens of volts, and the frequency will also drop dramatically, so that it will stop beeping. Of course, the brightness will also decrease. And in such a way that you hardly know that it is lit in the light. But in the gloom and darkness, the glow will be clearly visible again.

In general, therefore, we set the brightness of the EL wire not only by voltage, but also by frequency. Ours should suit you documentation (PDF) advise with these ranges:

  • Tension: 20-220 VAC
  • Frequency: 50-5000 Hz
  • Luminosity at a voltage of 120 VAC and a frequency of 200-2000 Hz: 30-126 cd/m²
  • Consumption at voltage 120 VAC and frequency 200-2000 Hz: 108-1032 mW/m

By the way, as far as consumption is concerned, the consumption of the inverter itself must also be added, so when we fed it with 12 V from a desktop power supply, which produced about 106 VAC at 3000 Hz, the total consumption for a five-meter cable was about 2,5 W. And since the consumption does not grow linearly, when we reduced the input voltage to 5 V, it was only a negligible fraction (but the luminosity was also a fraction).

LaskaKit ESP32-DEVKit Neon Shield

To light up the EL wire, we only need a DC source and an inverter, but what if we want to include some logic in the game? As I already wrote above, I personally have respect for any voltage in the order of tens of volts and above, and I rather enjoy it look for limits on the lower limit (ultra low power), so I left any work with 100-110 volts from the inverter to the board Neon Shieldwhich you get for 288 crowns.

Click for larger image
LaskaKit ESP32-DEVKit Neon Shield adapter for switching up to six EL wires

The board offers six output channels with two-pin male connectors JST XH, to which you can connect EL wires. But they usually have male connectors JST SMand so you will have to make either a reducer or wire ends replace. Incidentally, this also applies to the inverter, because it is also connected exclusively via the JST XH connector on the board.

Click for larger imageClick for larger imageClick for larger image
Replacement of JST SM connectors on EL wires with JST XH for easy connection to the board and control microcomputer ESP32-LPKit

Finally, we connect the control microcomputer to the board, while the module already assumes, according to its name, that it will be a prototyping machine ESP32-LPKitthat is, a control board with the popular ESP32 chip with Wi-Fi and Bluetooth, which we have worked with many times in our series and you can program it even in a simple Arduino.

Channel switching is handled by optocouplers and triacs

The connectors of EL wires 1-6 are on the ESP32-LPKit board connected to GPIO outputs 12, 13, 14, 25, 26 27 and we switch it by simply setting the logic state to HIGH. Each of these outputs is connected to an optocoupler MOC3063 a triac switch Z0103MN (see board diagram).

Click for larger image
Isolated AC switch using MOC3063 optocoupler and Z0103MN triac

The 3V signal from the ESP32 is therefore converted to the 110VAC circuit of the inverter via an optical path inside the optocoupler by turning on the LED and then detecting the light with a photodetector. It also closes the 110VAC circuit when the AC signal crosses zero, so the change should be as clean as possible.

Click for larger image
Circuit diagram on the board

A single program for switching using HTTP

And that’s actually the whole thing. Finally, the board has connectors for 7-20V DC power and a 5V regulator of the 7805 series connected to the ESP32-LPKit. We could therefore use one sufficiently strong 12V source to drive the entire device, which we connect to one connector, connect the input for the inverter to the other, and the regulator produces the drive for the control computer board. But you can also power it separately using USB.

Click for larger imageClick for larger image
Optional 7-20V DC power supply directly on the board

It could run a slightly modified program written in Arduino, which we already used to control the LED earthworm. This time, however, it will work with six inputs. Thus, after connecting the power supply, the processor connects to a predefined Wi-Fi network (2.4GHz/802.11bgn) and starts a primitive HTTP server, which we can control by calling a URL with a pair of parameters channel a condition in this form:

http:///?channel=&condition=

A value of 1 turns on the electroluminescent wire on the selected channel, and a value of 0 turns it off. So, if our control chip received, for example, the local address 192.168.0.231 from the Wi-Fi router, then we would close the fourth channel with the command:

And that’s really all for today. So, cheers to electroluminescence, which will not offer as much brightness compared to LED worms, but it is a suitable solution if you need a much longer and continuously glowing wire, the total consumption of which will ultimately be much less than the alternative made from LEDs.

Program source code

/*
Jednoduuchy HTTP ovladac svitivych EL dratu pomoci prototypovaci desky
LaskaKit ESP32-DEVKit Neon Shield
a 
HTTP prikazem http:///?kanal=&stav=
lze spinat a vypinat okruh jednoho z sesti pripojenych EL dratu
*/

#include 
#include 

// Kanaly 1-6 pro spinani EL dratu jsou pripojene k pinum 12, 13, 14, 25, 26 a 27 na desce ESP32-LPKit
// Vytvorime si pro ne pole
uint8_t kanaly[6] =  12, 13, 14, 25, 26, 27 ;

// Nazev a heslo Wi-Fi
const char *ssid = "Nazev 2,4GHz 802.11bgn site";
const char *heslo = "Heslo site";

// Server pobezi na standarndim TCP portu 80
WebServer server(80);

// Funkce, ktera se zpracuje pri HTTP pozadavku /
// Podle numericke hodnoty URL parametru stav=x (0/1) a kanal=x (1 az 6),
// nastavime na adekvatnim pinu bud vysoky, nebo nizky logicky stav a pripojeny
// optoclen a triak na desce ESP32-DEVKit Neon Shield sepne opticky izolovany
// okruh stridaveho proudu pro napajeni elektroluminiscencniho dratu
void httpDotaz(void) 
  if (server.hasArg("stav") && server.hasArg("kanal")) 
    uint8_t stav = server.arg("stav").toInt();
    uint8_t kanal = server.arg("kanal").toInt();
    if (kanal >= 1 && kanal <= 6) 
      if (stav == 0  else 
      server.send(200, "text/plain", "Chyba: Kanal musi byt v rozsahu 1-6");
    
   else 
    server.send(200, "text/plain", "Chyba: URL musi byt ve tvaru /?kanal=hodnota&stav=hodnota");
  


// Hlavni funkce setup se spusti po startu cipu
void setup() 
  // Nastavime vychozi zhasnuty stav kanalu pro ovladani EL dratu
  for (uint8_t i = 0; i < 6; i++) 
    pinMode(kanaly[i], OUTPUT);
    digitalWrite(kanaly[i], 0);
  
  // Nastartujeme seriovou linku rychlosti 115200 b/s,
  // pri startu do ni budeme vypisovat stav pripojovani k Wi-Fi a IP adresu
  Serial.begin(115200);
  // Pripojime se k Wi-Fi a pote vypiseme do seriove linky IP adresu
  WiFi.disconnect();
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, heslo);
  Serial.printf("Pripojuji se k %s ", ssid);
  while (WiFi.status() != WL_CONNECTED) 
    delay(500);
    Serial.print(".");
  
  Serial.printf(" OKnIP: %srn", WiFi.localIP().toString());
  // Pro HTTP pozadavku / zavolame funkci httpDotaz
  server.on("https://www.zive.cz/", httpDotaz);
  // Aktivujeme server
  server.begin();


// Smycka loop se opakuje stale dokola
// a nastartuje se po zpracovani funkce setup
void loop() 
  // Vyridime pripadne TCP spojeni se serverem
  server.handleClient();
  delay(2);


2023-05-07 16:45:22
#Electronics #programming #light #colored #earthworms #measures #meters #time #light #phosphor

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.