-
Notifications
You must be signed in to change notification settings - Fork 1
Hardware_Parts Selection_Display and Control
Temperatures values or setup menu entry parameters are displayed on a 16 character by 2-row (1602) backlit LCD. The selected LCD unit is configured for I2C serial bus communications to minimise required pin connections and simplify hookup.
Features
- Backlight (White characters on Blue background)
- Supply voltage: 5V
- Size: 82x35x18 mm
- I2C 450 kHz; Fixed address is 0x27
- contrast adjustment
"Almost all alphanumeric LCDs on the market are driven by the Hitachi HD44780 or compatible chipset, regardless of their size. The HD44780 takes care of "drawing" the characters on the LCD display, based on commands it receives from a host microprocessor over a 10-pin I/O bus."
Employing an I2C compatible LCD device makes a handy solution to minimise pin requirements. The 1602 module used was chosen because it has an I2C backpack based on the Philips PCF8574T I2C GPIO Expander, which facilitates communication on a 3-pin I2C bus (which can be shared by many devices).
A KY-40 rotary encoder module was chosen as simple interface to the microntroller to facilitate tasks such as changing setting values.
The module provides an indication of how much the knob has been rotated and the direction of rotation plus it is also integrated with a pushbutton switch. These cheap modules are notorious for inaccurate readings due to contact bounce; however paired with the right library (newEncoder which uses a state table approach to flawlessly software debounce the module), the KY-40 is quite effective and low cost.
The major issue with using a 3.3V microcontroller like the ESP8266 is that some periphials are powered by 5V. For example, the LCD display shown above is better powered by 5V while the majority of the circuit elsewhere is 3.3V. Powering the 5V LCD is not an issue given the cloudSmoker already has a ready 5V power rail direct from the 5V battery bank power source.
From statements made by Espressif, maker of the ESP8266, it appears that some ESP8266 pins may be 5V tolerant[^1] although this is not explicitly documented on the datasheet. If necessary, a low cost bidirectional level shifter module can be used on the SCA and SCL lines of the I2C bus to ensure that the serial interface signals do not cause issues,.
Although level shifting is certainly the safest approach from a reliability standpoint, I ran into no issues during breadboard testing without the level shifter, having the 5V powered LCD or ADS1015 ADC directly connected to the 3.3V ESP8266 pins. Consequently, I decided to drop the level shifter from the final design.
[^1]: "Just a bit of follow-up documentation: here's the article from Hackaday where they opened the question of 5V tolerance of the GPIOs, and the CEO of Espressif responded with a Facebook update that said yes, the GPIO pins are 5V tolerant: reference The Facebook comment from Teo Swee Ann was “I can reply officially here: it is 5V tolerant at the IO. while the supply voltage is at 3.3V.” The test done by ba0sh1 (above) is also linked in the Hackaday article. The module power is NOT 5V tolerant, as the flash chip may die with 5V on it's power pin. That suggests that GPIO6-11 on ESP-12 modules and DevKits (SC, SK, S0-S3) are probably also not 5V tolerant as they connect directly to the flash chip. The RST pin on the module is not 5V tolerant, either." source