The development of a simple programmable controller with two potential-free binary inputs and two potential-free binary outputs is completed, I plan to manufacture 50 prototype samples directly from online PCBA service https://www.jlc.com directly, which is convenient and also low cost.
There are several considerations in the schematic and PCB design:
(1) output using 10A HonFa relay HF3FF, the coil drive voltage of 5.0V, when driven by a Darlington transistor, the output voltage drop may be about 0.5V, the requirements of the power supply voltage connected to the other end of the coil to 5.5V or more in order to ensure that the relay reliably suction.
Therefore, I chose a DC-DC with adjustable output voltage, and set the output voltage of the DC-DC to 5.5V by choosing a suitable feedback resistor, and then supply power to the ESP8266 through the LDO LM1117-3.3V down to 3.3V;
(2) Use bidirectional optocoupler for the input isolation , one of the input pin through the current-limiting resistor to the external input terminals, while the other pin through the jump cap to connect to ground or power supply, when connected to ground, support for PNP or dry contact type digital input, when connected to the power supply, support for NPN or dry contact type digital input;
The current limiting resistor uses a 3.3K resistor, which can provide a current of 3.6mA-7.2mA when the contacts of the external mechanical switch or relay are closed, which can play a role in wetting the current and help to improve the service life of the external switch or relay;
3) The output needs to support the control of 220V high voltage power, and it is necessary to consider the isolation between high and low voltage, therefore, the relay and the output terminals occupy one side separately, while the power supply and the two inputs occupy the other side;
4) Using a housing sold in the market, after measuring the dimensions with calipers, draw the sketch of housing by autocad, import the autocad file to protel, set the imported lines to the keepout layer as the border of the PCB.
5) As the controller can be mounted into the control cabinet, it is not suitable to use PCB on-board antenna or ceramic antenna, in addition, the size of the housing is very limited, therefore, the external PCB antenna with IPEX interface is used and sticked to the housing. The SMA antenna terminal is also reserved next to the input terminal, which can be transferred to the SMA holder through the IPEX wiring, so that the user can use the external antenna to connect to the terminal.
6) A push button is reserved for users to restore the factory settings when they forget the Wi-Fi password, otherwise the device may turn into a brick once the password is forgotten.
Top comments (0)