Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: count(): Parameter must be an array or an object that implements Countable in /customers/6/7/d/bsmj.se/httpd.www/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263 Warning: Parameter 2 to M_DataMapper::set_custom_wp_query_where() expected to be a reference, value given in /customers/6/7/d/bsmj.se/httpd.www/wp-includes/class-wp-hook.php on line 298 Warning: Parameter 2 to M_DataMapper::set_custom_wp_query_groupby() expected to be a reference, value given in /customers/6/7/d/bsmj.se/httpd.www/wp-includes/class-wp-hook.php on line 298 Warning: Parameter 2 to M_DataMapper::set_custom_wp_query_fields() expected to be a reference, value given in /customers/6/7/d/bsmj.se/httpd.www/wp-includes/class-wp-hook.php on line 298 Warning: Parameter 2 to M_DataMapper::set_custom_wp_query() expected to be a reference, value given in /customers/6/7/d/bsmj.se/httpd.www/wp-includes/class-wp-hook.php on line 298 Warning: Parameter 2 to qtranxf_postsFilter() expected to be a reference, value given in /customers/6/7/d/bsmj.se/httpd.www/wp-includes/class-wp-hook.php on line 298 Feedback for Lenz RS-bus – Berry's RR Warning: Parameter 2 to M_DataMapper::set_custom_wp_query_where() expected to be a reference, value given in /customers/6/7/d/bsmj.se/httpd.www/wp-includes/class-wp-hook.php on line 298 Warning: Parameter 2 to M_DataMapper::set_custom_wp_query_groupby() expected to be a reference, value given in /customers/6/7/d/bsmj.se/httpd.www/wp-includes/class-wp-hook.php on line 298 Warning: Parameter 2 to M_DataMapper::set_custom_wp_query_fields() expected to be a reference, value given in /customers/6/7/d/bsmj.se/httpd.www/wp-includes/class-wp-hook.php on line 298 Warning: Parameter 2 to M_DataMapper::set_custom_wp_query() expected to be a reference, value given in /customers/6/7/d/bsmj.se/httpd.www/wp-includes/class-wp-hook.php on line 298 Warning: Parameter 2 to qtranxf_postsFilter() expected to be a reference, value given in /customers/6/7/d/bsmj.se/httpd.www/wp-includes/class-wp-hook.php on line 298

Home » Electronics » Feedback for Lenz RS-bus

RS Feedback module

My feedback modules have a couple of interesting features that I cant find in the other ones that is available on the market. One thing is that the module is queuing all changes locally inside the memory of the module. Because of that queue, even if the power is off on the track, and the central unit is not collection updates from the feedback modules, the update wont be lost when power is back on to the tracks. So as soon as the power is back on the tracks, and the central unit starts polling the feedback modules for changes, everything in the queue will be sent. Another feature is that regardless of changes of any of the input ports on the feedback module, the module sends an updated respons every 1 second to the central unit. So if there was example an electrical problem, and the priority bit was not correct, the receiver still gets the data. This is pretty important if you use feedback modules for all your turnouts and report the position on the based upon the feedback signal

For a technical description of the RS-Bus, see this page

 

Addresses

The most common way to set the address of the feedback module is to connect the track and listen to commands on it. This function does not exist on my modules. Instead, the address is fixed in every microprocessor. That means that you change address by programming the microprocessor with a different hex file. Not as flexible, I know. But it saves money and to be honest, how many times do you change the address of your feedback modules once it’s in place?

 

Connections

The connections is very simple. Connect the RS bus to the RS-input ports, +5 volt to power connections and your are up and running. To put an input port low or high, just connect the input port to ground, and you get a feedback signal. To use it together with a block detector, and for a graphical example on how to connect the board, please check my block detector page.

 

Schematics

The RS-bus side of the schematic is not my own design. It comes from the Der-Moba’s webpage.

Circuit - RS Feedback 1.1

 

Component list

R1 – 120 ohm
R2 – 33 ohm
R3 – 33 Kohm
R4 – 220 ohm
R5 – 1.5 Kohm
R6 – 8×10 Kohm SIL net
R7 – 8×10 Kohm SIL net
C1 – 220 uF 10v
C2 – 100 nF
D1 – Zenerdiod 5.6 volt
D2 – 1N4148
T1 – BC547
T2 – BC547
T3 – BC547
IC1 – PIC 16F1508
IC2 – Optcoupler 4N25
IC3 – Optcoupler EL817
Prg – 5×1 header connection
PCB connections if needed

 

