Introduction: Using MikroTik Router Board 433 & Arduino to Control Two LEDs
In this tutorial I will explain how to control two LEDs using MikroTik router board and Arduino.
MikroTik 433 is a router board based on Linux kernel ,it contain 3 Ethernet port and 3 mini PCI port used to connect wireless cards as required and the most interesting thing for me that it contain serial port ,So I decide to control Arduino through this serial port.
the principle of this project is to send serial data from a laptop through WiFi by forwarding this data in TCP port to MikroTik router board then to arduino .
Laptop(GUI using Processing)--->Virtual Serial (VSPE)---->WiFi----->MikroTik Serial port---Arduino---->LED
Step 1: List of the Materials
Hardware Parts :
1- Bread Board.
2- Arduino Nano.
3- 5V power supply module .
4- RS232-TTL Converter MAX232.
5- MikroTik Router Board 433 + Wireless Card + transformer.
6- 220 ohm resister.
7-SIP male & Fe-mail connectors with small piece of PCB as shown in the picture to make L type connector.
1- Arduino Sketch I used Ver. 1.0.3 .
4- VSPE (Virtual Serial Emulator) Free for 32 Bit ,for 64 Bit you need to purchase the license.
Step 2: Arduino Code
Download the attached arduino code and upload it to arduino module.
Don't connect the the RS232-TTL converter in this step ,otherwise you will get error message and you will not able to upload the code.
Step 3: Circuit Digram
Connect the wires as shown in the attached picture.
Arduino Vin ---> +5 Volt
Arduino GND ---> GND
Arduino TX ----> TX of TTL-RS232 (TX should connect to RX but in my case it look like they typed wrong label).
Arduino RX ----> RX of TTL-RS232 (RX should connect to TX but in my case it look like they typed wrong label).
Arduino Pin 2 ----> LED1 positive pin.
Arduino Pin 5----> LED2 positive pin.
LED1& LED2 negative pins connected together to 220 ohm pin and the other pin of this resister connected to GND.
RS232-TTL Converter VCC ---->+5 Volt.
RS232-TTL Converter GND ---->GND.
Step 4: Configuring MikroTik Router Board
In this step ,I configured the MikroTik router board as a wireless access point.
Note that you need to download Winbox software to access MikroTik router board.
After This step you will be able to connect MikroTik to your laptop through wireless network .
Next step is to configure the MikroTik serial port and forward the Serial Data through TCP port 10000 .
Step 5: Configuring VSPE (Virtual Serial Port Emulator)
VSPE software used to create virtual serial in the PC and forward the serial data through TCP port to the actual serial port which is located in this project in MicroTik Router board.
Note that this software free for 32 Bit version only.
Step 6: Processing Code
I used processing to create GUI with assisting of G4P library by Peter Lager ,it is very powerful library and it will make the design much easier and faster.
We have a be nice policy.
Please be positive and constructive.