Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. ESP32 based IoT gateway/control hub with TFT, touch, RFM69 and more..

ESP32 based IoT gateway/control hub with TFT, touch, RFM69 and more..

Scheduled Pinned Locked Moved My Project
23 Posts 7 Posters 6.5k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Martin Harizanov
    wrote on last edited by
    #1

    Folks,

    I'd like to share a project I've been working on recently, an ESP32 based IoT gateway/control hub with TFT, touch and more:

    Features
    Powered by the popular ESP32 SoC
    ILI9341 based 2.4″ TFT with resistive touch, PWM dimming control
    Light sensor (LDR)
    433Mhz RFM69 ISM radio
    One WS2812B RGB LED (Neopixel)
    Piezo buzzer for audible feedback
    HTU21D/SHT21 temperature/humidity sensor
    DS1338 real-time clock with battery backup
    Four multi-purpose buttons
    Option for ATSHA204 crypto authentication device

    Front:
    alt text

    Back:
    alt text

    3D printable enclosure:
    alt text

    The project was designed to be compatible with LittlevGL, the free and open-source graphics library providing everything you need to create embedded GUI with easy-to-use graphical elements, beautiful visual effects, and low memory footprint.

    As an example, I have created a MQTT Christmas lights controller, Arduino example code available on Github
    alt text

    More details, schematic and code: TFT32

    1 Reply Last reply
    7
    • electrikE Offline
      electrikE Offline
      electrik
      wrote on last edited by
      #2

      Nice project!

      Which TFT do you use?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Martin Harizanov
        wrote on last edited by
        #3

        I used a bare ILI9341 with resistive touch, a 2.4" TFT with 320x200 resolution. Relatively small, yet does the job well.

        Nca78N 1 Reply Last reply
        0
        • M Martin Harizanov

          I used a bare ILI9341 with resistive touch, a 2.4" TFT with 320x200 resolution. Relatively small, yet does the job well.

          Nca78N Offline
          Nca78N Offline
          Nca78
          Hardware Contributor
          wrote on last edited by
          #4

          @martin-harizanov that's a very interesting project, and thank you for pointing out to LittlevGL I didn't know about it, it seems really great. I'm working on an ESP32 project, too, and this library will save me a lot of time !

          And yes nice lcd controller, fast and available from 2'' to 3.2'' with the same physical interface than the one you use.

          M 1 Reply Last reply
          0
          • Nca78N Nca78

            @martin-harizanov that's a very interesting project, and thank you for pointing out to LittlevGL I didn't know about it, it seems really great. I'm working on an ESP32 project, too, and this library will save me a lot of time !

            And yes nice lcd controller, fast and available from 2'' to 3.2'' with the same physical interface than the one you use.

            M Offline
            M Offline
            Martin Harizanov
            wrote on last edited by
            #5

            @nca78 I am loving LittlevGL; it makes touch enable GUI development so much easier..

            1 Reply Last reply
            1
            • N Offline
              N Offline
              NW27
              wrote on last edited by
              #6

              Hi,
              First time post.
              I'm looking at setting up a MySensors network at home (two buildings) and I'm very interested in your project as a general MySensors MQTT gateway to my openHAB system.

              From a hardware perspective, this is pretty much what I was looking for (ESP32 & 915MHZ interface). The only thing I would change would be to add external antenna connections to the ESP32 and the RFM69 module.

              Are making the boards publicly available? Even as unloaded blanks?
              I'm located in Australia.

              Thanks,
              Neil.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Martin Harizanov
                wrote on last edited by
                #7

                Hi Neil,
                I use the RFM69HW module on the TFT32, which is the high power version of the RFM69. With this setup, I was able to ping remote nodes (Moteinos with RFM69) ~300m away with no issues, but I live in a suburb with little RF noise.
                I will probably have yet another PCB revision at some point (BTW this is 6th revision already ), that will have external antenna option, plus footprint for RFM95 LoRa.

                At this point, I decided to only provide the TFT32 schematic, example code and completed boards

                N 1 Reply Last reply
                0
                • M Martin Harizanov

                  Hi Neil,
                  I use the RFM69HW module on the TFT32, which is the high power version of the RFM69. With this setup, I was able to ping remote nodes (Moteinos with RFM69) ~300m away with no issues, but I live in a suburb with little RF noise.
                  I will probably have yet another PCB revision at some point (BTW this is 6th revision already ), that will have external antenna option, plus footprint for RFM95 LoRa.

                  At this point, I decided to only provide the TFT32 schematic, example code and completed boards

                  N Offline
                  N Offline
                  NW27
                  wrote on last edited by NW27
                  #8

                  @martin-harizanov
                  Hi Martin,
                  Will the current software act as a MQTT gateway between mysensor boards and external software such as openhab? Basically pickup a temperature from a mysensor board and send this to a MQTT broker.

                  Where do I purchase a completed board and how much are they?
                  I have a 3d printer, so able to print my own enclosure. Are you making the STL available or selling this as well?

                  Thanks,
                  Neil.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    Martin Harizanov
                    wrote on last edited by
                    #9

                    @nw27

                    What you describe is completely doable with TFT32, but the example I linked in the first post doesn't utilize the RFM69 (although I have an RFM69 basic example in the Github repo). The linked "Christmas tree controller" example only provides two touch GUI switches and links (in both directions) those to MQTT topics. So you can either touch the GUI and a message gets sent to the MQTT topic, or you publish 0 or 1 (off/on) to the respective topic from another application (say openhab) and the GUI gets toggled as well to represent the current state.
                    I will add a sensor gateway (RFM69<-->MQTT) example at some point as well.

                    There is a link to the 3D printable enclosure as STL in the TFT32 Wiki page, and also a link to the e-store on my blog, where you can grab a TFT32.
                    Alternatively, you can build your own breadboard version with readily available components using the schematic, and provided sample code.

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      heinzv
                      wrote on last edited by
                      #10

                      @Martin-Harizanov Great job Martin! I like and use the ESP32 since it was introduced.
                      If I would order the TFT32 without the RFM69HW (39€) and would replace it with my RFM95 (LoRa) modules.
                      The RFM69HW (only the HW version) and the RFM95 have the same pinouts right? Can you confirm that? I only use RFM95, no RFM69.

                      M 1 Reply Last reply
                      0
                      • H heinzv

                        @Martin-Harizanov Great job Martin! I like and use the ESP32 since it was introduced.
                        If I would order the TFT32 without the RFM69HW (39€) and would replace it with my RFM95 (LoRa) modules.
                        The RFM69HW (only the HW version) and the RFM95 have the same pinouts right? Can you confirm that? I only use RFM95, no RFM69.

                        M Offline
                        M Offline
                        Martin Harizanov
                        wrote on last edited by
                        #11

                        @heinzv No, unfortunately the RFM69HW and RFM95 have different footprints, so that won't work

                        1 Reply Last reply
                        0
                        • H Offline
                          H Offline
                          heinzv
                          wrote on last edited by heinzv
                          #12

                          @martin-harizanov said in ESP32 based IoT gateway/control hub with TFT, touch, RFM69 and more..:

                          RFM69HW

                          oh, that is bad luck. I had one RFM69 in mind (I think the HCW) which is pin compatible with the RFM95. Ranseyer made one PCB which can take a RFM69 or RFM95 at the same place (just in case somebody still want to use the RFM69).
                          Then I can't order it. However, a great project.

                          1 Reply Last reply
                          0
                          • TheoLT Offline
                            TheoLT Offline
                            TheoL
                            Contest Winner
                            wrote on last edited by
                            #13

                            @martin-harizanov said in ESP32 based IoT gateway/control hub with TFT, touch, RFM69 and more..:

                            LittlevGL,

                            Thanx for LittlevGL, it's something I was looking for something like this a while ago, but couldn't find it when I needed it. I started to develop my own Graphics library but this by for easier.

                            1 Reply Last reply
                            0
                            • N Offline
                              N Offline
                              NW27
                              wrote on last edited by
                              #14

                              Hi Martin,
                              I've placed an order for one of your TFT32 units.
                              I want to use this as a MQTT gateway to mysensor devices. It would be great if the gateway supported the MQTT auto discovery protocol (homie 3 ) https://homieiot.github.io/
                              It would be good if the tft32 showed the incoming/outgoing messages on the screen.

                              Now i need some 915Mhz mysensor boards. I currently have no mysensor equipment.
                              I'm looking for PIR movement, temp/humidity, door/window.
                              Any suggestions on units?

                              Thanks,
                              Neil.

                              1 Reply Last reply
                              0
                              • M Offline
                                M Offline
                                Martin Harizanov
                                wrote on last edited by
                                #15

                                @nw27 said in ESP32 based IoT gateway/control hub with TFT, touch, RFM69 and more..:

                                MQTT auto discovery protocol (homie 3 )

                                The "homie convention" sounds interesting. I will take a look, I think standardization on this subject is long overdue.

                                RE: It would be good if the tft32 showed the incoming/outgoing messages on the screen.

                                That would, of course, be possible, with some modifications to the firmware. What would be more interesting, in my view, is to discover the type of message and visualize accordingly i.e. temperatures as a gauge, switches as a toggle switch etc. based on the "homie convention". Such software will require significant effort

                                RE: Now i need some 915Mhz mysensor boards. I currently have no mysensor equipment. I'm looking for PIR movement, temp/humidity, door/window.

                                TFT32 has a 433Mhz RFM69HW , and you mention 915Mhz. These won't be compatible. I also offer TFT32 without RFM69HW, so you can buy your own 915Mhz version and solder it.

                                In general, you need battery operated nodes with 433Mhz RFM69s to be compatible with TFT32's RFM69HW@433Mhz, google for Moteino, but I believe there are RFM69 powered mysensor nodes as well.

                                N 1 Reply Last reply
                                0
                                • scalzS Offline
                                  scalzS Offline
                                  scalz
                                  Hardware Contributor
                                  wrote on last edited by scalz
                                  #16

                                  looks nice :)
                                  your device could perhaps be better (radio performance) if there was nothing around and behind antennas, especially for a gw.
                                  I prefer webapp vs TFT, as it offers more design freedom and I'm often closer to my phone than to my devices like the gw.
                                  But I agree it can be useful in some others usecases.

                                  M 1 Reply Last reply
                                  0
                                  • scalzS scalz

                                    looks nice :)
                                    your device could perhaps be better (radio performance) if there was nothing around and behind antennas, especially for a gw.
                                    I prefer webapp vs TFT, as it offers more design freedom and I'm often closer to my phone than to my devices like the gw.
                                    But I agree it can be useful in some others usecases.

                                    M Offline
                                    M Offline
                                    Martin Harizanov
                                    wrote on last edited by
                                    #17

                                    @scalz said in ESP32 based IoT gateway/control hub with TFT, touch, RFM69 and more..:

                                    ) if there was nothing around and behind antennas, especially for a gw.
                                    I prefer webapp vs TFT, as it offers more design freedom and I'm often closer to my phone than to my devices like the gw.
                                    But I agree it can be useful in some others usecases.

                                    My issues with using my phone to access IoT devices at home are:

                                    • I can't control any of the devices at home when no internet connection is available (in a cloud IoT setup)
                                    • Guests/family members can't control room thermostats without access to my phone
                                    • It is a cost reduction by centralizing controls and simplifying actuators
                                    • independent from smart devices, I prefer to leave my phone away from my bedroom
                                    • The TFT32 can be used as an always-on reference, just look at it and you have all the information you need instead of checking it on the phone

                                    So basically this is why I needed this sort of a control hub.

                                    Regarding the RF interference, it actually works very well even so. For the future, I plan to have an external RF antenna option for the RFM69 and flip the WiFi sideways to where the buttons are. I'll probably get rid of the buttons as I don't use them.

                                    1 Reply Last reply
                                    0
                                    • M Martin Harizanov

                                      @nw27 said in ESP32 based IoT gateway/control hub with TFT, touch, RFM69 and more..:

                                      MQTT auto discovery protocol (homie 3 )

                                      The "homie convention" sounds interesting. I will take a look, I think standardization on this subject is long overdue.

                                      RE: It would be good if the tft32 showed the incoming/outgoing messages on the screen.

                                      That would, of course, be possible, with some modifications to the firmware. What would be more interesting, in my view, is to discover the type of message and visualize accordingly i.e. temperatures as a gauge, switches as a toggle switch etc. based on the "homie convention". Such software will require significant effort

                                      RE: Now i need some 915Mhz mysensor boards. I currently have no mysensor equipment. I'm looking for PIR movement, temp/humidity, door/window.

                                      TFT32 has a 433Mhz RFM69HW , and you mention 915Mhz. These won't be compatible. I also offer TFT32 without RFM69HW, so you can buy your own 915Mhz version and solder it.

                                      In general, you need battery operated nodes with 433Mhz RFM69s to be compatible with TFT32's RFM69HW@433Mhz, google for Moteino, but I believe there are RFM69 powered mysensor nodes as well.

                                      N Offline
                                      N Offline
                                      NW27
                                      wrote on last edited by
                                      #18

                                      @martin-harizanov
                                      Hi Martin,
                                      For the unit that I have ordered, could you please supply it with the minimal soldered connections on the RFM69 unit so that I can easily change it over for a 915Mhz version.
                                      I also not that you are saying RFM69HW as opposed to RFM69HCW as per the Moteino you suggested looking at.

                                      I was just going for the 915 because there appears to be significantly more consumer (retail) equipment on the 433MHz, including my current X10 equipment.
                                      I had also been told that 915MHz got in and around buildings better than 433 due to things like house wall frame spacing.
                                      Thanks,
                                      Neil.

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        Martin Harizanov
                                        wrote on last edited by
                                        #19

                                        @nw27 said in ESP32 based IoT gateway/control hub with TFT, touch, RFM69 and more..:

                                        RFM69HW as opposed to RFM69HCW as

                                        I mailed you a version with the RFM69HW unsoldered.

                                        RFM69, RFM69HW, RFM69HCW, and RFM69CW can all talk to each other; the 'H' indicates the 'high power' version and the 'CW' - compatible pinout i.e. smaller package. The CW version was more difficult to source at the time, so I decided to use the regular RFM69s. You can source 915Mhz RFM69 here.

                                        1 Reply Last reply
                                        0
                                        • Nca78N Offline
                                          Nca78N Offline
                                          Nca78
                                          Hardware Contributor
                                          wrote on last edited by
                                          #20

                                          Hi Martin, just a question regarding the touch screen after looking at the schematics, I'm curious about why you didn't use an XPT2046 for that ? As it costs nearly nothing, saves I/O pins and makes code a bit easier and possibly more reactive if you use interrupt, it's the ic that's used on the "pcb" version of the lcd.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          20

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular