Logic Machine Forum
LM Ambient and RS-485 - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Hardware (https://forum.logicmachine.net/forumdisplay.php?fid=12)
+--- Thread: LM Ambient and RS-485 (/showthread.php?tid=409)



LM Ambient and RS-485 - buuuudzik - 04.10.2016

Hello,

is there any version of LM Ambient with RS-485? I found this information here:
http://openrb.com/lm/#/step-4

but when I've checked on the other places there is no information about RS-485 in LM Ambient. This was only concept?


RE: LM Ambient and RS-485 - admin - 04.10.2016

Current HW version has 1-wire but no RS-485. It has USB but it might be tricky to get a cable small enough to hide it, because it's meant for tiny USB sticks (for example, Z-Wave).


RE: LM Ambient and RS-485 - buuuudzik - 23.10.2016

(04.10.2016, 06:56)admin Wrote: Current HW version has 1-wire but no RS-485. It has USB but it might be tricky to get a cable small enough to hide it, because it's meant for tiny USB sticks (for example, Z-Wave).

I have one question about RS485 in LM Load Balancer. What kind of USB-RS-485 converter do you recommend and how can I find this serial port to use this port in the script?


RE: LM Ambient and RS-485 - Peter - 23.10.2016

Hello buuuudzik,
we use this converter: FTDI  US232R which costs about 22 Eur. You can use it simply like this:



Code:
require('serial')

-- open port on first call
if not port then   
  port = serial.open('/dev/ttyUSB0', { baudrate = 19200, databits = 8, stopbits = 1, parity = 'none', duplex = 'full' })
port:flush()
  log("Port Initialized")
end

-- your code next...



RE: LM Ambient and RS-485 - admin - 24.10.2016

All adapters support by smaller LMs are supported by Load Balancer. /dev/ttyUSB0 is the correct name for the first USB serial connected, you can also see a list of internal and external ports in System config -> Status -> System status -> Serial ports tab. Beware that cheap FT232-based adapters from China come with counterfeit chips, though they still seem to work properly Smile


RE: LM Ambient and RS-485 - buuuudzik - 24.10.2016

So normally when I use some other but with original RS485 chip it should be visible in the Serial tab? But how can I use this FT232 for RS-485?


RE: LM Ambient and RS-485 - admin - 24.10.2016

Original and counterfeit chips work exactly the same way from the system point of view.
This one clearly has counterfeit chip but seems to work correctly:
http://www.ebay.co.uk/itm/1PCS-USB-to-TTL-RS485-Serial-Converter-Adapter-FTDI-interface-FT232RL-Module-/191786656282

The one that Peter suggested is RS232, not RS485. You can also get USB-RS485 there, but looking at provided schematics it seems to be lacking line-biasing resistors (which are present on chinese board), which are needed for proper operation.


RE: LM Ambient and RS-485 - buuuudzik - 24.10.2016

(24.10.2016, 07:58)admin Wrote: Original and counterfeit chips work exactly the same way from the system point of view.
This one clearly has counterfeit chip but seems to work correctly:
http://www.ebay.co.uk/itm/1PCS-USB-to-TTL-RS485-Serial-Converter-Adapter-FTDI-interface-FT232RL-Module-/191786656282

The one that Peter suggested is RS232, not RS485. You can also get USB-RS485 there, but looking at provided schematics it seems to be lacking line-biasing resistors (which are present on chinese board), which are needed for proper operation.

So as I see some converters have support for both standards and some have support for only rs232. In the past I saw such situations when somebody connects converter via DB9(only 3 pins) to RS485. So at this moment all is clearWink