Jindra Fučík

Modifikovan� dekod�r pro DCC provoz 3V nebo 5V motor�

Modified DCC decoder for 3V or 5V voltage motors

Obsah


Projekt uzn�v� autorsk� pr�va Georga Zeiglera a jeho Self made DCC-Decoder

Index


Project respect author rights of Georg Zeigler and his Self made DCC-Decoder

Ne� za�nete

P�ed za��tkem je pot�eba si uv�domit, co tento dekod�r p�edstavuje a co naopak neumo��uje.
Podstata dekod�ru je umo�nit provoz speci�ln�ch vozidel kter� maj� velk� n�roky na prostorov� rozlo�en� dekod�ru a neumo��uj� pou�it� b�n�ho dekod�ru.

  • Dekod�r umo��uje provoz motor� s men�� volt�� (3,5V - 5V)
  • Dekod�r podporuje sv�tla (FR/FL)
  • Dekod�r umo��uje pou��vat jednu dal�� funkci ozna�enou jakou Aux1, kter� m� omezen� na max 5V a max 20mA, jej� p�vodn� ur�en� bylo pro osv�tlen� topeni�t�
  • Pro dekod�r je pom�rn� z�sadn� v�d�t, jakou spot�ebu m� pou�it� motor
  • Stejn�tak jak� pou�ijete sv�tla
  • Tento dekod�r neumo��uje provoz po analogov�m (DC) koleji�ti!
Spot�eba motoru se zm��� celkem jednodu�e - p�ipoj�te motor na maxim�ln� povolen� nap�jen�, zablokujete jeho osi�ku a amp�rmetrem zm���te prot�kaj�c� proud.

Before you begins

Before you begin, it is good to remember what you can do with decoder and what decoder not enable you to do.
Principles of decoder is enable special locomotives and cars with special requests for used space and not allows to use standard decoder.

  • Decoder alows to use motors with low voltage (3,5V - 5V)
  • Decoder support light functions (FR/FL)
  • Decoder support one other function marked as Aux1, this function is limited to 5V and 20mA max, originaly planed for flickering firebox
  • For decoder is crusual to know, how is consuption of used motor
  • As well as consuption of used lights
  • This decoder not allows to run on analog (DC) layouts!
Measure of motor consuption is easy; connect motor to maximal allowed voltage, block the motor and measure consuption.

M��en� spot�eby motoru | Measurement consuption of motor

Zapojen�

Cht�l bych se omluvit v�em, kte�� zde o�ek�vali opravdov� elektrick� sch�ma. Zve�ejnil jsem tuto mnemotechnickou mal�vku, ptoro�e je mnohem p�ijateln�j�� pro v�t�inu model���

Schematics

At the begin I would like to appologize to everybody who expect here electrical schematic. I published this mnemotechnic painting insted of schematics, because it is usefil for many train modelers

Mnemotechnick� mal�vka m�sto sch�matu | Mnemotechnic painting insted of schematics
decoder.wmf

Vysv�tlen� obr�zku

Barevn� konce ozna�uj� barvy vodi�� podle NMRA norem
Pokud se dva vodi�e k���, jedn� se o nevodiv� k��en�
Vodiv� spojen� je ozna�eno kole�kem v m�st� k��en�
Procesor (PIC12F629) je nutn� p�ed osazen�m naprogramovat

Na obr�zku je modr� �ipka kter� ukazuje sm�rem k modr�mu kole�ku. Ta slou�� k volb� nap�jen� pro sv�tla. Pokud je vodi� p�ipojen do (1), bude nap�jen� sv�tel klasick� 14V, pokud je p�ipojen� do (2), bude nap�jen� 5V (vhodn� pro LED). V p��pad� �e budeme sv�tla nap�jet 5V je pot�eba jejich spot�ebu zahrnout ke spot�eb� motoru.
Funkce Aux1 je ur�en� k p�ipojen� pouze jedn� LED diody spolu s odporem 470R. Druh� v�vod diody se p�ipojuje do m�sta ozna�en�m �ervenou trojkou.
Pokud nehodl�me pou��vat sv�tla v�bec, je mo�n� vynechat obvod FDC6303N

