---
title: "Fork + Relay"
url: "https://maker.wiznet.io/WIZnet/projects/fork-relay/"
markdown_url: "https://maker.wiznet.io/WIZnet/projects/fork-relay/md"
type: "UCC: User Created Content"
author: "fork"
author_url: "http://forktestlab.com/relay"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "fork"
original_url: "http://forktestlab.com/relay"
published: "2023-02-07"
language: "en"
likes: 2
views: 412
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Fork + Relay

> w5500

Original author: fork (source: http://forktestlab.com/relay)

## Article

Fork + Relay

**In this article I will carry out a study of the Chinese relay for reliability (number of switches).**

![](https://thumb.tildacdn.com/tild3935-3962-4335-a661-653633383861/-/resize/321x/-/format/webp/relay1.png)

**Figure 1 – Relay**

1. Switch the relay at idle

Will be necessary for the circuit:

- Fork;

- Breadboard;

- Relay;

- Set of wires.

![](https://thumb.tildacdn.com/tild6261-6531-4533-b762-323133316530/-/resize/620x/-/format/webp/relay2.png)

**Figure 2 – Photograph of layout 1**

![](https://thumb.tildacdn.com/tild6135-6439-4133-a131-646165626330/-/resize/460x/-/format/webp/relay3.png)

**Figure 3 – Circuit for test without load**

Note – As a source of +5 V I used the power supply and DC/DC converter, with a possibility of the output voltage adjustment. Any other source of +5 V is also acceptable.

Assembled a circuit to test the relay at idle.
All commands are sent in the browser address bar.
To check the link, I enter the command

```plaintext
http://192.168.0.205/control?DI0
```

Fork gives 0. I enter the command

```plaintext
http://192.168.0.205/control?DO0=1
```

to set the DO0 output high (high mode). The relay switches. And again I request the DI0 status

```plaintext
http://192.168.0.205/control?DI0
```

This time the fork gives 1. Everything is connected correctly.

In order to automate the relay switching process, I wrote a script in javascript that will switch relays in automatic mode and check the result. If a switch occurs, the script will increment the counter. Otherwise, we would see an error message and process would stop. Also, the script will constantly display the counter value. [LINK](http://forkfiles.com/forusers/relay_test_script1.html).

![](https://thumb.tildacdn.com/tild3361-3630-4562-b831-643861366639/-/resize/505x/-/format/webp/relay4.png)

**Figure 4 – Script algorithm**

![](https://thumb.tildacdn.com/tild3162-6566-4539-b762-623362373439/-/resize/460x/-/format/webp/relay5.png)

**Figure 5 – Screenshot of the script**

Set the number of switches to 100 at 2 Hz.

Started the process. For the test, I simulate the sticking of the relay by disconnecting one wire from Fork. I see that the process has stopped at the point of 7th iteration. I can also see an error message.

![](https://thumb.tildacdn.com/tild3566-3863-4361-b163-336163653364/-/resize/460x/-/format/webp/relay6.png)

**Figure 6 – Screenshot of the error**

Started the process and waited for it to complete. A success message is displayed.

![](https://thumb.tildacdn.com/tild3130-6439-4761-a532-663237636630/-/resize/460x/-/format/webp/relay7.png)

**Figure 7 – Screenshot of successful completion**

Now I will set up 100,000 switches and then start the process.
We’ll have to wait about 14 hours.

In 14 hours I will see a “success” notification. The relay has completed 100,000 switches.

**Figure 8 – Screenshot of successful completion**

2. Relay switching at 8 A load

I will proceed to step 2 and assemble the current load circuit.

In this case, we will also be needing:
– Power supply unit 12В/10А;
– Load resistor 1.5 Ohm 100 W;
– Wire set with section 0.75 mm2;
– Two resistors rated 6.8 kOhm and 4 kOhm.

Note – as a load I used 3 resistors rated 4.7 ohms, connected in parallel. Equivalent resistance is 1.56 ohms, which corresponds to a current of 7.65 A.

![](https://thumb.tildacdn.com/tild3237-6630-4762-a363-653138313638/-/resize/620x/-/format/webp/relay9.png)

**Figure 9 – Photograph of layout 2**

![](https://thumb.tildacdn.com/tild3338-3061-4333-b939-346433653666/-/resize/460x/-/format/webp/relay10.png)

**Figure 10 – Circuit for test at a load of 8A**

To verify, I enter the command

```plaintext
http://192.168.0.205/control?DI0
```

the fork gives 0. I issue the command

```plaintext
http://192.168.0.205/control?DO0=1
```

to set the DO0 output high (put it in the high mode). The relay switches. And then again, I request the DI0 status

```plaintext
http://192.168.0.205/control?DI0
```

Fork gives 1. The diagram is collected correctly.
I run a script.
The relay again has completed 100,000 switches at a load current of 8 Amperes.

3. Relay switching at 8 A load with capacitive component

I proceed to stage 3. In addition to the 8А load in parallel, I connected an electrolytic capacitor at 50 V and 330 μF, to simulate the start-up current of some tool. I also increased relay switching frequency to 4 Hz.

Here is the circuit.

![](https://thumb.tildacdn.com/tild3834-6462-4235-b763-313231626661/-/resize/460x/-/format/webp/relay11.png)

**Figure 11 – Circuit for test at 8A load with simulation of starting current**

The relay switches in a correct way. Has completed 60,000 switches. Set the switching frequency to 10 Hz. The relay has completed another 40,000 switches. In total, the relay has already completed 300,000 switches. Of these, 200,000 are loaded with 8 amperes.

4. Relay switching at 220В load, 2 kW.

Due to the fact that the relay remain its operational functionality under all the above circumstances/mentioned effects, I decided to put it on the load of 2 kW. In general, the diagram remained the same, but as a load I connected a kettle (with a capacity of about 2 kW). The problem now is how to detect the switching moment in this case? Luckily, the current transformer was right by me. As a result, the scheme turned out to be like this.

![](https://thumb.tildacdn.com/tild3332-3362-4164-a561-303539336462/-/resize/186x/-/format/webp/relay12.png)

**Figure 12 – current transformer sensor ZMCT103C**

![](https://thumb.tildacdn.com/tild3831-3031-4766-a239-363035636633/-/resize/620x/-/format/webp/relay13.jpg)

**Figure 13 – Photograph of layout 3**

![](https://thumb.tildacdn.com/tild6639-6533-4462-a135-626437383333/-/resize/460x/-/format/webp/relay14.png)

**Figure 14 – Circuit for test at a load of 2 kW**

It was necessary to replace Fork’s digital input with analog input to detect the state of the relay.

To verify, I enter the command

```plaintext
http://192.168.0.205/control?DO0=1
```

to complete the relay. Requesting AI1 by entering the command

```plaintext
http://192.168.0.205/control?AI1
```

Fork gives 0.103. At active load we have about 100 mV.

I’m re-writing the script. [LINK](http://forkfiles.com/forusers/relay_test_script2.html)

![](https://thumb.tildacdn.com/tild3964-6664-4066-b262-653266363530/-/resize/517x/-/format/webp/relay15.jpg)

Figure 15 – Script algorithm for the Fork’s analog input

I’m setting the switching frequency at 2 Hz. Running execution script. At 431 switches, the kettle boils.

5. Conclusion

Overall, the relay completed more than 300,000 switches at various loads, while maintaining serviceability/operation functionality. Fork made it possible to send relay switching signals and detect the result of their execution both at digital feedback signal and at analogue signal. Also, the program was implemented by standard Windows tools without any additional software.

---

Source: https://maker.wiznet.io/WIZnet/projects/fork-relay/
