Over 10 years we help companies reach their financial and branding goals. Engitech is a values-driven technology agency dedicated.

Gallery

Contacts

411 University St, Seattle, USA

engitech@oceanthemes.net

+1 -800-456-478-23

Display Screens Sensors and Modules Tech

What is OLED Technology?

OVERVIEW Nowadays we see oled display being used everywhere be it the phones , TVs , laptops or PCs , smartwatches . They sure are better than old chunky CRT TV displays that were bulky and didn’t deliver the desired picture quality , with the introduction of the LCD and backlight LEDs the things sure got better with the chunkiness of the display gone but the picture quality still wasn’t what one desired of but with the release of the OLED display all these problems became a thing of past. OLED or organic light emitting diode were invented in 1987 by Ching Tang and Steven Van Slyke from Kodak but it was until 2004 when SONY released a OLED TV. In fact in CES 2019 , there were some innovative inventions that were released in the OLED domain with the companies trying to come up with foldable display and some exceptional picture quality. TYPES OF OLED Passive Matrix Oled (PMOLED) Pmoleds have strips of cathode , anode and organic layer. The anode strips are perpendicular to cathode strips it is their intersection that makes a pixel . External circuitry applies current to the cathode and anode strips to decide which pixel to light up. They are used in MP3 players , cell phones etc. Active Matrix Oled(AMOLED) Amoleds have full layer of anode and cathode and organic molecules . The anode layer overlaps the TFT matrix array . The TFT array is the matrix circuitry that decides which pixel gets turned on form the image. Since they consume less electricity they are used in TV screens , BillBoards, Computer Monitors. Transparent Oled A Transparent Oled has all the components cathode, anode, substrate transparent and when off the display is 85 percent transparent. When switched ON the display allows the transfer of light in both the directions. Top Emitting Oled The Top Emitting Oled is have substrate that is either opaque or transparent . They are best suited for active matrix design . They are used in smartcards                   Foldable Oled They are substrate that made of flexible metallic foil , plastic . They are durable and are easier to replace in case of damage . They are used in smart clothing , GPS receivers , IC computers. White Oled They are made of white light that is more uniform and energy efficient rather than fluorescent lights. They posses true color of incandescent lights BESIDES THESE OLEDS ARE ALSO CATEGORIZED ON THE BASIS OF BASE COLOUR Monochrome Blue Monochrome white Yellow Colour NO OF PINS 3 Pins (supports only I2C) 7 Pins(supports both I2C and SPI) BASED ON INTERFACE ICs    SSD1306     SSD1331 BASED ON SIZE 0.91 inch(128×32) 0.96 inch(128×64) HOW OLEDs WORKS Both the LCD and OLED have similar display mechanism . The difference lies in the fact that OLED has the smallest display unit made of pixels that are usually 0.3mm x 0.3mm . Inside each pixel they are 3 different type of color filters . When the size of the color filter is reduced then human eye losses its ability to view each color individually and sees them as a mixture. Next each pixel is converted into digital form for future reproduction of the image. Earlier the image reproduction was done using backlight white , colour filters, glass , diffuser . When the light would glow each color filter would light up too. Behind the filters a polarizer lcd sheet is used which reproduces the image , the problem with this was the black colour produced wasn’t exactly black due to the back light being ON constantly . This issue was rectified using tiny light sources for each pixel due to which organic led was used . If we apply positive voltage to the anode termina the electrons would combine with the holes in the LUMO layer producing light. Work is also being done to remove the need for light source and add doping material in the emission layer which will release light of the certain color due to the energy difference in the conduction and valence layer corresponding to their wavelengths FIG -1 SIZE OF A SINGLE PIXEL FIG-2 RGB COLOR FILTERS INSIDE A PIXEL FIG -3 CONVERTING EACH COLOR INTO BINARY FIG -4 CROSS SECTION VIEW OF OLED FIG-5 CHANGING THE ORIENTATION OF THE POLARIZER TO GENERATE DIFFERENT COLORS FIG -6 ELECTRON HOLE PAIR COMBINATION TO GENERATE LIGHT FIG – 7 DOPING OF SUBSTRATE TO GENERATE LIGHT OF VARIOUS WAVELENGTH USE CASES OF OLED DISPLAY Raspberry Pi Based SSD1306 OLED Video PlayerThis project uses Raspberry pi and OpenCv to display videos on the Oled display ESP8266 Weather WidgetThis project used ESP8266 and weather API to display real time weather conditions on the 0.96 inch display. Tinyduino gamepadThe project used joystick , push buttons , arduino uno , custom designed PCB , USB module  and ssd display to play games on the tiny 0.96 inch screen Bluetooth SmartwatchThe project uses 0.96 display , bluetooth module , tiny arduino , lipo battery to connect to the phone and display all kinds of medical stats and time Speedometer for bikes The project uses gps module neo6m and ssd1306 display to show speed of the vehicle on the display and raise an alarm in case of overspeeding.                                                                                                 HOW TO CONNECT THE DISPLAY WITH THE MICROCONTROLLER WE WILL BE COVERING THE DETAILS ON HOW TO CREATE AN EMBEDDED DRIVER FOR THE DISPLAY IN THE NEXT BLOG . IN THIS WE’LL BE COVERING A BRIEF OVERVIEW OF THE 2 METHODS THAT CAN BE USED TO COMMUNICATE WITH THE DISPLAY. I2C SPI I2C Using I2C we’ll be communicating with the microcontroller by the help of SCL the clock

