background image

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 

Содержание OC32/NG

Страница 1: ...r 15 th 2017 2017 Leon van Perlo This page is intentionally left blank Author Leon J A van Perlo Version 1 0 Date December 15 th 2017 OC32 NG Manual VPEBVan Perlo Elektronica Besturingstechniek VPEBVa...

Страница 2: ...y information contained herein may not be copied or distributed in whole or in parts in whatever form without the explicit written approval of the original author The making of copies and prints by us...

Страница 3: ...nctions since all functions are made in software and the OC32 and the OC32 NG run 100 identical software The OC32 NG however integrates the options previously offered by the OC32 DS32 combination and...

Страница 4: ...rivers 500mA TBD62083 31 6 1 2 Source Drivers 500mA TBD62783 31 6 1 3 Sink and Source Drivers TBD62083 TBD62783 32 6 1 4 Resistor Array 5V outputs 32 6 1 5 OC32 ADM SI 4 8A power sink driver 33 6 1 6...

Страница 5: ...array A resistor array is the preferred choice if the input port s are to be activated by a push button or the contacts of a relay A resistor array can also be used if the event input is to be activa...

Страница 6: ...protocol is extremely simple just a few characters for a control command and control is unidirectional The OC32 can send command to the external Device but the external Device cannot send anything ba...

Страница 7: ...ptocoupler between both systems Output Voltage V Rs k 6 1 0 7 5 2 4 9 3 9 12 6 8 15 10 18 12 24 18 Q x GND Extern systeem 4k7 Rs Fig 40 External system with Voltage conversion Table 2 Series resistor...

Страница 8: ...the user So configuration needs to be done through one of the serial interfaces 1 The DCC Interface can also be added afterwards by the user All components needed are through hole so not SMD You need...

Страница 9: ...y goes back into the idle position Take care some relays are polarity sensitive It is important to connect the right pole to Vp and to the OC32 output The power supplied by Vp needs to match the volta...

Страница 10: ...anual OC32 NG 2017 Leon van Perlo Version 1 0 December 15 th 2017 Page 39 of 48 6 4 6 Decouplers OC32 I O Pin OC32 ADM SI 4 8A Sink Driver Solenoids may draw up to 1 5A or more That is too much for th...

Страница 11: ...t SMD types also Fig 28 Connecting LEDs antiparallel in 5V mode Q x 1 Q x Q x 1 Q x Fig 29 Connecting LEDs antiparallel in 500mA mode Vp Rv Q x 1 Q x Rv Vp Rv Q x 1 Q x Rv Fig 30 LEDs on the barriers...

Страница 12: ...n like decouplers turnout coils and motors Below you find a number of examples of devices to be found in the miniature world are presented 6 4 1 LED s with common anode OC32 I O Pin 500mA Sink Driver...

Страница 13: ...Manual OC32 NG 2017 Leon van Perlo Version 1 0 December 15 th 2017 Page 13 of 48 Reset jumper Only used to start the bootloader RS485 Termination jumpers Power jumpers DCC Low pass jumper only with DC...

Страница 14: ...wo power groups on the OC32 NG when using Sink Drivers the number of different power supplies is virtually unlimited The load is connected between the plus pole of the power supply and the output of t...

Страница 15: ...is the GND of the communications port that your PC uses to control the layout The 0V GND as stated above of your miniature world has to be connected to the GND connection of the OC32 All points in fig...

Страница 16: ...nterface is hardly ever needed it has been removed to protect the OC32 from unintended errors Control your Miniature World VPEB Manual OC32 NG 2017 Leon van Perlo Version 1 0 December 15 th 2017 Page...

Страница 17: ...ex situations like 3 LEDs on the barrier of an automatic railroad crossing AHOB which are driven with two outputs and two wires Control your Miniature World VPEB Manual OC32 NG 2017 Leon van Perlo Ver...

Страница 18: ...he examples of section 6 4 There is explained which driver you need for specific types of devices 6 1 1 Sink Drivers 500mA TBD62083 This is the default driver delivered with the OC32 NG module A load...

Страница 19: ...nel Full H bridge When changing drivers please observe the following Remove and install drivers only when power is OFF Remove IC s carefully without excessively bending pins Install either regular dri...

Страница 20: ...PC Table 1 below shows which settings of the dip switch correspond to which address For the record this is the standard numbering starting from 0 If your software starts numbering from 1 onwards you...

Страница 21: ...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...

Страница 22: ...connectors both the one on the OC32 and on the U485 have the same pin layout so pin 1 connects to 1 pin 2 to 2 and if applicable pin 3 to 3 The whole will look like the one below figure 12 Fig 11 Term...

Страница 23: ...al converter is limited and therefore there may be a limitation to the number of modules you can connect this way Up to 10 units should normally work fine If you want to connect more modules than your...

Страница 24: ...ultiple OC32 NG s Other options Of course you can combine options 1 and 2 as described above Since the two RJ45 s and the 3 pole connector are electrically connected effectively every OC32 NG can be u...

Отзывы: