Introduction: Mobus Over Bluetooth Serial HC05 Modem Controlling Relay Board Using Arduino Uno As Slave
In this design I'm using Bluetooth serial modem to receive data from serial port. The received data is a Modbus ASCII packet. This packet is further decoded into port level signals. The decoded signals from Modbus frame finally controls the target port.
Supplies
- Arduino Uno board 1 pc
- HC05 Bluetooth modem 1 pc
- 1K resistor 3 pc
- 8 channel relay board 1 pc
- Wires suitable
- Vero board to implement and test 1 pc
Step 1: Detailed Theory and Photos
In this article Im using a Bluetooth modem that will handle Modbus ASCII communication. The Modbus frame is received by the bluetooth Modem and is fed to the Arduino Uno. The Arduino decodes the modbus signal and triggers required relay from the 8-channel relay board to get active.
The HC05 modem TX pin is connected to Arduino Uno RX pin. The RX pin of HC05 modem is fed to Arduino Uno. Note the circuit diagram, there is a voltage divided using a voltage divider. This is a 1K and 2 K voltage divider. This voltage divided because Arduino voltage level is 5 V and HC05 receive pin is 3.3 V.
The protocol used in this project is Modbus ASCII.
I'm controlling 8 channel relay board controlled by Arduino Uno.
The Arduino Uno address is 06 in this experiment.
Arduino port 8 to 13 is controlling the relay board. In address we are putting values between 8 to 13 as can be seen in attachments.
The software is attached.
This is a tested design.