![background image](http://html1.mh-extra.com/html/vpeb/oc32-ng/oc32-ng_manual_1052370021.webp)
Manual OC32/NG
VPEB
Control your Miniature World
Page 28 of 48
Version 1.0 – December 15
th
, 2017
2017 Leon van Perlo
(channel 1) and RS232 (channel 0). You can make a modification after which you can select
TTL or RS232 level for channel 0 as was the case with the ‘old’ OC32.
We won’t explain TTL as technology in this manual. Essentially we consider it obsolete and if
you don’t know what to use it for, you won’t need it anyway.
Required components:
•
3-pin header 2,54mm
•
Jumper 2,54mm
Before modification
RS232 setting
TTL setting
Fig 18: Adding an RS232/TTL selection option
Behind the 4-pole power connector K1 you find 3 pin-holes marked JP4. Take a very close
look and you’ll see that 2 holes that have the text ‘RS232’ next to them are shorted. First
you need to cut this short circuit. You can do that by using a sharp knife or, for better
control, an electric miniature milling cutter tool, such as a Proxxon drill or similar. Just
remove the copper between the 2 pin holes and don’t cut deeper than some 0.2mm below
the surface of the PCB or you may damage the internal layers. Use a multimeter to check
that both pin-holes are actually isolated.
Next solder a 3-pin 2,54mm pin-header on the position of JP4.
Now you can select RS232 or TTL by placing a jumper on 2 of the pins as indicated.
5.6.2
Dual RS485 interface
The OC32/NG has two serial interfaces: RS485 (channel 1) and RS232 (channel 0). In some
cases it is handy to have two RS485 interfaces. For these situations you can make a
modification after which you can use channel 0 in RS485 mode, RS232 mode, and if you
made the TTL modification as well, in TTL mode.
Note that (at the moment) channel 0 is receive-only, so modifying it into RS485 won’t make
channel 0 bidirectional.
Standard the OC32/NG has 3 connectors for RS485 channel 1: K2, K2A and K3B. Since we
need an additional physical RS485 interface we will separate K2 from K2A and K2B. As a
result, we can use K2A and K2B for RS485 channel 1 as before and we can use K2 for
RS485 channel 0.
Required components:
•
2-pin header 2,54mm
•
3-pin header 2,54mm
•
2 x Jumper 2,54mm
•
8-pin IC socket (preferably “turned pin”, or “machined contacts”, gold plated)
•
MAX3082 or SN65HVD3082, DIL version
Behind the 3-pole RS485 connector K2 you’ll find 5 pin-holes indicated as JP5. Take a very
close look and you’ll see that 2 pairs of holes that have the text ‘CON’ next to them are
shorted. These shorts are the connection between K2 and K2A/K2B. First cut these short
circuits. You can do that by using a sharp knife or, for better control, an electric miniature
milling cutter tool, such as a Proxxon drill or similar. Just remove the copper between the 2
Control your Miniature World
VPEB
Manual OC32/NG
2017 Leon van Perlo
Version 1.0 – December 15
th
, 2017
Page 21 of 48
5.2.2
Adressing (extended)
Extended addressing offers the possibility to connect in practice up to 96 modules
3
in a
serial bus. Note that extended addressing shall also be supported by your software. When
extended addressing used, the address is no longer selected by the DIPswitches, but
instead by a configuration setting in the OC32 flash memory. The DIPswitches on all your
modules are set in identical positions and determine the channel number by which
communication takes place. The actual module address is configured by OC32Config in the
module. The procedure is described in the OC32 firmware manual.
5.3
RS485 communication
5.3.1
RS485 general explanation
RS485 is a serial bus for the transmission of signals over long distances. When properly
installed, you can reach distances up to 1200 meters. Despite the fact that you will need
some ambition to encounter this kind of distances on a model railroad at home, RS485 is a
handy protocol because it makes is possible to create a reliable communication between
multiple pieces of equipment.
When we talk about a “bus”, we mean that there is a single continuous cable, without
branches, to which a “module” can be connected at random points. So the cable runs past
every module that needs to communicate via the bus. With RS485 the cable consists of 2
wires that are twisted with each other (“twisted pair”). At both ends the cable needs to be
terminated with a resistor of 120
Ω
.
Furthermore it is important that the modules that are communicating have a “common
reference voltage”. Basically, they need to be connected to the same ground or the same
common power supply. In principle, an RS485 bus contains with the twisted pair also a third
wire for the reference voltage, but if your modules are already connected to the same power
supply, you can skip the third wire.
Only between PC and miniature world it is advisable to install “the third wire”, if it is not
already present.
In principle you require only one twisted pair, plus, if required, an extra wire for the
reference voltage. Most cables that are for sale contain multiple pairs. You can for example
conveniently use UTP-LAN cable (cable used for computer networks), nowadays commonly
for sale in every DIY/hardware store, either with solid core or with stranded core. The latter
is slightly more flexible and easier to use. UTP LAN cable contains 4 wire pairs. With RS485
you use only 1 pair (it doesn’t matter which one). A wire from any other pair can be used as
third wire, if necessary.
At short distances (up to about 20 meters) is hardly matters what kind of cable you use. It
doesn’t even have to be twisted. Therefore you can just use two insulated wires that you
twist together, plus a third wire, if required. For longer distances a proper cable is not only
more reliable, but also simply more convenient.
RS485 is offered by default by the Dinamo RM-U controller, the RM-C controller and the
UCCI/E controller. Information about this can be found in the documentation of the
corresponding modules.
5.3.2
RS485 on the OC32/NG
RS485 is available on the OC32/NG on 3 sockets. These sockets are all interconnected,
thus from a functional perspective, it does not make any difference which one you use.
3
In theory up to 1536 modules