Showing posts with label Digital Systems. Show all posts
Showing posts with label Digital Systems. Show all posts

Thursday, August 29, 2019

DIY Simple DCC Command Station for less than 20€

In our last exhibition we missed to have an independent command station to read and write CV. Normally we are managing trains in automatic mode, so command station and Rocrail are busy managing trains and we cannot stop if we need to program a new locomotive or read its data if we don't know the locomotive number it has.

So we decided to make a new module with two independent tracks and an independent command station so we can read, program and test locomotives. This module will be in the operator's side, connected to the "T" module that we use to enter or extract compositions to the main tracks.

We took profit of the fantastic DCC++ project, and just changed it to add a display, keypad and slider so we don't need the PC to perform any of the above operations before running a train in the main layout.


Disclaimer


Before continue reading, please consider the following typical disclaimer for DIY projects that applies to all this blog:

DIY projects are purely “at your own risk”. As with any DIY project, unfamiliarity with the tools and process can be dangerous. Posts should be construed as theoretical advice only. I’m not a professional, but only a hobbiest passing on ideas and tips to other hobbiests. Information and techniques I show here can change, and there can be mistakes in the information I publish, so I’m not responsible if that happens. Please consider my instructions as a guide only.


Shopping List


Arduino MEGA 2560 R3, 5€

L298 Motor Shield, 5€


4x5 matrix Keypad, 1€


Slide Pot, or linear potentiometer, 1€
We chose a linear potentiometer, but it can be a regular button potentiometer or any other kind.


20x4 LCD display with I2C controller, 6€


A bunch of DUPONT cables for the connections, 1€


Two power sources, one for Arduiono and an independent one for the motor shield. We recomend a 16Vdc 3Amp power source for the motor shild, as we found with less voltage some decoders do not respond to CV commands, or sound decoders do not work properly.

Connection


Please check first my previous post about how to mount the original DCC++ command station here (http://www.clubncaldes.com/2016/02/build-your-own-dcc-command-station-for-8.html). Motor shield needs some preparation (cutting a pad and making a bridge between pins 2 and 13).

After that you can connect the new elements (keypad, display and slider pot) as shown in the following scheme. Take into account that the keypad of the scheme is not the correct one (we are using the 4x5 keypad, see photo above these lines), but I couldn't find the Fritzing object for the right keypad:




  • Display needs 5V, GND and two wires to SDA and SCL pins of Arduino (pins 20 and 21)
  • Potentiometer needs 5V and GND in the same way, and the signal is connected to A8
  • Keypad is connected using 9 pins (from 22 to 30)
  • You will need one power source for Arduino, and an independent 16Vdc power source for the motor shield

Program


You will find always the latest version of the program to upload to the Arduino in the following link, were you can freely download from ClubNCaldes github repository and upload it to the Arduino Mega board:




How it works


I tried to make it as much intuitive as possible, but this are the main keys:

"*" ON, tracks are feeded with current
"#" OFF, no current to tracks
"F1" RUN MODE, this is the mode to run and test trains
"F2" PROG MODE, this is the mode to read and write CV in the programming track

In RUN MODE the left and right arrow are used to set the direction of travel, while the numbers activate or deactivate the functions. Speed is controlled with the slide pot.

In PROG MODE you can see a little help in the last line of the display which tells you the meaning of each CV entered (just for the standard ones like address number, acceleration, break, config...)


I hope you enjoy this simple but useful DCC command station for you own projects.


Sunday, November 18, 2018

Testing Peter Giling GCA50_AN for Arduino NANO

GCA50_AN BOARD FEATURES


Hi All! In this post I'm not showing more digitalizations, basically because I run out of decoders.... but I have a more interesting issue: the new board from Peter Giling GCA50_AN



And what is this board used for? Basically it is a Loconet interface for Arduino NANO. Probably you saw in older posts the board GCA185. You can check as an example how to build a 8 servo module with frog polarization and turnout feedback using that Loconet interface and Arduino UNO:

It's basically the same board but instead of being an standard Arduino UNO shield shaped board, it is a base board for Arduino NANO giving you the same functionalities:

- Power source to arduino via Loconet
- Sub DB9 and RJ12 connections to Loconet
- J5 and J6 connectors for standard Giling driver boards connection

It can be used as substitution of the old GCA50 board, but having Arduino connected to your Loconet bus and being able to receive and send any Loconet command, you can build any type of device: throttles, sound modules, illumination, turnout control, automation, signaling...

Club N Caldes has all the system based in two of the most famous standards (DCC and Loconet), but everything implemented in Open Source and Open Hardware platforms like Arduino.



This board has also an extra feature: it fits in a Littfinsky LDT-1 box like GCA51:



Here you can see how I tested the board connected to two of the most used boards form Peter Giling: GCA93 ( 8 port current detector) and GCA77 (Interface for turnout coils and illumination):




Make sure the jumper is properly set, depending on how you connect the board to loconet (using the DB9 connectors or RJ12):



HOW TO PROGRAM AND SET UP THE ARDUINO


First of all you will need to upload the desired firmware to the Arduino NANO board. In this case, the example is with the SVLocoIO firmware which is the firmware we created in Club N Caldes as the standard module for illumination control and sensor feedback. You can download it freely from the public GitHub of Club N Caldes:


After you downloaded it, open the sketch (sketch is the name used in "Arduino" terminology for the programs or firmwares) from the Arduino environment:


Make sure the line of code below is commented or directly deleted to use the software with GCA50_AN or GCA185 boards:



If your module was not connected yet to the computer, it's time to do it now using the USB cable. It doesn't matter if your module is also connected to the Loconet network or not, and you don't need to unplug the Arduino from the base board or disconnect anything, everything is safe.

Check in your Arduino environment that Arduino NANO board is selected and the right USB Serial port appears and it is checked:




Now you can select the Upload function from the Sketch menu or click the second button with the right arrow symbol from the tool strip menu. If everything goes ok, it will show the message "Done uploading" in the bottom strip, ignore the rest of messages:



I assume now that your GCA50_AN board is properly connected to your Loconet network and Rocrail is also running and connected to your layout. To set up the module functions, select the GCA50 configuration option from the "Programming" menu:




Clicking the Query button from the Addresses tab it should appear the module 081/001, this is the standard address for any new module (that you should change immediately to avoid conflicts with a new connected board):




In the Easy Setup tab you can read the current configuration clicking the button Get All, and change any configuration and save it again to the board with the Set All button. The configuration you see in the following screen is the right one needed for the GCA77 and GCA93 driver boards as connected in the previous photos: 



Using the test button of the last port, you can see the board responds illuminating the test led I connected:



Thank Peter Giling for your work, and congratulations for another excellent board which allows all railroad modellers who believe in Open Source Communities and like DIY to implement standard and professional digital buses in their layouts. Same greetings for Rocrail people and MRRwA for the Loconet libraries for Arduino and everybody supporting these groups.

Like always, you can order this and any other board directly to Peter Giling sending and email. All information and prices are in the following link:






Saturday, November 17, 2018

Kato 3043 EF64-0

The Class EF64 (EF64形) is a 6-axle (Bo-Bo-Bo wheel arrangement) DC electric locomotive type operated on passenger and freight services in Japan since 1964. This is an old model from Kato, easy to convert to DCC as there is room enough for any thin decoder without the need of sanding or cutting the housing:




First of all isolate the motor plates and strips using Kapton tape:



Cut the positive leads of led that will be soldered to the function wires of the decoder:



Fix the decoder in place with double sided tape and route the wires to solder, in the photo you can check the exact position of each one:



Done!!!





Kato 2027 C50 50th Anniversary DCC conversion

I was afraid of converting this beautiful locomotive to DCC, but I don't want to have my trains static in a display cabinet. This is the most detailed Kato locomotive I've ever seen, an special edition of the 50th anniversary that comes with a nice box, booklet and DVD:





To open the locomotive, everything is clipped. You don't need to unscrew anything, but for better understanding on how to open it check the following web page that has nice self explaining pictures. Doesn't matter if you don't understand Japanese:





Isolating the motor is as easy as cutting or desoldering the wires:



And you have plenty of space inside the tender, you can use almost any small N scale decoder and there is a hole to pass the wires to the main body:



Trim the motor wires to the right size and solder them to the motor wires:



Do not forget to isolate it with Kapton tape or heat shrink:



Current wires can be soldered to the little cooper plate as seen in the following photo. You will have to scratch this plate with any sharpened tool to allow tin to stick on:



And there is almost nothing more to do!!! Just one more note (I don't have photos of this step, sorry!) but I had to trim a little bit the shell to be able to close it as there is not enough space for the motor wires:


Sunday, October 21, 2018

Kato EF200 [3036-1] New Libery

Another version of the EF200 by Kato, same digital conversion as any other modern electric locomotive from Kato having the light board with smd led. In this post I'll focus just in the light board modification, as the rest is like explained in the previous post about another model of the EF200 (http://www.clubncaldes.com/2018/10/kato-ef200-3018-digitalization.html)



Any small decoder can be installed under the roof, make sure to trim the decoder wires to the exact length so the decoder will be in the right position:



The first thing to do is to find the positive and negative lead of led. For that, the safest and easiest procedure in my opinion is to set the multimeter in diode testing position. When the red test lead is in the positive side and the black test lead in the negative the led will shine. If you place them in a wrong position or make a shor-circuit nothing will burn, it is a safe method to find the positive and negative terminals of the led:



The negative terminal of leds must be isolated to connect there the function wires of the decoder (white and yellow), and the positive terminals bust be rerouted to the wheel current after the resistor. For that, I did 3 cuts in the cooper tracks (see the red arrows in the photo below) and bridged two tracks (see the yellow square):



Finally, the decoder soldered in place:



And job finished!!



Kato EF200 [3018] Digitalization

I bought this second hand Kato EF200 model model in an auction. At first sight I was a little bit disappointed because it arrived without any of the accessories (couplers, horns, plates, ....), but looking it closer it had all accessories already installed and some nice and extra enhancements like front and rear hoses and details painted like the top of the pantograph and steps.




The light board was also changed, with only one led and the resistor changed to a value adjusted for analog operation:



My first idea is to use a D&H DH05 decoder, as it fits perfectly in the space under the pantograph plastic piece.




I changed the resistor by a higher one, 680 Ohm, and installed new led in each side. I had to solder them two times as the length has to be really precise to allow closing the case (in following photos you can see the exact and final shape I installed the led). I only soldered the positive lead of the led to the hole were it picks up the current after the resistor. The negative lead will be fed by the decoder function wires (white and yellow).



Remember to isolate with Kapton tape the current plates in the point were it could make contact with the motor plates. Same for any other metallic part like led terminals:



With cooper plates and light board in place, I tin the points where the decoder wires will be soldered, I cut the decoder wires to the right size and tin them, and solder the decoder in place:
  • White and yellow wires are soldered to the negative terminal of the led.
  • Orange and Grey wires are soldered to the motor cooper tabs
  • Red and Black are soldered directly to the cooper strips in the place were the light board narrows
You can see you don't need to disassemble completely the locomotive, there is no need to access directly to the motor!




The following is the final position of the led, bended 90º:



And that's the final step mounting again the locomotive, check the point where to solder the current pick up wires (red and black) as in this way you don't need to trim or sand the shell:



And the final result!




NOTE: After 5 minutes run, the Kapton tape was not properly installed and the rail current and motor wires caused a short-circuit. The decoder burned, and I replaced it by a Zimo MX616. I'm in love with this decoder!!!!