Welcome to the forum   
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post in this topic Go to first unread post in this topic
Offline Markus Schild  
#1 Posted : 29 June 2014 19:14:43(UTC)
Markus Schild

Germany   
Joined: 14/01/2006(UTC)
Posts: 1,650
Location: Wurttemberg
Hi,

Many modellers and enthusiasts still use the old – style Märklin turntable 7186 (aka 7026 / 410 N).

I was always bored by the control with the two knobs. If you want to turn from position 1 to 5 you must observe the turntable all the time and wait until it stops at every position just to start it again.

My aim was to build a replacement for the old two – knob device with a numeric control without any modification of the turntable itself. The control device only works with turntables in good condition. If the bridge has contact- problems these problems must be solved first.


Video:


http://youtu.be/OqSXKjg1Vvk


Layout:
UserPostedImage

Large scale version of the layout:

https://dl.dropbox.com/s/blw1h9knxbh7fg8/dreh300.jpg

All parts used can be bought from China for less than 25.00 EUR.

You need

Hardware (all ebay links just as a sample. I don’t have any preference for any of the sellers):





Software:


The most import part is the current sensor: It notices when the bridge has reached a position and triggers the restart.

When the sketch is installed the first time the EEPROM could contain an invalid value for the position. After installing the sketch the keys [ * ][ 0 ][ # ] must be pressed to rewrite the start-position.
At the initial start the turntable should be in the position between 0 and 7 like on the sketch below. On pressing one of the keys [ 0 ]-[ 9 ] it rides to according position. As a first test the key [ 1 ] should be pressed. If the bridge does not travel in the right direction to reach rail 1 in the shortest way, the red and green connections on the turntable must be swapped.
If the position is equal to the key pressed the loco is turned 180°.
If something is mismatched with the position of the bridge, pressing [ * ] <number of the rail> [ # ] overwrites the position in the memory according to the position chosen. In this programming mode a LED near the USB-port flashes rapidly.
If the key [ * ] is pressed by mistake, pressing [ * ] again leaves the programming mode.

Regards

Markus

Latest version 08/2016: https://dl.dropbox.com/s...sob8t/drehscheibe430.ino

Edited by user 21 December 2016 10:25:07(UTC)  | Reason: Restored lost code

thanks 19 users liked this useful post by Markus Schild
Offline Renato  
#2 Posted : 29 June 2014 20:02:26(UTC)
Renato

Italy   
Joined: 19/03/2004(UTC)
Posts: 976
Location: Gorizia, Italy
Hi Markus,

Fantastic!

I am just starting using Arduino and this is a very cool project.

Cheers

Renato
Offline matiasdc  
#3 Posted : 01 August 2016 01:35:37(UTC)
matiasdc

Argentina   
Joined: 01/08/2016(UTC)
Posts: 2
Location: Ciudad Autonoma de Buenos Aires, Buenos Aires
Hi excellent project, i am buy things to do it, but i can´t download the codification for the arduino, it isnt in the server, someone could help me please??, thanks!
Offline ixldoc  
#4 Posted : 01 August 2016 03:07:03(UTC)
ixldoc

Australia   
Joined: 18/11/2015(UTC)
Posts: 191
Location: Brisbane,Australia
Hi Markus,
Great idea! Always nice to modify an item to improve the function.
Can I ask ( as I am not able to code), does the solenoid drop in between tracks but is immediately re-energised to keep the bridge moving to the selected one? Also is that what the current sensor detects?
Regards,
Howard.
Offline Bigdaddynz  
#5 Posted : 01 August 2016 09:31:01(UTC)
Bigdaddynz

New Zealand   
Joined: 17/09/2006(UTC)
Posts: 16,167
Location: New Zealand
Originally Posted by: Markus Schild Go to Quoted Post
drehscheibe401.zip (2kb) downloaded 155 time(s).


It seems like this file has disappeared - I get a message when trying to download "Error: Resource has been moved or is unavailable. Please contact the forum admin."
Offline Markus Schild  
#6 Posted : 01 August 2016 12:03:56(UTC)
Markus Schild

Germany   
Joined: 14/01/2006(UTC)
Posts: 1,650
Location: Wurttemberg
Originally Posted by: ixldoc Go to Quoted Post

Great idea! Always nice to modify an item to improve the function.
Can I ask ( as I am not able to code), does the solenoid drop in between tracks but is immediately re-energised to keep the bridge moving to the selected one? Also is that what the current sensor detects?



Hi Howard,

Here is the latest code: https://dl.dropbox.com/s...sob8t/drehscheibe430.ino

The current sensor detects if the motor is running: If the motor stops, the next position is reached and the program decides if it needs to restart the bridge by putting on the solenoid for 500 ms. In most cases also 250 ms work fine. This must be tested with the turntable used.

Regards

Markus

Edited by user 21 December 2016 10:24:24(UTC)  | Reason: Not specified

thanks 2 users liked this useful post by Markus Schild
Offline patrick5678  
#7 Posted : 20 December 2016 21:23:40(UTC)
patrick5678

Germany   
Joined: 20/12/2016(UTC)
Posts: 1
Location: Nuremberg, Bavaria
Hi Markus,

Awesome project. Got all the material together, but my 7186 still needs a make-over.

Studying the code: What is button A's (ziel = 17) function? I do not really understand turn=0, turn=1, turn=2.

Many thanks for your help and sonnige Grüße aus Bayern.
Patrick

Code:


 if (ziel == 17) {
      turn = 1;
    }

// other code

if (turn == 0) {
            auftrag = schritte;
            Serial.println("kein turn");
          }

          if (turn == 1) {
            Serial.println("turn 1 erkannt");
            Serial.println(schritte);
            if (schritte > 0) {
              Serial.println("schritte groesser null");
              schritte = schritte - 8;
              Serial.println(schritte);
              auftrag = schritte;
              turn = 0  ;
            }
          }
          if (turn == 1) {
            Serial.println("turn 2 erkannt");
            Serial.println(schritte);
            if (schritte < 0) {
              Serial.println("schritte kleiner null");
              schritte = schritte + 8;
              Serial.println(schritte);
              auftrag = schritte;
              turn = 0  ;
            }
          }
Offline Markus Schild  
#8 Posted : 21 December 2016 10:27:44(UTC)
Markus Schild

Germany   
Joined: 14/01/2006(UTC)
Posts: 1,650
Location: Wurttemberg
Hi Patrick,

That was an error. That version was not intended to be published. I changed the links above to a valid version.

Regards

Markus
Offline JWS  
#9 Posted : 06 January 2019 10:11:24(UTC)
JWS

Netherlands   
Joined: 06/01/2019(UTC)
Posts: 3
Location: Zuid-Holland
Hi Markus,
I am new here, a dutchman in his sixties, who has started again, and found an old turrntable on ebay, and managed to copy your arduino scheme to run the turntable. Thank you for your scheme!! As I am using (the IB for) digital controle, I wonder if I could "easily" incorporate the arduino keyboard in the digital system (with turnoff decoder?) and nessesarily (?) changing of the (brown) mass connection of the turntable motor.
I just want to thank you again and will start searching this forum for the answers on my questions.
Greetings,
Jan Willem
thanks 2 users liked this useful post by JWS
Offline Markus Schild  
#10 Posted : 06 January 2019 22:47:52(UTC)
Markus Schild

Germany   
Joined: 14/01/2006(UTC)
Posts: 1,650
Location: Wurttemberg
Hi Jan,

Welcome to the forum. Yes, I thought about integrating it to a digital environment. But I have no ready to use solution so far.

Regards

Markus
Offline JWS  
#11 Posted : 11 January 2019 22:58:16(UTC)
JWS

Netherlands   
Joined: 06/01/2019(UTC)
Posts: 3
Location: Zuid-Holland
Hi Markus,
There must be a way to replace the 4x4 keyboard entries by a decodertype like k83 or a digikeys decoder? Iam no expert on this, maybe someone else on the forum?
Cheers,
Jan Willem (double first name)
Offline DaleSchultz  
#12 Posted : 12 January 2019 18:23:59(UTC)
DaleSchultz


Joined: 10/02/2006(UTC)
Posts: 2,760
Originally Posted by: JWS Go to Quoted Post
Hi Markus,
There must be a way to replace the 4x4 keyboard entries by a decodertype like k83 or a digikeys decoder? Iam no expert on this, maybe someone else on the forum?


yes, that is certainly possible to use the output of a K84 type decoder as an input to an Arduino type device. Treat the k84 as an input switch, connecting GND with an input pin.

For people who have access to the code of their layout software, I am also extending my RemoteSign syntax to drive network connected devices. I already have it at the point where I can do things such as trigger events, dim lights in the layout room, etc., from my train control software. I need to merge the documentation for the new RemoteSign commands into the SDK and also publish the RemoteSign library so that people can add it to their Arduino sketch and start calling it.

If you also use Blynk, and can issue HTTP calls from your layout software, then you can use their restful HTTP calls to trigger anything in your sketch.

Dale
Arrival and Departure signs: http://remotesign.mixmox.com
My first layout: http://layout.mixmox.com
My current layout (under construction): http://cabin-layout.mixmox.com
thanks 2 users liked this useful post by DaleSchultz
Offline Markus Schild  
#13 Posted : 13 January 2019 08:52:40(UTC)
Markus Schild

Germany   
Joined: 14/01/2006(UTC)
Posts: 1,650
Location: Wurttemberg
Hi,

Just to describe my thoughts. This is all theoretically. It is not more than vaporware. And so far, I don't know whether I will realize it.


There is no MM-decoder with +10 functions. Using function decoders will work theoretically but will use a bunch of decoders and addresses. This will work but will be practically unusable.

I think about using an older decoder for locomotives. A MM decoder has 14 or 27 steps for the speed. These steps are realized as a pulse-wide modulation which power the motor. But these steps (the length of the pulses) could be also read by the Arduino. So, the knob on the control unit could become the control-device for the turntable.

Example: If the address of the decoder is chosen at the control-unit and the knob is turned to minimum speed for more than 3 seconds (to make the command valid), the decoder sends a pulse of X milliseconds (speed step 1) this could be interpreted as a command to turn the bridge to position A. A pulse of Y milliseconds (speed step 2) could be interpreted as a command to turn to position B. And so on. This would be at least useable also without a computer and needs only one decoder.

Foreseeable disadvantage: Due to different characteristics of different decoders this will work only with a specified decoder. Mabe only with a special decoder from one series.

Regards

Markus
Offline Purellum  
#14 Posted : 13 January 2019 10:44:04(UTC)
Purellum

Denmark   
Joined: 08/11/2005(UTC)
Posts: 2,758
Location: Mullerup, 4200 Slagelse
Cool

Originally Posted by: Markus Schild Go to Quoted Post
There is no MM-decoder with 10 functions. Using function decoders will work theoretically but will use a bunch of decoders and addresses. This will work but will be practically unusable.


If you use a M83 decoder, you can use 7 of the outputs to count binary to 127, and use the 8th. output
to tell the Arduino when to read the binary number, to be sure you're not sending a lot of numbers while the M83 switches.

Per.

Cool
If you can dream it, you can do it!

I, the copyright holder of this work, hereby release it into the public domain. This applies worldwide.

In case this is not legally possible:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

UserPostedImage
Offline JWS  
#15 Posted : 13 January 2019 23:04:39(UTC)
JWS

Netherlands   
Joined: 06/01/2019(UTC)
Posts: 3
Location: Zuid-Holland
Thank you Daele, Markus and Per, but I am afraid this is too much for me, at least at the moment. Iam thinking more to use simpel relais to connect the wires the same way when you push the matrix board. For the time being I only use gates 4,5 and 6 for the locdepot and opposite gate 8 to enter and leave the turntable. So 4 contacts to make, like 2 turnouts on a K83 but then with minirelais.......
Greetings,
Jan Willem
thanks 1 user liked this useful post by JWS
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

| Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.890 seconds.