Furnace monitor bugs

After the power outage and all the work involved with getting the household back up and running (I have never done that much laundry at one time) I had some time to work on the furnace monitor. I finished the final wiring and got the major bugs out of the Arduino as well as the Linux SW. But two issues had been lurking.

The first was the rather random breaking up of lines. This turned out to have an interesting root cause. The Serial print and println routines have a limitation that has significant ramifications for RS-485 communications. According to the reference page, the last byte is not transmitted till sometime after the call returns. If the very next thing you do after calling the print routine is to turn off the transmitter, than you are nuking your own transmission. Now I see using println that it is not just one character, but rather both the CR and the LF that get obliterated. I added a short delay and now my Linux receiver does not have hiccups.

The second problem has been the occasional IO error on the Linux side when the device driver dies because of “possible EMI” issues. With everything opto isolated (other than the wall wart that powers the Arduino) I am at a loss. But I am now wondering if a mall formed byte (broken due to transmitter going inactive too early) might look like EMI. Time will tell.

This entry was posted in Furnace Monitor, Projects. Bookmark the permalink.