Showing posts with label electronics. Show all posts
Showing posts with label electronics. Show all posts

Sunday, December 20, 2015

Starlight Express

One of the first comments I received when I announced I was working on a model of the Clayton was that the light mouldings really were crying out to be fitted with working lights, and who am I to refuse such a sensible suggestion. The problem is that while the mouldings are big in relation to the size of the model they still aren't very large. Fortunately LEDs are available that will fit but they are very very small.

The smallest surface mount components I've used before are the resistors in the Hudson-Hunslet, which come in a 1206 package. They are known as 1206 as that is the imperial measurements of the component, i.e. 0.126" by 0.063" or in metric just 3.2mm by 1.6mm. For the lights on this loco I've had to go for LEDs in a 0402 package which is 0.039" by 0.020" or an eye wateringly small 1.0mm by 0.5mm. Given that those dimensions are for the entire LED you can probably imagine just how small the two contacts are that you need to solder wires to. My eyesight for close work might be quite good and I have a brilliant magnifying lamp on my desk but I don't think I would have the patience or dexterity to wire these up. Fortunately you can buy them pre-wired on eBay! This helps but the wire itself (referred to as magnet wire) is also ridiculously thin so it's still a fun challenge wiring these up.

Of course there isn't just the LEDs to wire in, but a resistor to protect them from the full track voltage (2.2K Ohm in this case) and a capacitor to help reduce flickering all of which need to be connected together and then stuffed into the small space behind the motor.


As you can see there is quite a bit of stuff, even if some of those wires were trimmed back before I finished) to get into the body so there was a fair amount of careful stuffing involved. Once the body was on the result though is this.


I could probably have used a slightly bigger resistor to drop the brightness a little further but for a loco that originally worked in a long dark tunnel this seems okay, and a bigger value capacitor might have reduced the flickering a little further, but in general I'm really happy with the result.

Monday, December 1, 2014

How to Electrify a Frog

Some of you may remember that since May I've been slowly documenting my attempts at point control (here, here, and here). All the posts so far have dealt with the mechanical side of changing the points and have completely ignored what happens to the power running through the rails.

In theory the PECO points can be used straight from the packet, but from prior experience I won't be doing that ever again. The problem is that, as manufactured, the points rely on the contact between the switch and stock rails to provide power. While this works well with a new point as soon as you try and paint, weather, or ballast the track it is exceedingly likely that the point of contact will be obscured and the power flow will either stop entirely or be very temperamental. On Jerusalem, I had no end of problems with the one scenic point and no amount of careful cleaning would give me a reliable point. The solution to this is to perform a small amount of surgery on the point so that we no longer rely on the contact between the rails to transfer the power.

Before we start altering the point we need to ensure some consistent terminology so that the instructions are clear. So here we have an annotated photo of a right hand PECO crazy track OO9 point.


Now that we are all on the same page here are four simple steps to upgrade the point.

Step 1
Counting from the vee end of the point, use a small razor saw to remove the webbing from under the inner vee rails between the first and second sleepers and also the webbing from under all four rails between sleepers six and seven (helpfully these are the sleepers with writing on the bottom). Be careful not to cut into the rails and try and make sure the sleepers don't slide along the rails.


Step 2
Add a small amount of superglue (the runny kind not a gel) at each point indicated in the photo. Capillary action will help draw the glue into the gap between the rails and sleepers and will help to hold the point together. Once the glue has dried use a small file or fibreglass pen to clean the newly exposed rail surfaces.


Step 3
Solder three wires to the rails as shown. Do not rush this stage as it easy to destroy the point by getting it too hot. My approach was to wrap as much of the point as I could in wet kitchen paper and to allow the rail to cool completely between soldering each joint. The three wires give you access to the track power (red and black) and the vee (white) and can be wired directly into most accessory switches found on point motors. If you don't need access to the track power (i.e. you are feeding the accessory switch from a power bus) then you can remove the left over black and red wires just leaving the bridges between the switch and stock rails.


Step 4
The final step is to electrically isolate the frog and vee from the switch rails. Use a small piercing saw to cut the rails just to the right (when viewed from below) of the sixth sleeper. If you can avoid cutting the webbing then the point will be stronger but I found this impossible with the saw I used. The point can now be connected to the rest of the track not forgetting that you will need to use isolated rail joiners on at least the two vee rails to avoid a short circuit.


When viewed from the top the changes appear minor and the wires can easily be dropped through holes in the baseboard out of sight. The main advantage, as discussed earlier, is that the point can now be painted and ballasted without worrying about retaining a clean contact surface for the switch rails as they are always at the same polarity as the accompanying stock rail.


I'm not going to go into the issue of wiring the point up as this has been covered elsewhere (a quick search for DCC friendly point wiring will set you on the right track) and can be done in a number of different ways depending on the switches etc. you want to use. At some point I'll wire these up to the Cobalt-S lever and have the power switched over at the same time as the servo moving the point, but I know some people will prefer using a micro-switch activated by the moving tie bar etc. Whichever option you choose if you've followed these steps, and not destroyed the point (I killed at least three before I got this worked out) then you should never have an electrical contact issue ever again!

Monday, September 15, 2014

Changing Points ... With Style

Back in May I started looking into how I would operate the points on the OO9 gauge layout I'm intending to build. I made the decision to use a servo to throw each point and wrote two posts, one on the electronics and one on actually using the setup to throw an OO9 point. The one thing missing in both of those posts was an actual switch of any kind; I triggered the point throw by simply pulling one of the Arduino pins to ground with a short piece of wire which is clearly not a long term solution. The second of my railway related birthday presents (the first being the Heath Robinson book) has solved the problem in a very stylish fashion.

The solution to the problem is a Cobalt-S switch lever from DCCconcepts. Essentially this is a simple combination of a momentary switch and two SPDT switches, but it is packaged to look and work like an old fashioned point/signal lever. Of the nine wires I've currently just used two (one half of one SPDT) to trigger the electronics.


The angle of the video doesn't really show off the lever at its best although it does nicely show the lock mechanism. I've also yet to paint it or attach the rest of the detailing parts, but I think we can all agree that it's quite a stylish way to change the points. I'll need to pick up another one at some point as I'm planning two points on the layout but that is one more decision taken.

Friday, May 23, 2014

Action at a Distance

So I've done a bit more work on the point control in that it will now actually throw an OO9 gauge point. This is achieved by attaching the servo arm to the point tie bar using some 0.5mm diameter piano wire running through some 2mm diameter aluminium tubing (both from Albion Alloys) to keep it in place; i.e. a proper wire-in-tube system.


Everything is currently just held down with double sided tape but that seems to hold well enough for experimentation. I could have glued the point down though as I won't be using it on the layout having damaged it beyond repair when soldering on the wires (one of the sleepers is so buckled that the switch rails don't line up so things derail) but it works for this purpose. I found using the second hole from the end of the servo arm and a rotation of 10 degrees was enough to nicely throw the point. The calibration was a bit hit and miss though so I need to work on the software on the Arduino to make that a bit more user friendly but so far I'm happy with how it is all working. If I can figure out how, I might slow down the action to be a bit more prototypical, although that might be tricky given that I'm still relying on the spring in the points to help complete the throw.

Next up will be checking that I've understood the frog switching wiring correctly by attaching the three wires from the point to the relay and checking for the expected power flow through the point.

Thursday, May 22, 2014

Preparing To Throw An Electrified Frog

Please note that no amphibians were harmed during the production of this blog post!

I'm afraid that now the disclaimer is out of the way, the rest of this post will probably turn out to be quite boring in comparison; the title is accurate but rather misleading.

While I may have finally settled on a plan for the new layout (and no one highlighted any obvious problems with it) there are still a few other things to sort before I can start laying any track. The main outstanding issue is the matter of how the points are going to be controlled.

On Jerusalem I used a wooden dowel as a manual point control (think of it as a poor mans wire-in-tube control). This approach is both cheap and simple but it does have a few down sides. Firstly it can't be operated automatically and on Jerusalem at least I can't reach the lever to operate the point while stood at the front of the layout watching the trains. While I could fix one problem by extending the control so it could be operated from the front or the back of the layout that still doesn't allow me to control it automatically.

The other problem with the points on Jerusalem is that they rely on the switch rails to transfer electrical power and I've found that this really isn't very reliable, especially once they have been painted and ballasted, no matter how well I try and clean them. Many layouts solve this problem by switching the power externally to the point, often by a micro-switch connected to the tie bar so that changing the points changes the polarity of the frog (the frog is the point of the vee where the two lines leaving a point meet).

