Introduction: ILUMINEXA (HomeMade Alexa With ESP32)

This project was submitted to 'Creative Electronics', a Beng Electronics Engineering module at University of Málaga, School of Telecommunications.

Authors: Pablo Castillo Moraleda, David Calabrés González, David Martín Martín.

Our project is a device that reacts to your voice, so it shows on the screen what you ask for. It can be the actual temperature of your city, the time or some colours. It wouldn’t be difficult to add some more features with some more time dedicated to it, so feel free to modify and improve the project.

We use the ESP32 board, a cheap board (10€ approx.) that includes the WiFi module we needed and even more features to improve this project (such as a Digital to Analog Converter to add sound output or Bluetooth to communicate with a smartphone).

Supplies

Hardware:

- Wood planks (For the case).

- Translucent plastic (For the case).

- ESP32 board.

- Power Supply of 5V (We used 5V – 10A, it can work with less amperes, but you must be careful with the brightness of the screen, it can consume up to 15A).

- Wires: 4 Jumpers male to female, some common wire for electronic, 1 Micro-USB cable and some high voltage wires.

- IEC male socket and female cable to get the electricity from a wall plug.

- Voice Recognition Module V3 (It comes with the microphone).

- Universal PCB board 5x7 cm.

- Male-Female pin headers.

- Neopixel LED matrix 8x32.

- Welder kit (For soldering some wires)

Software:

- Arduino IDE (Download: https://www.arduino.cc/en/software)

- Voice Recognition V3 library (Download: https://www.arduino.cc/en/software)

- Adafruit NeoPixel library (Download: https://www.arduino.cc/en/software)

Step 1: DESIGN

This project is very simple to replicate, the first thing to do is to design the box. We decided to use an 8x32 neopixel panel, to be able to display words so that the device reacts to the commands you say. Once the panel was decided, the measurements of the box could be taken. To get the dimensions of the box, we took into account the size of the panel, which marked the length of the box. For the width and height we took into account the dimensions of the power supply. As the wiring and the ESP32 board had to be placed inside, you should left a margin of 2cm to ensure that everything fits perfectly. Finally, the dimensions of the box are 34x13x8cm.

Step 2: MAKING: Choose Material and Cut

Once the dimensions of our box are decided, the next step is to decide what material to build it out of. We decided to use wood because it is cheap and with a saw or a jigsaw it is easy to cut, the type of wood does not matter, but we opted for one cm thick to make it sturdy and we also decided to choose wood because it is easy to correct mistakes (if any extra holes had to be made there was no need to redesign the box as for example if it had been 3D printed).

For the upper part, where the LEDs will be placed, we used a translucent plastic so you can't see the interior of the box but you can see the lights.

Then, you only need to cut it with the measure we got in the design step, as you can see in the image..

Step 3: MAKING: Assembly

We need to modify the short sides of the box. One by cutting the central part with a jigsaw, in order to incorporate a male IEC connector. The other side was modified by drilling a small hole of about one cm, which will be used to connect the microphone that will receive the voice data (in the picture, this hole is small, we had to enlarge it).

We used some screws to fit all the pieces together and for the power connector.

We also needed 3 sticks of that wood in order to hold the LED matrix as you can see in the pictures.

Step 4: MAKING: Wiring

We already have the skeleton done. If you have come this far, we are not far away.

To connect the power supply to the trifasic high voltage wall plug, use a three-wire cable, yellow-green wire for ground, brown wire for the phase and blue wire for the neutral. Peel the wire to remove each of these wires to the power supply using a pair of scissors or cutter. We screwed one side of the cable to the power supply and, on the other side we soldered it to the IEC socket with some drops of tin. With that done, we already had the 5V we needed for our circuit.

At first, we tried to power the ESP32 with the 5V and GND pins, but we realised that there it have to pass through a internal converter so it loses some voltage, making the board not work well. So we decided to take a Micro-USB cable, peel it until you see the red wire (5V) and the black wire (GND) and power the ESP32 that way.

To connect the rest of the component with the power supply and the ESP32, we used the universal PCB board. We solder to it the male-female pin headers to plug in the ESP32 so we can recover it from this project whenever we want. We also soldered 7 more pin headers to communicate the ESP32 with the LED Matrix (3 pins) and the voice recognition module (4 pins).

The 3 pins of the LED matrix were connected with some path of tin we soldered underneath to VCC, GND and the data to the pin 33 in ESP32.

The 4 pins of the voice recognition module were connected to VCC, GND, Tx to pin 16 and Rx to pin 17.

In the pictures, you can see we powered the LED matrix and the voice recognition module with the 5V we got from the 5V pin and the GND pin of the ESP32 (that we powered with the USB cable). This work but with low brightness. We recommend to take the 5V of the power supply to the PCB, and then, from there you power the ESP32 with the USB and the voice recognizer and the LED Matrix with the pins.

To hold everything in place, we used some tape.

We used a decoupling capacitor for the low frequency noises that could be induced by the oscillations of the electrical network and to obtain a good ground.

With this last connection our box is now ready, all that remains is to load the programme.

Step 5: SOFTWARE

First, we need to install the ESP32 in the Arduino IDE. Go to Tools -> Board -> Manager, search for the ESP32 and install it. Then go to File -> Preferences -> URL manager and paste this link as shown in the picture "https://dl.espressif.com/dl/package_esp32_index.js...

The library for the voice recognition available in the GitHub of the firm is made for Arduino Uno, that use SoftwareSerial, so we had to modify it to use HardwareSerial. You can download the modified files from our GitHub (https://github.com/PabloCM4/Iluminexa) or you can change them by yourself doing this:

****** HEADER FILE **************
- LINE 38: Delete "#include "SoftwareSerial.h".

- LINE 39: Delete "vr/"

- LINE 106: Replace "SoftwareSerial" with "HardwareSerial".

- LINE 108: Replace "VR(uint8_t receivePin, uint8_t transmitPin);" with "VR(int uart_nr);"

*********** CPP FILE **********

LINE 43: Replace "VR::VR(uint8_t receivePin, uint8_t transmitPin) : SoftwareSerial(receivePin, transmitPin)" with "VR::VR(int uart_nr) : HardwareSerial(uart_nr)"

- LINE 51: Replace "SoftwareSerial" with "HardwareSerial".

************ MAIN FILE ******************

VR myVR(2); //Use this to initialize the object, using UART number 2, (pins 16 and 17)

To use the voice recognition module, first you need to train it with the commands we are going to use.

Execute the train_esp32 or use the example train of the library (dont forget to change the initializacion of the object if using the example) with the Arduino IDE and then open the serial monitor. Type " sigtrain 0 iluminexa" and then you will have to say twice the word. Do it with all the commands, changing the number (0 to 6) and the word (red, green, blue...).

Then you are ready to load the main in the ESP32, plug it and enjoy using your creation.

Step 6: END

That's all.

We have put a lot of work in this, so we will appreciate every comment here and we will love is someone try make it or even improve it.

Thanks for reading.

Microcontroller Contest

Participated in the
Microcontroller Contest