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.

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

ARDUINO UNO or clone. It also works with a MEGA. With smaller modification of the code it can be also build with a ARDUINO MINI PRO. www.ebay.com/itm/300948763268 (relay included in this special offer)

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.

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.

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?

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.

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

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)

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.

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.

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.

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.

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 for posting this. I am struggling though to get it to work. I build it using your plan and uploaded the arduino sketch. The current measurement does not seem to work. Ampere is always sampled at around 18182.00 with or without load. Do you have any hint where to start investigating?

That value is so far out of range that my only idea is, that there is something wrong with the ACS712 module itself or with the wiring. Also the power-supply for the module should be checked. Does the value change when you disconnect the module?

That value is so far out of range that my only idea is, that there is something wrong with the ACS712 module itself or with the wiring. Also the power-supply for the module should be checked. Does the value change when you disconnect the module?

Regards

Markus

Hi,

My multimeter reads 550mA when the turntable is turning.

I simplified my setup to find the error and left only the ac712 on pin A2 and made a simple test sketch. analogRead will return values between 250 and 260. If I connect the AC712 without a load attached analogRead returns 876.00 constant. Putting a load on the ac712 does not change the value. I tried two different ac712 modules from two different suppliers already. I also checked if my arduino works correct. If I connect the 5V or 3.3V pins to an analog pin anlaogRead returns the expected values.

The high value from my first post is the result of this code I copied from the sketch you posted:

So far I have no good idea what's going wrong here. I made about eight of these circuits for other people and all work fine with the code above. I will build another one to check the issue (mine is installed unreachable in the layout) but this will take some days.

Just one other idea: Do you use real AC from a real transformer? Or current from a switching power supply?

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.