{"id":223,"date":"2011-10-20T09:22:18","date_gmt":"2011-10-20T13:22:18","guid":{"rendered":"http:\/\/fll-freak.com\/blog\/?p=223"},"modified":"2025-04-21T00:54:36","modified_gmt":"2025-04-21T04:54:36","slug":"moving-furnace-monitor-over-to-rs-485","status":"publish","type":"post","link":"https:\/\/fll-freak.com\/blog\/?p=223","title":{"rendered":"Moving Furnace Monitor over to RS-485"},"content":{"rendered":"<p>Last night I got the three primary zone circuits instrumented and connected to the Arduino. I also have the two thermistors working but I have yet to run the outdoor sensor through the house wall. All this has been done with USB communication to the Arduino siting on the floor of the furnace room.<\/p>\n<p>It was therefore time to run a serial cable to my Linux file server one floor up from the furnace room. My recent experience with RS-232 over long runs pushed me to an RS-485 solution.<!--more-->So I pulled out the Sparkfun RS-485 boards I purchased a while back for the lightning detector. I had discovered a problem with their implementation. As delivered the boards are useless for multidrop communication, but will work just fine for a single point to point communication channel.<\/p>\n<p>I make up a cable harness and connected the CMOS logic to RS-485 converter to the RX\/TX pins on the Arduino, and I used the Arduino D13 logic signal to drive the RTS pin on the converter. I then went to upload a new sketch to the Arduino and it failed to load.<\/p>\n<p>At first I figured I had swapped RX and TX and therefore I was screwing up the bus, but a careful survey indicated I had connected it up properly. So I un-soldered the RX and TX pins and verified that I could upload. So next I connected the Arduino&#8217;s transmit pin to the converters receive. That worked as well. As soon as I did that I realized my problem.<\/p>\n<p>I have bus contention on the Arduino&#8217;s receive line. Both the USB UART and the RS-485 converter are trying to drive the Arduino RX line. This garbles the communication and prevents a good upload. So what to do?<\/p>\n<p>Well I could use one of the bit bang serial port libraries available to avoid the problem. But I really do not want to give up two GPIO pins when I already have two designed for serial communications. The easiest solution will be to put in a mechanical switch to isolate the RX\/TX lines during programming. That switch can be inserted into the cable harness and mounted inside the enclosure so it can&#8217;t be accidentally flipped.<\/p>\n<p>For a moment I wondered if I could program the Arduino over RS-485. But mu guess is no. The Arduino IDE does not likely support the mono directional RS-484 format. Oh well.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last night I got the three primary zone circuits instrumented and connected to the Arduino. I also have the two thermistors working but I have yet to run the outdoor sensor through the house wall. All this has been done &hellip; <a href=\"https:\/\/fll-freak.com\/blog\/?p=223\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,7],"tags":[],"class_list":["post-223","post","type-post","status-publish","format-standard","hentry","category-furnace-monitor","category-projects"],"_links":{"self":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=223"}],"version-history":[{"count":5,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/223\/revisions"}],"predecessor-version":[{"id":225,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/223\/revisions\/225"}],"wp:attachment":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}