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?
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?
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?
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.
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?
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?
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.
and the baud rate is 19200
You've actually seen that on the input to the Arduino?
But it should be possible to read from the max485 to newsoftserial, right?
Yep.
Do I need common ground for 485?
Yep, in general all circuits need a common GND.
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.
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]