Mark DiVecchio's O-Gauge Train Layouts

1992 Layout Page

2006 Layout Page

2009 Layout Page

P&LE Postcards by Howard Fogg 

Plasticville Buildings

Portable Layout Page

Train Clubs

Bing Track

Remote Train Control Program

YouTube Channel

OOK Radio Support

Technical Videos

3D Prints for my Layout

More RTC Videos

ADPCM - Playing clips from .mth sound files

P&LE McKees Rocks Locomotive Shop
3D Printer Project

White Tower Restaurant
3D Printer Project

RFID Train Detection

Engine and Car Operation
Hints and Tricks

RFID Tag Programmer using PN532

RTC Control Language - Scripting


More RFID Tag Videos

RTC Control Language - Signaling


WiFi Support for RTC

This Page last updated on .

I started developement of this web page in January 2022. It will be under construction for a while.

On this page, I describe the work that I've been doing to implement the use of WiFi to connect to my layout. I started on the coding around September of 2021.

When I started my work on RTC, I used a wired interface to connect the PC to the TIU. Later, I learned how to use a CC1101 radio to connect directly. The radio was connected to the PC using a USB cable. Now the ultimate(?) implementation - I can get rid of the USB cable by using WiFi to connect to the Radio. I extended this so that now I can also connect using WiFi to my RFID tag detectors distributed over the layout.

Though connecting to the TIU via WiFi is nice, the real advantage to reduced wiring is having a dozen or more RFID tag detectors around my layout and not having to have them wired together in series and then wired to my computer. If you look on my RFID tag detectors page, you can see the "old" RS232 wired connection scheme.

This is based on the work that I did for the Remote Train Control (RTC) program and OOK Radio Support.



Prior Art 

Mike Hewett

Mike always seems to be acknowledged on my web pages and he deserves it. Mike learned about the ESP8266 based NodeMCU board and started to use it in his projects. After I saw his success and how easy it was to use, I started to port my RTCModemE and RTCNFCIRQ programs to that device.



My Ideas

I figured that could replace the USB connections for both my CC1101E radio (which lets the RTC program talk with the TIU) and for my RFID tag detectors (which send tag information to the RTC program).




ESP8266

    features
        1MB program memory
        64KB data memory
        3MB data space ( see the LittleFS below. Simulates a small hard disk.)

    web page

ebay

    there are many on eBay. Here is one example.

   All are under $5 each as of July 2022.

Adruino IDE

    Use Arduino IDE 1.8.16





Ported the RTCNFCIRQ sketch to the ESP8266 - RTCNFCWiFi


The current version of the RTCNFCIRQ sketch runs on a Seeeduino/Infiduino. This porting effort moved the sketch to run on an ESP8266.



Cost:
ESP8266            $5.00
Tag Reader from Elechouse          

https://www.elechouse.com/product/pn532-nfc-rfid-module-w-external-antenna-updated-version/




Ported the RTCModemE sketch to the ESP8266 without using WiFi - RTCModemESP

The current version of the RTCModemE sketch runs on a Seeeduino/Infiduino. This porting effort moved the sketch to run on an ESP8266. This was done in two steps. This section describes step 1.

 
Cost:
ESP8266            $5.00
RS1101E-V3.1 Radio   

https://www.elechouse.com/product/915mhz-cc1101-wireless-module/
The illustration shown is labeled RF1100SE but this specific 915Mhz version is V3.1.

There are cheaper versions of this radio on eBay but since you only need 1 for a layout, the higher price is not so bad for a quality radio.


Ported the RTCModemE sketch to the ESP8266 using WiFi - RTCModemWiFi

The current version of the RTCModemE sketch runs on a Seeeduino/Infiduino. This porting effort moved the sketch to run on an ESP8266. This was done in two steps. This section describes step 2.



Cost:
ESP8266            $5.00
RS1101E-V3.1 Radio   



Wrote a new sketch to emulate an AIU using WiFi - RTCAIUWiFi

The current version of the RTCModemE sketch runs on a Seeeduino/Infiduino. This porting effort moved the sketch to run on an ESP8266. This was done in two steps. This section describes step 2.




Cost:
ESP8266            $5.00
8 Relay Module           



Power supply


    track AC to 7 volts


Many available on eBay. https://www.ebay.com/itm/284059932130.






RTCModem WiFi Configuration



After you download the RTCModemWiFi program into the ESP8266, it will start an Access Point. If you look on your phone, you will see the new AP listed as RTCModem. Tounch on that AP to connect to it.

The phone will proceed to connect to the RTCModem AP.

The phone should connect up and you should see the RTCModem AP "connected without internet".

Then startup a web browser such as Firefox or Chrome. Enter this IP address into the Address Bar:  192.168.4.1. Press GO. You should see this screen. Here is were we enter the information that the RTCModemWiFi program needs to communicate with your computer via the WiFi Router.
Enter:
The SSID of your router
The WiFi password of your router
DO NOT change the Port number as the RTC expects this value.

Then click on [Setup CC1101E Radio WiFi].

You should see this screen indicating that the device is rebooting and will connect up the WiFi Router.











RTC RFID Tag Detection Configuration


After you download the RTCNFCWiFi program into the ESP8266, it will start an Access Point. If you look on your phone, you will see the new AP listed as RTCRFID. Tounch on that AP to connect to it.

The phone should connect up and you should see the RTCRFID AP "connected without internet".

Then startup a web browser such as Firefox or Chrome. Enter this IP address into the Address Bar:  192.168.4.1. Press GO. You should see this screen. Here is were we enter the information that the RTCNFCWiFi program needs to communicate with your computer via the WiFi Router.
Enter:
The SSID of your router
The WiFi password of your router
The detector number of this device
The number of tag readers connected to this device.

Then click on [Setup RFID WiFi].

You should see this screen indicating that the device is rebooting and will connect up the WiFi Router.
















CC1101 Radio by Elechouse

The radio I use is a TI CC1101 based radio from Elechouse. Note that the image on their web page says RF1100SE but I received the correct version labeled RF1191SE-V3.1. This is a 3.3V device and no signal pin can be connected to a 5V Arduino output.




Compiling a sketch which uses the CC1101 radio from Elechouse requires my libraries CC1101E_OOK_ESP and C1101E_OOK_ESP_SPI. You can download it from here. In your local Arduino Library folder, create a folder named "CC1101E_OOK_ESP" and put the CC1101E_OOK_ESP library files in it, then create a folder "CC1101E_OOK_ESP_SPI" and put the CC1101E_OOK_ESP_SPI library files in it.




Program summary and source code

I'll try to keep these zip files up to date but if you are going to seriously work with them, email me to be sure you have the latest versions.

RTCModemWiFi        This is the new ESP8266 NodeMCU based sketch using WiFi to connect to the PC

RTCNFCWiFi            This is the new ESP8266 NodeMCU based sketch using WiFi to connect to the PC





This site prepared and maintained by Mark DiVecchio

email :  markd@silogic.com

SD&A HOME
 
 Mark's Home Page

The DiVecchio genealogy home page
The Frazzini genealogy home page

This site will be under construction for a while.