Skip to main content

Posts

CNC Engraving and Cutting

 An Excellent presentation today at the West of Scotland Area Group today where Chic and Jim share their experiences of using CNC machines for different uses. Covering both laser and spindle based equipment, it was amazing to see the flexibility of these machines for making PCB's , cutting card models and engraving wood and perspex. The session was recorded and will hopefully appear on the WOSAG website soon. Suitable software for creating design files was also discussed.  These included DesignSpark, FreeCAD and Eagle. For drawing, the Open Source InkScape software was highly recommended. Having just started using this particular software a few weeks ago myself, I can support the recommendation. I had no idea however, of the range of extensions available for this free software. One included a .grbl  output ( pronounced Gerbil in the UK)  that would translate your drawings into the machine code file required for these CNC machines. Chic showed a few circuit boards he ...

Kit-bashing Metcalfe Card Kits

 Most of the Metcalfe kits are designed as straight or square structures, so if you need to make a building for a strangely shaped area then you need to be prepared for a little bit of additional work. For those familiar with making Metcalfe kits ( other suppliers are available) and those contemplating doing so for the first time, there are a couple of Golden rules. Rule 1 . Read the instructions carefully Rule 2. Don't throw anything away (even on completion) there tends to be additional bits of thick card ideal for bracing buildings and spare sheets of stone, tiles and brick paper. Get yourself a bits box and hold on to them. For this article I am building an N scale Railway bridge (PN146/7) with the additional problem of it crossing a curved double track as you can see above.  Ignore the trains underneath in the holding area. That will be hidden before final installation. I initially built the thick card bridge former ( square structure) and set it aside to dry. Testing on ...

What is Arduino

 With groups in our area having smaller attendees at Zoom meetings, we decided to try a multi group session so that our speakers would benefit from a fuller audience. On Sunday 14th January The Scottish Border Group, Cumbria Group and North Wales Group joined together for our first joint session. This worked very well, with our speaker, David Roberts giving an excellent talk on Arduino hardware delivered to around 24 members. For those who missed it, it is available on the MERG website on Channel 36 of MERG TV Some Arduino software tutorials are available on the MERG website and there is an Arduino Special Interest Group for those interested. If you want a well structured, beginners course for absolute beginners, I would suggest Paul McWhorter as a starting point.

PMP 5 Logic Probe

 Davy Dick's  PMP 5 Logic probe is a really useful piece of testing gear to establish the logic output of a 5 Volt circuit.  The original kit is built on stripboard and requires three tracks to be cut which can be problematic for some. It may be useful, particularly at exhibitions, to show the status of a digital signal being output from one PMP Kit to ascertain how the next circuit should respond.  A good example of this would be PMP4a (Shuttle Add on) driving PMP 18 (Ezy-Points). To avoid any confusion of polarity, I arranged for the Power and Logic headers to be made available at both ends of the circuit and colour coded them as follows. Red  + 5Volts  ;   Black 0 Volts common ground  ; White  - Logical Output to be tested All the tracks in my version are continuous and will fit on the same board provided in the kit. Obviously, the component layout have been changed slightly but still follows the original circuit diagram. A common str...

Safety in the workshop

 An excellent presentation by Dr. Craig Lennox on workshop safety at today's West of Scotland area group meeting. An amusing but nevertheless serious video was followed by a detailed talk on safety and first aid. I am hoping this talk will be made available on the WOSAG website in due course. The take home message is to ensure your workspace is well ventilated, tidy with no trailing cables. Plan what you are going to do using appropriate tools, avoid distractions and don't rush A clear head is essential. Use PPE where necessary for example ear protection, safety glasses and laser glasses. The risks of burns, cuts, electrical shock and inhalation of dust and fumes were all covered in some detail. Automatic External Defibrillator (AED) are now installed in most supermarkets. A short video was shown illustrating just how easy they are to be used. Excellent talk.  Keep safe everyone.

