Difference between revisions of "ESP32 TFT LCD with Camera(3.5'')"

From MakerFabsWiki
Jump to: navigation, search
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''This page had been no longer maintained, please go to the new page on our website.'''--[https://wiki.makerfabs.com/ESP32_3.5_TFT_Touch_with_Camera.html https://wiki.makerfabs.com/ESP32_3.5_TFT_Touch_with_Camera.html]
== Introduction ==
The 3.5" 320x480 TFT LCD driver is ILI9488, it uses SPI for communication with ESP32, the SPI main clock could be up to 60M~80M, make the display smooth enough for videos; and the camera OV2640 with pixel 2M, with this camera, you can make applications such as remote photography, face recognition…. While the camera not used, you can freely use all these pins with the breakout connectors, to connect the ESP32 display with sensors/ actuators, suitable for IoT applications. <br>
'''Model: [https://www.makerfabs.com/esp32-3.5-inch-tft-touch-resistive-with-camera.html Resistive: ESPTFT35RE]'''<br>
'''Model: [https://www.makerfabs.com/esp32-3.5-inch-tft-touch-capacitive-with-camera.html Capacitive: ESPTFT35CA]'''<br>
[[File:ESP32 TFT LCD with Camera A02.jpg|500px]]<br>
== Features ==
*Integrated ESP32 Wrover 2.4G WiFi and Bluetooth<br>
*Wi-Fi Protocols: 802.11b/g/n(802.11n up to 150Mbps),A-MPDU and A-MSDU aggregation and 0.4us guard interval support<br>
*Wi-Fi Frequency range: 2.402GHz - 2.483Ghz<br>
*Bluetooth Protocols: Bluetooth v4.2 BR/EDR and BLE specification<br>
*Bluetooth Radio: NZIF receiver with-97 dBm sensitivity, Class-1/class-2 and class-3 transmitter, AFH<br>
*Bluetooth Audio: CVSD and SBC<br>
*Arduino Compatible: You can play it with Arduino IDE<br>
*OV2640: A 1/4inch CMOS UXGA (1632*1232) image sensor manufactured by OmniVision<br>
*OV2640 supports output images up to 2 million pixels<br>
*LCD 3.5 inch Amorphous-TFT-LCD (Thin Film Transistor Liquid Crystal Display) for mobile-phone or handy electrical equipment<br>
*LCD Driver: ILI9488<br>
*LCD Resolution: 320*480<br>
*NS2009: A 4-wire resistive touch screen control circuit with I2C interface, which contains A 12-bit resolution A/D converter<br>
*FT6236 Series ICs are single-chip capacitive touch panel controller IC with a built-in 16 bit enhanced Micro-controller unit (MCU)<br>
*Power supply: 5V, Type-C USB<br>
*Micro SD card slot on the board<br>
*Board size: 66mm * 85mm<br>
== Diagram ==
[[File:ESP32 TFT LCD with Camera_9.JPG|500px]]<br>
[[File:ESP32 TFT LCD with Camera_9a.JPG|500px]]<br>
Warning: Don't operate when in power supply on<br>
'''[https://github.com/Makerfabs/Project_Touch-Screen-Camera Github:Project_Touch_Screen_Camera]'''
===Software setup===
'''NOTE: In order for the project to work normally, please install the same version.'''<br>
1.Install the Arduino IDE V1.8.10.<br>
2.Install the ESP32 boards supporting V1.0.4<br>
*After Arduino IDE installed, there is no package to support ESP32, we need to install the ESP32 package in Arduino IDE to continue.<br>
*Select “File>Preferences>settings>Additional Boards Manager URLs” to fill the link: https://dl.espressif.com/dl/package_esp32_index.json<br>
[[File:ESP32 TFT LCD with Camera_11.PNG|700px]]<br>
*Click “Tools>Board>Boards Manager” to search for and install the ESP32 library:<br> 
[[File:ESP32 TFT LCD with Camera_12.PNG|700px]]<br>
3.Install Adafruit GFX library V1.10.4<br>
:Click “Tools> Manager Libraries” to search for and install Adafruit GFX library.<br>
[[File:ESP32 TFT LCD with Camera_14.PNG|700px]]<br>
4.Install LovyanGFX library V0.3.4<br>
:Click “Tools> Manager Libraries” to search for and install LovyanGFX library.<br>
[[File:ESP32 TFT LCD with Camera_25.PNG|700px]]<br>
5.Select and setting the parameter in the Tools menu, as the picture:<br>
[[File:ESP32 TFT LCD with Camera_13.PNG|700px]]<br>
===Draw on LCD===
1. You can get the code from here: '''[https://github.com/Makerfabs/Project_Touch-Screen-Camera Core]'''<br>
2. Open the file “\Project_Touch-Screen-Camera-master\touch_draw_v2\touch_draw_v2.ino”. Select the screen type used and comment out the ones that are not used.<br>
#include <Wire.h>
#include "SPI.h"
#include <LovyanGFX.hpp>
#include "makerfabs_pin.h"
//Choice your touch IC
#define NS2009_TOUCH    //Resistive screen driver
//#define FT6236_TOUCH  //Capacitive screen driver
[[File:ESP32 TFT LCD with Camera_26.PNG|500px]]<br>
3. Verify it and upload.<br>
[[File:ESP32 TFT LCD with Camera_15.PNG|500px]]<br>
If failed to upload the code as the picture, please upload again and try to press the Flash switch when the code is uploading.<br>
[[File:ESP32 TFT LCD with Camera_16.PNG|700px]]<br>
4. After done uploading, repower the ESP32 and you will get the drawing board.<br>
[[File:ESP32 TFT LCD with Camera_17.GIF]]<br>
===Display the picture===
1. You can get the code from here:'''[https://github.com/Makerfabs/Project_Touch-Screen-Camera Core]'''<br>
2. Copy the picture you want to show to the SD card. Insert the SD card into the board.<br>
3. Open the file “\Project_Touch-Screen-Camera-master\SD2TFT\SD2TFT.ino”. The name of the showed picture must be filled in the string array, such as the below code.<br>
<pre>String img_file[5] =
4. Verify and upload the code, you will get a digital photo frame.<br>
[[File:ESP32 TFT LCD with Camera_18.GIF]]<br>
1. You can get the code from here: '''[https://github.com/Makerfabs/Project_Touch-Screen-Camera Core]'''<br>
2. Open the file “\Project_Touch-Screen-Camera-master\Camera_v2\Camera_v2.ino”. Choose the screen type and modify the code.<be>
//#define NS2009_TOUCH  //Resistive screen driver
#define FT6236_TOUCH //Capacitive screen driver
#ifdef NS2009_TOUCH
#include "NS2009.h"
const int i2c_touch_addr = NS2009_ADDR;
#define get_pos ns2009_pos
#ifdef FT6236_TOUCH
#include "FT6236.h"
const int i2c_touch_addr = TOUCH_I2C_ADD;
#define get_pos ft6236_pos
3. Verify and upload the code, you will get a camera.<br>
[[File:ESP32 TFT LCD with Camera_20.JPG|500px]]<br>
== Indoor Environment Expansion board ==
This is an expansion board for measuring CO2, TVOC, Temperature, and Humidity. The board is design for ESP32 TFT LCD with Camera(3.5')(also for 3.2' one). For using, plug the board into the ESP32 TFT LCD board directly, program the ESP32. The ESP32 TFT LCD will turn to a meter for monitoring the environment.<br>
'''Model: [https://www.makerfabs.com/esp32-touch-indoor-environment-expansion.html Indoor Environment Expansion]'''<br>
[[File:ESP32 TFT LCD with Camera_21.JPG|500px]]<br>
=== Features ===
*SGP30 Air Quality Sensor, measuring TVOC and CO2.
*DHT11 temperature and humidity sensor.
*Active buzzer.
*[https://www.makerfabs.com/wiki/images/d/d6/3.5_Environment_Expansion_Schematic.pdf Schematic]<br>
=== Using ===
*Plug the expansion board into the ESP32 TFT LCD board.
*Loading the program obtained from [https://github.com/Makerfabs/Project_Touch-Screen-Camera/tree/master/Environment%20Expansion%20Board GitHub].
*Reset the ESP32, and wait a minute.
*The LCD will display the measure of CO2, Temperature, Humidity.
*When the CO2 level is high over 1000, the buzzer on board rings.
[[File:ESP32 TFT LCD with Camera_22.JPG|500px]]<br>
===Display CO2 historical level===
*Plug the expansion board into the ESP32 TFT LCD board.
*Loading the [https://github.com/Makerfabs/Project_Touch-Screen-Camera/tree/master/example/p-line-chart program].
*Reset the ESP32 board, the ESP32 will start to record the CO2 level and TVOC level, and draw the historical values to line.
[[File:ESP32 TFT LCD with Camera_23.JPG|500px]]<br>
== FAQ  ==
'''You can list your question here or contact support@makerfabs.com for technology support. Detailed descriptions of your question will be helped to solve your question.'''<br>
*Q: Why the display fails to respond sometimes I touch.<br>
:A: The touching interface is loose, please reconnect it.<br>
== Resources ==
*[https://www.makerfabs.com/desfile/files/esp32-wrover_datasheet_en.pdf ESP32 wrover datasheet]
*[https://github.com/Makerfabs/Project_Touch-Screen-Camera Github: Project_Touch-Screen-Camera]
*[https://www.makerfabs.com/wiki/images/6/67/ESP32_TFT_Touch_with_camera%283.5%27%27_ili9488%29_sch.pdf Schematic]

Latest revision as of 03:56, 13 December 2022

This page had been no longer maintained, please go to the new page on our website.--https://wiki.makerfabs.com/ESP32_3.5_TFT_Touch_with_Camera.html