PCB design

PCB - RS Feedback V1.1

 

Board - RS Feedback V1.1

 

Downloads

PCB Design
RS Feedback HEX V1.1.2

 

12 Responses so far.

  1. Fisherman says:

    Kollade just ditt sätt. Bra med återrapportering / uppdatering av läget.
    Min variant är med en Parallax Propeller där en av de åtta parallella processerna läser blockdetektorerna (dubbla dioder med optokopplare) med seriekopplade shiftregister 74HC597 som sedan rapporterar påRS-bussen till LZV100.
    Ser att vi har liknande koppling – som jag hittade på http://www.der-moba.de/index.php/RS-R%C3%BCckmeldebus för några år sedan.

    De övriga 7 processerna sköter växellägen, signaler med charlieplex, mm

    /Stefan – Fisherman på mjforum

    • Berry Österlund says:

      Hej Stefan

      Kul att du hittade hit. Jag laborerade också en del med shift-register på både denna kretsen, men framförallt även på servo dekodern som jag använder mig av. Till slut valde jag att använda en enklare PIC med tillräckligt med I/O’s för 16 ingångar. Mina block-sensorer som jag använder mig av har nog liknande funktion som din. Mäter spänningen över dubbla dioder (en standard brygga) och en opto-kopplare i mellan. Skall skapa en sida här också om den, och kretskort layouten som jag har där.

      Nu använder jag dessa feedback kopplingar till hela banan och de fungerar över förväntan. Jag har totalt 12 av mina feedback moduler igång. Helnöjd!

  2. Szabolcs says:

    Hi,
    I’d like to use 4 modules. How can I change address of 3. and 4. module? Thanks to your answer!

    • Berry Österlund says:

      Hello there

      Just noticed that I had only uploaded two .hex files. My bad, sorry for that. I have now created a zip with 12 .hex files in it, and it’s available in the download section above. Program your PIC with different .hex files, and they will have different addresses. The address you will get is in the filename. Goes from address 65 up to 88. Let me know if you have any other questions, or just drop a comment after you tried them out.

      • Szabolcs says:

        Hello Berry,
        You are an angel 🙂 Thank you so much.
        Did you thinking about new version with programming button? I maen a lot of modellers have no programmer. But for me it is great, so thaks a lot again!
        Szabi

        • Berry Österlund says:

          Hi again.

          I will try to answer your question about programming button, as many other users might wonder why I did the solution the way I did.

          1. It saves me programming time on the PIC. I don’t have to put in logic to listen for the DCC command.
          2. I don’t have to buy the electronics (even if it’s not that much required to solve it)
          3. Less work soldering
          4. I’m already using all the PIN’s on the 16F1508 PIC. So it would mean a different PIC.
          5. All people that will build this feedback modul needs to be able to program the PIC. Then it’s pretty easy to just use a different hex file when doing it.

          So to summarize it: I will most likely not add a programming button to this feedback module. But if I somewhere in the future do it for some reason, all information will be on this page

  3. Alain - Belgium says:

    Hello Very nice project !
    Can I use another pic model ? How do you program the 16F1508 ? ISP with which tool ?

  4. Robb says:

    Hej
    Jag tittade igenom elschemat och du har två motståndsnät som båda har ID R8, får inte PCB & Schema att lira ihop.
    Tänkte bygga en kompaktare version i SMD komponenter.

  5. Laurent says:

    Hi
    This is a very good job!
    May it would possible to have other HEX files for following adress or just to explain how to modify HEX file ( I suppose the adress is store in EEPROM part of chip) so if only 2 digits need to be change to fix a nex adress it would be nice…and easy)
    May it would be possible to change programm by this way? ( using adress in EEPROM part if not yet use)
    Other way is to publish other HEX with other adress up to 127-128.

    Thanks
    Laurent

  6. luca says:

    Hello Berry!
    I just realized your project and it works very well.
    I used a professional PCB maker to realize board and I modified the block detector from 16 to 8 inputs.
    Thanks!

  7. luca says:

    Hello Berry!
    I just realized your project and it works very well.
    I used a professional PCB maker to realize board and I modified the block detector from 16 to 8 inputs.
    Is it possible to have the source code?
    Thanks!

Leave a Reply

Your email address will not be published.

*