V prav�m horn�m rohu jsou nakresleny 4 diody. Jejich ��el je sn�en� nap�t� na motoru - ka�d� dvojice p�edstavuje �bitek 0,7V, nap�t� bez diod je cca 5V. Pokud tedy chceme provozovat motor s pracovn�m nap�t�m 4,5V a v�t��m, diody nepot�ebujeme, pro motory 3V diody zapoj�me. P�i n�kupu diod po�adujeme b�n� diody, ale d�v�me si z�le�et, aby hodnota jejich proudov�ho zat�en� (If) byla v�t�� ne� proud motoru.
Dioda 1N4148 MICRO MELF je sice nejmen��, ale m� proud jen 150mA (sta�� na motory z mobilu do pr�m�ru cca 4mm),
Dioda 1N4148 SMD 1206 m� proud cca 300mA (to je dost pro motory cca 6mm)
Pak u� budeme pot�ebovat diody typu SUF4004 SMD nebo 1N4007 SMD, ty maj� proud a� 1A.

Na obr�zku je tak� stabiliz�tor 78M05 SND DPAK, jeho proudov� zat�en� je 500mA (0,5A), pokud je proud motoru v�t�� (+ proud sv�tel), je pot�eba pou��t 7805 DPAK, ten m� zat�en� a� 1A, ale m� sklony se h��t.

Kondenz�tory na obr�zku slou�� mimo jin� k udr�en� nap�jen� p�i p�ej�den� vyhybek.
Jejich hodnota 4,7uF je asi nejmen�� pou�iteln�, pokud m�me mimo��dn� dobr� koleje, mo�n� si vysta��me s 2,2uF, nicm�n� sp� budeme nuceni hodnotu zv�t�ovat.
Zv�t�ov�n� kapacity kondenz�toru vlevo je efektivn�j��, ale z�rove� rychleji porostou jeho rozm�ry rychleji ne� u prav�ho.

Figure description

Color marking of end of wires respecting color schema recommended by NMRA
If here is a cross of wires - it is isolated cross
Conducted connection is marked by circle
Procesor PIC12F629 must be programed before appliing

On the picture is blue arrow pointing to blue lines. It is used for powering lights. If the wire is connected to (1), the voltage for lights will be usual 14V, if it is connected into (2), voltage will be 5V (suitable for LEDs). In a case of usage 5V lights, it is necessarry to add consuption of lights into consuption of engine
Output Aux1 is designed only for connection one LED diode with a rezistor 470 ohm. oposite connection is marked by red number (3)
If we are not planing to use lights at all, we can remove also FDC6303N

In upper right corner we have four diodes. These diodes are used for decreasing voltage for motor. Every two diodes decreasing by 0.7V, voltade without diodes is cca 5V. For connecting motors with voltage 4.5V and more diodes are not necessarry, for 3V motors we need diodes. When buying diodes must be carefoul, that working forward curent (If) is bigger, than current of engine.
Diodes 1N4148 MICRO MELF are small, but current is only 150mA (for motors cca 4mm diameter),
Diodes 1N4148 SMD 1206 have current cca 300mA (suitale for motors cca 6mm)
Next level is diode types SUF4004 SMD or 1N4007 SMD, they have curent cca 1A.

On figure we have stabilisator 78M05 SND DPAK, its current is cca 500mA (0,5A), if motor current is bigger (+ lights), we need 7805 DPAK, it have cca 1A, but sometimes heating.

capacitors on picture are used also for powering decoder during corsing turnouts.
Value 4,7uF is a minimum suitable, if you have good layout, it is possible, that 2,2uF will work, we can expect, that we will need increase value of capacitors.
Increasing of capacity left hand capacitor is more efective, but it increase size faster than right hand.
Sou��stky kupuji v GME
S380 SMD
78M05 SMD DPAK
1N4148 SMD
PIC12F629 I/SN
Kondenz�tor 4,7uF / 25V
Kondenz�tor 4,7uF / 10V
Co nemaj�, tak kupuju u farnell
Si9986CY
FDC6303N