Automatic Station Lights

 Following on from the station lights blog I published awhile ago I have now have the lights coming on automatic when a train comes into any of the four tracks using a Arduino Nano As I have some spare Ezybus boards I used one of these to do all my connections to the Nano, it also has a 12 Volt input to power the Nano As my layout is DCC I am using a MERG PMP7 for train detecting, which uses a opto-isolator, to control the LED on the control panel. One side has a voltage on, in my case 5 Volts with a dropper resistor which brings it down to about 3.5 Volts, the other side is connected to ground 0 Volts. One of the Nano pins reads this voltage, if it is 3.5 volts it does nothing but if it at 0 volts it switches on another pin on the Nano. I have used 4 PMP7's for the 4 tracks and used 4 pins on the Nano ( one for each track ) if any of the pins goes to 0 Volts it will switch on the output pin, this in turn switches on a replay to power the LED's ( I have not used the output pin ...

Push button Ezypoints

 A few months ago I produced a batch of Ezypoint kits for our local members to overcome a shortage in the Kitlocker.  At that time the kit was produced on stripboard which some members find problematic. An additional PCB board normally available from MERG was not available either.  Alan Turner ( the PCB designer) had only a few boards available but graciously provided me with the gerber files to allow me to order PCBs directly from China . Having sourced all necessary components, the kits were duly made up. I find this simple kit is really useful for automation projects. A toggle switch provides either a HIGH or LOW on the PIC input pin to determine which of the two servo positions is selected. For a particular application, I wanted to use a push button to toggle the position on alternate presses of the button. This involved a rewrite of some of the code in the PIC. I initially developed the program using an Arduino as a means of testing the logic. When this was successfu...

Solenoids

 Today's West of Scotland talk was on Solenoids. Soenoids are still extensively on some model railway layouts. H&M, Peco and SEEP are common manufactures. Some early controllers have a 15v ac supply which can be used to operate the solenoid. Push buttons or passing contact switches are normally used to operate solenoids due to the large  operating currents involved. These passing switches are expensive at around £9 to £16 for every single point. With the voltage drop across the solenoid a higher voltage is sometimes used supplied by a Capacitor Discharge Unit (CDU) The circuit of  a typical Gaugemaster CDU was discussed costing around £15.  Davy then showed us an equivalent Veroboard version for around 71p that would work with a centre off SPDT switch.  The MERG dual CDU version using a simple on/off switch uses a circuit that operates the solenoid and charges the opposite direction capacitor at the same time. If this unit is placed near the point only a sin...

My Module doesn't work

 This evenings Virtual Area Group meeting covered what needs to be done when your MERG Kit does not function after assembly. Simon West was our presenter and informed us that almost 90% of problems is down to poor soldering techniques. A timely article from Martin Perry has appeared in the December Journal and is well worth reading. Make sure you have done all the preliminary tests as outlined in the building instructions. DO NOT plug in IC's until these tests have ben completed. It is essential that the orientation of components is checked before applying power to the circuit. This is essential for diodes, electrolytic and tantalum capacitors. Fault finding needs a logical approach and you should note down your results as you proceed. Have a reason for doing the test and refer to the circuit diagram. A basic multimeter is essential and does not need to cost a fortune. (About £3.50) A very decent version is available for under £20. Do not be afraid to contact other MERG members. Th...

Electronics 2

 On Sunday Davy Dick ran an online version of his Electronics 2 course. Normally he runs them at his home with around six or seven attendees which gives plenty time for questions and the opportunity to see and touch the circuits The course was divided into three sections covering Numbering systems - decimal, binary, hex - how do we use them in our projects Digital signals • How do we store numbers (e.g. inside a DCC decoder or inside the Servo4 module) • How do we pass numbers (e.g. from a command station to a loco, CBUS, etc.) Serial / parallel connections How transistors work  Using transistors as switches and operating high power devices. Integrated Circuits Examples of ICs, PICs Demonstrations of popular ICs. • Driving a 7-segment display • LED chasers • Route selection • Power drivers, including motors • Comparators (DCC TOTI) 555 timers - and how they are used in Pocket Money Kits How this very popular (and cheap) IC works and its three operating modes: • Bistable – as i...

Project Updates

My apologies for the shortage of posts this month due to shortage of writing time while I've been  focusing on other projects. Speaking of projects, at the last Cumbria Group meeting we were updated on two very interesting developments. Firstly Mark Bradley has made great progress on his operator messaging project which was featured in September 12 A timetable of train movements has been created initially on a card system so that operators were aware of which trains to expect or prepare for the next sequence. The movements are now recorded on  a memory card and each record is sent by the Arduino Mega via it's I2C bus to the relevant display or displays. Different display types have been tested and the records can be advanced or reversed in single steps or in tens. The code is available from Mark for those interested. A second project this time from Tony Hoath, featured a complex scissor crossing with route switching using Arduino controlled relays to ensure the relevant polari...

Mimic Points in Visual Basic

For this project, I wanted to create a moving graphic to mimic a set of points moving from one position to the other.  This Blog shows all that is needed. The first Picture shows the 6 lines needed.                                 This Picture shows the Line Properties.    The tracks are shown with 5 lines, though only the middle ones in red are involved.  The other line shown below the others is the one that actually "moves".  It is shown below the other lines for clarity only.  At the start of the Program running, it is positioned over the lower red line. In VB, each Line has properties and these are shown above.  To get a line to appear to move, all that needs to be done is to gradually change the X2 and Y2 co-ordinates of the line. This is the code for the program. The first 6 lines create a pause Function in the program, by using the Computers internal C...

Shuttle Plus or Super Shuttle?

 A really interesting project was discussed at tonight's JALSIG Zoom meeting. The Basic shuttle kit PMP4 was designed in February 2013 and remains one of the most popular Pocket Money Kits. It uses a 555 circuit as a basic timer  and changes the state of a relay to reverse the polarity of the track. Davy Dick has revisited this circuit but this time used a 14 Pin PIC (16F676) to replicate the circuit and  add a few enhancements to take advantage of the additional pins available. It is hoped that this will eventually appear as a Pocket Money Kit with PCB sometime in the New Year. Potential features include adjustable cycle times, controlling semaphore or lights using a delay or detectors set by an option jumper and incorporation of PMP4a  for shuttles with branches.   Two additional pins might be used to control crossing gates or trigger sound effects or anything else your imagination fancies. Using around 12 components and some simple coding techniques, thi...

Sound file editing

 At today's West of Scotland meeting with thirty three attendees, Chris Cosgrove showed us how he uses Audacity ( a free Open Source software) to record and edit sound recordings. The Basic toolbar contains icons for Pause, Play, Stop, Goto Beginning, Goto End and Record. Chris showed how you can select a piece of a recording, remove it and replace with a fixed period of silence.  The ability to add silence is very useful for joining two tracks together with a fade out of the first merging with the fade in of a second. Copy and Paste commands make sampling from different sound files fairly straightforward and Chris mixed bird sounds, sheep and a couple of train recordings including a reversed section to simulate the train disappearing. The Audacity help manual is very well written and covers all aspects of using the program. There are many good sources of audio files including YouTube and the following links. https://freesound.org http://bbcsfx.acropolis.org.uk Chris McCarthy ...

Arduino controlled shuttle

 Thirteen members joined us on today's Cumbria Zoom meeting where Tony Hoath demonstrated and explained his Arduino based shuttle layout which he uses for bedding in new OO scale locos. The basic Pocket Money  shuttle Kit suffers from the sudden stop when the track break is detected and the sudden start when the relay is reversed. The affect can be minimised if slow speed is selected. Tony uses a simple Light Dependent Resistor to detect the presence of a loco and then gradually decelerates and finally stops on reaching a second sensor. The circuit is shown below. As the relay is only switched when no power is being supplied to the track, a much smaller relay can be used to change direction. As the locomotive returns it ramps up to a set speed so the rather unrealistic stop / start is avoided. Tony's sketch is available below. //00 test track //1 loco to run back and forth //2 LDR,s to determine train postion. //2 push buttons. Green starts and stops operation. The sto...

Use Visual Basic to enhance the Display

 The reason that I like VB as a Programming Environment is the ease with which you can make it look nicer or Enhance the Display if you want to sound fancier about it. If we take the Red LED - Green LED Program, we can another couple of features which show the beginnings of what might appear in a mimic panel.  So the first thing we would do is to add a couple of Shapes (another type of VB Object). We put a shape beside the Red Control buttons then set the properties to :- Shape = circle Fillcolor = Red Bordercolor = red Name = Red_Circle Do the same for the second, green, shape. Then we edit the VB code Private Sub Red_Off_Click()   MSComm1.Output = "r"                   '   Sends r Switch off Red   Red_Circle.FillColor = vbWhite       '   Changes the fillcolor to white End Sub Private Sub Red_On_Click()   MSComm1.Output = "R"        '   Sends ...

Introduction to linking Visual Basic to an Arduino

 Visual Basic is an "Object Oriented" language and is a programming environment which I'm comfortable in, so I'm going to look at the steps involved in setting up a Program on a Laptop to control a simple model train layout. Using an Arduino Uno, connect via a USB Cable, the first thing is to establish communication from Laptop to the Arduino. This needs the Comms Component to be added.  This link shows how to do that.     http://www.thaiio.com/prog-cgi/0002_serial.htm This picture shows the main (functional) sections of code, along with the Program display (Bottom left) when it's running. The Visual Basic bit (top left) In VB, you add "Objects" to a form and then attach some code to each Object. Some of the Objects you get in VB are Command Buttons, Labels, Text Boxes, List Boxes.  There are many others. This example has "Command Buttons" named "Red On", "Green Off" and all that happens is when, for example you click on the...

An introduction to the FCU

 At  today's meeting of the North Wales Area Group, Alan Turner presented a basic introduction to the FCU ( FLim Configuration Utility) for controlling CBUS units. Alan began by describing the minimum requirements for a test board which is the best way to begin with CBUS so that you understand how things work before attempting to implement it on your layout. Starting with a push button operating a led that switched off when the pushbutton was released, Alan showed how this can be readily changed to a latched operation  by manipulating the Node Values. Depending on whether you use push buttons or normal switches you have the flexibility to choose either. Alan then added a new module , the CANMIOSVO which can control up to 8 servos. The end positions can  be set up and then controlled by switch or pushbutton. The beauty of CBUS is that a single event can actually trigger more than one output which would allow one switch to set a route of perhaps five points on a layout...

CBUS to Control DC Layouts

 At this mornings Virtual Area Group Meeting, Rob Thomas described how he uses  CBUS to control his OO9 layout.  He discussed the Pros and Cons of the various available systems including MERG's Automatic Train Controller, commercial offerings and Mike Bolton's Basin Speed Controller. Having opted for the Basin Speed Controller version as the basis of his project, he then looked at how he might add additional control using CBUS. Various versions were developed starting with a seven speed and stop initial project with subsequent modifications to overcome some of the problems associated with the different behaviours of individual train motors. Speed and Inertia were eventually  controlled using files created from a Python script and stored on an Arduino. He uses RFID to identify the locos so that the correct profile can be loaded to the controller. This is certainly not a beginners subject but the video is available on the Merg website for those interested.