Display Screens I2C Modules Sensor/Module Interfacing Sensors and Modules Tech

CONFIGURING THE OLED WITH STM32 MCU

In previous blog we covered a brief overview of how the OLED display works in microscopic level and also understood various types of OLED displays available in the market . In this blog we’ll be discussing  how to configure the SSD1306  display with the microcontroller and we’ll be  making the embedded driver as well.128×64 display is a dot matrix display , hence 128×64 =8192 total pixels . It is by turning on/off these pixels we display graphical image of any shape . It is the current provided to each pixel that varies the brightness. HARDWARE DESCRIPTION OLED Display chosen is driven by SSD1306 Driver IC although they are other ICs such as SSD1331 which can be used to drive the display . These ICs  are CMOS OLED Driver controller for dot-matrix system . OLED has 256 brightness steps .Besides 128×64 , 128×32 display resolution is also available. Specification of ssd1306 128×64 OLED Display Type: OLED (Organic Light Emitting Diode) Display Size: 128×64 pixels Display Driver: ssd1306 Display Colors: Monochrome (White), Yellow, and Blue Operating Voltage: 3.3V to 5V Interface: I2C Operating Current: ~20mA Display Structure OLED DISPLAY is mapped using GDDRAM page structure  OF SSD1306 GDDRAM or graphic display ram is a bit mapped static RAM . It holds the bit pattern to be displayed. The GDDRAM having size 128×64 is divided into 8 pages from PAGE 0 TO PAGE 7 which is used for monochrome matrix display . When data bit D0 – D7 is sent the row0 gets filled with D0 and D7 is written into the bottom row.  Display has 64 rows , 128 columns divided into 8 pages . Each page has 128 columns and 8 rows. Display 128 columns known as segments For displaying the graphical data in the first location , page address and column address both are set to 0 with the end address of page and column also being selected End of column and End of the page is 7FH and 07H respectively SSD1306 BLOCK DIAGRAM PIN ARANGEMENT SSD1306 FUNCTIONAL BLOCK DIAGRAM SSD1306 BLOCK DIAGRAM PIN ARANGEMENT SSD1306 FUNCTIONAL BLOCK DIAGRAM ADDRESSING MODE 1. PAGE ADDRESSING MODE 2.Horizontal Addressing Mode 3.Vertical Addressing Mode 1. PAGE ADDRESSING MODE In page addressing mode, after the display RAM is read/written, the column address pointer is increased automatically by 1.                                                                If the column address pointer reaches column end address, the column address pointer is reset to column start address but page address pointer not points to next page. Hence, we need to set the new page and column addresses in order to access the next page RAM content. We need to set lower two bits to ‘1’ and ‘0’ for Page Addressing Mode. In page addressing mode, the following steps are required to define the starting RAM access pointer location: Set the page start address of the target display location by command B0h to B7h. Set the lower start column address of pointer by command 00h~0Fh. Set the upper start column address of pointer by command 10h~1Fh 2.Horizontal Addressing Mode In horizontal addressing mode, after the display RAM is read/written, the column address pointer is increased automatically by 1. If the column address pointer reaches column end address, the column address pointer is reset to column start address and page address pointer is increased by 1. When both column and page address pointers reach the end address, the pointers are reset to column start address and page start address We need to set last two digits to ‘0’ and ’0’ for horizontal addressing mode. 3.Vertical Addressing Mode In vertical addressing mode, after the display RAM is read/written, the page address pointer is increased automatically by 1. If the page address pointer reaches the page end address, the page address pointer is reset to page start address and column address pointer is increased by 1. When both column and page address pointers reach the end address, the pointers are reset to column start address and page start address. We need to set last two digits to ‘0’ and ’1’ for vertical addressing mode. In normal display data RAM read or write and horizontal/vertical addressing mode, the following steps are required to define the RAM access pointer location: Set the column start and end address of the target display location by command 21h. Set the page start and end address of the target display location by command 22h. Hardware Pinout SDAThis pin is used to send data between master and slave with the acknowledgement of the master SCLThis is a clock signal that helps keeps the process in synchronization VCCA power supply of 3.3 V is required . More than 3.3V may damage the module GNDThis ground pin is connected to the ground supply ALGORITHM Select the I2C slave address and specify the operation that will be performed i.e Read 0x79 or Write 0x78. #define SSD1306_I2C_ADDR 0x78 Set the clock divide ratio and oscillator frequency . Bit 3-0 sets the clock divide ratio , Bit 7-4 sets the oscillator frequency SSD1306_WRITECOMMAND(0xD5); //–set display clock divide ratio/oscillator frequency SSD1306_WRITECOMMAND(0xF0); //–set divide ratio Set the multiplex ratio switching to any value ranging from 16-63 SSD1306_WRITECOMMAND(0xA8); //–set multiplex ratio(1 to 64) Display start line addressing in which the starting address of the display ram is determined . In our case this is set to zero and RAM row 0 is mapped to col 0 SSD1306_WRITECOMMAND(0x40); //–set start line address Set memory addressing mode using page addressing mode, horizontal addressing mode, vertical addressing mode. SSD1306_WRITECOMMAND(0x10); //00,Horizontal Addressing Mode;01,Vertical Addressing Mode;10,Page Addressing Mode (RESET);11,Invalid SSD1306_WRITECOMMAND(0xB0); //Set Page Start Address for Page Addressing Mode,0-7 Set column address using a triple byte first specifies the column setting , second column start and third column  end . Do the same for the page SSD1306_WRITECOMMAND(0x00); //—set low column address SSD1306_WRITECOMMAND(0x10); //—set high column address Set pre-charge period and VCOMH deselect level SSD1306_WRITECOMMAND(0xDB); //–set vcomh Entire display is on using A4H and A5H command SSD1306_WRITECOMMAND(0xA4); //0xa4,Output follows RAM content;0xa5,Output ignores RAM content The normal functionality of the

