SR-201 Web Server Switch
Contents:
- 12 pin Jumper
- Relay Connectors
- Factory Default Settings
- Chipsets
- STC 8H1K28 Micro Controller
- Ebay Order
- github code repository
- sr-201-relay.py
- Configuration Parameters
- Hard Reset to Factory Settings
- Using nc command
- Example - SR-201 Python code
- Python Code
- Video
- References
[Top][Home]
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
Interface Description:
- pin 1 - +3V [power supply
- pin 2 - +3v power supply
- pin 3 - CLR
- pin 4 - P32, Channel 4
- pin 5 - CLR
- pin 6 - P33, Channel 5
- pin 7 - P30, Channel 3
- pin 8 - P34, Channel 6
- pin 9 - P31, Channel 7
- pin 10 - P35, Channel 8
- pin 11 - GND: power ground
- pin 12 - GND: power ground
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:
- IP address: 192.168.1.100 Network parameters can be configured over the network
- Default gateway: 192.168.1.1
- Subnet mask: 255.255.255.0
- TCP Port: 6722 - The service port of the module cannot be configured
- UDP Port: 6723
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
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
- IEEE 802.3 compatible Ethernet controller
- Integrated MAC and 10BASE-T PHY
- Supports Full and Half-Duplex modes
- Programmable automatic retransmit on collision
- Programmable padding and CRC generation
- Programmable automatic rejection of erroneous packets
- SPI Interface with clock speeds up to 20 MHz
[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
[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
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
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:
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