Go Down

Topic: intercepting rs 485 communication (Read 3804 times) previous topic - next topic

kristina

Hi all,

I have a system of wireless thermostats in my house. They send temperature and setpoint to a receiver, which sends the signals in rs 485 to my heating controller. I have received the protocol from the maker, and I'm currently trying to read what's sent to the controller. Once I have managed that, I would like to be able to change the setpoints without touching the thermostats. (ie reduce the setpoint x degrees in the whole house). That way I can manipulate and save power for heating when I'm away for more than a day.

How would I go about doing that, since 485 units all share the same line? Should I use two 485 chips to separate the lines?

Joachim

graynomad

#1
Jan 12, 2011, 03:44 pm Last Edit: Jan 12, 2011, 04:09 pm by graynomad Reason: 1
You can connect your own 485 transceiver to the line and pretend your gadget is a "receiver", however

  • You're going to have to write some code to implement their protocol.
  • You may have to disconnect the existing receiver (that depends on the protocol).

_____
Rob

Rob Gray aka the GRAYnomad www.robgray.com

kristina

OK you're right, sorry for the scarce info. The wireless units send their info to the receiver, which sends the data by 485 to the controller. If I connect to the same 485 line, I should be able to read the info, but I would need to disconnect the controller and add that to another line to change the data, right?

Joachim

robtillaart

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

kristina

#4
Jan 12, 2011, 09:53 pm Last Edit: Jan 12, 2011, 09:54 pm by kristina Reason: 1
Thank you guys for following up. I've done some more research, and it seems the 485 bus is not the one communicating with the heating controller, so I would not be able to send any info to the wireless receiver or the controller. I have the protocol for the receiver, but I'm struggling to get the data out. I have connected the two 485 pins (a and b) to my max485e as per this

and can see on my scope that there are things happening. But when I try the simplest newsoftserial example, there is nothing in the serial buffer. Am I on the wrong track here? Does not the max485 convert to ttl serial?

Joachim

graynomad

Quote
it seems the 485 bus is not the one communicating with the heating controller, so I would not be able to send any info to the wireless receiver or the controller.

I'm confused now, can you post a drawing showing what talks to what?

Re the schematic, I assume this is a functioning 485 link that is already properly terminated, so you shouldn't need to add your own 150R resistor.

Quote
and can see on my scope that there are things happening

Are you referring to the RX_PIN signal? Is the bit rate correct? Does it look like proper async serial characters? Is the polarity correct?

______
Rob

Rob Gray aka the GRAYnomad www.robgray.com

kristina

That makes two of us...

I'll try to explain a bit more. The general purpose of the wireless receiver is to gather all the wireless sensor data and send it to the controller. This is done via a 6 pin telephone cable. But the receiver can also be connected via 485 to a pc or other controller, by way of a separate plug. So it seems I can not change the data while connected to the controller.

I have scoped the a and b lines from the receiver, and this is what it looks like (bad picture I know):



I have tried many combinations of polarities, and the baud rate is 19200, but I don't even get garbled text out of the serial monitor. There seems to be a lot of different schematics around for the max485. But it should be possible to read from the max485 to newsoftserial, right?

Do I need common ground for 485?

Thank you all for your patience and help!

Joachim

graynomad

Quote
(bad picture I know)

About the worst I've ever seen  :)

Quote
I have scoped the a and b lines from the receiver

What's coming out of the receiver though, that's all that matters. If that's not happening then look at the A/B lines.

Quote
and the baud rate is 19200

You've actually seen that on the input to the Arduino?

Quote
But it should be possible to read from the max485 to newsoftserial, right?

Yep.

Quote
Do I need common ground for 485?

Yep, in general all circuits need a common GND.

Quote
receiver can also be connected via 485 to a pc or other controller

So this is designed  to be controlled by something. So do you then just input to this port? If so why look at the receiver/controller connection? Or am I mis understanding what's connected to what.

I'm guessing

thermostat ------>  receiver --------> controller
                               |
                               | rs485
                               |
                               X your gadget

If not can you post a drawing?

As for the MAX232 schematic, I'll have a look at the data sheet.


______
Rob


             
Rob Gray aka the GRAYnomad www.robgray.com

kristina

#8
Jan 13, 2011, 12:07 pm Last Edit: Jan 13, 2011, 01:08 pm by kristina Reason: 1
Thanks. You're guessing right. I had hoped that I could connect my gadget between the receiver and the controller, but I'll leave that for now. I'm scoping the a/b lines from the receiver, and the datasheet says it is 19200 baud fixed, but I'm not seing anything on the arduino. I'll try again now...

Joachim

[edit]tried with common ground now, no luck. Scoping the ttl from max485ecsa+, nothing. So therein lies my problem.[/edit]

Go Up