NFC/RFID Sensor/Module Interfacing Sensors and Modules Tech

Read and Write to a Rfid Tag

In the previous blogs we discussed how to read uid of different tags . Now as discussed in the applications of the rfid cards , the rfid tags can be used to store employee information so as to access certain restricted area. The rfid tags can also be used by retail stores to store customer information and points earned with each shopping. In this blog we’ll be learning how data reading or writing works by looking at the memory map of MIFARE 1K Tag and how to read and write the data using rc522. UNDERSTANDING THE MEMORY MAP OF MIFARE 1K TAG The memory of the MIFARE 1K Tag is divided into 15 sectors and each sector is divided into 4 blocks , within each block 16 bytes of data is stored Hence 16 Sectors * 4 Blocks * 16 Bytes=1024 Bytes = 1K The 0th Block of Sector 0 is used to store manufacturer data , this is usually 4 Byte UID(MIFARE 1K TAG, MIFARE Mini Tag) certain tags are available such as MIFARE Plus , MIFARE Desfire etc that has 7 Byte UID There are 3 data blocks presents in each sector and the last block in each sector is known as sector trailer.The 3 data blocks are used to store user data and the trailer block is used to deter mine the access conditions for all the blocks of the sector . The access conditions include Read , Write , Increment , Decrement ,Transfer and Restore. Each sector trailer consists of following information:- A mandatory 6 Byte Key A. 4 Bytes for Access Bits. Optional 6 Byte Key B (if not used, data can be stored). MEMORY ORGANIZATION MANUFACTURER BLOCK SECTOR TRAILER ACCESS CONDITIONS MEMORY ORGANIZATION MANUFACTURER BLOCK SECTOR TRAILER ACCESS CONDITIONS FUNCTIONAL DESCRIPTION uint8_t MFRC522_Write(uint8_t blockAddr, uint8_t *writeData) This function takes in 2 arguments the address to which the data has to be written and the array or buffer in which data  is stored lets say this to be writedata array. A 8 bit  array of 18 length is also intialized to store data which will be transferred to the memory block. Intially CRC is checked using CalculateCRC function using which takes in 3 arguments array in ( whose first 2 values are PICC Write and blockAddress ), len and output array that stores 2 values CRCResultRegL , CRCResultRegM . Next MFRC522_ToCard function is called which takes in 5 arguments command (in this case that will be PCD_Transceive), send data , send length , back length, back data according to various commands processing is done and according to switch cases status is sent Finally  MFRC522_ToCard in again called (with  PCD_Transceive) and the data is transferred to the FIFODataReg to return with the correct status and finally the PCD is set to idle uint8_t MFRC522_Read(uint8_t blockAddr, uint8_t *recvData) This function is used to read data from a memory block and and put it into a buffer or array hence the argument recvData Similar to uint8_t MFRC522_Write initially the CRC is calculated and MFRC522_ToCard  is called. In MFRC522_ToCard the command argument is set to PCD_TRANSCEIVE due to which the code enter the for loop in which the data that was in FIFODataReg is populated in the recvData Buffer. Finally  MFRC522_ToCard in again called (with  PCD_Transceive) and the data is transferred to the FIFODataReg to return with the correct status and finally the PCD is set to idle uint8_t MFRC522_ToCard(uint8_t command, uint8_t *sendData, uint8_t sendLen, uint8_t *backData, uint *backLen) This function is used to control the MFRC522 according to the command arguments that can be PCD_AUTHENT PCD_TRANSCEIVE Both these commands have different irqEn ,waitIRq that are written into CommIEnReg block which is then cleared using clear bit mask function After finally setting bit mask the PCD is set to idle state The function writes the data in FIFODataReg to the backData buffer and returns the status which is OK in case of no errors STM32CUBE IDE CONFIGURATION FIG 1- PINOUT CONFIGURATION FIG 2 – CONFIGURING THE SPI1 PERIPHERAL CODE #include “main.h” /* Private includes ———————————————————-*/ /* USER CODE BEGIN Includes */ #include “stdio.h” #include “stm32f1_rc522.h” #include “stdio.h” #include “string.h” #include “fonts.h” #include “ssd1306.h” /* USER CODE END Includes */ /* Private typedef ———————————————————–*/ /* USER CODE BEGIN PTD */ /* USER CODE END PTD */ /* Private define ————————————————————*/ /* USER CODE BEGIN PD */ /* USER CODE END PD */ /* Private macro ————————————————————-*/ /* USER CODE BEGIN PM */ /* USER CODE END PM */ /* Private variables ———————————————————*/ I2C_HandleTypeDef hi2c1; SPI_HandleTypeDef hspi1; UART_HandleTypeDef huart1; /* USER CODE BEGIN PV */ void uprintf(char *str) { HAL_UART_Transmit(&huart1,(uint8_t *)str,strlen(str),100); } //uint8_t i; uint8_t status; uint8_t str[5]; // Max_LEN = 16 uint8_t serNum[5]; uint8_t KEY[] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; uint8_t KEY2[]={1,2,3,4,5,6}; uint8_t W[]=”PRATYUSH”;/STEP 1/ uint8_t R[10]=””;/STEP 2/ uint8_t test; /* USER CODE END PV */ /* Private function prototypes ———————————————–*/ void SystemClock_Config(void); static void MX_GPIO_Init(void); static void MX_SPI1_Init(void); static void MX_USART1_UART_Init(void); static void MX_I2C1_Init(void); /* USER CODE BEGIN PFP */ /* USER CODE END PFP */ /* Private user code ———————————————————*/ /* USER CODE BEGIN 0 */ /* USER CODE END 0 */ /** * @brief The application entry point. * @retval int */ int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration——————————————————–*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_SPI1_Init(); MX_USART1_UART_Init(); MX_I2C1_Init(); /* USER CODE BEGIN 2 */ MFRC522_Init(); /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { status = MFRC522_Request(PICC_REQIDL, str); //MFRC522_Request(0x26, str) status = MFRC522_Anticoll(str); memcpy(serNum, str, 5); HAL_Delay(1000); MFRC522_SelectTag(str); test = MFRC522_Auth(PICC_AUTHENT1A,24,KEY,serNum);/STEP 3/ MFRC522_Write((uint8_t)24 , W);/STEP 4/ HAL_Delay(1000); MFRC522_Read(24, R);/STEP 5/ HAL_Delay(1000); if (status == MI_OK) { MFRC522_SelectTag(str); test = MFRC522_Auth(PICC_AUTHENT1A,2,KEY,serNum); /*if((str[0]==0) &&

Stay Updated With Us

Error: Contact form not found.