In the 1990s, the well-known designer Luigi Colani asked why computers always have to be square and angular. He was right, they don't have to be. Not even our small micro controllers. The proof is provided by the new circular AZ-Envy, a micro controller board with the ESP8266-12F and two built-in sensors for environmental data, i.e. Envy from Environment and not from envy.
The gas sensor MQ-2 immediately catches the eye because of its explosion protection cover made of a dense stainless steel mesh. On the left side there is the ESP8266-12F with WLAN antenna and the built-in LED. The second sensor, top left in the picture, is a temperature and humidity sensor called SHT30. Otherwise you can see the µUSB socket for the power supply, to the right of it the voltage regulator, a yellow pin header and two buttons named RESET and FLASH - all in all a nice "physical computing platform" that can be programmed with the Arduino IDE.
Of course, I want to try this micro controller board immediately and use the program Blink as usual. Since I have already used other ESP8266 micro controllers, I only need to select the board " Generic ESP8266 Module" in the Arduino IDE.
If you have not yet installed the ESP8266 family with the board administrator, you must enter the additional board administrator URL under "File/Preferences" in the Arduino-IDE:
Then open the management dialog under "Tools/Board/Board manager". Enter "ESP8266" in the search box and click on "Install" in the search result.
Then, under the Tools/Board tab, you will see ESP8266 and its various board designs. As I said: for the AZ-Envy, I immediately selected the top option "Generic 8266 Module".
What is noticeable about the image in the highlighted line? Correct: Despite the USB port for the power supply no port is shown at first. The AZ-Envy does not have a USB-Serial-interface due to lack of space. This is only needed for programming and - if desired - for data output in the serial monitor. I can use the FTDI, which I have used for the ESP8266-01 so far.
On closer inspection I see that the designations on the yellow connector strip match the pin designations of the FTDI. A technician told me that originally a female connector strip was planned here, into which the FTDI would be plugged directly. It’s a pity that this was not realized, so three jumper cables (female-female) for TX, RX and GND. The connectors DTR, CTS and VCC are not used. A special feature: Because the labelling was done in the same order as the FTDI, TX is connected to TX and RX to RX; not crosswise as usual with the UART interface. When the FTDI is connected to the computer, you will also get the port display (of the FTDI) under the Tools tab. Then you are ready to start.
With the first program blink I am interested in whether the AZ-Envy with its ESP8266-12F knows the name LED_BUILTIN; otherwise I would have to add the line "int LED_BUILTIN=2;" in the sketch, as with the ESP32. And how do I put the board into programming mode?
Only pressing the FLASH key while uploading was not successful. The trick is: The FLASH key must be pressed when the power supply is established. Therefore first press the RESET button, then the FLASH button, then release RESET and finally release FLASH. This must be done at the latest when the Arduino IDE shows the dots after compilation that the connection should be established.
After uploading I have to leave the programming mode, so press RESET shortly.
Everything works at first go. LED_BUILTIN is recognized and the built-in LED next to the WLAN antenna flashes every second.
Next, I try the sensor SHT30. I don't need to connect anything here, it is connected internally. From the internet I learned that the sensor is connected via the I2C interface and has the hex address 0x44 (or 0x45 if necessary). The relative humidity should be measured with an accuracy of ±3% and the temperature with an accuracy of ±0.3°C. As usual in the Arduino world, I use an existing program library to read out the sensor. Recommended for the AZ-Envy is the library SHT3x.
So put AZ-Envy back into programming mode (RESET, +FLASH, -RESET, -FLASH) and load a sample program installed with the SHT3x library.
Again, everything works immediately. The temperature display is a little too high and therefore the value of the relative humidity a little too low. This is quickly explained: Despite the cut-out in the circuit board, the ESP8266, the voltage regulator and the (heated!) gas sensor MQ-2 are in close proximity. The AZ-Envy shares this fate with all micro controllers that have a temperature sensor directly on the board.
In this case you may have to compensate/calibrate, or you may be satisfied with the statement "much too cold" (danger of frost?) or "much too hot" (fire?, ventilation required?). I am planning a construction where I blow ambient air with a small PC fan towards SHT30 on the AZ-Envy and will report about it.
And finally, the gas sensor. The MQ-2 gas sensor is a metal oxide semiconductor (MOS), also known as a chemical resistor (chemistry actually without e at the end). MOS sensors measure the resistance change when gases are present. This type of sensor requires the gas to strike the sensor for a chemical reaction to occur, resulting in a change in resistance.
The actual sensor for detecting the gas is located under the explosion protection cover made of a dense stainless steel mesh, which also serves as protection against dirt particles or other disturbing factors. This resistance change, related to a defined resistance value, results in an analog value, and thus it is clear where this sensor is connected, at input A0. For the evaluation the MQ-2 library from labay11 is recommended, which determines the gas concentration in ppm with simplified functions. The secret behind this remains hidden as long as we do not study the program library in detail. But that would go beyond the scope of this first consideration of the AZ-Envy.
After the installation of this library there is also a code example after installation:
After uploading, the following picture appears in the Serial Monitor:
Using the unknown algorithms, values for LPG, CO and smoke are determined. The number outlier at the bottom of the picture was the reaction to my breathing after a nice glass of rosé wine, otherwise the values in our living room after airing. Here, too, I will do further research, because basically the sensor is said to be non-gas specific, but it is very well suited for the detection of LPG, i-butane, propane, methane, alcohol, hydrogen and smoke.
This was my first examination of the new AZ-Envy, which was designed by a young developer (name is on the back) and realized with the help of AZ-Delivery. All in all a successful combination of a WLAN-capable microcontroller and two very good sensors, and the whole thing very nicely placed on a round board with less than 5 cm diameter.
The links to the program code are linked to the respective image.
And here the article as download.