Given my current plan for powering the tracks I decided to try and create a simple electronic circuit that would combine changing the points with switching the track polarity. To produce the mechanical movement necessary to change the points I've opted to use a small 5v servo although I have yet to finalize exactly how I'm going to mount them to the layout and connect them to the points.

If you switch the track polarity using a normal switch it needs to be a SPDT (single pole, double throw) and such switches are also easily available as electromechanical relays. I thought they should also be available as integrated circuits which would draw less current than a relay, but after a long search and a long discussion on the MERG forum (sorry, but that is only accessible to other MERG members) it turns out that if such an integrated circuit does exist it would be prohibitively expensive to use.

So what I now have is a simple Arduino powered setup that on a button press will switch a relay and move the servo arm. I'm actually using a double pole, double throw (DPDT) relay as that opens up a few options which I'll return to in a later post. Anyway here you can see the whole thing in action.


Each time I "press the button" (rather than a button I'm just pulling the pin low by shorting it to ground) the servo switches to the other position and the relay changes over; hopefully you can here it click in the video over the servo whine. I've currently got the servo switching between 45 and 135 degrees so there is obvious movement. Obviously I don't need that much movement to throw the point, so this will need configuring once the servo and point are connected. You can also see that the light on the Arduino goes on and off to signal the position of the servo and state of the relay, which will be useful on a control panel for showing the position of the point. At some point I'll remove the need for the Arduino (like I did for the flickering fires in the mill on Jerusalem).

While it might not look like much, I'm quite happy with how it all works as I can see how I can combine this with some other ideas into an integrated control panel which should give me both full manual control over the layout as well as the possibility of running some trains automatically. Next up will be connecting this up to an actual point and configuring the servo properly.

Friday, March 28, 2014

A Whole Brass Band

I didn't think I'd have anything to write about today, because I've packed my modelling stuff away for the weekend as we are having family to stay. Fortunately the post brought something interesting for me to talk about.

Some of you may remember that one of the things that grabbed my attention at Barrow Hill last September was the Model Electronic Railway Group (MERG) stand. Having signed up not long after, I received my first journal just before Christmas and found it a fascinating read. While many if not most of the members have far more electronics knowledge than I do, I did notice a lack of articles around using the Arduino to control various aspects of a model railway, something I've been playing with for a while, and so I thought I'd write and submit an article.

In the end I submitted two articles both of which were accepted, and both of which appeared in the journal that arrived with today’s post. The first article explains how I produced the flickering flame effect for the mill on Jerusalem, which I've talked about on this blog before. The second, longer, article focused on how you would go from a prototype using a full Arduino to a cheaper standalone circuit which is probably of more general use (while this was a new article it drew heavily on what I wrote on one of my other blogs, here and here).

Sorry for this being a bit of a trumpet blowing post, normal service will resume after the weekend.

Sunday, March 23, 2014

Motive Power

Those of you who have been reading this blog for a while, might remember that the main motivation behind modelling Jerusalem in N gauge was that I wanted a roundy-roundy layout where I could just watch the trains go by, as I'm not really into the whole shunting business. This preference for just sitting back and watching the trains hasn't changed which leaves me with a bit of a problem, as the new layout is so narrow that it could only ever support an out and back style track plan and personally constantly turning the controller on and off to operate such a layout sounds seriously tedious. To try and solve this problem I've been experimenting with some electronics to see if I can control the layout automatically for those times when I just want to sit back and watch.

What you can see here is my first attempt at controlling the locomotive automatically. The basic idea is that it simply runs the train in one direction for 2 seconds, stops the locomotive, waits for a second, and then runs in the other direction for 2 seconds before repeating the process indefinitely; currently for some reason the locomotive travels faster and hence further in reverse than when going forwards, even though the power supplied is the same.

Given that this isn't a post on my code/electronics blog I'm not going to go into the full details here, but essentially I'm using an Arduino UNO with a L293DNE integrated circuit acting as a H-bridge to provide power to the tracks (the messy collection of wires to the left of the track). Power comes from standard transformer that provides 12V DC at 1.5A, and the speed of the locomotive is set by using pulse-width-modulation (PWM) to vary the duty cycle of the output (i.e. the percentage of the time the power is on versus off). This arrangement seems to work reasonably well, although I have found that the Kato chassis doesn't work as well as I'd hoped at low speed (even with a standard DC controller), although adding some weight to the body shell in the form of Liquid Gravity has helped a little. Interestingly if I put my N gauge locomotive onto the track it performs much better at slow speed. Does anyone have any hints on getting the best out of the Kato chassis (it's model number 11-104)?

Of course basing the change on direction on time is never going to be particularly accurate, especially given that the speed seems to change based on direction, so in practice I'll need some way of determining when the locomotive should stop and reverse direction. My current plan is to re-use some of the ideas from my scale speed trap to sense the presence of the loco at certain points on the layout and then react accordingly.

Sunday, October 27, 2013

The Man From M.E.R.G.

So I realised that while I've done six posts recently about my trip to Barrow Hill Live, as yet I haven't shown you a single model railway! So this post will show a model railway, but something a little out of the ordinary.

According to the programme there were 11 layouts on show and yet the one I found most interesting wasn't listed as it was part of the Model Electronic Railway Group (MERG) display stand. Now I've messed about with some electronics on this blog, but my efforts pale in comparison to those on show here. What you can see in the photo is a DC layout (no fancy computer control) which is fully automated by the stack of electronics in the centre. Essentially the track is broken down into a large number of independent blocks each of which is controlled by a MERG SuperBloc board which ensures that two trains can never try and occupy the same piece of track, as well as controlling the signals and updating a layout diagram running on the laptop (from the discussion that was all the laptop was used for given that the system was DC and not DCC).

It was great fun to watch with trains running at different speeds being held at signals until the next block was clear, and the guy who had built it was happy to explain and demo how it all worked. I probably spent no more than a few minutes in front of each of the actual layouts on display, but nearer half an hour talking to people on the MERG stand. No surprise then that I've become a member!

If I ever have enough space I do have plans for a large layout that would require block level control due to the track plan so I can see me a) building a number of their kits and b) asking for advice on the forums when my limited electronics knowledge runs out. Hopefully I'll be able to give back by helping more on the software side of things.

Thursday, August 8, 2013

High Flying, Adored

One thing I haven't talked about so far on this blog (other than a brief disparaging comment) is how I'm supplying power to the locomotives. I'm currently in possession of five controllers (two of which are the cheap and nasty Hornby starter controller) but I have a clear favourite; the Hammant and Morgan Flyer.

There are a number of reasons I really like this controller:
  • It's the controller I remember using with my first train set.
  • It's reassuringly well built. You could probably kill someone if you hit them with it!
  • It's a centre off controller
  • It uses a continuous speed dial
  • It isn't a PWM based controller
  • The illustration on the box is exceedingly dated!
I'm sure everyone will have their own preferences that may well not match with mine, but I think most would agree that they really don't make controllers like this anymore.

The problem is that PWM based controllers are cheap to build (I did experiment with using my Arduino to controller the locomotive which should give you an idea on cost) and so they dominate the market. The problem is that they tend to make the motors in modern models buzz loudly as they essentially turn it on and off rapidly. It is possible to tune the PWM frequency to reduce the noise but in doing so you lose some of the benefits (low speed control seems to suffers quite badly).

The Flyer, however, is based around a large rheostat that gets satisfyingly hot in use as it dumps a lot of the current as heat. The downside is that you wouldn't want to leave it plugged in unattended... just in case. Also it is quite large in comparison to more modern controllers. Of course, it's my layout and I'll cry if I want to I'll choose which controller is used.

Saturday, July 20, 2013

No Smoke Without Fire

In the previous post I showed you the flickering fire and smoke effects I'd added to the scalescenes.com factory I've built for Jerusalem, but I left out one detail; the control board.

I did mention that the power comes from a 19V DC power adaptor liberated from a cheap OO gauge train set, but here you can see how that adaptor gets included in the setup. Yes this is what I was really producing when I was experimenting with laser engraving.

The datasheets for the power socket and switches contain accurate dimension information which I used to design the control board using the same techniques as the previous example of laser etching I showed. Even given the precision of the laser cutting and the accuracy of the dimensions I was slightly surprised when everything fitted together perfectly on the first attempt.

The final task was to wire everything together to provide power for the fire and smoke. Given that you can't really have smoke without fire, I've connected the switches so that you can turn the fire on without the smoke, but to get the smoke working as well you need to have both switches turned on. I'm really happy with how this all turned out, it's just a shame that the control panel will be hidden behind the backscene out of view when the layout is finished. Mind you I do have three more control panels should I wish to show them off (I thought I might need to modify the holes slightly and didn't know how resilient the acrylic would be so used up the small sheet with some spares).

Friday, July 19, 2013

The Flickering Fires Of Hell

In an effort to imbue my layout with a little more life I've added a couple of new things to the dark satanic mill; the flickering fires of hell and associated smoke. Neither fire or smoke is easy to capture with a photo so I've made a short video that should show the mill come to life.


If you've watched the video I'm sure that some of you might be interested in how I've produced the effects. I'll start with the smoke as that is easier to explain.

To produce the smoke I've fitted a Seuthe smoke generator inside the chimney (it's about 1cm from the top). You can see the smoke generator in the photo to the left; this was taken while I was testing how it works. It is actually very easy to use, you simply add a small amount of smoke fluid to the chimney using the supplied syringe and then apply electricity; it requires quite a bit of juice and I'm powering it with a 19V DC supply using the adapter from the cheap OO gauge train set I bought last year.

The flickering fire effect is a little more complex. Now I'm sure that I could probably have bought something for this purpose but I decided I'd prefer to build my own solution. Essentially the flickering is produced using five bright (6 million candles each) LEDs, 1 red and 4 yellow. These LEDs are connected to a small micro-processor (this is essentially a shrunk down Arduino) that runs a very simple piece of code to flicker the lights: randomly choose one of the LEDs, randomly set its brightness and then wait randomly up to 50ms before starting again. It's simple but effective, although I think it could improved by tweaking the minimum brightness of the LEDs.

Two simple additions which, I hope you agree, really help bring the factory to life.

Sunday, December 9, 2012

Hidden In Plain Sight

Whilst I was more than happy with the performance of the scale speed trap I built back in August, I wasn't happy with how it looked. Whilst most of the electronics can be hidden out of the way the light dependent resistors (LDRs) have to be on the track somewhere. Whilst I had chosen fairly small and flat LDRs they were still quite large and unsightly. To have any chance of hiding them I would have needed to place them below the sleepers which would have permanently covered part of the working surface. So if I want to add the speed trap to a nicely modelled layout I have to find a way of fitting and hiding the LDRs.

Fortunately it turned out to be easy to find LDRs that were a better fit to the track; the VACTEC - VT935G are a push fit between the sleepers and cost me just 70p each (with a pull-down resistor included) from oomlout. This just left the small problem of how to disguise the LDRs on a layout.

When I catch the train to work I have to cross the tracks to reach the Sheffield bound platform. Right next to the crossing is a signal and, as with many signals, it is fitted with a Train Protection Warning System (TPWS). A full TPWS consists of four grids positioned at set distances from the signal. Firstly there is an Overspeed Sensor System (OSS) which uses two grids a short distance apart to determine the speed of a train approaching a signal. If the train is travelling two fast then the breaks are automatically applied. The second half of the system is a Train Stop System (TSS) which consists of two grids next to each other positioned at the signal which are triggered by any movement of the train. You can find full details of how TWPS works at this interesting web page.

While a TSS would probably place the two LDRs too close together, using two separate grids as an OSS to hide the LDRs seemed like a perfect way of hiding the electronics in plain sight. Now PECO do make TPWS grids in the right scale, but when I looked into these I felt that they were a little chunky for my liking. In reality, from anything other than close to, the grids actually look more like a set of parallel bars as the thin ties aren't really visible. The problem is that modelling such thin bars at 4mm to the foot scale would result in very very fine plastic bars -- too fine to model accurately and as a result the are oversize on the PECO grids.

Having had some success with 3D printing, I decided to have a go at creating my own TPWS grids. The simple structure was easy to model and has printed really well. While I chose to leave out the thin tie bars completely, I'm quite happy with the look of the resulting grids, and they are a perfect size to hide the LDRs from view. Once the track is properly ballasted and the grids are painted it should all come together nicely.

Monday, August 6, 2012

Scale Speed

When doing any scale modelling it is important to stick to the same scale throughout (as much as possible anyway) otherwise things start to look a bit odd. I'm currently modelling in OO gauge which means 4mm to the foot or a scale of 1:76 (although the track width is slightly wrong but that's a whole other kettle of fish). One thing that I never really considered before was scaling the speed of a locomotive correctly. Now I've always known that most of the engines run way too fast to be accurate, but I didn't really have any way of knowing just how inaccurate they were. My older locomotives tend to move at a more sedate pace than newer models. For example, the small 0-4-0ST that came with the starter set I bought goes off like the proverbial rocket.

So in an effort to try and model things accurately I set about working out how I could measure the scale speed of the various locomotives I own. Now this involves a bit of maths but it's nothing too complicated, honest!

Firstly I'm going to work in millimetres as I find both the maths easier and I have a nice accurate steel ruler that bizarrely doesn't show inches. This means that I'll end up calculating the speed in kilometres per hour (kph) although it's easy to convert kph to miles per hour (mph) for comparison with real steam engines:

mph = kph * 0.621371

Now firstly as were are going to calculate kilometres per hour we need to know what a kilometre of track at a specific scale would measure in millimetres.

scaleKilometer = 1000000/scale

We simply take a kilometres worth of millimeters and divide it by the scale (in the case of OO that would be 76 meaning I would need 13157.89mm of track to model a kilometre). Now that we know how many millimetres of track represent a kilometre we can work out what the distance between any two points on our layout represents

scaleDistance = distance/scaleKilometer

In my case I know that my two markers are 74 millimetres apart which means that they represent 0.005624 of a kilometre or more usefully 5.624 metres.

Now if I time the locomotive between the two markers I can finally calculate the speed by simply multiplying the distance the real locomotive would have travelled by the fraction of an hour that it took to cover the measured distance.

kph = scaleDistance*(3600000/time)

As an example, if it took 2 seconds to cover 74 millimetres that would be 2000 milliseconds which would be 1/1800 of an hour, which means that the real speed of the locomotive would be 10.1232 kilometres per hour or 6.29 miles per hour.

Now there are a number of websites that simplify the maths by providing you with a form where you simply fill in the distance, time and modelling scale and it gives you the speed, but manually measuring time with a stopwatch is never going to be particularly accurate, certainly not if you are trying to measure the speed of a fast moving locomotive.

The obvious solution (given my background) was to build a speed trap that could accurately measure the time taken for a locomotive to travel a set distance. I won't go into the technical details of how I built the speed trap here but if you want to build your own scale speed trap then I've posted full instructions over on one of my other blogs. All you really need to know is that I can set a speed limit and then a green light comes on if the locomotive is below that speed, otherwise a red light comes on. The actual speed is also fed back to the computer.

The photo to the left shows the current version installed on my layout. Now I know that it isn't pretty, but all the electronics apart from the two small sensors on the track could be hidden away off the layout so for a prototype of what I'll eventually include in my layout I'm happy with how it's turned out. In the photo you can also see one of my other locomotives which I haven't mentioned before. This is Mallard in BR green livery. Given Mallard's history she seemed the perfect locomotive with which to test a speed trap!

So how fast can the locomotives I own (or at least the ones I've blogged about so far) actually travel. I decided to measure the speed of each locomotive under two conditions: the locomotive on it's own and when pulling a train, which in this instance was made up of four LNER teak panelled coaches. In both cases I allowed each to run around the layout ten times and then took the highest recorded speeds which were...
Speed in mph
Engine OnlyA Train
CR 0-4-0ST163.38128.37
Mallard144.42118.68
Flying Scotsman110.3697.52
L&YR 0-4-0ST93.8856.96
Duchess of Abercorn84.4367.97

Now I think we can all agree that there is something seriously wrong with those numbers, i.e. running the locomotives at full speed means they are moving way two fast. Malard holds the world record for a steam locomotive at 126mph so nothing should be travelling faster than that, and certainly not a Caledonian Railways tank engine!

One thing to note from that table is that while it is sorted by decreasing speed of the loco only run, it's also ordered in the second column apart from the L&YR 0-4-0ST. The reason for this is that the engine is so small and light it doesn't have the weight to really pull the coaches, you could see the wheels slipping on the track. If I added some weight to the locomotive it could probably pull the coaches faster even though it would be heavier.

So now I know that I really don't want to run any of the locomotives anywhere near full power, unless I want to try and recreate Mallards record breaking run. Once I've decided exactly what my layout will include (rural or urban etc.) I can decide on a reasonable top speed and programme the speed trap accordingly so that I can keep an eye on the speeds and make the model as accurate as possible.