Program pro PIC je mo�n� pou��t origin�l (ten pro 12F629)
Pro�n� spoj tak� podle origin�lu
CVPopisDescription 
CV1Prim�rn� adresaPrimary Address3 / 1-99
CV2VstartVstart0 0-255
CV3Zrychlen�Acceleration Rate255 0-255
CV4Zpomalen�Deceleration Rate255 0-255
CV5VmaxVmax255 0-255
CV6VmidVmid0 0-127 neg. 128-255 pos.
CV17Dlouh� adresa spodn� ��stExtended Address Low Byte0
CV18Dlouh� adresa horn� ��stExtended Address High Byte0
CV19Adresa soupravyConsist Address0 0-255
CV290=DIR 1=14/28 2=PWRSRC 3=ADVACK 4=SPDTAB 5=LADRE 6= 7=ACCDEC (viz. dole) 0=DIR 1=14/28 2=PWRSRC 3=ADVACK 4=SPDTAB 5=LADRE 6= 7=ACCDEC (see below) 0 0-255
CV49V�stup F1=F8 na GP2 Bity 76543210 = F87654321Output F1-F8 to GP2 Bit 76543210 = F876543210 0-255
CV50V�stup F1=F8 na GP4Output F1-F8 to GP40 0-255
CV51V�stup F1=F8 na GP5Output F1-F8 to GP50 0-255
CV55Vmax �. 2 p�ep�nan� pomoc� F1-F8, nebo sm�ru j�zdy2. Vmax switchable over F1-F8 or over drive direction0 0-255
CV640=FLOFF 1=BLOFF 2=RDLTON 3=BRKON 4=HI2LOFS 5=FLACKON 6=LITAUTO 7= (viz. dole) 0=FLOFF 1=BLOFF 2=RDLTON 3=BRKON 4=HI2LOFS 5=FLACKON 6=LITAUTO 7= (see below) 0 0-255
CV29 PopisDescription
CV29,0DIRINVOto�en� sm�ru (j�zdy a sv�tel)direction inverted (travel+light)
CV29,114/28Po�et j�zdn�ch krok� 14 nebo 2814/28 speed steps
CV29,2LIINVOto�en� sv�telLights inverted
CV29,4STABRychlostn� tabulka / CV2, CV5 a CV6Speed tab / CV2, CV5 and CV6
CV29,5LADREPovolena dlouh� adresaLong address enable
CV29,6ACKOFFVypnut� ACK pro podru�n� dekod�ry (nepou��vat)acknowledge off for piggy bag decoder (don't use this bit)
CV64 PopisDescription
CV64,0=1FLOFFP�edn� sv�tla se nastavuj� podle CV50 (GP4)front light switch with cv50 (GP4)
CV64,0=0RANGIERMapov�n� podle FLOFFlow activ, mapped with FLOFF
CV64,1=1BLOFFZadn� sv�tla se nastavuj� podle CV51 (GP5)back light switch with cv51 (GP5)
CV64,1=0SPEED2Mapov�n� podle BLOFFlow activ, mapped with BLOFF
CV64,2RDLTON�erven� sv�tla aktivovan� (zadn� sv�tla)red light on (back light)
CV64,3BRKONBrzdov� sv�tla zapnutabrake light on
CV64,4HI2LOFSRezervov�noReserved
CV64,5FLACKONBlik�n� povolenoFlickering on
CV64,6LITAUTOotev�en�/zav�en� kotle automatickyfirebox open/close automatically
CV55 stejn� jako cv5, aktivuje se prost�ednictv�m cv64,1=0, Norm�ln� zapnuto, a p�ep�n� se prost�ednictv�m cv51.
pokud je cv55=0 potom je Vmax �. 2 neaktivn�.
pokud je cv51=0 potom je Vmax �. 2 pou�ito podle sm�ru.
pokud je cv29,0=0 potom cv5 ovl�d� vm�r dop�edu a cv55 ovl�d� sm�r dozadu.

Nap��klad: m�me cv64,0=0, cv64,1=0 cv50,1=1 a cv51,1=1
potom F2 zap�n� sv�tla na obou stran�ch a z�rove� aktivuje Vmax �. 2 ulo�enou v cv55.
cv55 same as cv5, activate over cv64,1=0, normal on, and switchable over cv51
is cv55=0 then the 2nd Vmax is deactivated.
is cv51=0 then the 2nd Vmax is for direction use.
if bit cv29,0=0 then cv5 controls forward direction and cv55 controls reverse direction.

for example: is cv64,0=0, cv64,1=0 cv50,1=1 and cv51,1=1
then F2 switches the light on both sides on and activate the 2nd Vmax over cv55.