RE: DCC Sniffer – Packet Analyser with Arduino

#1 von RudyB , 23.10.2015 19:38

DCC Sniffer – Packet Analyser with Arduino

There are two Arduino DCC libraries floating on the Internet, Mynabay and NMRADCC. Both contain example code that lets them work as a DCC monitor. They show the DCC packets that are detected. However ... they are shown as numbers, which makes it rather difficult to understand what is what.

This Arduino sketch 'captures' the DCC packets as they are transmitted by your Command Station and shows them on you PC screen in a readable format. No DCC library is needed by the way, just upload the .ino file to the Arduino and enjoy watching all the DCC commands passing by on your screen.

DCC is fed to pin 2 of the Arduino, via an opto coupler circuit of which the schematics are available on the blog. The .ino sketch is available for download on the blog also.

Some examples of DCC packet readout:
Loc 1902 Forw 21 = loc 1902 speedstep 21 driving forward
Loc 4 Rev 14 = loc 4 speedstep 14 driving backwards
Loc 4 L F4-F1 0 = loc 4 lights off, F4 off, F3 off, F2 off, F1 off
Loc 4 L F4-F1 11 = loc 4 lights off, F4 off, F3 off, F2 on, F1 on (leading zero's are not shown)
Loc 4 L F4-F1 10001 = loc 4 lights on, F4 off, F3 off, F2 off, F1 on
Loc 4 F8-F5 1010 = loc 4 F8 on, F7 off, F6 on, F5 off
Loc 4 CV 4 Write 3 = loc 4 write value 3 into CV4
Acc 4 1:3 1 On = Accessory 3 (= module 1 port 3) On, pulse = 1
Acc 5 2:0 0 On = Accessory 5 (= module 2 port 0) On, pulse = 0 (a module has 4 ports)


Link to the blog with software download and hardware info.



Youtube channel on Model Railway, Traincontroller, Arduino and more


RudyB  
RudyB
InterRegioExpress (IRE)
Beiträge: 268
Registriert am: 20.09.2014
Homepage: Link
Gleise Peco 75
Spurweite H0
Steuerung TrainController
Stromart Digital


RE: DCC Sniffer – Packet Analyser with Arduino

#2 von RudyB , 26.10.2015 09:46

A new version of the DCC Sniffer / Analyzer is available via the download link below. This version has the ability to send configuration commands via the keyboard, to change the buffer size, change the refresh time and to toggle on/off the display of locomotive or accessory packets. The keyboard commands that are available are:

1 = 1s refresh time
2 = 2s
3 = 4s (default)
4 = 8s
5 = 16s

6 = 4 DCC packet buffer size
7 = 8
8 = 16
9 = 32 (default)
0 = 64

a = accessory packets display on / off toggle
l = locomotive packets display on / off toggle


Download link.

..


Youtube channel on Model Railway, Traincontroller, Arduino and more


RudyB  
RudyB
InterRegioExpress (IRE)
Beiträge: 268
Registriert am: 20.09.2014
Homepage: Link
Gleise Peco 75
Spurweite H0
Steuerung TrainController
Stromart Digital


   


  • Ähnliche Themen
    Antworten
    Zugriffe
    Letzter Beitrag
Xobor Einfach ein eigenes Forum erstellen
Datenschutz