Introduction
This article is a guide on getting set up and running with the BV4115 module based on my own first attempt at using it. Overall I was happy enough with the module in the end, which is a straightforward relay controller that uses wifi for serial communication.
Prequisites
A few things are needed before you get started.
- A soldering iron, some header pins, a 5vdc power supply, and a few jumper wires.
- The BV4115W datasheet from here.
- The appropriate version of bvserial.
- Python and Pyserial installed on your machine.
- A relay module. I used this one.
Setting Up The Hardware
First off lets get the board ready and all wired up for use.
- Solder on the header pins. This is straight forward enough and just requires a steady hand. The only pin holes you need to worry about are the 8 relay pins and the 6 serial pins.
- Solder the jumper pads. In the datasheet you will see that several configurations are provided for the jumpers, depending on what relay setup you plan to use. In this guide I used a 2 relay module so I solder a bridge between the pads shown below.
- Connect your relay to the board. Note it is best I find to power the relay from the screw terminals rather than the relay header pins, so connect your V+ and Gnd from the relay to the terminal, and IN1 + IN2 (your relay may have different labels eg R1, R2 but this is fine) to the R1 + R2 pins on the BV4115 module.
- Power the board and relay by connecting your 5vdc power supply to the screw terminals, then power it up to confirm it works.
Connecting To Your Network
Now we setup our module to be connect to your network and communicate. When you power up your board you should see a new access point visible to your computer with ESP_xxxx or something similar. Connect to it and go to 192.168.4.1 on your browser and you should see the first screen below. Go to "Station Setup" and you will see the second screen.
On the second screen change mode to 1, enter your home networks's SSID and password, give the BV4115 an ip in your router's range, enter the router's gateway and assign a port for the module to use. Click save, the save changes on the next screen and your module should reboot itself.
Communicating With The Module
Now the module will have restarted and you can connect back to your home wifi. Start the bvserial program and a terminal window will open. Type "socket://'the module ip':'port'" and hit enter.
Next type ".cr" followed by "+++hello" to get the response "A*" confirming the wifi module is listening, followed by "dV" and "dD" which will return the device id and firmware version.
Now you should be all ready to go. Enter "da1,0" and "db1,0" to turn on both relays, and "do" to switch them both off again. You can confirm this by the audible click from the relays. Once your happy with this the datasheet explains the commands further for you to experiment with and start to plan your next project using the BV4115 Wifi Relay Controller.





Comments