User Tools

Site Tools


ora1-nl

Hardware

InhoudHardwareRocrail



ORA-1 is een DCC Accessory decoder unit te gebruiken met vele systemen inclusief ORD-1


Algemeen

ORA-1 is een multi purpose accessory decoder. Hij kan in twee versies gebouwd worden; één versie voor wissels aangedreven met magneetspoelen en een tweede versie voor servomotor aangedreven wissels.

ORA-1 is gebasserd op en compatibel met Opendecoder. Veel dank aan Wolfgang Kufer en zijn OpenDCC project.

Belangrijkste eigenschappen

  • Volledig Rocrail ondersteuning
  • Compatibel met ORD-1
  • 8 uitgangen ( 4 wissels )
  • 100x70mm PCB
  • NMRA-DCC compatibel
  • externe voeding voor de uitgang
  • te configureren voor motor en spoel aangedreven wissels
  • instelbare spanning voor motor aangedreven wissels
  • 0,5A of 1,0A stroom voor magneetspoelen

Blok Schema

Bestanden

Schema en de print zijn ontworpen met KiCad, een Open Source (GPL) PCB omgeving. Alle CAD bestanden zijn beschikbaar RocRail Subversion repository.

Versie 1.02:

De onderdelen

Versie 1 - Accessory Decoder voor wissels en seinen met magneetspoelen

Versie 1 kan gebouwd worden met één of twee maal ULN2803 driver chips. Iedere ULN2803 geeft 0,5A max. piek vermogen. Voor kleine schalen zoals N of TT, kan één ULN2803 genoeg zijn, voor HO is het beter de ORA-1 met twee chips uit te rusten. .

Naam Waarde, Opmerking Aantal
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 1N4146 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

verder nog:

Naam Aantal
IC-Socket 20 pin voor U1 1
IC-Socket 18 pin voor U2 en U3 2
IC-Socket 8 pin voor OK1 1

Onderdelen zijn o.a. verkrijgbaar bij :

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)

Versie 2 - Accessory Decoder voor Motor aangedreven wissels

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 Darlingtons 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:

Reichelt shopping cart

Build your ORA-1

Version 1 - Accessory Decoder for Turnouts with Solenoids and Signals

  1. Mount the jumper near U2.
  2. Mount all resistors and diodes. If you use a 6N137 opto you have to mount R2, if you use a 6N136 leave R2 empty.
  3. Mount all IC Sockets. If you build the 0.5A Version mount sockets for U1, U2 and OK1. If you need 1A you have to mount U3 too.
  4. Mount all other small parts
  5. Mount the power supply, elko's and the connectors.
  6. Connect power and check VAA and +5V
  7. Insert the IC's
  8. Program the AVR
  9. Test - If you press the sw1 button longer than 100msec, LED2 will light up.

Version 2 - Accessory Decoder for Motor driven Turnouts

  1. Mount the jumper near U2.
  2. Mount all resistors and diodes. If you use a 6N137 opto you have to mount R2, if you use a 6N136 leave R2 empty.
  3. Mount all IC Sockets. Remember that you don't need to mount U3 for driving motors.
  4. Mount all other small parts
  5. Mount the PNP Transistors, the power supply, elko's and the connectors.
  6. Connect power and check +5V and VAA after the LM317. Test the Poti and measure the output voltage.
  7. Insert the IC's
  8. Program the AVR
  9. Test - If you press the sw1 button longer than 100msec, LED2 will light up.

AVR programming

AVR programming is quite easy. You need a programming software and a small hardware adapter for the serial port. We suggest to use Ponyprog2000 .

Hardware

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 i prepared a small Layout.

Version 2.1:

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.

Software

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.

ponysetup7.jpg

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:

ponyfuses1.jpg

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)"

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.

Usage

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 geschikt voor motoren van 5-18Volt DC. Gebruik van mode 3, zie onderstaand.

Setting up ORA-1

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 ? ;-)

Pictures

3D Picture from Kicad

Prototype picture

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)

ora-1a.jpg

Prototype picture

Picture of the prototype ORA-1 assembled with all the parts needed for motor switches.

ora-1b.jpg

ora1-nl.txt · Last modified: 2018/11/12 08:56 (external edit)