Support
Wiki Documentation
Support Forum
Mobile
- Rocweb Browser
- WIO-Control ESP32
- andRoc Android
- Rocview Tablet
DIY
User
Wiki writer
Legal
Support
Wiki Documentation
Support Forum
Mobile
DIY
User
Wiki writer
Legal
ORA-1 = Open Rocrail Accessory decoder to use with many systems including ORD-1
ORA-1 is a multi purpose accessory decoder. It can be built in two versions; one version for turnouts driven by solenoids and for various signals and the other version for turnouts with servo motor.
ORA-1 is a based on and code compatible with Opendecoder (OpenDecoder Hardware 1). Many thanks to Wolfgang Kufer and his OpenDCC project.
All documentation: https://gitlab.com/rocrail/GCA/tree/master/ora-1
Last Version is 1.02
Schematics and PCB artwork was created with KiCad, an Open Source (GPL) PCB Suite.
Version 1 - Accessory Decoder for Turnouts with Solenoids and Signals
Version 1 can build with one or two ULN2803 driver chips. Every ULN2803 provides 0,5A max. short time power. For small gauges like N or TT, one ULN2803 may be enough but for H0 it may be better to build ora-1 with both drivers.
Name | Value, Remark | Quantity |
C1, C2 | 18pF, 2,54mm pin spacing | 2 |
C3 | 470µ, 5,08mm | 1 |
C4, C6, C8 | 100nF, 5,08mm | 3 |
C5 | 100µF, 5,08mm | 1 |
D1 | 1N4148 | 1 |
D2 | LED, 3mm, low current, 2mA | 1 |
D3 | rectifier B80C1500 | 1 |
F1 | multifuse, 0,5A, If using 2 x ULN2803 you need 0,9A | 1 |
JP1 | jumper, 2,54mm | 2 |
K1, K2, K3, K4 | connector, 3 port, 5,08 mm pin spacing | 4 |
OK1 | optocoupler 6N136 or 6N137 | 1 |
P1 | connector 2x10, 2,54 cut out the pins you need | 1 |
P2, P3 | connecter, 2 port, 5,08 mm pin spacing | 2 |
R1, R4 | resistor 1k5 small | 2 |
R2, R3, R27 | resistor 10k small (R2 is only needed if using OK1 = 6N137 | 3 |
SW1 | switch, print | 1 |
U1 | ATTiny2313DIP | 1 |
U2, U3 | driver ULN2803A (each driver supports 0,5A ) | 2 |
U4 | voltage regulator LM7805 | 1 |
X1 | 10MHz chrystal | 1 |
usefull accessories:
Name | Quantity |
IC-Socket 20 pin for U1 | 1 |
IC-Socket 18 pin for U2 and U3 | 2 |
IC-Socket 8 pin for OK1 | 1 |
You can get the parts at theese distributors:
Reichelt shopping cart (You have to select if you need 1 or 2 ULN2803. Preselected are 2. You also have to select if you need a 0.5A Fuse PFRA050 ore a 0.9A Fuse PFRA090)
Version 2 - Accessory Decoder for Motor driven Turnouts
For building the Version 2 Hardware you need all parts used in Version 1 plus the parts below.
You need only one ULN2803 because of the BD678 booster circuits.
The Heatsink is not a must but a small Heatsink is better as a burned LM317 Remember that you need a M3 screw for it.
Name | Value, Remark | Quantity |
C7 | 100µF, 5,08mm pin spacing | 1 |
D3 - D10 | LED 3mm std. only if you like LED's ![]() | 8 |
Q1 - Q8 | BD678 PNP Darlington uncooled | 8 |
R5, R7, R10, R12, R15, R17, R20, R22, R26 | resistor 1k5, small | 9 |
R6, R8, R11, R13, R16, R18, R21, R23 | resistor 5k6, small | 8 |
R9, R14, R19, R24 | resistor 1k small (only needed for LED's) | 4 |
R25 | resistor R470 | 1 |
RV1 | poti 5k | 1 |
U5 | voltage regulator LM317 | 1 |
U5 | U-Form Heatsink for LM317 | 1 |
Instead of the BD678 PNP Darlibgtons you can use any PNP types who are able to drive 1A. If you use non Darlington Transistors you have to replace the 5k6 resistors with 1k5 types.
You can get the parts at theese distributors:
Version 1 - Accessory Decoder for Turnouts with Solenoids and Signals
Version 2 - Accessory Decoder for Motor driven Turnouts
AVR programming is quite easy. You need a programming software and a small hardware adapter for the serial port.
We suggest to use Ponyprog2000 for Windows.
For Linux you can use Avrdude . Avrdude are available as binary package in many Linux distributions.
The programming hardware is really small. You only need 4 resistors, 2 zener diodes, 1 transistor and two connectors. You may build it on a breadboard but for the more enthusiastic model railroader we have prepared a small Layout.
You also need a 1-to-1 cable to connect the 6 pin connector at your decoder with the 6 pin connector at the programmer board.
First you have to setup the pic programmer. If you use the programming hardware described above you have to setup Ponyprog this way: Click on "Setup/Interface Setup" and setup the I/O Port as you can see in the picture below.
Attention: If you are using ORA-1 with 10k Pullup at reset input, don't check "Invert Reset" !!!
You have to tell Ponyprog the name of the device you want to program. Click at "Device / AVR micro / ATtiny2313"
The software for the decoder is found at Wolfgang Kufer's Opendecoder page: http://www.opendcc.de/elektronik/opendecoder/OpenDecoder_V04.zip . (There may be newer versions available on this location.) Download and unzip the file. You need to program the OpenDecoder_10MHz.eep and OpenDecoder10MHz.hex into the atmel chip
Now it is time to connect ORA-1 with the pic programmer. Also connect 8V to 30V AC or DC Power to ORA-1. To program the chip you have set the fuses of the atmel. Click on "Command / Security and configuration Bits" Set the fuses as shown in the picture below:
Finalize by using "Write" to download the fuses to your decoder.
Afterwards you have to open the EEprom and the Program files. Click on "File / Open Program (FLASH) File …" and select the OpenDecoder10MHz.hex file at the place where you unziped it. Now click on "File / Open Data (EEPROM) File …" and select the OpenDecoder_10MHz.eep file. If both files are successfully loaded you have to click on "Command / Write Program (FLASH)" and after that is done click on "Command / Write Data (EEPROM)"
For Avrdude, use:
avrdude -p t2313 -c ponyser -P /dev/ttyS0 -e \ -U flash:w:OpenDecoder_10MHz.hex \ -U eeprom:w:OpenDecoder_10MHz.eep \ -U efuse:w:0xff:m \ -U hfuse:w:0xd9:m \ -U lfuse:w:0xef:m
Now the chip is ready to test: connect power to ORA-1. Press the button at the ORA-1 board. The LED will light and displays that ORA-1 is in programming mode. Disconnect power and be happy, your ora-1 works.
Power and DCC
Connect your 12-18V AC Model Train Transformer to P3, connect the DCC signal cables with P2. It is also possible to bridge P2 and P3 and get both, Power and DCC from the tracks.
Version 1 - Turnouts and Signals
Connect your Turnouts to screw 1 to 3 of every Connector K1 to K4. Screw 1 is the green output, screw 3 is the red one. Screw 2 is Power (black cable at most turnouts).
Version 2 - Motor driven Turnouts
Connect your Motors to screw 1 and 3 of every Connector K1 to K4. ORA-1 is suitable for 5-18V DC-motors. Use mode 3, see below.
ORA-1 has 8 working modes:
Mode | Function |
0 | Turnout decoder for solenoid driven devices, Pulse duration 0,25s |
1 | Turnout decoder for solenoid driven devices, Pulse duration 0,5s |
2 | Turnout decoder for solenoid driven devices, Pulse duration 1s |
3 | Turnout decoder for motor driven devices, Pulse duration 2s |
4 | Light signal decoder, 4 signals with 2 lights each |
5 | Light signal decoder, 2 signals with 3 lights each, one signal with 2 lights |
6 | Light signal decoder, 2 signals with 4 lights each |
7 | Trafficlight decoder |
You can select the mode when sending a turnout command while ORA-1 is in programming mode. To enter programming mode press the button at ora-1. LED D2 will Light to indikate programming mode. Select the mode by sending the according turnout command. After ORA-1 received the DCC Command LED D2 will be off.
Example:
You want to setup ORA-1 for your motor driven turnouts No. 13 to 16. Mode 3 is the right one for motor turnouts. So you have to send a DCC command to the "green" output of Turnout 2 of this ORA-1 board. Turnout 14 equals Turnout 2 at the 4th ORA-1 board (every board is able to power 4 turnouts). To setup ORA-1 send the DCC command for the green output at Turnout No. 14.
Questions ?
Picture of the prototype ORA-1 assembled with all the parts needed for signals and solenoids. (forget the trimmer, it's only to adjust the voltage for motor switches)