Difference between revisions of "7 segment display"

From Let's Control It
Jump to navigation Jump to search
m (Grovkillen moved page 7 digit to 7 segment display)
 
(16 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
= Introduction =
 
= Introduction =
The 7 segment plugin support two different chip types, the TM1637 (4 digits) and the MAX7219/21 (8 digits).  
+
The 7 segment plugin supports two different chip types, the TM1637 (4 digits) and the MAX7219/21 (8 digits).  
  
 
[[File:7D-display-001.jpg|420px]]
 
[[File:7D-display-001.jpg|420px]]
Line 6: Line 6:
 
= Hardware =
 
= Hardware =
  
     '''ESP'''            '''Keypad'''
+
     '''ESP'''            '''TM1637'''
     GPIO    <-->  SCL
+
     GPIO    <-->  CLK
     GPIO    <-->  SD0
+
     GPIO    <-->  DIO
+
 
     '''Power'''
+
    '''ESP'''            '''MAX7219'''
     3.3V*   <-->  VCC
+
    GPIO    <-->  DIN
 +
    GPIO    <-->  CLK
 +
    GPIO    <-->  CS
 +
 
 +
     '''Power'''          '''chip'''
 +
     3.3V*   <-->  VCC
 
     GND    <-->  GND
 
     GND    <-->  GND
 
      
 
      
 
     *Many 7 segment displays state that they need 5V to operate but we have successfully powered them using 3.3V.
 
     *Many 7 segment displays state that they need 5V to operate but we have successfully powered them using 3.3V.
  
== 8 keys vs 16 keys ==
+
== 8 digit display ==
In order to get the 9-16 keys to work you need to bridge the P1.3 pair (see picture below). The setting will come active on boot of the module. Other settings is also possible but not covered in this guide.
+
 
 +
[[File:7D-display-002.jpg|420px]]
 +
 
 +
Displaying date.
 +
 
 +
 
 +
[[File:7D-display-001.jpg|420px]]
 +
 
 +
Displaying temperature.
 +
 
 +
== 4 digit display ==
 +
 
 +
[[File:7D-display-004.jpg|420px]]
  
[[File:TTP229 2.jpg|420px]]
+
Displaying time.
  
[[File:TTP229 3.jpg|420px]]
+
 
 +
[[File:7D-display-005.jpg|420px]]
 +
 
 +
Displaying temperature.
  
 
= ESP Easy =
 
= ESP Easy =
Use the device tab on the ESP Easy web interface and create a new task by editing one of the available tasks. Select "Keypad - ..." from the drop down box.
+
Use the device tab on the ESP Easy web interface and create a new task by editing one of the available tasks. Select "Display - 7 segment". Available in testing at the moment. Settings are as follows.
[[File:TTP229 screendump.PNG|520px]]
 
  
If you check "ScanCode" the key number will be reported and not the exponential numbering which is generally used when the module is set to allow multiple inputs simultaneously (if you use multi input the value will be the sum of all the pressed keys).
+
== TM1637 ==
  
The values that this device reports will be as follows:
+
[[File:7segment_001.PNG|520px]]
 +
 
 +
If you use the 4 digit chip (TM1637) you only need two gpios.
 +
 
 +
== MAX7219 ==
 +
 
 +
[[File:7segment_002.PNG|520px]]
 +
 
 +
If you use the 8 digit chip (MAX7219) you need three gpios.
 +
 
 +
= Type of display information =
  
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|-
 
|-
! Key (ScanCode)
+
! Setting
! Value (8 key)
+
! Information
! Value (16 key)
 
! Extra information
 
 
|-
 
|-
  
| 1
+
| Manual
| 257
+
| Display is manually updated sending commands (see below)
| 1
 
|  
 
 
|-
 
|-
  
| 2
+
| Clock - Blink
| 514
+
| Display is automatically updated with current time and blinking dot/lines
| 2
 
|  
 
 
|-
 
|-
  
| 3
+
| Clock - No Blink
| 1028
+
| Display is automatically updated with current time and steady dot/lines
| 4
 
|  
 
 
|-
 
|-
  
| 4
+
| Date
| 2056
+
| Display is automatically updated with current date
| 8
 
|  
 
 
|-
 
|-
 +
|}
  
| 5
 
| 4112
 
| 16
 
|
 
|-
 
  
| 6
 
| 8224
 
| 32
 
|
 
|-
 
  
| 7
+
== Commands ==
| 16448
 
| 64
 
|
 
|-
 
  
| 8
+
{| class="wikitable sortable"
| 32896
 
| 128
 
|
 
 
|-
 
|-
 
+
! Command
| 9
+
! Value
| -
+
! Extra information
| 256
 
|
 
 
|-
 
|-
  
| 10
+
| 7dn,<value>
| -
+
| '''-999...9999'''<br>'''-9999999...99999999'''
| 512
+
| Display the number (positive or negative). If you use decimal point and the number is longer than the display allows it will be rounded. 7dn, n stands for "number". '''Only used if set to "manual"!'''
|
 
 
|-
 
|-
  
| 11
+
| 7dt,<value>
| -
+
| '''-99°...999°'''<br>'''-999999°...9999999°'''
| 1024
+
| Display the temperature (positive or negative). If you use decimal point and the number is longer than the display allows it will be rounded. 7dt, t stands for "temperature". '''Only used if set to "manual"!'''
|
 
 
|-
 
|-
  
| 12
+
| 7don
 
| -
 
| -
| 2048
+
| Turn the display on.
|
 
 
|-
 
|-
  
| 13
+
| 7doff
 
| -
 
| -
| 4096
+
| Turn the display off.
|
 
 
|-
 
|-
  
| 14
+
| 7db,<value>
| -
+
| '''0...15'''
| 8192
+
| Change the brightness of the display. Possible to dim it further if you disconnect the VCC (power it over the GPIOs). 7db, b stands for "brightness".
|
 
|-
 
 
 
| 15
 
| -
 
| 16384
 
|
 
|-
 
 
 
| 16
 
| -
 
| 32768
 
|
 
 
|-
 
|-
 
 
|}
 
|}

Latest revision as of 11:29, 14 January 2018

Introduction

The 7 segment plugin supports two different chip types, the TM1637 (4 digits) and the MAX7219/21 (8 digits).

7D-display-001.jpg

Hardware

    ESP            TM1637
    GPIO    <-->   CLK
    GPIO    <-->   DIO
    ESP            MAX7219
    GPIO    <-->   DIN
    GPIO    <-->   CLK
    GPIO    <-->   CS
    Power          chip
    3.3V*   <-->   VCC
    GND     <-->   GND
    
    *Many 7 segment displays state that they need 5V to operate but we have successfully powered them using 3.3V.

8 digit display

7D-display-002.jpg

Displaying date.


7D-display-001.jpg

Displaying temperature.

4 digit display

7D-display-004.jpg

Displaying time.


7D-display-005.jpg

Displaying temperature.

ESP Easy

Use the device tab on the ESP Easy web interface and create a new task by editing one of the available tasks. Select "Display - 7 segment". Available in testing at the moment. Settings are as follows.

TM1637

7segment 001.PNG

If you use the 4 digit chip (TM1637) you only need two gpios.

MAX7219

7segment 002.PNG

If you use the 8 digit chip (MAX7219) you need three gpios.

Type of display information

Setting Information
Manual Display is manually updated sending commands (see below)
Clock - Blink Display is automatically updated with current time and blinking dot/lines
Clock - No Blink Display is automatically updated with current time and steady dot/lines
Date Display is automatically updated with current date


Commands

Command Value Extra information
7dn,<value> -999...9999
-9999999...99999999
Display the number (positive or negative). If you use decimal point and the number is longer than the display allows it will be rounded. 7dn, n stands for "number". Only used if set to "manual"!
7dt,<value> -99°...999°
-999999°...9999999°
Display the temperature (positive or negative). If you use decimal point and the number is longer than the display allows it will be rounded. 7dt, t stands for "temperature". Only used if set to "manual"!
7don - Turn the display on.
7doff - Turn the display off.
7db,<value> 0...15 Change the brightness of the display. Possible to dim it further if you disconnect the VCC (power it over the GPIOs). 7db, b stands for "brightness".