Using Dyadics SCN5 and SCN6 servo linear actuators with X-Sim³
I start this thread for the questions about how to wire and connect a SCN5 or SCN6 actuator to the PC.Please do buy this starter sets directly from mirai factory outlet. They are cheap and we and mirai will support you with the fitting cables.
The actuators get full warranty and are the cheapest shipping solution you get. The link to the shop is in our X-Sim shop.
For a better unterstanding: the SCN5 and SCN6 electronic control is the same, so I talk from now on only from SCN5.NOTE: Questions about the software plugin can be asked in the SCN5 software thread!-click here to go to the software thread-
The software thread may also include some possible error finding solutions ...
Ok, let's start ...
This is all that you will need:
Community adapter set for one SCN5 (order at mirai factory outlet or here)
First you have to connect a SCN5 to a comport or USB virtual comport. This is done with a RS232<->RS485 adapter or a USB<->RS485 adapter or a cheap USB<->RS232 adapter followed by a RS232<->RS485 adapter.
If you want to buy or build such a adapter you can choose a auto adapter with fast TXD switching to be combatible with the TVBST SCN5 Tools of the developer. That means, you can also use their software like you are using their ADP-1 RS232 to RS485 adapter. (Or you simple buy such one from the SCN5 developer)
The RS232 converter is a "half duplex" serial device, this means it can only send OR receive. To tell the adapter to write some pins are switched on the serial port. Theese two are DTR pin and RTS pin in. If using a "auto" a special extra circuit will detect a TXD signal and switch without the use of DTR or RTS. If you have a manual DTR/RTS adapter
, you must find out which combination will switch to the sending mode. The x-sim SCN5 plugin carries therefore a possible invert funktion of both, DTR and RTS signal. There are 4 combinations possible. This because every combination is on the market available.If using a "auto" adapter
you have to find out the TXD switching delay time the adapter needs to switch back to the receiving mode if it has send something. This is different from hardware dealer to hardware dealer and has no standards. The auto adapter shown below has a switch to select some speeds. The normal setting for this "auto" adapters is 3ms, you can also take +/-5ms. To tell the plugin the speed, you must input this to the SCN5 plugin in X-Sim converter. On "auto" adapters there may be no external powersupply.
The developer sometimes uses the DTR and RTS signal as power supply.
Let me explain how: If you switch DTR high, you got +8Volt, and if you switch RTS low you got -8Volts, therefore you
got a low current powersupply with 16Volts. To simulate this the two checkboxes "switch RTS" and "switch DTR" are
added since 188.8.131.52 . So if you are using a "auto" adapter like the original ADP-1, you have to disable the manual mode by
disable both checkboxes and find the right combination of the "invert DTR" and "invert RTS" checkboxes until the adapter works.One hint here to the "auto" mode: 100ms = 10 updates of actuator per second does not make sense For beginner or noobs, do not continue reading and buy:Check out eBay with the search tags "rs485 usb". You can get one of theese adapters which are sold very often from china:or this one:
Devantech USB-RS485 Serial Interface:http://www.robotshop.ca/devantech-usb-r ... rface.html
And here more details about it:http://www.robot-electronics.co.uk/htm/ ... 5_tech.htmor this one:http://www.usconverters.com/index.php?m ... cts_id=280The following hardware adapter are additionally tested successfullyDyadic "auto"matic RS485 adapter hardware ADP-1 from the developer of SCN5
If you have bought the equipment if the original SCN5 hardware you have to do following settings:The "auto"matic RS485 adapter hardware DIY
I have used this "auto" adapter from a elector magazine:
Hardware setting for my test: all switches on, do not mount the green LED!
I have not equipped the 7805 Low Drop power chip, because the SCN will provide stable 5 volts. (Bridge pin 1 to 3 instead of 7805 chip and D1 is a bridge)
Also I have not equiped the zener diodes, because no electrical mismatch can work here.
other have to followed and presented in this thread first page!4 wire cable = Termibus/RS485
Black to GND of RS485 adapter
Red to 5V of RS485 adapter (the SCN5 provides the 5Volts if powered)
White to RS485- A connector
Green to RS485- B connector
HINT: if you use the longer cable, you have to terminate the other end of the cable with 120Ohm resistor between A and B.
Settings:The cheapest handshake (manual) DTR/RTS RS485 adapter hardware DIY
with release 184.108.40.206 and up here is the cheapest converter available.
It will switch with the DTR pin of the RS232 connector, but because windows is no realtime system the switch cannot really
switched correctly everytime. If the cpu has much load there may be output losses if you drive it too strength (fast).
This adapter can be made without etching a board on a simple breadboard you see.
You will need twice of them, if you do not change the SCN5 evice ID's.
Settings in the SCN5 setup are therefore:
There may be output losses (only displayed in DTR/RTS mode), because windows has much cpu load and cannot switch fast enough. This is not really a problem but should be reduced by setting higher switching delay times. It is also a good choice to use a additional small pc (slow old worker pc) for the X-Sim converter work. This will always increase the movement stability and frees cpu load from the gaming pc.ILK switch Wiring:
To connect the SCN5 you must know, that the wires described in the SCN5 manual with colors are only valid for the long adapter cable. It is NOT the description of the short SCN5 cables out of the white box.
Here is the wiring for the upper adapter:
Without killswitch (not recommended):The ILK protection is very important, insert Z-Diode and resistor
We noticed some SCN5 with inverted ILK pin in the asian room. If the software tells you, that the ilk is set but you are sure the above circuit is well done, you should try to connect the ILK pin to ground and run again. If this works, you need to place the (opening) kill switch between ground and the ILK pin. (Note: there are only a view)
Last but not least we have to inform you that destroyed ILK pins cannot be repaired, it is a pin that is connected directly to the main SCN5 processor.
Some newer SCN5 can disable the ILK pin with the developer software, which we are not able to provide in public. You can repair a deffective ILK pin, if you disable the ILK with this software. The autor of this thread will not provide this software! Search this forum and ask some members who have done this before.14 wire powercable and PIO output cable modification (everytime needed)
outer Red wire to +24Volt
inner Red wire = not connected
outer single black wire to Ground 24Volt (The grounds of RS485 and Termibus are not connected)
grey wire (middle) to 24Volt, this is the ilk wire for emergency stop switcher !! a button is needed which cut the 24 volts.
The powersupply needs about 2 ampere current.
Mine is from the old Rock'n'Ride Interface :rofl: Which length of SCN5 / SCN6 actuators are supported?
All are supported, you can program them with the original software to other length or reduced length.
The plugin will read out the borders and calculate the X-Sim own unsigned integer 2³² positions automatically.
If there is one not listed because it is newer, it would be working ...
If you see a false length than you have ordered, the internal EEPROM is programed false, you should reprogram them to the right length.Hints for ready bought RS485/RS232 converter and HowTo buy such a converter
First I have to say, that nearly all converter are connectable with the X-Sim SCN5 plugin. But because of the nearly unlimited versions on the electronic market this is a very difficult setup for beginners. If you cannot make a DIY (do it yourself) version as above and cannot buy the listed ones you have to look at your next suplier what is possible to get. This is a DIY forum, so you are able to choose your solution by yourself and can discuss about it here as you like. But you always need some patience with the selfmade problems by buying a unknown adapter.
Here is a list what you have to know about your adapter, if you want to make a setup with a unknown adapter:1.
Is it self powered or is there a power supply added?
Self powered adapters are a bad option for beginners and you have to switch the DTR and RTS checkboxes to the fitting position. If the adapter is using DTR, you have to insure DTR is always on and otherwise RTS. Some adapters need both always enabled. It make no sense to continue without a sure power. Please first measure out that with a multimeter in the opened adapter. For example at the RS485 IC VCC and GND pin. If the power will float while the X-Sim converter starts it is not the solution, the power must be surely fixed. So a powered adapter would help you in this case to avoid that unknown setup.2.
Is the adapter a half duplex RS485 converter?
This you can find out with the count of outputs (Ground and 5 volts excluded). If there are 4 wires called R+/R- and T+/T- this adapter is the wrong full duplex adapter. You need a converter with 2 wires called TRx- and TRx+ for example or called A and B. You only can use half duplex adapters because the SCN5 Termibus is half duplex!3.
Is the adapter half-duplex mode "auto"mated or controlled by the handshake signals?
If it is "auto" the manual inludes some notice about that. This could be "TXD auto switching" or "fast autoswitching" notice. Also it MUST be a fast switching converter in the auto mode. If there is no notice it is normaly a converter that will switch the half duplex mode from send to receive with the RS232 DTR or RTS signal. To find out that importand wire, you can tryout all possible combinations of the plugin or open your adapter and look at the connector which wires of the RS232 side are used. It is up to you to find out what your adapter needs. So a auto mode converter is a better solution. You are able to change TRx+/TRx- signal pins for tryouts as you like, you cannot destroy your adapter with a false reversed connection.4.
There must be some end resistors placed!
As the above schematic (handshake adapter) the TRx+ wire and TRx- wire (or called A and B) of RS485 are equiped with a end resitor of about 120 to 220 ohm. On short cables (1m) there is only one needed at the converter side. Some converter have such a resistor included, some not. You can measure them out or the manual tells you how to enable them. For beginners a short cable and a 220ohm resistor at the outputs of the converter will do the job always correct.5.
DCE or DTE / nullmodem or 1:1 switch?
Some adapters have a additionally option to cross over the RXD and TXD line of the RS232 connector. This is designed for modem use or 1:1 adapter use. Modems need the receive signal on transmit and counterwise. This is the last problem you must solve. The above adapters use 1:1 (DTE) wiring. If you are not sure you have to tryout until it works. If a adapter is nullmodem designed you have to twist the cables by your own in the connection cable. You can only find out that with a schematic of the adapter or you find out where each wire is connected inside the adapter. If there are LEDs included you can send a file with the hyperterminal and look if the TXD LED is aktive. If this works you are connected correct.A converter with a send (TXD) LED indicator is here helpfully! You can see if it is correct wired.http://www.taltech.com/TALtech_web/reso ... c.html#dceHint: A ready build USB to RS485 adapter (no USB to RS232 and RS232 to RS485 adapter solution) will switch the half duplex mode itself correct.6.
No echo or loopback is allowed!
Some adapters have a internal connection from TXD to RXD to insure the sended data are correct. This adapters can not be used because the timing will cause undefined receiving packets by the SCN5. Some adapters can open a jumper to remove the loopback, some other adapters have a in circuit loopback. You can verify the presence of such a loopback if you disconnect the RS485 side and open a terminal program like hyperterminal or putty. If you press a key and the key is returned on screen, then you have somewhere a hardware loopback which has to be removed.
Because you have to find out that much different combinations, you must do a list what you can get for informations about the adapter to reduce your later setup work. It is nearly impossible to tryout all that combinations if you cannot exclude some of that listed combinations. The timing setup can be setup to a save mode version which can be reduced step by step for a faster output later:
As a option you can send the adapter to me and I will provide you a connecting picture and software setup, because it is for me a short action to find out the correct wireing and used checkboxes.
Ok thats all ...
Now ask if you have some questions, this first thread will be updated for better overview of newcomers
If a answer is correct or did help you for a solution, please use the solve button.