Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Full duplex RS485 over bluetooth

Status
Not open for further replies.

jelezarov

Member level 1
Member level 1
Joined
Jan 29, 2016
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
313
Hi there

I have a cable for serial communication which I am trying to get rid of. According to the wiring diagram of the cable it is "RS485: /Rx Tx Rx /Tx Gnd".

Can something like this work:

(Rx /Rx) -> (MAX485) -> (HC05) ...... (HC06) -> (MAX485) -> (Rx /Rx)
(Tx /Tx) -> (MAX485) -> (HC05) ...... (HC06) -> (MAX485) -> (Tx /Tx)

Thanks in advance!
:thinker:
 

I have no idea what all your HC05 and HC06's are. Maybe you could be a little clearer about what you're trying to do. Making a VERY wild guess, you might have a half-duplex connection that you are trying to convert to full-duplex?
 

Lol sorry, had to be more precise

it is a hand terminal to send and read parameters from a small wind turbine. The schematics said it is a RS485 connection and because it has also 4 wire (Rx, /Rx, Tx and /Tx) I suppose it is a full duplex - I am just starting to learn in this field :)
So, I am trying to use my display without the cable and therefore looked for bluetooth.
The MAX485 modules converts RS485 to TTL; the HC05(master) and HC06(slave) are the bluetooth modules, which use as input TTL and send it over bluetooth.

MAX485 - link
HC05 and HC06 - link

Thanks for your help!
 

This is possible since the RS485 is full duplex and does not require direction control. The only problem could be speed, if the max485 will send data too fast the HC05 HC06 will loose data. Although the HC05-6 can work with baud rates up to 1Mbps, they do not support continuous data flow.
 
Sounds more like RS422 or RS432 to me. Normally and RS485 would only use two signal wires in full duplex mode.

Bluetooth isn't full duplex so there would be interruptions in the data flow, it would get "chopped up" but if the data rate was relatively low (normal UART range) I see no reason why a small MCU couldn't be a 'go between' from one system to the other.

Brian.
 
What is the range you want?
bluetooth modules goes not go much far.
 

Thanks to all for the responses :)

@tantalos: The baudrate of the terminal is 1,2k so hopefully the speed of the bluetooth module wouldn't be a problem.

@betwixt: I have the schematics for the cable connection and it says explicit "RS485" and then shows four signal cables Rx /Rx Tx and /Tx. I wish i had more detailed description, but I didn't :( Like I understand it Rx and /Rx is the receiver and Tx and /Tx the sender, or am I missing something? My plan was to set one MAX485 module to permanently send and one - to permanently receive - so two modules on each side.

@gamegurus: I am trying to achieve something like 7-8 meter range -this should be easily achievable over bluetooth?
 

This image is from
https://www.sunrom.com/p/pcb-for-rs232-to-rs485-full-duplex
1150.gif


In your case instead of RS232 side you will give a bluetooth module.

I hope your PC already is bluetooth enabled.
 
It's strange to call it RS485 as that is a bidirectional multi-drop protocol. Using two pairs of wires, one for each direction and using it with only one peripheral at each end technically makes it RS422. Note the title on the Sunrom schematic doesn't match the labels in the diagram.

Your problem will be configuring the bluetooth modules, you will almost certainly have to add some "AT" commands to get them to talk to each other and you can't do that with a 'dumb' interface. In similar situations I use a PIC based interface to process the data before passing it on.

Brian.
 

@gamegurus: This is basically my idea, except for the SN75176 -are not this IC's interchangeable with the MAX485? And I am not going to connect my pc - just trying to create a cable replacement for the hand terminal

@betwixt: the plan was to use an arduino to configure and test the modules

And I just realized one more problem: the HC-05 module supports baudrate from 4,8k and what I need is 1,2k :(
I suppose two HC-06's cannot communicate with each other in the absence of master?
 
Last edited:

Even if you configured them, I'm not sure they would survive after being powered down without doing it again. It might be worth considering a different method, perhaps using two transmitter and receiver modules on different bands. That would allow full duplex at any reasonable speed and probably over a greater range too.

Suggestion: as it is RS422 compatible - look at one MAX489 instead of two MAX485s.

Brian.
 
SN75176 is same as MAX485, you can interchange.

HC-05 can work in master and slave mode with AT commands,
but
HC-06 only works in slave mode.

since your PC is master, its ok to use either of it.

I have tested HC-05 in loopback by shorting its TX/RX pin. I do indeed get the data back on PC since it uses internal buffer to store incoming uart when it is doing something else.

So just to replace sunrom's MAX232 part with HC-05 or HC-06 will work in your application.

About changing baud rate of HC-05 or HC-06 is no problems. You can find AT commands here
https://www.sunrom.com/m/3685
 

Unfortunately HC-05 (the master) cannot be set to baud rate 1200 :(

According to the HC-06 documentation the are some units which are produced as "master" but I could not find any such module.

Does anyone know something more suitable as a bluetooth module, which accepts TTL or RS485/232 input AND can be set to baud rate 1200?
 

Thank you gamegurus for your help

So I have to pass the both RS485 signals through MAX485 to arduinos and then emit it with the NRF24L01 module - and this two times - for the sending and the receiving direction?
What confuses me is that the description says it operates at "250kbps, 1Mbps and 2Mbps on-air data-rate" - or am I missing something ?
 

250kbps, 1Mbps and 2Mbps are the maximum bit rate in RF.
in UART you can customize the baud rate you need.

So your setup should look like
RS485 > ARduino > NRF24L01 -----------RF------------- >NRF24L01 > Arduino > RS485
the module NRF24L01 can either be transmitting or receiving at same time.
So if you have low byte count then no problem with library buffer.
But if you are continuously transmitting then received of UART might get lost as the NRF will not get time to go back to receive mode.
In such case you need two such setup, one for transmit dedicated and one for receive, and both configured to different channel of frequency to avoid collision.
 
It would be also possible to convert the 1200 bps to some higher baud rate with a microcontroller (Arduino) and use the HC05-06 modules.
 
Thanks to all nice people who helped in my thread :)
Now I just have to build some prototype and test it and when it does not work, then I have a backup solutions

Cheers
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top