The Raspberry Pi based PLC that you ordered from industrial shields has finally been delivered to your doorstep. You are excited to work with it and explore the possibilities that this PLC offers. You realize that in order to program or work with it, you need a keyboard, a display monitor, or an ethernet cable; but all you have is your laptop and your home wifi. Read on!
Step 1: Prepare the SD card by installing the Raspberry os. You can download the Raspberry Pi automation imager from their official site and install the Raspberry os lite.
Create the following two files in the boot drive of the SD card:
Step 2: Create an empty file named ssh with no extension. This file will enable the ssh protocol in the PLC.
Step 3: Create a file named wpa_supplicant.conf and add the following lines to it. Make sure you edit the country_code; SSID and Password fields. This file will set up the wifi on boot up of the PLC. ( Do not change the spacing or indentation)
👉 Note: If you are creating these files on windows, you will have to wrap the names in " " . This will ensure the integrity of the file extension and if there is none, it will ensure that too. For eg. "ssh". Do it for both the files.
You can now insert the SD card in the PLC, but do not switch it on yet.
Step 4: Now you need to find the IP address of the PLC. There are a few ways to go about this. One, you can try to connect to raspberry.local using the following command in the terminal or cmd depending on your OS:
If that does not work, the workaround is to run the following command and look for all the devices currently in your local wireless network. This command shares the physical address and the IP address of all the devices in the network.
And now you can configure your PLC however you like.