SR-201 Web Server Switch

Contents:
  1. 12 pin Jumper
  2. Relay Connectors
  3. Factory Default Settings
  4. Chipsets
  5. STC 8H1K28 Micro Controller
  6. Ebay Order
  7. github code repository
  8. sr-201-relay.py
  9. Configuration Parameters
  10. Hard Reset to Factory Settings
  11. Using nc command
  12. Example - SR-201 Python code
  13. Python Code
  14. Video it's open, then in n seconds (1 <= n <= 65535)
  15. References

[Top][Home]
Switch-Module.webp
LAN Ethernet 2 Way TCP/UDP Controller Module Web Server

Description:

Micro-channel remote control 2-way remote cloud Ethernet network switch delay relay TCP/UDP 
relay module controller can be expanded to 8
Control via Ethernet and internet pull 2 relay, the release
And can be extended by a pin external relay module to eight outputs
Module supports TCP, UDP, cloud remote control three kinds of operation
Easy to understand instructions, instruction can specify 1--65535 seconds delay
Module is equipped with VB, Delphi PC program and source code to help you easily computerized remote control
​TCP and cloud remotely can check the status of all relays
Also after each command processing is complete, the module will return to the latest state of all relays
UDP mode no status query or other returns
Code is extremely simple, easy to be embedded into a variety of applications
Full support for secondary development, open TCP, UDP control protocol, cloud secondary development 
    package provides remote SOAP Web Service API interface and RESTful Web Service API interface
 

Module Features:

STC microcontroller for industrial master chip
Onboard 2-way high-quality relay, relay with absorption diode circuit
With 1-channel power indicator, each relay has status indicator lights up and relay
The relay module can be extended up to 8 outputs, Note: The relay module should be active high
You can configure the module through the network parameters, such as the module IP address, 
    default gateway, etc
Holding relay status before power down (configurable)
Through internet control, remote cloud by local password protection, safe and reliable
Supports 5V or 9-24V input voltage 1.6mm thick PCB by the military grade FR-4 sheet material, 
    PCB size 6.8x4.8cm, set aside the mounting holes
 PCB dimensions: approx. 6.8x4.8x1.5cm/2.68x1.89x0.59"

12 pin Jumper

12-pin-jumper.webp

Interface Description: P30 – P35: CH3 – CH8 control line, active high
CLR: Short circuit CLR and power on the module to restore factory settings

[Top][Home]

Relay Connectors

Blue terminal: Connect to user load, you can use 220V AC equipment, or DC equipment less than 30V, the current of the equipment cannot exceed the standard load of the relay. Each relay has a normally open contact, a normally closed contact and a common contact. When the relay is closed, the common contact and the normally open contact conduct; when the relay is released, the common contact and the normally closed contact conduct Pass.



[Top][Home]

Factory Default Settings

Factory setting of the module is: Module parameters can be re-configured through the network.
Factory Settings can be restored by shorting the CLR jumper and powering up the module.
[Top][Home]

Chipsets

web-sw-1.webp web-sw-2.webp
ENC28J60:

https://www.alldatasheet.com/datasheet-pdf/pdf/102687/MICROCHIP/ENC28J60.html

The ENC28J60 is a stand-alone Ethernet controller with an industry standard Serial Peripheral Interface (SPI). It is designed to serve as an Ethernet network interface for any controller equipped with SPI.

Ethernet Controller Features



[Top][Home]

STC 8H1K28 Micro Controller

Ultra-high speed 8051 Core with single clock per machine cycle, which is called 1T and the speed
is about 12 times faster than traditional 8051

https://stcmicro.com/stc/stc8h1k28.html

[Top][Home]

Ebay Order

Web-SW-ebay.png

[Top][Home]

github code repository

git repository: https://github.com/cryxli/sr201



[Top][Home]

sr-201-relay.py





[Top][Home]

Configuration Parameters



Change the IP address The #2 command expects the new static IP address as an argument. #29876,192.168.0.201; >OK; You should also send a #7 and close the connection for the device to restart is Ethernet connection with the new setting.

Source:https://github.com/cryxli/sr201/wiki/Config-commands

[Top][Home]

Hard Reset to Factory Settings

reset.png

Note that this board has a 3.3 volt supply not 5 volt. Short pins 3 and 5 and power cycle the board. Remove the jumper (short) after resetting the board.



[Top][Home]

Using nc command

This an example using the "nc" command to communicate directly with the sr-201 module.



[Top][Home]

Example - SR-201 Python code

This code is broken - DO NOT USE
https://sr-201-relay.sourceforge.io/

[Top][Home]

Python Code



[Top][Home]

Video

it's open, then in n seconds (1 <= n <= 65535) # open it. Get started whit SR-201 Network relay, Installation and usage tutorial by Fohab Electro:

https://www.youtube.com/watch?v=0Gnxaf7Dlt0

SR-201Network relay by Udda Ting:

[Top][Home]

References

https://www.youtube.com/watch?v=UkHdXKTLjog

Arduino YUN rev.2 and SR-201 Relay Card:
it's open, then in n seconds (1 <= n <= 65535) # open it. https://www.open-electronics.org/arduino-yun-rev-2-and-sr-201-relay-card/

[Top][Home]
Glenn Lyons VK4PK
glenn@LyonsComputer.com.au
Ver:gnl20230321 - pre published v0.9