Creating a a custom 4ch Mosfet switch PCB with a built in backup 12v battery changeover circuit takes some careful planning. Since I had experience working with mechanical relay versions the task was not too difficult however it did come with a few extra challenges. Mosfets require more parts to work reliably they also have significantly different ratings when compared to relays. In this case I was using an esp8266 with 3.3v logic. I had to create an amplifying circuit out of two transistors in order to get around 6.6V to allow the Mosfets to turn on completely thus allowing me to utilize their max current ratings.
On my 4ch PCB I used 3x IRL520N and 1x IRLZ44N N channel Mosfets. The IRLZ44N is the best rated for logic level and also the most expensive and rare here at least at this time. I also needed a large amount of amps for the LED strips it was going to switch on and off. The other three IRL520N Mosfets will be used with applications using under 5A of current. Technically I could have just used TIP120 NPN transistors but I wanted to keep the entire PCB Mosfet compatible in case I wanted to swap out any chips.
For more info on the project check it out on Github
While looking for ways to trigger a siren through the internet I decided to make a small project using inexpensive modules. I decided to use the SonOff RE5V1C without an enclosure because it was the cheapest option available that would satisfy all my requirements. Likewise I used the LM2596S because it was a cheap and easy to use option unfortunately some of the mini options (like the LM2596 Mini Buck Regulator) are to cumbersome when adjusting the output voltage.
The number 1 major pain of this simple project was the red and black speaker wire I used…. This wire is actually more of a pinkish color and the insulation can be torn easily by my fingers however, the problem is dirty copper wire inside this cheap cable that would not solder even with a generous amount of flux.. I had to expose the copper and then try to clean them with vinegar and this partially worked.. However lots of time was wasted with this mundane cleaning. Even standard store bought ripcord solders fine compared to this wire….
Anyway in the end it worked out the way I wanted it to and it’s quite light and reliable, I have the whole system hooked up to a dedicated 12v battery that is trickle charged so when the power goes out the devices will still be operational for quite a while.
The RE5V1C uses from 80mA to 250mA according to the datasheet but I have a 40W siren connected to the relay so if triggered it will use from about 3A to 3.5A depending on the supplied voltage 11.5v – 13v
During summer there’s been a ton of rain this year and my electric fence alarm keeps going off The 2 main reasons are lots of water and crazy grass growth around the property. It’s been impossible to use weed killer because it rains so often it’s all just washed away.
So I decided to install a remote switch as well as a sensor to alert me if the siren is blaring off.
For the switch I used a SONOF RE5V1C DC powered relay. This device costs under R100.00 and can be powered by 5v DC, the switch can handle 10A of DC or SV loads up to 240V.
For the alarm siren sensor I used an SONOFF DW2 Wi-Fi wireless door/window sensor. I de-soldered the magnetic switch and just soldered 2 wires to the pads. Now when the siren goes off a 12v relay will close the relay and the DW2 will report a closed event. The DW2 cost R115.00
The great thing about this project is the price and the usage of the SONOFF software and MQTT service. There is no need to create my own firmware or MQTT software by using these affordable SONOFF products.