Skip to content

IoTPi is an industrial board that consists of onboard RP2040, ESP8266 WIFI(ESP-12E) and RS-485 communication that can control up to 4/6 appliances/devices on a load of, photo-coupling isolation Optocoupler EL357NC, allowing users to safely control high voltages or current devices.

License

Notifications You must be signed in to change notification settings

sbcshop/IoTPi_Software

Repository files navigation

IoTPi

IoTPi is an industrial board that consists of onboard RP2040, ESP8266 WIFI(ESP-12E) and RS-485 communication that can control up to 4/6 appliances/devices on a load of, photo-coupling isolation Optocoupler EL357NC, allowing users to safely control high voltages or current devices. IoTPi makes appliances smart, which users can operate via the PiRelay app on their electronic device. IoTPi is also consist of addition GPIOs pins for connecting extra Hardware to this board.

RS-485

RS-485 is an industrial specification that defines the electrical interface and physical layer for point-to-point communication of electrical devices. The RS-485 standard allows for long cabling distances in electrically noisy environments and can support multiple devices on the same bus. It is a serial communication protocols and are ubiquitous device interfaces.It is used to communicate with RS485 sender by connecting its A-terminal and B-terminal to A-terminal and B-terminal of the sender module respectively. Power port should be connected in the right direction (positive terminal to positive and negative terminal to negative of sender and receiver) in boards.

Reserved Pins Of IoT-Pi 4/6CH Board

Steps To Follow for Working with IoT-Pi Boards

  • Step.1 - Download the Zip file of IoTPi package and extract it in your computer system, for this click on code—>download Zip (Highlighted with Red)

  • Step.2 - After downloading and extracting the Zip file you will get the following files under the “IoTPi-main” folder

  • Step.3 - After that open the folder IoTPi 4-channel if you have our 4-channel board or if you have 6-channel board then open IoTPi 6-channel folder. Under this you get two python files as shown in below image

  • Step.4 - File “home_automation_4ch” is the main file and “IoTPi” is the library file for our IoTPi boards. To open these files you should have Thonny IDE installed in your system, If you don’t have Thonny IDE follow the link below to install it

  • https://thonny.org/

  • Step.5 - First Open both files in your IDE and connect your IoTPi board to your computer via using micro-usb cable.

  • Step.6 - Now select the interpreter by clicking on “Run” button in IDE and follow the image instructions below

* Step.7 - After selecting the interpreter click on the “Stop” button for restarting your board. If your board is properly connected you will get the RP2040 information as , shown below

  • Step.8. Now click on “IoTPi” file and save it in your RP2040, for this click on “file” (upper left corner in your IDE) under that click on “save as” you will get a window asking for where you want to save your copy file, click on “Raspberry Pi PICO” and save it by naming it “IoTPi” and click on “Ok”. Your file will be saved in RP2040 of your IoTPi Board

*Step.9 - After that you have to save the code file (home_automation_4ch) in RP2040 same as the library file(step.5), only change is you have to save it by naming it “main.py” and then click on “Ok”. You can also see that your library file already saved here that you recently saved in it.

Step.10 - Now, both the library and main file are saved in your board and it is ready to control relays of it and so on appliances that you want by providing the command accordingly

Downloading Android Application

As in previous steps we completed the code saving and other important steps to work with the IoTPi board. Now in this section we will learn how to control it.

  • Step.1 - In the IoTPi_main folder you will also get a folder named with “Android Application”

  • Step.2 - Open this folder and under this you will get a .apk file named with “IoTPi.apk” download and install this application in your android phone for controlling your IoTPi Board

  • Step.3 - After installing the app, open it and you will get the interfaces as following below

  • Step.4 - For connecting this application to your board provide IP address of your WiFi which your using at that time, in my case my it was 192.168.43.18 as shown below

  • Step.5 - Initially the button setting should be as shown in below image for giving ON/OFF commands. After that you can change it according to your code

Communication Using RS485

The IoTPi board also has the feature of rs485. You can use this feature by making one of your boards as the sender and another one as receiver. Fer this follow the steps below

  • Step.1 - Locate the RS485 directory inside the IoTPi_main folder and open it, inside this folder you will get a file named with “rs485_test”

* Step. 2 - Open the “RS485_test” file and you will get two blocks of codes, one is for making a receiver and the other one is for makingyour board as a sender * * Step. 3 - Uncomment the sender code and save it in RP2040 of your board and now it is ready for working as a rs485 sender device

* Step.4 - Now, uncomment the receiver block of code(sender block should be commented this time) and save it in another board

  • Step.5 - Now, your sender and receiver board is ready for communicating to each other by using rs485 protocol.

  • Step.6 - Connect to RS485 port of your boards as shown below and Power port should be connected in the right direction to a 5V dc power supply

Documentation

Related Products

GatePi 4Ch

GatePi 8Ch

Product License

This is open source product. Kindly check LICENSE.md file for more information.

Please contact support@sb-components.co.uk for technical support.

About

IoTPi is an industrial board that consists of onboard RP2040, ESP8266 WIFI(ESP-12E) and RS-485 communication that can control up to 4/6 appliances/devices on a load of, photo-coupling isolation Optocoupler EL357NC, allowing users to safely control high voltages or current devices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages