Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Location
    Barnsley, South Yorkshire
  • Interests
    computer programming, micro controllers, slot cars, ickle model trains, table top wargaming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

aleopardstail's Achievements



  1. bit more rolling stock arrived this morning, quartet of GF Mk3 coaches, here nicely demonstrating that the two longer sidings are not long enough for such. to be honest I really only wanted some Mk3 <i>now</i> for gauge clearance testing, at best the layout supports a 2+2 HST which to be fair looks to my eyes a bit silly anyway. still, they are quite nice have also etched boards for more IR sensors, will drill these later, track loop needs three more currently which once tested can see the outer loop fully secured down. also have some conductive paint so plan to try a 10k resistor retro-fit to a coach and see how the detection system handles it (and to try a comparator based current sensor in place of the current ADC versions)
  2. Experimentificating! this blurred mess demonstrates two things, firstly my iPhone is really rubbish at close up photo work, and secondly that it is possible for me to create a small circuit board and hand solder 0603 surface mount LEDs more amazing was that is actually worked, this is a prototype for a 4 aspect colour light signal head. it has shown me a few things, mostly I need a better way of cutting the board for things this size, also that I need to find a slightly different way to actually wire it, may enlarge the upper side of the anode solder pad (top in the pics) so the wire can come out the side to wrap around to the rear of the board where they can be twisted (the wire is enamelled)and then fed down the inside of a narrow brass tube. the PCB is 0.4mm thick, in theory double sided but only using one side here (there is no way I could drill accurately enough to go through the centre of a pad) does however show that in theory at least I can make working colour light signals
  3. both long sidings, and the adjacent track section between the two currently unused turnouts now have the IR proximity sensors installed, they are now all also fully glued down. need to print off, transfer, etch, drill, cut and assemble the next batch of proximity sensors - that will give me the four on what will be the outer loop of track (each of which will eventually have a signal associated with it) and the two for the sidings (so inbound trains know when to stop before going splut). can then start to consider the inner loop, which needs another five such sensors (four blocks but one of them is bi-directional so a sensor towards each end). currently these are just being tested but not actually hooked up - same as the current transducers for the inner blocks will be installed but not fully wired up. need to revise the point motor servos to include the position sensor switches (and to be centred a bit better), means cutting some more channelling and configuring to put the mounting screws into different positions which isn't hard to do. this is the "fiddling" stage but actually quite enjoyable, now the basic techniques are down things can be installed even if the actual operation is all a bit basic
  4. slight delay, waiting for some bits. anyway, first sensor head was built and tested, it worked, so a second was built for a bit more testing in situ this time, looks thus the black painted circuit board is flat with the bottom of the track, wires down through the board, needs painting grey before the track gets actually stuck down properly. have to remember to cover them when painting the track and ballasting. hopefully this shows why I'm avoiding the ebay "IR position sensor" modules with the 5mm LED form factor devices, these should be invisible once ballasted and painted up. testing! 1.48v output without a train over the sensor head. 2.46v with a train. the head has a second ambient light sensor, it feeds into the analogue inputs on an Arduino (Uno currently but will be a Nano with three connected and the I2C pins clear), this means if the light is brighter I can use the ambient to provide a differential sensor spotting either the reflection or the shadow the vehicle casts. only mode to the coach is a bit of white paint under the coupler housing, it will "see" a train without that but the delta is much less so this is a bit more reliable. if this was OO I'd use a PCB sleeper with the sensor and emitter mounted directly to it now I know the sensor head works I can build & install others, the below board gubbins can come later, this has been the hold up for track laying
  5. Sensor V3 prototype board ready for etching easy enough to change it and make another one, so I did, etch likely tomorrow (I hope), build next week, need more 0805 resistors. note the design now has the pull down resistors and the current limiter for the LED on board. Ambient sensor (two sets of squares along the bottom) is a bit further from the rails, the four circle are between sleepers outside the rails, sensor and emitter back adjacent in the same sleeper gap - will also be angling the emitter and sensor slightly to try to get a better reflection
  6. Second version of the sensor head assembled today, this one moves the LED current limiting resistor and photodiode pull down resistor to the head itself, simplifying using it considerably, have also added a second phototransistor that sits adjacent to the track - this one to pick up an ambient light level. Idea being to use the different between them to detect a train. Still feeds into an arduino, results are mixed, this design puts the emitter and detector with a sleeper between them which I don't think is a good idea now. measured voltages back are lower (the sensor isn't getting enough of the light bouncing back) room ambient light and the sensor head (between sleepers) picks up 0.01v, basically its seeing nothing, the ambient sensor seeing 0.03v. move the white painted part of the train into view and as expected ambient doesn't really change, the sensor head is now seeing 0.11v so the delta between them changes nicely. the difference now is when the light is brighter, bringing a desk lamp near and ambient reads 0.13v, with the sensor reading 0.11v being the white bit of the train in and again the sensor sees the same 0.11v, hmmm.. however, as the shadow of the rest of the coach passes the sensor now drops to about 0.04v, so now the readings are the other way around but the variation between them is still enough to detect a train the first version couldn't cope with brighter ambient lighting as it would see a higher voltage and register a train. ok, more work needed on the sensor design to get the emitter and detector closer together in the same sleeper gap, I want the voltages back to where they were before up to about 1.5v, or maybe slightly higher, will also move the ambient sensor to be slightly further out to avoid some of the shadow falling over it. ironically the surface mount stuff may actually be a bit too small, as in shallow profile, could do with being nearer the top of the sleeper than the bottom - may be worth adapting the sleepers with a file to reduce the profile where the circuit board will end up. basic concept works though and once ballasted would be essentially invisible unless you knew where to look
  7. Experimentation updates, parts arrived earlier to assemble the IR sensors, so the first prototype have been assembled and tested. here it is post assembly but before painting, the two 0805 SMD components in place (both from Kingbright, a KP-1202F3C 0805 infrared emitter LED and a KP-2012P3C 0805 infrared phototransistor - the two being designed to work together). they are meant to face each other to act as a photo-interrupter however here being used to project a cone and catch a reflection. initial testing showed light bleed between the two, so the head was painted (it was going to be painted anyway) this left just a small window exposed, when tested with an arduino and a couple of resistors (a 180 ohm for the LED and a 10k pull down on the phototransistor - limits current flow nicely and the extra response speed isn't needed here for a lower resistor), this works, could see a bit of paper up close. this is the basic test setup, the arduino is set to measure the analogue input for the sensor voltage, 0-5v, this to provide an idea of the range we will get - eventually this will go via a comparator and a reference voltage for each sensor, of which more below. initial test, the Arduino on board LED is set to illuminate at about 0.75v (found by experimentation). the 0.5v reading is essentially ambient light being picked up as the sensor is pointing directly upwards. sliding the coach along a little reading goes up as the coach underbody reflects a bit of light - the issue is the underbody is black, which absorbs the infrared light, so the underside of the coupler housing has been painted white, also tried a bit of the actual underframe, which while it can be seen is a bit too far to be easily distinguished from ambient light levels, I suspect it will work better in darkness. so it works, mostly, I was going to give each sensor a fixed reference voltage (well a potentiometer but designed to set & forget between 5v and 0v). I think I may consider a reference voltage that includes a second sensor for ambient light, hence we check for a threshold as a percentage of the ambient light level, not hard to do, just means having a few ambient sensors dotted about, then hooking the potentiometer to the output of them, will have to experiment. anyway, a bit more work with this one and will install it into the actual track to test it in more detail. Not too bothered if I end up putting a bit of white paint on the bottom of coupler housings to make it work reliably.
  8. I did wonder about just having more blocks and working it that way I have to say - when I started out I wasn't too sure how well the block detection would work so thought of the split with both block and IR sensors, I think on a larger layout I'd just use the block ones
  9. to be fair MS Paint isn't exactly known for circuit drawing but it was to hand, yes current transformer. have had a few other ideas on the detection circuit side of this which I'll be experimenting with which is likely to cut out the ADC module
  10. managed to sort the PCB issue out, went with a wet chemical transfer method that worked pretty much spot on 8:3 mix of Ethyl Alcohol and Acetone, pattern printed on a bit of a magazine (thin glossy paper), pattern placed over the cleaned board and the chemical mix drizzled over the back. left for a few seconds (long enough to recap the bottle really), then pressed down through a bit of kitchen roll, came out as above, nit perfect round the edges but the important bits worked. when the weather cleared up Saturday I had a go at etching it came out very nicely, better than my accuracy with the drill at least *hangs head in shame*, will get there though. for scale with a bit of N gauge track will be ordering some bits later this week to assemble them, planning to try the HW-201 infra red proximity module boards but also a custom circuit as I want to add a bit of hysteresis into the response to save having to debounce the output before using it. have also made a (small) start with some scenery, nothing fixed in place and done mostly to get a handle on the scale and size of it Metcalfeville strikes again, picked up some paints for the exposed edges to experiment with as well
  11. Still working with these beasties, added the ability to read/write to and from an EEPROM IC, its not an optimised library (it writes byte by byte and not in pages for example) but it does for what I want, its also set to 8k EEPROM only. Still not gotten round to playing with PIO though
  12. today has seen some initial experimentation with preparing the sensor PCBs, not quite successful enough to etch, but learnt a fair bit, will have another go tomorrow second attempt, better than the first but didn't quite transfer correctly. rectangles are pads for 0805 components, then circular pads for connecting wires. the four pads in a row fit between N gauge sleepers nicely
  13. It would (wood?) have been a lot heavier if not for the good denizens of this site providing some much needed advice on what would (ply?) actually work without being overkill. its 9mm ply, it could probably have been 6mm and still worked. have not tried to move it too far but on and off the desk it sits on isn't too bad, basically kneel down, slide it forwards and can get a hand on the centre of the "X" which makes a very good handle. lesson so far though: it needs handles on the sides just to make stablishing it easier, also a bit more thought about where the electrickery bits will go would have been useful - specifically how to access them during this build stage - wondering on cutting out some of the side at one end to make an access point - eventually covered by a removable metal plate that can have things like USB ports and a power connector added. there is quite a bit more to go on here as well (needs at least a low backscene on three sides and a facia on the front, indeed one end likely needs to be lower as well - but this needed to protect the scenic bits) so a few concerns about weight here, in retrospect actually going 4'x4' or 4'x3' but in two halves would have been a lot better, the design seems made for it really and would have made working on it a lot easier. still the point was to be a learning exercise. Before more track goes down (and I do actually have the rest of the track) I need to get some experiments with printed circuit board manufacturing completed
  14. space for an Arduino Pro Mini? would need an opto-isolator circuit and a power regulator & rectifier circuit to go with it but reasonably cheap and can drive pretty much any number of outputs if you are willing to add output shift registers or extra port multipliers - can do a decent number on its own though. can also get the chips on their own (inc. the SMD ones if you can work with them, these are pretty small)
  15. Bit more progress, I combined the C/MRI & RS485 code and hardware with my previous servo controller, added it all up and got this gork awful mess however while ugly, and in dire need to be fitted to stripboard and nailed on the underside of the board eventually it works, sensors still need some calibration but they work. can now drive what there is of the layout from the computer. the next step really is work on the infrared position sensors and to add some position feedback for the turnouts. there is another PCA9685 board on order which will become the early stages of some colour light signals, probably oversized mock up ones initially to get used to how they work, the layout isn't in a suitable state to add actual scale ones as yet which would be way too fragile
  • Create New...