Browsing Tag: model railroading for beginners

    How To Use A  Breadboard For Your Model Railroad Lighting
    Articles, Blog

    How To Use A Breadboard For Your Model Railroad Lighting

    August 30, 2019


    if you want to light up your model
    railroad and want to see how to get this breadboard assembled so you could do it
    easily you’re gonna want to watch this video right now I’m Tom Kvichak and this
    is Toms Trains and Things this channel was created to help other modelers who
    are in need of guidance in pursuing their dream of building a model railroad
    and we’re going to take this breadboard that I showed you the other day I’m going
    to disassemble everything on here and rearrange it and show you how to do it I
    figured out a different way of doing it when you’re doing a breadboard you’re
    putting the components on there just to test it out and to see how it would work
    and experiment with it but since I have the design of a correct I figured out a
    way to rearrange it on there a little bit better so we have the LED on one
    side of the breadboard and everything else on the other side of the breadboard
    and I also made one for the mini breadboard that doesn’t have a power bus
    along the side on each side of them so I put a little connector on there
    transferring this to a circuit board is a next step after I show you how to put
    it on these little bread boards here now that’ll be another video after this
    showing you how to put it on a circuit board something similar to this where
    you have to put jumpers on the back of it this has holes similar to what’s on
    the breadboard now you can buy circuit boards in different sizes I have I
    bought a pack of circuit boards that have I think one two three four five
    assorted sizes you can also get circuit boards that have the traces that are
    similar to the bands that are on the breadboard now on the breadboard you
    have the power buses on either end you can see how the power bus works and then
    the working area everything is common in that direction
    right there here’s the schematic diagram of what we’re working with I’m going to
    show this battery here as our power source with the plus and the minus right
    here now we have the first resistor here R 1 which is the 680 ohm resistor this
    one right here is the 150 K ohm resistor and this is the the trim pot this is our
    variable resistor this is our q1 it’s a SS 8:05 oh and this is our LED we
    could use any LED we want right there now we’ll go over to what it looks like
    on the breadboard and we’ll see the same thing over here this is r1 which is the
    680 ohm resistor this is the R 2 which is the 150 K ohm resistor and you’ll see
    that they are both connected to the positive terminal there okay now this
    680 as you can see goes all the way up to the anode of the LED which is right
    here okay this resistor right here 150 k ohm
    goes on to one leg of the potentiometer right here right there the center post
    of this one goes up to the transistor the base of the transistor which is
    right here the other leg of the trim pot goes down
    to your negative and it also goes to the emitter of your transistor now on the on
    the actual breadboard that I’m working on I moved it down to these terminals
    right here I’m just showing it right here because
    it’s it’s a little bit clearer like this but I put these two leads the base in
    the emitter right here in here and I put the collector in this one I just bend it
    up to fit over on this one right here but it’s the same thing as coming down
    like this okay and then moving this up to there but anyway that’s what that is
    right there that’s the emitter which comes on to the other side of the
    variable resistor and goes to your negative terminal on your power source
    and then the other side of the transistor which is right here goes up
    to the cathode of your LED right there so that’s the entire wiring diagram in
    there you have two fixed resistors a variable resistor a transistor and an
    LED and that’s what it looks like here I’m going to I’m just showing you one
    instance of it but when we do it we’ll put a couple of them on here and the
    video after this one we’re going to show you how to put all of this on your PC
    board we’re going to start off on his breadboard on this side we’re going to
    do a couple of them and the first thing we’re going to use on here is the 680
    ohm resistor and how we’re going to do this is we’re going to connect it to the
    positive rail and we turn this around this way so it’ll
    make it a little bit easier and we’ll just take it for the positive rail and
    then come up here like that and then we’ll take 150 K now we’re gonna not
    going to trim a lot off of here and we’ll stick it in the next slot down on
    both the positive and the working part of it now we’re going to put a jumper in
    here and this jumper is going to go on the want the opposite leg of the
    potentiometer but it’s going to go from the negative terminal so we’re going to
    put it like right here okay so now we got that you can see our potentiometer
    here and they have some slots in there to set it and it’ll set it back just in
    case there you have some wires in there and the way and we’re gonna put it in
    there is like this we’re gonna put it up as close as we can to the front maybe
    that’s a little bit too close I’ll try this one right here okay right there and
    that gives us enough in the back for our transistor we’re going to do on this one
    here we’re going to bridge the gap in there
    and move it over some but before I do that let me put this other jumper in
    here I’ll put this one right here and we’ll put that jumper right there okay
    and that’ll connect this resistor all the way up and put it on this side all
    right now with this transistor right here like I showed you
    in the diagram before we have the emitter on the side where the side of
    the potentiometer that goes to the negative this is the base and then this
    is the collector so we’re just going to put it over here we’re going to try to
    bridge this over and I might have to get this a little bit further out and so as you can see right here and let
    me use my exacto this is the emitter in this pin right here on the base of this
    one is the base of the transistor and the collector is on this side over here
    now we’re going to put our LED we’re going to take our long one and put it
    where the jumper is and we’ll just stick it right up here I’m going to stick the
    power supply on here there we go you know on these longer ones there’s no
    connection between this side and this side here so you can see that that one
    works and let me get my screwdriver these always have slots in them and if I
    would have cut these resistors down they would bend down lower but just for the
    sake of doing this we’ll show you how that increases so we’re testing it out
    right away okay so we’ll take the power off of it
    that’s our first one now we’ll go over to the next one and we’ll do the same
    thing we’ll go from here to right there here we go got it in there and get my
    other resistor put that in the next one let me get my needlenose and I’ll just
    shove that in there with that okay there we go okay so we got those two resistors we’ll
    skip one and put in a jumper and put it on the negative let’s turn this in just
    a little bit it is no there we go I think it there we go okay we’ll take
    this potentiometer I put it right here and I think what we’re gonna do here
    we’re going to put a couple of okay when we take yes see if I could find if I got
    the right length jumpers here let me put another white one over here for the one
    end of our LED Esther bend it down a little bit more I’m going to speed this up a little bit
    while I put the transistor in there and what I’m gonna do is place the
    transistor like I showed in the diagram across from the center gap so just just
    to show you that it works just like I had it in the diagram on here the
    emitter is on the left the base is in the center and the collector is on the
    right and we’ll put the LED in there so we could apply power and watch this
    thing light up again and we’ll apply the power and adjust it so we can see the
    difference in the brightness of the two LEDs and there we go the brightness and
    the dim on both of them okay there it is all the way up to the
    brightness on there let me turn the lights on here I’ll show it that way and
    then we’ll bring it down let me put it to about right there so
    you could see them so even that not quite halfway there still pretty bright
    and we’ve spent so much time on this one here that I’m not going to have enough
    time I mean we’re already at about 16 minutes going on 16 minutes and this one
    here I’m gonna do on the next one show you how to do this I’m gonna do the same
    thing you show you the diagram well the diagram is going to be the same but I’m
    going to show you how to put it on the on the mini breadboard and then after
    that we’re going to put it on the PC board like one of these right here we
    might do this one here or we might do one I think we’ll do this
    one right here we’ll see on this breadboard here you could run as many as
    10 circuits on here as far as this one goes like here I only did the two we ran
    out of time with these two on the next video I’m going to show you how to do
    this and I may show you how these transistors work to increase the
    brightness on here while we operate the potentiometers on there so take a look
    for that coming up in the future episodes and we’ll see ya

    What Connectors Should You Use For DCC On Your Model Railroad
    Articles, Blog

    What Connectors Should You Use For DCC On Your Model Railroad

    August 27, 2019


    we’re gonna talk about electrical
    problems on your model railroad and what causes it and how to fix those problems
    so let’s get going with this right now I’m Tom Kvichak and this is Toms
    Trains and Things this channel was created to help other modelers like you
    who are in need of guidance in pursuing their dream of building a model railroad
    and a lot of people have been writing to me in the past two months about their
    problems with conductivity and their wiring on their layout I’ve determined
    that most of the problems that everybody was haven’t was through their connectors
    it could be that they are not using their connectors the way they should be
    so I’m going to show you the connectors that I have here some of the ones that I
    use that I have some that I won’t use anymore and I’ll tell you why and
    basically it’s this kind right here and I think this is the kind that
    everybody’s having the problem with the suitcase connectors and I’m going to
    show you other connectors like wire nuts and these little deals right here I’m
    not exactly sure what they’re called but they were originally made for
    fluorescent fixtures where you could use on your layout also and these ones right
    here they come in two three or four conductors terminal strips the screw
    type and where you tighten the screw down on the wire terminals that you use
    on the screw type terminals this is a little red Spade connector 18 to 22
    gauge what I think it is and if you have any circuit boards or bread boards that
    you want to use on air you see me use these on another project you have a
    screw on the top that tightens down on the wire inside so we’re going to talk
    about those and I’m going to show you how to use those properly so let’s get
    going with this right now since most of the issues have been
    coming from these suitcase connectors I’m going to cover these first and the
    reason I don’t like these is as you could see down into the hole you have a
    large hole in here and if you’re using two different wire sizes say you’re
    using a 14 gauge for your bus wire and you’re using maybe a 22 gauge or 18
    gauge for your feeder wires those are have two different diameters in there
    and when you press down on this blade that’s on here to make contact with your
    14 gauge wire it may not always hit that 18 or 20 or even 22 gauge wire these
    were originally used in the automotive industry to splice in on your cables
    using the same size wires now that is why these aren’t that good using two
    different wire sizes now I don’t have a tool for it but they do make a tool for
    crimping this but I use my channel locks and as you could see now I’ll put it on
    this side where you can see that and I’ll crimp down on that all right now
    even though there’s a little slot inside there for the wire you don’t always hit
    that and your wire may be smaller than that little slot in there and not
    penetrate the insulation on your wire all the way so when that happens you
    don’t have conductivity and once you quote once you close this up and you
    forget about it and go on to the next one and the next one as you’re running
    your feeder wires down your layout and then you try starting it up and you
    don’t have any DCC signal going to your tracks or
    you have bad DCC signals this is the reason why because in that little slot
    right there and let me see if I can get any closer
    with that right in here and this one right here it’s slotted but that may not
    penetrate the insulation or it may just barely penetrate the insulation on there
    and not make good contact on your feeder wire now they make these in different
    sizes now this one the red one right here and this is 18 to 22 gauge wire now
    as you can see this is a lot smaller then the blue one now the blue one is
    probably 14 and 16 gauge wire if it uses the same color standards as everything
    else like I said if you use a 14 gauge wire and you’re using a lot smaller wire
    on your feeder wires it may not penetrate the insulation I’m gonna take
    a picture of this and pull out one of these blades on here so you can see it
    better and I’ll put the picture right up here so you can see the slot in there
    compared to the wires and that’s why you’ll have bad conductivity on your
    layout the next connector I’m going to show you is originally made for
    fluorescent fixtures and I wish I had these when I had to change the ballast
    on many many light fixtures but what they didn’t didn’t come out with these
    until later on but what I use it for is for my bus wires if I have a section of
    my layout that I know that I’m going to be taking apart I’ll use this as the
    connection between it and you could only put this in one way because it’s slotted
    and it has a ridge on the one side and you put your wires in there and
    you’re good to go and what if you ever have to move it this would be good on a
    modular layout where you’re taking the part you could use these on here and
    just put it in there for your bus wire now there’s another type that I use
    similar principle where you push it in on a contact and that art that is these
    right here now I also use this hooking up my bus wire to my feeder wires and if
    I am using stranded feeder wires I solder maybe three or four of them
    together I only use these where I have multiple wires that I need to put
    together like near a turnout or in a yard where I have multiple tracks
    together now these will go in just as easily on your bus wire it just pushes
    right in and you’re good to go now they say on this type right here that they’re
    reusable all you have to do is twist them like this and it may take some
    doing but you could take it right back out and use it over again now the only
    problem with that is if you do that more than a couple of times you might lose
    the spring action in there it’s just a little piece of metal that’s down there
    on an angle and as you put your wire in it catches it now when you’re twisting
    it around your pull and pulling it out you may Bend that back up and you may
    cause it to be wider than what it originally was so I would I mean these
    are pretty cheap and I would recommend only using them once but you could use
    them in multiple size wires like I said this is made for salt this is made for
    solid wire either one of them and it’ll take a large wire and it’ll take small
    wires the only thing with the smaller wires you have to be careful with it
    what I do is on the smaller wires if it’s not
    if it’s not solid wire and if it’s too small now a 20 gauge and I don’t have
    any 20 gauge right here but what I would recommend is on a smaller wire
    especially on a stranded wire is to is to tin the end of it and stick it in
    like that and like I said when I use it on the stranded wire I usually put maybe
    two or three together and I’ll show you a picture of what I have over here for
    this type of connector but these are good connectors for running your bus
    wire and feeder wires you have a real good connection in there and they work
    excellent wire nuts come in all different sizes here’s orange in the
    yellow and depending on the manufacturer if you have if you stick with one
    manufacturer and you know the color codes on them but you could use this in
    solid wire and stranded wire solid wire works better but you could also use it
    on stranded wire so whoever you talk to they’re either going to tell you that
    you can leave them straight like that or start out twisting it make sure your
    insulation on each one of the wire is cut close to what the other wires are at
    the same length and put the wire nut on there and twist
    now some manufacturers put wings on it to make it a little bit easier like on
    this yellow one here and you’ll see why whenever your tighty tightening down on
    some of the wires and you’ll actually need these little wings on there to get
    them tight but just from tightening tightening them like this would be
    enough to have a good connection on there they’re not gonna go anywhere on
    this type of terminal strip right here where you tighten down the screw on your
    wire now you put one on each you can put one on each side or you could tip if you
    if your wires are small enough you could put a couple of them say like if you
    want to jumper from one to another you could put multiple wires on there
    but all you do is you strip it down as far enough what I you normally do is
    measure the distance to the center of it strip it that far and then just put it
    in and all you do is tighten down on them and you’re good to go on there now
    these come in different sizes this is a smaller one it’s a European size and the
    the ones that are made in North America they’re a little bit bigger and I’ll
    show you a comparison right here you could hook up your bus wires on here you
    could even hook up your wires going to your which machines or anything else on
    your layout on here as far as the feeder wires go you can take them and cut these
    down and use these on your for your feeder wires too you could run your your
    bus wires through here and then put your feeder wire on the terminal on one side
    or on both sides now another kind of terminal strip is the screw type now and
    I put a a terminal on there already and I’ll show you how to crimp the wire on
    that terminal here in a second and all you have to do is just take your needle
    nose pliers and then just bring it around into a circle just like that you
    want to put this in the direction that you’re tightening the screw you just put
    it underneath there and then bring it around and once you tighten the screw
    it’s going to tighten your wire up also but you can see right there how it turns
    around in there you could also do that with stranded wire but it is much more
    difficult with stranded wire because the stranded wire will come apart as you’re
    doing it if you’re going you stranded wire I would suggest tinted
    so you could manipulate it just like solid wire this little connector right
    here that has the screws in it and it’s similar to this terminal strip but it’s
    made for circuit boards and if you have small circuit boards or breakout boards
    with holes in them you could use this in there and actually solder them on there
    and these connectors have a little Ridge on there so you could slide more than
    just the two together if you’ve been working with servo motors or hobby
    motors then you may be familiar with this type of connector right here this
    is what you normally get on a servo motor and on the Hobby motor you have
    the little two pins on there similar to the jumper wires that you use on a
    breadboard now these are very simple you just plug it in and they are really good
    connectors I don’t have to show you too much about them but it’s usually on more
    delicate stuff and just a regular jumper wires or the standoffs that I showed you
    in another video and I’ll show it to you on here but say you have a board now
    this is a relay board but I’ll just show you that these fit right on the pins
    just like that on if you’re using a dort Arduino board or anything like that
    they’ll have them on top now we’re going to talk about this kind of connector
    right here now this is the kind of crimping tool that I have they’re made
    in many different styles this is one of the styles that I have right here when
    you’re stripping your wire you want to make sure that you strip it shorter than
    what the insulation is right here so when you put it in there you don’t have
    any bare wires showing out the back and if you do you can push your wire in
    just a little bit so it shows through it’s not going to hurt and what I do is
    if you could see on there there is a slot where the metal is folded over I
    take my crimpers and I put the slot in the side that has the notch in it and
    just crimp them down on it like that it’s not going to go anywhere and then
    you could put this on your terminal strip right there like that I hope with
    this demonstration you come out with a better understanding of the connectors
    that are available for use on your model railroad and how to use them that’s my
    intention to show you how to make things better on your model railroad so if you
    like what you see here and would like to contribute go ahead and take a look at
    my patreon account patreon.com slash Tom Kvichak or PayPal me slash Toms
    trains and things where you can contribute to this channel where I could
    give you better videos so you could make a better model railroad thank you very
    much those that you have contributed so far I’m going to try to do a live show
    at least two of them a month either on Friday or Sunday so I’ll let you know
    ahead of time but on this Friday it’ll be coming up there
    so take a look for that and we’ll see ya

    Easy Resistance Substitution Box For Your Model Railroad Projects
    Articles, Blog

    Easy Resistance Substitution Box For Your Model Railroad Projects

    August 26, 2019


    if you do any DIY projects on your model
    railroad or in fact anywhere else this resistance substitution box will come in
    handy when determining what size resistor you’re going to need for that
    project so let’s watch this and see how to use this and see how to assemble it
    because this is a kit you have to put it together hi I’m Tom Kvichak and this
    is Toms Trains and Things this channel was created to help other modelers who
    are in need of guidance in pursuing their dream of building a model railroad
    you know that I do a lot of electrical work on my channel and I came across
    this thing right here it was a kit now I’m going to show you how to assemble
    this and then how to use this for your projects but this one is mostly about
    assembling this because it comes in a lot of pieces I do have another one if
    you don’t like to solder where it already comes assembled it’s a smaller
    version of it it has surface mount resistors on the
    back of it and you have jumpers on it and you have seven decades going from
    one ohm all the way up to one meg this is more precise because you could put
    jumpers on there and get values in between what you have on here so let’s
    get started with it right after this if you would like to see more videos like
    this about model railroading and about electrical projects go ahead and hit
    that subscribe button and while you’re at it ding that bell and that’ll notify
    you whenever I have a new video coming out so let’s get started with it right
    now and see how I assembled this little box right here we have a bag full of
    resistors here and we’re going to spread these out and we’re going to have to
    sort these up by value because we’re going to have to solder them all on here
    like that what I did on here was I took some painters tape and rolled it over so
    be sticky on both sides and I went by this chart right here and put every
    resistor in order so when I go to solder this side here I’ll have every resistor
    that I have and what I’ll do when I do it I’ll just double check it before I
    put it in there this kit comes with its own solder I had to experiment with it I
    used this little board here and I tried a couple of different tips on there to
    see and to see which one would be the best one and did some of these pads
    right here and the better temperature to do this one is a 750 degrees we’ll try
    to add on at 750 degrees with this tip right here I don’t have it on right now
    now even though they give you some free solder on here I experimented with it
    and I found it a lot easier to solder with the lead-based solder now if you’re
    you know worried about lead-free this is lead-free this is LED base this is six
    hundred fifty degrees this is seven hundred and fifty degrees it’s harder to
    solder with this even though you have it up to seven hundred and fifty degree and
    it doesn’t look as pretty I decided after soldering a few resistors to quit
    using this and I went back to using the six hundred and fifty degrees solder the
    lead-based solder and let me get my visor on so I could see this real good
    y’all on violet red and gold okay so what I’ll do is just pin this down a
    little bit here and Bend that down there and see how close that is put this in
    here and that was pretty close and whenever you push it in it’ll it’ll
    conform to wherever you want so what I do is just tip it over to the side like
    that so it’ll hold it in there I’m taking the resistors off the tape one by
    one and placing them on the board as you can see here and then I test them
    just a double check and bend the things down bend the leads down and just try to
    get them in there straight and then bend the leads over okay now we’re down to
    our four which is your our four we’re gonna do our five that’s the next in
    line so I just pick it up in our five is 220 ohm and I got my meter right over
    here and I just check it and as you’ll see there’s a tolerance on these so like
    on the 220 ohm it shows up as two hundred and sixteen point four because
    there’s a on these these are five percent tolerance so you have a little
    leeway in there and you don’t have to but I line them up all the same way with
    the the gold band all to the right you don’t have to do that because there’s no
    polarity on these but it just it looks a little nicer okay now you can see the
    backside you have although the wires on there and you you put them you bend them
    over to the side so it’ll hold the resistor in place and so he’s seen there
    night all in place nice and tight up against the board and we could even you
    know press down on it like this they do make a holder for circuit boards but I
    don’t have one yet we’re working on the the resistor board the resistance
    substitution board and I have all the resistors on the one side in place and
    I’m getting ready to solder them all I have to do now is put the flux on there
    and get my soldering iron heat it up and start soldering
    since I do so many soldering tutorials I’m not gonna make you sit through 50
    plus soldering pads on here so just showing you a few on here now and after
    doing about six resistors on here on both sides is when I decided to go back
    to the my original solder lead-based solder 60/40 rosin core I was not
    satisfied at all with the solder joints and how they looked and how hard they
    were just to solder them in place now I did the same thing for the high
    side as I did for the low side I put them in order as they are on this sheet
    right here so I could easily put them on the board I’ll put all of these on the
    board on the other side now and we’ll proceed to solder those on once I get
    them in place okay that side is much much better the next part comes to
    switch the selector switch from one side to the other and what I did was I
    soldered the two outside posts which have no electrical connection that’s
    just to hold it into place and so now I’m going to solder the three terminals
    on there the holes for the switch were so large that I just have to drag the
    solder over top of it just to fill up the hole okay now those these traces are
    really close together on there so you’ve got to be real careful check to make
    sure that there’s no solder in between the traces on the board this is where I’m soldering one of the
    test leads onto the board as you can see all it takes is a little
    bit of solder on there for it to bond so I’m going to have to try to get a knot
    all the way down as close as I can so it won’t pull out both why oh here we go I
    got it through okay but what we have to do here is have to bend I have to bend
    this tab down this is a index tab on it normally you would have a hole in there
    so this wouldn’t turn but they don’t have it they have an extra pin and it’ll
    stay on here like this don’t put this here but what we want to do is make sure
    that these things will Center on the faceplate when we solder this in so
    we’re going to take this put this faceplate on here and just tighten
    tighten it hand tight so we have them positioned in the right place on the
    front panel all right now I have to solder all these
    pins on here and then on here there will be a jumper one will go when they told
    you to cut off a inch and a half but that’s kind of long one jumper will go
    that way across this hole right here and this pin and the other one the same way
    this way right there and into that hole right there
    so that’s what we have so far but what I’m going to do is before I start
    soldering the rest of this stuff on here I’m going to take my meter and then go
    down on each one of these resistors to make sure that they are correct and they
    have continuity through them there’s a two wire jumper wires that go from the
    switch either end of the switch to the wiper on each one of the rotary switches
    here so what we’re doing is we’re taking a wire from here and bringing it over to
    here on both sides and then so we could select and then the wiper on there
    selects what resistance there is now let me clean this up a little bit on the
    back and then we’ll put the alligator clips on and we’ll test it before we
    close up the box but that’s what it looks like right there
    it’s kind of hard to do on camera so you can see it but we just take the little
    tabs and bend them over the insulation like that just to hold them in place okay let’s see the wire hanging out the
    bottom air will solder that on let’s get the Blackwell out here all right there
    we go there trim the excess wait for this
    thing to cool down and then we’ll put the insulators on it and test it now
    here’s the test I got the my probes on the leads of the substitution box and
    we’ll turn this on ohms okay so it comes up at three point two five so that’s
    three point three K ohms there’s what’s on here three point three K ohm the
    three point three K ohms is this one here to 3300 ohms so what we’re gonna do
    is just take this right here and put it there
    and we’ll turn it that way four point seven that’s gonna be 10 20 247 102 okay
    so this is a five percent tolerance so to 2334 7680 see it’s a six point six 80
    km so and one 1k ohm 2.2 K on okay well switch it off to the other side to the
    higher end okay so it says point six eight Meg so that’s six hundred and
    eighty k so we’ll get the other knob put it on right here to the 680 push it
    down that one’s just a little bit off okay there should be 1 Meg okay 6.8 K 10
    K 22 K 33 K 47 K 68k 100 k – 20 K 330k 470 K so back to – 680 so you see we got
    everyone on there everything looks good on there
    overall this was a pretty simple project of soldering all the resistors on there
    now even though there was about 20 resistors on there that you had to
    solder on there I didn’t after determining I didn’t like
    this solder here it was a breeze going back to this solder and soldering
    everything on there including the rotary switches I mean it’s it took me all
    together now it took a little bit longer setting up the camera and everything
    like that and setting up everything for the video but all in all probably a
    little bit over an hour to put this thing together so that’s not too bad so
    I got more videos coming out I’m going to show you how to use this for the LEDs
    and there’s one more type of LED that I forgot to show you about and that’s
    gonna be coming up this month also but watch for the demonstration on
    this and also I have this one here which is if you don’t like to solder you could
    use this one and this one has more precise and I also have one for
    capacitors if you want to get into really not really complex circuits but
    more than just putting your LEDs in a building the Arduino we’re gonna do a
    few videos on the Arduino so look for them in coming up this month we’ll start
    off real small and they’ll get a little bit more complex so we’ll see ya

    Easiest Way To Run DCC Buss Wires On Your Model Railroad
    Articles, Blog

    Easiest Way To Run DCC Buss Wires On Your Model Railroad

    August 25, 2019


    we’re going to continue on the DCC
    discussion about wiring your layout and I’m gonna use romex
    and that’s what I’ve used throughout my entire layout so let’s get started with
    this right now I’m Tom Kvichak and this is Toms
    Trains and Things this channel was created to help other modelers who are
    in need of guidance in pursuing their dream of building a model railroad and
    if you’re going to do DCC then it is a good idea to run your buss wires with a
    good sized wire and what I did on mine was I used some romex I had some romex
    leftover from a project and I and did my entire layout with that romex I’m going
    to show you how to strip it and how to set it up throughout your layout now it
    doesn’t have to be romex could be any wire that is suitable for DCC that is
    large enough to handle the amperage through your system so you won’t have
    any loss of signal throughout okay I got my stripper I hope it’s sharp enough
    because this thing is over 30 years old all right here’s the room that’s right
    here it’s a black and white wire with a ground wire and it has a covering over
    top of it now this is usually used in house wiring run this up on your on your
    wire and see this little little blade in there like that that just sits down on
    there and you just squeeze it down the center of it like that
    and you just pull and what it does is it strips the coating off of the outside
    like that so you have your black and you have your
    white wire and then you have a crown wire in there and you could use your
    ground wire for a lot of different things on your model railroad just
    showed it to you right here now I’ll measure this and give you the dimension
    of it so you could see what it is you could use it for pipes you could use it
    for downspouts you could use it for anything on there so save the ground
    wire also now I have it stripped all the way through and I have approximately 15
    foot of black and white wire and 15 foot of bare copper wire all 14 gauge now the
    way you want to run your bust wires I’m gonna give you example of my layout here
    as you can see behind me I have a loop right here but it’s on two levels I have
    a high grade and I have a low grade and then as I move over here the low grade
    continues right underneath here actually my layout is shaped like an M okay I
    have a circle on this side on two levels and I go across the back and then I have
    a circle going across the back end alright so I have my command station
    right here in the middle and what I did because I have different levels and I
    was in different phases of construction on building my model railroad what I did
    was I put in a PM 42 so I could have four districts in there and what I did
    is I have high grade which is this whole area up on this level here I have low
    grade which starts right over here as it goes down to this level right here and
    it comes around underneath the camera right here and then it terminates
    then I have my Mountain which goes along the back end of my layout and goes up
    the Rockwood and I’ll show I’ll turn the camera around and show you that in a
    little bit and then I have this area right here it’s not finished yet it’s
    not connected yet but this area where I have my computer and everything right
    here and where I do all my work is big rock and that’s my fourth district what
    I did was I run a bus wire for each district so I actually have two bus
    wires going that way one for the high grade going that way and one for the
    mountain route going that way going back this way I have a bus wire going for the
    high grade come along the back and then for the low grade coming along the back
    here on the lower level so and then the fourth one is going to for Big Rock
    which is right here it’ll be coming up this way
    I already haven’t run underneath this table right here and I have some of
    it’ll run over here so that’s the four districts that I have now you don’t have
    to have run a termination on it it could it could go out and just stop it you
    know if you want to you can put a wire nut or any kind of terminal on the end
    of it so you know there’s no bare wires showing on it you just want to run your
    feeders along where your track is underneath your track and make your
    feeders as short as possible my feeders on there are no longer than
    six inches now you can make your feet or wires long you can make them a foot you
    can make them two-foot but I chose to keep it under six inches I’m gonna put a
    couple of drawings up on here of a cup of a few sections my mountain section
    and my high grade you can see how I ran my buss wires through my layout now I’m
    not going to show you the low grade or the other section for Big Rock
    I mean it’s just a repeat of what I did in the sections for the mountain section
    and the high-grade behind me I have a rough drawing of the mountain loop now
    as you can see I have the bus wire running along the tracks
    now I’m only showing one line for the tracks
    okay I’m not putting both tracks in here but I’m showing that you have the
    positive the minus the positive and the minus of the tracks coming up here now I
    have a siding on there and I have a loop coming around now what I had to do was
    put a reversing in there the AR-1 and the reason for that is as you
    could see on this side you have the negative coming around here okay and
    then it’s matching up with the positive right here so whenever you have that
    scenario you have to put a reversing loop in there so what you do is you
    double gap all the track right here there there and there
    what the manufacturers tell you with the reversing loop is now this is my theory
    okay say you have a locomotive and it’s crossing over right here okay and you
    have all your cars all the way up here and on your last car you have a decoder
    in it to operate a delight for your end of train light or you have a caboose
    with the light in it or anything else if your wheels are crossing this gap here
    the same time the wheels are crossing the gap back there on the other end of
    your train then you’re going to run into a problem because your AR-1 one is going
    to try to reverse polarity here it’s going to try to change this to a
    positive and this to a negative but over here you have another short
    you’re gonna run into a problem I’m not sure what it is if it’s gonna stall out
    the train and burn up the AR-1 or even burn up your command station or burn up
    your PM 42 like I have on here now this is just to show you that I have one bus
    wire or a set of bus wire to black and white
    running and I could you know I could feed it with two separate tracks going
    all the way around and bring it around all the way to a certain point and then
    I terminated here and then this is fed by the AR one it’s getting its signal
    from the bus wires over here I’ll do a drawing of another section so you could
    see how I did it now I have a rough drawing of my high grade now again I’m
    only showing one line for the track and one line for the bus to make it simple
    but you can see I have the this is in the center and I have the command
    station I have two PM 42 and I’m not showing all the connections for that but
    my command station and everything else is in the center of everything now this
    from here to here is 17 foot and this from here to here is 10 foot you have a
    bus wire that runs all the way down to here and then this one over here is the
    same thing now I’m branched off on these two right here where the tracks are
    coming apart where all where all the tracks are close in together this one
    bus wire will feed all these tracks here and the same thing for over here it came
    around now this is Leakin Creek right here and this is underneath the tunnel
    this is underneath scenery right here now it comes back out and I have the bus
    wire here and this one feeds the engine facility that’s underneath the mountain
    section and these are sidings right here this buss wire that comes down here
    off of the terminal board right there and I have these
    sidings and this is a loop that comes around my drop bridge and goes out to
    and terminates right here and going this way is to the mountain section and then
    this is the the close-in rail right here from the high grade that goes to the
    mountain section it’s terminated right there so you can see I just have you
    know the pair of buss wires coming around to feed wherever I need it now I’m
    keeping the feeder wires as short as possible as I’m coming around
    so I’m feeding both of these tracks here actually three three tracks right here
    because this one terminates right here to go to the low grade I’m not showing
    that in this drawing right here you could feed multiple tracks from a single
    pair of bus wires if they’re close enough together now I’m trying you know
    this right here from this track right here to this track right here is no more
    than I’d say ten or eleven inches so with the bus wire coming in between you
    know I could run short feeders to all of these tracks right here all three of
    these tracks right here and then I have a terminal board here where I I run it
    run it down this is the peninsula where I have my computer right now and it
    feeds these sidings right here and it feeds this loop coming around right here
    all the way to the drop bridge now there’s as you can remember I have a
    switch on a drop bridge that cuts off a section of this whenever the bridge is
    down so this is all dead track right here
    when the bridge is down but it’s all fed from the same bus wire at the same
    potential everywhere on there so you just have one pair of buss wires that
    feed all these tracks in here and all of this is connected
    – one section on the PM 42 you could separate your wires here you can see
    where I have high-grade feed and low-grade feed and then I split them off
    on this terminal board here in two different areas and this could be done
    anywhere on your layout where you need to branch off on another section I have
    below grade on another section I have the high grade and on another section I
    have the continuation of the low grade over here on a future city that I have
    called big rock the biggest thing that you have to be concerned about is making
    your bus wire large enough to handle the signal and to handle the area that you
    have now I did I I told you in the previous video what you have to take
    into consideration I gave you all the charts on there and I’ll put another
    chart up here to show you the same thing on this one here but that’s the biggest
    thing is make sure that your bus wire is big enough and your feeder wires you
    have your feeder wires close enough together on my layout I have them every
    three foot or closer now I use flex track through most of the layout here so
    every piece of flex track I have a feeder wire going to it on some of them
    I have more because of turnouts in there and you know you put the feeder wires on
    your sidings and everything else along with your main line so I have it at
    three foot manufacturers and everybody else
    NMRA has their standards for it in DCC Wiki they have the standards different
    manufacturers have their own standards for it so whatever you feel comfortable
    with is how you should do it okay if you feel that you could stretch it out to
    six foot just make sure that you do the coin test on there where you put a
    quarter on a rhasta tracks to make sure that your
    command station shuts down as long as it shuts down you’re doing good well you
    know that I’m gonna have some comments and questions on this and on the last
    video that I did I already had some questions and so I’m gonna be doing a QA
    coming up pretty shortly so watch out for that
    check out TomsTrainsandThings Dot Com and don’t forget to check out my patreon
    page and I want to thank Chris O’Connell for pledging on my patreon page on
    Sunday thank you very much I really appreciate it it helps out to put out
    better content and more content so I could teach you things about model
    railroading so that’ll be it for right now and we’ll see Ya!

    Using Ambient Light Sensors – Arduino Made Easy(er) Lesson 05
    Articles, Blog

    Using Ambient Light Sensors – Arduino Made Easy(er) Lesson 05

    August 24, 2019


    welcome to Arduino made easy in this
    lesson we’re going to talk about photo resistors or ambient light sensors
    whichever you want to call it so let’s get started with this right now I’m Tom
    Kvichak and this is Toms Trains and Things I created this channel to
    help other modelers who are in need of guidance in pursuing their dream of
    building a model railroad and you may want automation or lighting in your
    model railroad and that’s why I’m doing these Arduino made easy’ her videos I’m
    making it a little bit easier for you to understand if you have no experience
    with coding or electronics now we’re going to talk about some photo resistors
    and I have this several different types of them and I’ll show you right here I
    had these are the first ones I use but since they’re so old one of them has a
    resistance it’s a lot different than this one here so what I did was I
    purchased some more I got a pack of 20 of them what I have right here are some
    old photo resistors from RadioShack that I purchased some time ago and what I did
    is I put some shrink tubing around it so it wouldn’t pick up the light on around
    the photo resistor and they actually look like this right here and it came in
    a pack of five and that’s when RadioShack still had their
    brick-and-mortar stores that was some time ago now
    you can if you have a starter kit you may have an ambient light sensor that
    looks like this you can see that it has the squiggly thing up on top but it’s
    mounted on the board and there’s also a resistor mounted on it okay now on this
    one here we have to put a resistor on the breadboard but if you have one that
    is like this right here on a breakout board did you get received in a kit you
    won’t need to add the resistor because the resistor is
    already on there we’re going to talk about the ambient light sensors and how
    to see what the reading is on the serial monitor just like we did with the
    potentiometer now I’m going to show you I’ll plug this in right here and this is
    what we’re eventually going to get to today we’re not going to use the LEDs or
    the resistors for the LEDs we’re just going to use the ambient light sensor
    actually two of them and we’re going to simulate a railroad crossing and this
    each one of these ambient sensors is on either side of that crossing to trigger
    it and so when you when your locomotive comes over on one side your train goes
    over on one side it starts the flashers and then when you get over on to the
    other side and it will keep it going I hope you can’t see it if I do it that
    way well this will start the flasher on this side and then as you come across on
    the other side of the crossing your flasher will stay on until you leave and
    then it’ll finally go off but we’re not going to talk about the LEDs on this one
    we’re just going to talk about the ambient light sensors and how to
    determine what value you need to trip your lights or if you’re going to use it
    for anything else to actuate whatever you want to actuate if you have
    something like this this is an infrared sensor an IR sensor now these come in in
    beginner kits also but we’re not going to talk about that and we may talk about
    that this type here in a later episode where we’ll show this we could use these
    instead of the ambient light sensors to do the same thing as triggering your
    crossing signal but anyway we’ll get into this one here a little bit later in
    another lesson these ambient light sensors can be
    referred to by several different names they can be
    called photocells they could be called CD s sales photo resistors light
    dependent resistors ambient light sensors so you could see that you know
    they could be called a lot of different things but basically they all do the
    same thing they change resistance depending on the amount of light that is
    on there so we’re going to start by using these two new ones that I got I’m
    going to remove these two LEDs just so you won’t get confused with those right
    there and I’m going to remove these old ambient light sensors that I had on
    there I’ll take these wires off here now what we’re going to do we’re going to
    use a zero and a zero this one here and a two and those are our analog pins that
    we’re going to use to read the ambient light sensors and what we’re doing with
    these ambient light sensors is we’re actually making a voltage divider now I
    showed you one of those if you saw one of my older videos about voltage
    dividers I did a little discussion on voltage divider so you can see how they
    work but this is basically the same thing we’re just taking the two leads
    and we’re reading in between this 10k ohm resistor here and the ambient light
    sensor so one side of this ambient light sensor goes to five volts
    here’s where it goes to this one goes to our A0 pin and this 10k ohm resistor is
    on the same line as the ambient light sensor and our pin that reads it and the
    other side of the 10k ohm resistor or wires in the way right there the other
    side of the 10k ohm resistor goes to ground so actually we’re reading between
    this five volt and ground and using this 10k ohm resister and the ambient
    light sensor as a voltage divider now that Kent 10k resistor won’t change but
    as we cover the ambient light sensor the resistance in that will change so we’ll
    come over to this other one and put them in the pins and once we do that we’ll be
    good to go so you can see one side goes to the five
    volts the other one goes to our analog read pin which this one is a to the
    resistor also goes on that same leg and the other side of the resistor goes to
    ground first thing we’re going to do is declare our pins and the readings that
    we want to get off of those pins so we’ll start off with integer and we’ll
    call the first one east pin and that is a zero the second one integer west pin
    and that will be on oops a – I’m gonna put this one didn’t move
    fast enough okay then we want our readings so we’ll
    call it East reading and West G do that make this a capital R right here so all
    right so those are the four values that we need to declare right off the bat and
    so we’ll come down to here what we want to do is start the serial
    monitor by serial begin okay then we have to come down we’ll come down here
    and the loop and what we’ll do is take those East reading oops I forgot to put
    the integer in that int up there there we go now we’ll come down to here and
    we’ll do east reading equal analog read and yes TPN and that’s the value that
    we’re going to get off of the pin from the ambient light sensor and we’ll do
    West reading and also do equal analog read whist pin now while I was typing and talking away
    I didn’t realize that everything that I was typing was off-screen so we’re gonna
    have to do this again we want to print out what the reading is and the way
    we’re gonna do that is we’re gonna say east reading a space of the Damned and
    want a damn and then actually put the east reading like that and the same thing for the
    West reading but what we’ll do we’ll cheat a little bit here and we’ll copy
    this and then paste it there and we’ll just go west and west and then we’ll put
    in a slight delay so we could read it they’ll put in a half a second okay now
    while I was doing this before I ran into an issue where it wouldn’t compile and
    it wouldn’t upload to the uno and let me move this up a little bit here and I’ll
    show you this is okay right now but what I did was when I was having an issue for
    some reason it couldn’t find a file and I don’t know why it couldn’t find it
    because the folder wasn’t there but I printed out what the error message was
    and I’ll show you how you can get these error messages to find out what the
    problem is now you can see down here on the bottom it says file does not exist
    so it was looking for this file right here and when I went back to find that
    file the the file was there in a folder that was wasn’t zipped yet unzipped yet
    so I had to unzip it before it would start working but why it wasn’t unzipped
    and it’s been working all this time I have no idea but maybe it’s something
    that they updated because they had a new version you know every once in a while
    you’ll see down at the bottom here that there is a some some updates available
    and you can click well I did that and that might have been
    what the issue was on there so let me put this down here like this but anyway
    I’m going to show you how you can get that you have to go to preferences and
    you’ll see right here show verbose output during compilation and upload
    well what I did was I checked on compilation and it will put all that
    stuff down there so let me compile it now you can see how all that information
    is up there now I’ll compile it again and you’ll see it has less information
    on the bottom okay bring this up here and here we go not showing the bottom of
    the thing anymore but anyway that’s it it just shows those two lines normally
    but when it when you have the those boxes checked off it shows a lot of
    different lines on there so anyway here’s this then we pull this back down
    so we could see that we have all that ready let me plug in the uno and we’ll
    pull up the serial monitor and as you can see it has east reading until 557
    West reading let me stop this West reading 533 now there’s a little little
    difference between the two sensors right there that’s not a lot of difference
    that’s that’s acceptable right there but what I’m going to do is put my finger
    over top on one of the sensors and you can see how the reading went down to
    under 100 and I’ll do the West one and I cover it the same way but it only goes
    down to about 108 109 107 somewhere in that area and what I did is okay let me
    show you here I had to turn off the lights to get this
    to work so let me turn these lights back on there we go
    now now you can see but the only problem with that with these bright lights on in
    here you’ll see a difference in the reading I’ll pull this back up here and
    you can see it’s all both of them or back up into the 800s so and when I
    cover this one here it goes down to about 421 okay this one over here about
    360 and what I did with these I I covered these up with the shrink wrap
    like I did the heat shrink tubing like I did on these other ones right here I
    don’t know if you could see it right there but here’s the RadioShack sensor
    and I have the the heat shrink tubing over top of it so it doesn’t so the
    light doesn’t leak through the side and I did the same thing for the other one
    you could also paint them but since this is really bright lights up here the the
    readings are gonna be way off from what you’re gonna have on your layout so once
    if you’re gonna use this method on your layout you could do an initial reading
    on on your bench just like we’re doing here to see where it is and we’ll go a
    little bit further with this and I’ll show you how to how to operate the LEDs
    with this but once you get once you get your sketch written up and everything
    and you get it satisfactory then you mount your sensors in between your ties
    in between the track and check it out and you know cover it up like with you
    know like with the train going over top of it and you’ll be able to get a better
    reading of how it’s going to work on your layout if you’re gonna have
    different figures on than what you have right here so once you get your sketch
    built and everything then you put your sensors down in place and then you put
    different figures in to tart to work your LEDs and we’ll get into how we do
    that here in a minute I’m going to skip a line here I want to get before that
    one bring that down a couple lines okay now we’re going to put in an if
    statement and we’re going to say if the ast or e a D and G is less than and
    we’ll say 500 on here and then we’ll put a brace in there and put another brace
    and then move this one down and we’re not going to operate any LEDs right off
    the bat we’re going to put a SP or a L P oops cereal we’re gonna say trigger led just the
    show that this is what’s going to happen so we’ll compile that alright then we’ll
    upload it to the board alright and we’ll see if we can bring that up I’m going to
    bring up the monitor here okay so we’re up in the 800 so we’ll see if that okay
    see so it said trigger led reading for 15 okay and it’s back up to eight
    hundred and sixty eight hundred and sixty s so that’s what we wanted to do
    we wanted to see what that is in the readings 366 so we could even bring it
    down a little bit more let me just I had a completely covered so let me put it
    about right there so that’s not quite okay so maybe we could go to we’ll put a
    reading of 450 in there oh it’s at 500 okay so let’s try the four let’s see still meaning 559 let’s bring it down to 600
    just to be on the safe side we’ll go here and we’ll compile that and bring to
    monitor up okay so we got it right there so it’s hard it’s hard to do with all
    these lights that I have here for recording so if I turn these lights off
    and you’re gonna see me in darkness right here and maybe this will ok so
    right there the ambient light is at 493 so let me change that and bring this
    down to say 300 and we’ll compile that and then open this up and then there it goes it goes once it gets under
    the threshold of – on less than 300 it will give me the reading trigger led
    okay so let me change this put a space here I’ll put print the line there we go
    we’ll do it that way so it’s not on the same line bring us back up okay there we
    have our readings okay so you see it says trigger LED let me turn the auto
    scroll off and you could see it a little bit better so it brought it down
    I had it completely covered so it brought it down to almost 100 but as you
    you could see as I was covering it up it was it was changing the reading on there
    let’s slow this down so we can read this a little bit more okay we’ll do one and
    a half seconds delay between the readings so we could see it a little bit
    better as we’re doing this okay so I’m bringing my finger down so you see once it got below the 300 it
    said trigger led and I’ll cover it like this here and we’ll bring it back up and
    then it’s back normal and then we’ll cover it again okay now we’ll do the
    same thing with the other one okay so you see the other one the West
    raining goes down but what we’ll do there is will let me bring this up well
    right in and I’m going to show you something different than what we did
    last week we’ll do a else if and and I’ll explain it here and we’ll do less than 300 on that also and I should put that inside I should
    bring this curly bracket up I’ll delete this one right here and I’ll bring this
    one right here and that way this in this if statement serial print and then this
    else if statement is in its own braces so we’ll do a print on this one and
    we’ll see say the trigger other l-e-d okay and let me put a print line in
    there okay so now we have an if statement in there and if east reading
    is less than 300 it will print out trigger LED and then else if and what
    that means is if it sees West reading under 300 you know print out trigger
    hell other LED on the serial monitor will pull up the monitor here and you
    can see we got West reading and East reading I’ll cover up the the East one
    and it’ll say trigger led I’ll cover up the West one and it’ll say trigger led
    and trigger other led so I’ll take it off of the one and it just says trigger
    other led and I’m off of it off both of them and we’re back to normal now that
    we know how to get the data from the ambient light sensor on the serial
    monitor we could figure out what is the right setting that
    we can trigger the LEDs now we’re going to do that in the next episode next
    Saturday on May the 12th I’m going to show you the sketch with all the notes
    in it and I’m also going to show you the fit Seng diagram right here as always
    you could find a copy of both of these on tom’s trains and things calm slash
    Arduino and the Fritzing diagram I put the sensors apart from each other
    because we’re gonna use the same diagram in the next lesson where we’re gonna
    have the LEDs right in the center if you would like to see more videos like this
    on Tom’s trains and things go ahead and hit that subscribe button and while
    you’re at it ding that Bell and that’ll notify you whenever I have more videos
    coming out and speaking of videos go ahead and check my playlist where you
    could see a number of videos categorized for you to find easily so check them out
    on the playlist page now on next week we’ll work with the LEDs and we’ll work
    on how to get those LEDs working like I showed you in the beginning of the
    sketch to get them to alternate whenever we cover up the light sensors we’re
    gonna take some of the code from Jeff lenses Gate crossing sketch that he did
    oh about three or four years ago and we’re gonna modify it a little bit so we
    could work it on this sketch right here so your figures on here may be different
    than mine depending on how much light that you have have how much ambient
    light that you have what your sensors because not all sensors are made the
    same they not all of them have the same exact resistance then the next one so
    your readings may be different so play around with the figures in there and
    I’ll show you in the next one how to get everything working so we could get a
    working gate crossing at least with the lights as far as the bells go that’s a
    more expensive than ever we have to buy more stuff for that so that’s going to
    be wait later on but at least you the knowledge right now of how to get
    started with it so you could build on that knowledge and
    we’ll keep on going after the next one we’ll keep on doing more sketches on
    different things for our model railroad so we’ll see Ya

    Easy Sound fx With A DFPlayer Mini For Your Model Railroad
    Articles, Blog

    Easy Sound fx With A DFPlayer Mini For Your Model Railroad

    August 21, 2019


    I have some new information from the QA
    that we did a couple of months ago and you’re gonna want to see this because
    it’s about sound on your model railroad so let’s see what I’m talking about here I’m Tom Kvichak and this is Toms
    Trains and Things this channel was created to help other modelers who are
    in need of guidance in pursuing our dream of building a model railroad now a
    couple of months ago I did a QA on a question from Will Kling and he was
    asking about a shield or some other device for his Arduino to do sound
    effects he says he has a steel mill and he says whenever people walk up to it he
    wants something to trigger it so he can play some sound effects of the steel
    mill well at that time I told him you know it was probably about $35 or $30 to
    get everything that you’re going to need include after the Arduino just to get it
    up to the volume that you need and the reason for that is because I was looking
    at some other things and the videos that I saw on them used a little speaker and
    it sounded like those greeting cards that you open up and get the song out of it or the cartoon clip out of it which is really terrible but I found out for myself I
    went a little bit deeper when I was doing my welder scene right back here
    now I found a DF mini and I’m going to put you down on the other screen here I
    found this little gizmo right here it’s called a DF mini and I paid under $8 for
    it I got it from the manufacturer I wanted to make sure that I got a good
    one now you can get knockoffs for as little as under two and a half dollars a
    piece and I think if you get them in quantity you could even get them cheaper
    than that I’m not sure but I looked around and you can get them on eBay
    really cheap I got this one at Amazon now all it takes is an SD card and
    SD card reader is it’s a micro SD card the reader takes up most of the the
    board the two chips are on the bottom it has the micro SD card reader and it has
    a small amplifier on it now right here is all the inputs and outputs on enter
    16 pins on it now I was impressed when I first turned this thing on and I think
    you will be too because I’m going to turn the power on to this thing and I
    have this this is an old speaker from home theater system it’s three ohm it’s
    a 3 ohm speaker now I put a sketch on here I first tried it with the Nano and
    it worked good with the Nano but I wanted to have something where I could
    trip the thing I could trigger the thing to start so right now I have to keep it
    on there for a half a second because when I was testing it I have all the
    print delays in there so I could read it so I have to keep it on for a second but
    you could hear this is at half the volume you could you could select the
    volume from 0 to 30 I have it selected at 15 now this sounds pretty good I got
    5 clips on there and I’m using songs on here from the YouTube
    library they’re royalty-free songs on here so we could play them on here but
    anyway I have the songs on there because you could hear them better on the video
    than the actual clips for your sound effects I have a I have a micro SD card
    some here somewhere here here we go I have another one here that I have the
    sound effects on there and those are down low but it still come out really
    good but as you could see from what you hear on here this is a really good
    device for the cost of it now it puts out a really good sound now granted this
    is a good speaker here and it’s 3 ohms they say 8 8 ohms anything up to a 3
    watt speaker on it but I’ll show you a little bit more on this how to hook it
    up the sketch on it and everything else but you could hear how good that sounds
    I’m not sure how it sounds until I replay this for you but to me this
    sounds really good now you have five EQ settings on here also right
    now I have a set of bass there’s like normal pop rock classic jazz country and
    bass that you could set it at and you can set the volume and there’s a lot of
    different items on there that you can set in your sketch and what I let me
    show you let me put it on the other camera right now and what I have
    I could go over the sensor and shut it off also so it’s easy as that is you
    could just put a sensor up against the edge of your layout and have somebody
    walk over to it and your sound effects will start operating go over it again
    and it’ll start over again so it’s easy as that I’ll get I’ll show
    you the sketch and everything on here how I hooked it up if you would like to
    see more videos like this go ahead and hit my subscribe button and while you’re
    at it deem that bow so you could be notified whenever I have a new video
    coming out yeah I wrote a simple sketch to get this thing to work with the
    sensor and all I did is put sensor on pin three and busy on pin five and the
    busy is a as a pin on the on the player itself that determines whether it is in
    use or not in use now in here you can see that I have a lot of have cereal
    begin and a lot of the commands in here are specific to the DF player library
    but I have the sensor and busy then the volume I have set to fifteen I have the
    equalizer on base I you don’t need that in there you could leave it empty or you
    could put normal there there’s normal plus five different ones on there and
    out to output device is telling it’s using this SD card now down here in the
    loop I’m using sensor state and is busy to determine what’s happening in the
    loop itself now I still have the the print in here to tell me if it’s either
    high or low at the at any given time but here’s how I started out as if the
    sensor state is low and is busy is high now normally when it’s not busy
    it’s high and then sensor state low is when when you cover up the sensor
    because the sensor is normally high so that’s telling it when you cover up the
    sensor that’s like pushing the button start this if statement and so it goes
    through the serial print ending and the one command that we’re really concerned
    about here is an able loop all and it will go through all of the songs or
    sound effects that you have in that given folder or on that SD card until it
    you give it another command the next command that I give is to turn it off so
    it’s the same thing if sensor state equal low is when we cover up the IR
    sensor and busy is low when it’s when busy is low it’s running it’s doing
    something so it’s telling it when when you cover that up and it’s and it’s
    running you want to shut it off so the command is disable loop all and that’s
    it that’s all you have to do and then you can go back up to the top and cover
    it again and it’ll start all over again now the sketch on the right is all the
    functions that are available in the library for the DF Player and most of
    this stuff you don’t really need it’s just there for your information but you
    can see over here you could have the volume volume up volume down you could
    put that into commands here’s all the the equalizer settings right there okay
    here’s what I used here for the SD card okay here’s some other ones now if you
    wanted to use the DAC and that is on and I’ll show it to you on the thing right
    here these two pins right here are for headphones or earbuds or for computer
    speakers output setting true output setting and
    the output and set the game to 15 so that means that you’re setting the
    volume to 15 for the deck for this line right here enable deck now that is again these two pins right here this would be
    the back right the deck left and you’ll need the ground on that one now you
    could use the computer speakers on there or if you wanted to monitor it with your
    headphones you could do it that way there here are all the commands that
    you’re going to need this is the full function right here and this is the one
    of the sketches that comes with the on github for the for the DF player now
    basically most of this is just information here that you’re going to
    need to put into your sketch like I have on my sketch I have what do I have now I
    have base but here are all the options for your equalizer I use this one here
    because we’re using an SD card I’m not sure what the other ones on there are
    for they don’t have any documentation on that over here for the enabled DAC that
    is for the headphones now the deck is the only option that is in stereo if
    you’re using the speaker that’s monell monaural and it combines both the left
    and the right into the center so when if you want to use left and right and use
    stereo you would have to use computer speakers on this and you would have to
    initialize it with one of the commands on here right here output setting true
    and 15 to set the volume on there okay here are all the available commands on
    here next previous play loop loop to the first mp3 file on there and you could
    put any number in there too do a specific file you could pause it
    you could start it you can play any folder or any specific folder and file
    in a folder with that command there enable loop all is what I use to turn it
    on and disable loop all to turn it off lute play mp3 folder you can play a
    specific folder in there there’s advertise you could do advertisement so
    we won’t get into that play large folder not exactly sure what that’s for
    you can loop a folder a specific folder you could random everything you can
    enable loop disable loop and here are all the commands that you could use at
    the top of your sketch for your serial monitor to see what what the state
    states are of the different categories here you know when you’re first starting
    just to see what’s in your sketch so that I’ll put everything up in the
    description of the video I’ll put this in here and I’ll take out all the print
    commands on there so you’d be able to see it without the print commands it’s
    only a just a couple of lines of code for each command so it’s a pretty simple
    code to get this thing started and to stop this again so let me turn
    this back on so you could see we ready let me see here’s the USB cable right
    here the only issue that I have with it and you’ll see when I plug this in you hear that pop in there let me reset it
    and that that’s the only thing I contacted a manufacturer and they told
    me a couple of things and that’s why I have these resistors here and that did
    not take care of the problem so they said they’ll send me another one which
    and so we’ll start this and this is at half volume I’m gonna move this speaker
    over here this is the speaker we’re using again
    oops did I just cover it up again I guess I did there we go but this is
    pretty good sound for a little device like that that’s under three dollars all
    the information is going to be in this description where you can find the
    library for this where you could find this in on Amazon and where you could
    find this find the this information the wiki right here that gives you all the
    information on this and how to set it up I’m going to incorporate that into my
    welding scene and also into my building scene I don’t know if you see right here
    we’re gonna have that back there but anyway I’m glad that I found this let me
    shut that off I’m glad that I found this and we’re gonna be using this you know a
    lot of our projects and how even do a lesson on Arduino made easy on this
    after this next one because the next one is
    the welding sketch is that’s going to be the lesson paint and now will be coming
    up but anyway we’ll see Ya

    Easy And Cost Effective Way To Light Your Model Railroad
    Articles, Blog

    Easy And Cost Effective Way To Light Your Model Railroad

    August 21, 2019


    woodland Scenic’s has an easy way of
    adding lighting to your model railroad through the just plug hub now this could
    be very expensive so if you’re a budget minded you may want to build one for
    yourself and I’m gonna show you how to do it on a breadboard so let’s get
    started right now hi I’m Tom Kvichak and this is Toms Trains and Things this
    channel was created to help other modelers who are in need of guidance in
    pursuing our dream of building a model railroad there our model railroaders who
    are not very good at electrical issues so Woodland Scenics made this just plug
    for them but there are others that are pretty good with electronics and
    electrical items and want to experiment with things so I’m going to show you how
    to do duplicate this right here on here on a breadboard I’m gonna break this up
    into two videos I’m going to go over these components on here the new
    components that I haven’t showed you anything on yet and on the first one and
    I’ll show you a little demonstration of what I did so far on the first video and
    then the second video we’ll get into the meat and potatoes of putting this thing
    together and showing you how to do this and the rectifier this rectifier and the
    other rectifier that I just got in so make it a little bit easier so you could
    hook it up to your power pack now one thing that you can do with this is the
    just plug the way they designed it you could use it for AC and DC they make a
    wall wart for it and you could also hook it up onto the AC of your power pack
    because they have a little rectifier and capacitor in there and that’s what this
    is right here so we’re going to talk about that and then go into the building
    of this in the second video so if this is your first time here and you would
    like to see more videos on model railroading and cost-effective ways to
    illuminate your model railroad and animate your model railroad go ahead
    and hit that subscribe button and while you’re at it ding that Bell and that’ll
    notify you whenever I have a new video coming out and while you’re at it check
    out my playlists in the playlist page of my channel I have a lot of different
    playlists in there categorize by subjects so it’s easy for you to find
    there’s over 40 some playlists in there right now so go check that out also I
    have 5 potentiometers on here and the potentiometer was the most expensive
    item on here which was 95 cents apiece but they make cheaper ones now I have 5
    lights this one has 4 this cost you what $18.00 19 it what does this cost you
    here well there’s a cost savings here and you could add to it keep adding to
    it and the more you add the less it’s gonna cost you because the LEDs are very
    inexpensive the transistors are very inexpensive I got a whole box of 200
    transistors now they’re different transistors but the ones we use there’s
    20 of the ones in there and you we could use some other ones in here also that
    could do the same thing the resistors are very inexpensive like I said the
    most expensive part on here are the potentiometers Christmas tree lights
    here is a set that we bought after Christmas and paid I think about $2 for
    Matt’s CVS you get 50 LEDs in here now there are Christmas tree lights where
    you can get a hundred of them that may cost that maybe a dollar more but this
    is what we picked up we got four boxes of it so that’s about 200 LEDs so
    that’ll last us a long time in our experiments here but anyway this is what
    the circuitry looks like on there and they use SMDs on there so it’s pretty
    inexpensive for them to make these in fact I price the little transistors that
    they have on here and I could get a hundred of them for
    two dollars and 68 cents the only thing is that I’d have to wait about three to
    four weeks to get them because they’re on a slow boat from China just like
    everything else these SMD resistors on here which are
    dirt cheap and just like this the probably the most expensive part on it
    is the potentiometer but before I show you how to do this and what is involved
    in doing is I’m going to tell you a little bit about we haven’t discussed
    these yet transistors potentiometers and what I have here are diodes and a
    capacitor and I and I got a little switch that I had it on a little push
    button switch well we’re going to talk about diodes and capacitors now the
    reason I have four diodes on there is because it’s a rectifier but after you
    know dude this was another thing that took a while to get here but this is the
    same thing it has four leads on the back of it that I soldered on this board just
    to play around with it but that is also a rectifier it changes AC into DC and
    we’ll talk about that and they add a capacitor to it just to hold the charge
    let’s take a look at the components that we haven’t seen yet the diagram you see
    right now on the left-hand side is of a potentiometer and on the right-hand side
    is a visual representation of exactly the same thing the only thing with the
    one on the left the wiper where you could see the arrow that could be moved
    from one end to the other to change the resistance throughout the entire circuit
    number one and number two are both capacitors in the ones that we’re going
    to be working with right away or is number two which you can see a plus sign
    on it that’s because it’s an electrolytic capacitor it stores
    electricity and has a plus on it you could only hook it up in one direction
    if you try hooking it up in the opposite direction you
    you’ll explode the capacitor so you have to be careful with those this is a
    symbol for a diode similar to the LED except it doesn’t emit light current
    flows from the anode to the cathode and blocks current flow in the opposite
    direction from the cathode to the anode so this a device is used to control
    which direction the current flows in your circuit here we have two
    transistors the one on the left the NPN is the one that we’re going to be using
    in our projects right now this device regulates the current flow in our
    project it can either be turned off it could be turned on completely or it
    could regulate the current flow going from the collector to the admit er we
    won’t get too far into the theory behind it but we’ll just use it in our projects
    and rely on the magic of the NPN transistor this last picture here is a
    rectifier with the RC filter on it now the four diodes on there converts the AC
    signal to DC and with the capacitor and the resistor it smooths out the peaks
    and valleys of the voltage created by the diodes as you can see in the dotted
    lines this may seem a little confusing in the beginning but once you start
    working on circuits and see how everything works and experiment along
    with me you’ll be able to see how easy this is to understand I use the only D
    just to determine that there’s power on it because I when I was first tested it
    out I had these leads on my meter detect a voltage on it but anyway there it is
    right there with the rectifier on it coming off of the AC on a power pack
    this breadboard right here this mini breadboard right here is a rectifier you
    can see the four diodes and I have the capacitor and actually I have two
    resistors on there one for the capacitor and one for the LED you know I don’t
    need the LED on it it’s just for indication that there’s power on now
    this over here is the rest of the circuit where you have two resistors a
    transistor in a potentiometer to light two LEDs and to change the brightness on
    it now I’m using one finger on here so I’m just going to go like this and raise
    that up all the way up and you can see the difference in the lighting now with
    this right here it’s not as bright as it is if i hook it up to the power supply
    with the 24 volts now they have a wall wart that you could use to plug into
    this that is 24 volt DC and that’s what I simulate on this power supply right
    here and I’ll you know I’ll show this right here and then I’ll just switch
    this over I’ll put the leads on here from the power supply and you can see
    the difference you could turn them all the way off and then brighten them up
    with the potentiometer I hooked up one of the lights just plug lights this is a
    blue one that they have let me see if I could fun yeah thing right here LED
    stick on lights blue 25 milli amps each ready to plug in and where is this thing
    at 2:59 I got it a bunch of them but anyway these are the the ones that they
    use are very very bright I have this one turned up all the way and let me turn
    this one up so that’s Christmas tree light all the
    way up and that’s the one that you get from wooden Scenic’s to just plug lights
    now that’s the blue one right there let me turn this one down a little bit I
    mean they’re very bright I mean they’re they’re a a 6-pin LED and they’re on a
    real small circuit board but they they get pretty bright as you can see right
    there and put 10 all the way up that one this one’s all the way up and this one
    right here is all the way up and these I have cut down a little bit I just wanted
    to show you I hooked up a the other output to it so I got five on there now
    and I’ll put the power supply on and I have these down pretty low so I’m going
    to increase them and as I increase them we’ll take a look at the amperage on
    here and it’s three of them all the way up
    there’s the fourth one all the way up and here’s the fifth one so with five
    five LEDs all the way up to maximum brightness on it it’s 0.1 three amps so
    you could make a lot of these before you get up to one amp but I mean I wouldn’t
    worry about the amperage on this if you’re using even if you’re using a
    Walworth it’s 24 volts like they have for the just plugs you can that one is
    one amp or if you’re using on a power supply and you want to use the minus 12
    and the plus 12 on there you can get one amp on there and still have plenty of
    power left over – for a lot of other lights now there are other ways of doing
    it we could do the same thing with the Arduino which is going to be a lot
    easier and I’ll show you that in one of the episodes that I do for a nor do we
    know how to change the brightness on their next episode I’ll show you how to
    go from a bare breadboard like this – this right here will go through all the
    steps of assembling this and we’ll also show you how to make the rectifier and
    I’ll do it with the four diodes and I’ll do it with the small rectifier right
    here which makes it a little bit easier all it has is four pins on it – for the
    AC and – for the DC and we’ll show you how to do that so you could hook it up
    to your power pack just like this the AC accessories we’ll see ya

    Top 10 Money Saving Tips For Your Model Railroad
    Articles, Blog

    Top 10 Money Saving Tips For Your Model Railroad

    August 20, 2019


    if you want to know how to save money
    while you’re building your model railroad you’re gonna want to see this
    did I hear somebody saved budget I’m Tom Kvichak and this is Toms Trains and
    Things this channel was created to help other modelers who are in need of
    guidance in pursuing their dream of building a model railroad and I’m gonna
    give you ten ways that you could save money while you’re building your model
    railroad if this is your first time here and you would like to see more videos
    about building your model railroad go ahead and hit that subscribe button and
    while you’re at it ding that Bell so you could be notified whenever I have a new
    video coming out so let’s get started with this right now with number one the
    first way to save money while working on your model railroad is to buy at train
    shows you can get a lot of good bargains at train shows and the earlier you go
    the better the bargains that you get Debbie used to tell me to go to church
    sales and garage sales and go there a half an hour an hour early and wait in
    line and I always wondered why well because you get in there and get with
    all them people and they fight over all that stuff and get in there and get all
    the good stuff before everybody else gets it so that’s the first one go there
    early to the train shows number two you’re gonna find a lot of things at
    thrift stores that you never thought that you could use on your model
    railroad in fact about three or four years ago I found an entire collection
    of somebody who must have passed away and their wife just unloaded it at a
    thrift store I got about four locomotives a lot of buildings in fact
    some of the buildings are here on my layout I got all kind of good stuffs
    really cheap and not only model railroad related but tools
    I got a tripod at Bogan tripod it’s worth a couple hundred dollars I got for
    $9 at a thrift store because they didn’t know the value of it a lot of times
    these people at the thrift stores know the value of some of them do some
    of them don’t and wall warts you know these wall warts that I’ve been
    showing you it well if you don’t like doing electrical projects and you want
    to get the wall warts some of them go as far as categorizing them put them in
    little plastic containers according to voltage for 50 cents apiece
    so there’s your power for your model railroad at thrift store number 3
    clearance isles at your local Hobby Lobby A C Moore Jo Anns Michaels any one of
    those stores even Walmart you could get paint I don’t know how many of those
    little tubes of paint that I got some of them I got for as low as twenty-nine
    cents they’re odd colors but they still work as far as scenery goes you can get
    some really good stuff there and I always shop there I get all my paint
    brushes there they seem I got a gallon of Elmer’s glue for something like 17
    bucks and a Seymour I think was even less than that but anyway at the
    clearance Isles for these places and I told you about the Just Plugs these
    things here okay I got this one apart right now but anyway I got this one for
    I think that the hub for $3.59 and I got all those LEDs these things right here
    they normally go for $9.99 for two dollars and 59 cents
    number-four garaad’s sales you can get a lot of stuff at garage sales in fact I
    got a shovel hanging up on the wall it’s a coal shovel I got that at a garage
    sale the guy didn’t even have it out selling it because he had some other
    stuff selling I asked him if he had any other railroad related stuff and he said
    sure I got this I got that and I got some other good stuff and not this one
    here you could get tools I’ve got a lot of these clamps at garage sales from
    people that didn’t want them anymore I bought an entire N Scale layout that
    had more turnouts in the boxes that came
    with the layout and there was on the layout itself and there was about 20 on
    the layout itself I mean I had over 40 turnouts between what was on the layout
    and and I only paid like $95 for it at a garage sale so you can find a lot of
    good stuff at garage sales number five now this one you got to be careful with
    eBay and Craigslist you could find some good stuff on both of them but you have
    to be very knowledgeable you have to do your research when you’re buying there
    otherwise you’re gonna get burnt you have to know what you’re doing you have
    to know what you’re talking about and you have to know the products and you
    have to read all the little things about the shipping on it also because a lot of
    times you can get something real cheap and the shipping will cost you three or
    four times what the product cost you so you have to beware but you get some good
    stuff on there in fact if you’re looking for projects electronic projects or
    anything else on eBay you could get hundreds of transistors hundreds of
    resistant for pennies I mean I got on this Just Plug board right here they
    have a transistor on there that I looked up and they were selling them on eBay
    now it’s on a slow boat from China it takes two to three weeks to get them
    but a hundred of those transistors the SMD versions of them for two dollars and
    sixty eight cents a hundred of them so you could find some good stuff on there
    but you could get burnt on it also so be careful number six make your own
    lighting just like I said with the the Just Plugs okay I bought a lot of stuff
    at Hobby Lobby on a discount sixty percent seventy five percent seventy
    percent discount at Hobby Lobby and I figured out how to do it by the parts
    and you got your instant lighting build your own lighting things you could I
    have so many videos out there showing you how to
    solder how to use LEDs how to figure out what resistors to use with LEDs you can
    make your own lighting you can make your own effects with lighting to that I’m
    gonna go into with Arduino number seven scratch build your buildings it doesn’t
    take a lot to scratch build in fact you can define cheap items all over your
    house that you could use for scratch building
    Vinny Susseto uses for sale signs that he gets at Home Depot or Ace Hardware for
    his styrene projects and you could do the same thing years ago when people
    didn’t have the supplies that’s how they did it they found things around the
    house to build their buildings from a lot of people just use that stuff to
    make cutouts for just to see where the buildings are gonna go but you could
    even make your buildings out of that card stock that heavy cardstock and draw
    right on it and do make your own buildings out of anything that you could
    find around the house number eight your scenery you could make your own scenery
    outside dirty dirt there’s trees there’s leaves that you could crunch up in a
    blender there’s foam that you could use from packing that you get your supplies
    from and grind it up in a blender and use that as a ground cover there’s an
    unlimited amount of things that you could use for your scenery from stuff
    that you get around the house all my scenery the the the base that I use was
    it froze from cardboard boxes I just sliced them up and put them together
    with a hot glue gun and that made the form for the scenery of my mountains the
    plaster cloth here’s some that I got the wooden hood Scenic’s plaster cloth that
    I got at Hobby Lobby 4 or 4 dollars and 31 cents but if you can’t find it that
    cheap you can always use paper towel and diluted plaster of Paris like we used to
    do 30 years ago when there wasn’t any plaster cloth or the only place that you
    can get plaster cloths was in a hospital for where there was making the cast
    number nine buy in bulk every piece of roadbed I have on my railroad is quarter
    inch cork underlayment I bought it in bulk it comes in four foot wide 80 foot
    rolls now in here I don’t know if it’s anywhere else but the Home Depot here
    will only sell it by the roll but they used to sell it by the foot and that is
    a lot better than buying these little strips here now granted you could bend
    these a little bit around the curve you know once you take these apart how much
    do you pay for this compared to buying a whole roll of cork or just how many feet
    that you need I think I did my whole layout with about 25 foot of cork and
    you can’t tell the difference because your ballast over the stuff anyway the
    only time that you could tell the difference is before you put the ground
    cover down so buy in bulk the same thing with your electronic projects if you’re
    doing any kind of electronic projects on here for LEDs for transistors for
    resistors buy them in bulk it’s cheaper that way number 10 repurpose your items
    I have a static grass applicator that I made myself from one of those electronic
    fly swatters and a little strainer it cost about 6 bucks
    altogether and how much did they cost in the store 35 $40 for the same thing
    that’s something two things that you can repurpose into make a one little tool a
    lot of modelers use hairspray on their models especially on the trees to
    finalize their things and what I found is to use the pump type ones instead of
    the aerosol because you could use them over once you’re finished with the
    hairspray you could either put alcohol in here or water in here for your
    scenery and it has a much finer mist than those spray bottles that you have
    to pump that you get from the hardware store or from WS these are
    much better a much better spray on them a finer spray on them and you can put
    anything in here I use them for alcohol and water and diluted glue on here also
    a lot of the things I mentioned in here I just went over real quickly for you so
    I could go into better detail in other videos coming up soon about how to do
    things on a budget I hope you were able to get some good tips on saving money on
    your model railroad this is how I’ve been doing it for a long time and I try
    to save as much money as I can whenever possible on my model railroad so I think
    it’s a good idea that you could do the same thing there’s a lot of good tips in
    here that I’ve given you to save money on your model railroad and I hope you
    could save money too so we’ll see ya next time

    Arduino Made Easy(er) PWM Analog Read And Write – Lesson03
    Articles, Blog

    Arduino Made Easy(er) PWM Analog Read And Write – Lesson03

    August 19, 2019


    welcome to Arduino Made Easy this is
    lesson 3 today we’re going to talk about analog read analog right we’re going to
    go a little bit deeper into serial communication and we’re going to talk
    about pulse width modulation so let’s get started with this right now hi I’m
    Tom Kvichak this is Toms Trains and Things this channel was created to
    help other modelers in need of guidance in pursuing their dream of
    building a model railroad and in that railroad if you want to have some
    automation and lighting Arduino is the way to go it is so simple you would be
    surprised how easy it is to get your buildings lit up and to do a little bit
    of automation on your model railroad and we’re going to make it a little bit
    easier for you Arduino is already pretty easy to figure
    out but those of you who have not had any experience in electronics and coding
    it might be a little bit difficult for you to do so that’s why I’m here trying
    to teach you a little bit about the electronics part and the coding part as
    easy as it can be so after this we’re gonna get started with this if you would
    like to see more videos like this on model railroading or on Arduino
    automating your model railroad or anything else concerning model
    railroading go ahead and hit that subscribe button and while you’re at it
    ding that bell and that’ll notify you whenever I have a new video coming out
    and speaking about videos go ahead and check out my playlist you could check
    them out down below in the playlist page I have over 40 playlists they’re
    categorized by subject so they are easy to find so go check them out so let’s
    get started with this lesson 3 right now on
    analog read analog write serial communication and a little introduction
    to pulse width modulation which you are going to hear a lot about let’s start
    off by identifying the analog pins on the uno now on the uno there are six
    analog pins if you have a nano or mini you have eight of them if you have a
    mega you have 16 of them so we’re just gonna concentrate on the uno right now
    from a Oh to a five now this is an SMD chip it’s the Atmel mega 328p now this
    is the SMD version there is a conventional version that I have on this
    one right here and you could see it right there now it has an analog to
    digital converter so whatever sensor analog sensor that you put on these pins
    right here it’s going to change that analog signal to a digital signal and
    we’ll talk about that right now any sensors that we hook up to the analog
    input whether it be a potentiometer a ambient light sensor a temperature
    sensor anything that will give you a 0 to 5 volt reading on those pins the
    analog to digital converter converts that into an integer between 0 and 10 23
    now that means every unit is about 4.9 millivolts so that’s a lot to take into
    consideration now where do we write these well we write these on the pulse
    width modulation pins and you’ll notice those pins have a little tilde on it or
    a little dot next to them and I’ll show you on here now you’ll notice on the
    Digital side you’ll have pins 3 5 six nine ten and eleven
    they have little till Diez right next to them and on some of them that just have
    a dot these are the PWM pins on here now what that means is pulse width
    modulation and that takes the analog signal that we get from here and it
    reads it on here as digital signals now let me explain that a little bit further
    for you because this is where it gets really interesting how do we take a
    signal that flows to nothing more than an on and off signal so that’s what
    we’re gonna talk about with pulse width modulation pulse width modulation is a
    technique for taking an analog signal and converting it into a digital signal
    so how is that possible well the digital signal is nothing more
    than zero volts and 5 volts and in our pins we read that as 0 for off and 255
    for on or 0 for low and 255 for high but wait it they create a square wave okay
    the pulse width modulation technique creates a square wave in a duty cycle so
    whenever you have a signal that is off you have zero percent of that wave in
    the duty cycle whenever you have five volts the full 255 on that signal you
    have 100% of that duty cycle at five volts so you see where I’m getting here
    that’s how we change the analog signal to a digital signal and read it on our
    pwm pins now it’s a it’s a little bit confusing at first but I’m gonna put a
    graphic over here and show you the the different duty cycles on there and you
    might be able to grasp it if you you know you look at it and then you review
    my explanation of it where the 25% you have you have a number
    64 coming from your potentiometer that’s 25% of the duty cycle so 25% of that
    duty cycle is going to be at 5 volts and the rest of it is going to drop down to
    zero for the rest of that cycle and it’s going to continue that way until we move
    that potentiometer to a different position and the more that we turn it
    potentiometer up higher the longer that Duty that the longer that area is where
    we have the 5 volts on and the shorter where we have the zero volts so it’s
    just a matter of how long in that duty cycle we have fought that the complete 5
    volts on that’s how that works I don’t know if I made it more confusing for you
    or if I cleared it up any but just look at that look at that graphic over there
    and that’ll explain it it’s nothing but ups and downs and how long the up is
    compared to how long the down is in a given time period
    that’s what pulse width modulation is PWM I hope you got it there last week
    when we did two serial monitors we had nothing but ones and zeros because we
    used the button it was either on or it was either off
    but with this potentiometer we could read 0 to 1023 or we could read 0 to 255
    or we could read 0 to 5 do we want to figure out how much voltage we have or
    do we want to figure out what the actual reading is between twos between 0 and
    255 or do we want to know what it is between 0 and 5 now it may sound a
    little strange right now but later on when we start looking into sensors and
    looking into readings and whether we want to turn the thing on or turn the
    thing off it’ll all come together then but
    we’re just going to go over it now I’m going to show it to you on the screen
    here we’re gonna start off by identifying the potentiometer what value
    we’re going to give it to begin with and the two LEDs on here so let’s start off
    with the potentiometer and we’re assigning it to a oh I am TVA l equals
    zero now the my LEDs number one and we’re
    going to put on pin three and pin five since those are the pwm pins all right now that we got that we’ll go
    down into the setup move this out of the way here and pinmode my led as an output oops – also is an output and we’ll start the serial monitor all right now that we got that going
    let’s go down into the loop and all we want to do from the very beginning is we
    want to print the value this on the potentiometer so you could see up here
    we have value we start the value off as zero now in the loop we’re going to
    identify it as an analog read from the potentiometer pin and so the only thing we want to do
    right now before we turn on any LEDs or anything like that is we want to print
    out and see what the value is when we turn the potentiometer so what we do
    there is we do a serial print line and then we’ll go ei L now we want to be
    able to read what’s on the serial monitor so we’ll put a delay in there
    over half a second and then we’ll go back and correct the mistakes I made I
    took the parentheses out and forgot to put the zero back in there and when I
    was thinking about my I led to I put print mode – so I think that will work
    right there but since I don’t have the uno hooked up right now it’s not going
    to be able to compile because it needs to have something hooked up to it before
    it will compile we’ll save this and we’ll format this Auto format and it’ll
    move two things up make it look a little bit prettier and what we’ll do later on
    when we’re finished like always we’ll put the comments in there if you
    remember in our last video we had the two buttons in here and I just moved
    them off to the side here’s a potentiometer that you could use you’ve
    seen this in some of my other videos but I’m going to use a potentiometer like
    this is a little bit bigger and it’s the same thing it’s a 10k potentiometer now
    in the last video I had these 2 jumpers going from and from my buttons over to
    the ground rail and the power rail and what we’re going to do is have these two
    and pins one go to ground and one go to the 5 volts so I’m going to turn it
    around this way here so I could put another wire in
    there and we’ll have it right there and since we’re going to be going to a Oh
    we’ll just put this on a or right there and bring this over to these center pin
    on there now we’re going to put this on the ground and we have a ground pin
    right here make sure I get the right o in there and on our positive our five
    bolts we’ll stick it over here and run it over onto this one right here and
    make sure we get it in right all right now we’re going to be using number three
    and number five I got to turn this around to see it so three right there
    and five right oops skip one and five okay oh one
    two three four five okay so now we got three and five we got a Oh over here to
    the center pin on the potentiometer we got our five volts going to one side of
    the potentiometer and here is the ground wire right here the black wire so we’re
    we’re good to go on this just disregard it everything on that side right there now that we have this all hooked up
    let’s compile our sketch and so far so good all right there we go
    now we’ll upload it to and well before we do that we’ll make sure that it
    recognizes it’s genuine we know to comport five ok we’ll upload it ok and
    it’s going to stop the LED from fading in and out because we don’t have
    anything on there except for the print value so we’ll open up the serial
    monitor here and you’ll see it’s printing out 362 and as we increase this on the potentiometer you can see it
    gets higher and higher to when it’s all the way up to ten twenty three now let’s
    go down to the other end and we’ll do this a little bit faster and you could
    see as a zero okay so let’s try to get this up around halfway so that one
    should be around five twelve okay so you can see how hard it is to get a precise
    number on here when you’re trying to dial it in so that’s why we’re using a
    potentiometer start out and we’ll use whatever value we need to put it in our
    code now we’re seeing 0 to 1023 on here but let me show you something else
    now we’re going to change a few things on here first way I’m going to show you
    here is we’re gonna take the value and divide it by 4 and that will give us 0
    to 255 now let’s pull up this serial monitor once this thing uploads now you
    see it’s at 128 that is halfway that’s right in the middle so we’ll come up to
    the highest point which is 255 and we’ll go down to 0 and there we go so you saw
    two different ways on here that we could read it we could read the actual values
    of what’s coming from our pin on the analog side or we could read the digital
    value 0 to 255 I’m going to show you another method to change the values that
    we’re reading on here and it’s called map so we’re going to
    take the value and we’re going to map it to and we’ll call it value again and
    what we’re going to do is we’re going to take the original figures 0 to 1023 and
    then we’re going to put in 0 to 255 and that’s telling the map function that we
    want to take value and we want to call it value from 0 to 1023 and we want to
    map it to 0 to 255 that’s what we want to read on serial print line value and
    we’ll compile this and upload it and without showing you it will just show
    you the serial monitor on here and I’m adjusting the potentiometer and bringing
    it down to zero and then I’m turning it the other way so we’ll go all the way up
    to 255 on there so you saw on there where we could take the value and divide
    it by 4 to get to 255 and then we use the map function on here to change the
    value or remap the value from 0 to from 0 to 1023 to 0 to 255 I just wanted to
    show you that right there so because we’re going to be using that in the
    future now the next thing we’re gonna do is light up the LEDs and the way we’re
    gonna do that is put in the analog right so we’ll start over here
    and I commented out to delay for the analog right and what you see is my LED
    one and then we’re going to use value and value is value is whatever we read
    on the potentiometer LED – okay now that should be okay and the reason I took the
    delay out is if I would have left that delay in there you would see like
    brightness of the LED going down in steps and I’ll put it back in after I
    show you the first part of this and we’ll take a while to upload it it compiled it
    now it’s uploading there we go all right there we go then we’ll take this and
    we’ll bring it down and then we’ll bring it back up now on camera it kind of
    distorts the LED the brightness on it so it’s not gonna look exactly like that it
    looks better in real life so I’m gonna leave it right there now I’m gonna put
    the delay back in there and you can see what happens with it now with a delay
    it’s gonna stop at a half a second to read now whenever everything that’s in
    that loop with that delay in there it’s going to delay everything in that loop
    so it’s also going to delay the value that goes to the LEDs okay now now as I
    decrease it you’re gonna see it step down instead of go smooth okay and you
    can see that right there now let’s bring up the serial monitor
    and the reason why we want to do the serial monitor is because if we have a a
    sensor and it doesn’t have to be a potentiometer it could be anything that
    we’re working with we want to know what value it works best with the sketch that
    we’re writing so we want to we want to replace whatever this potentiometer is
    replace that with our sensor and play around with it to get the right setting
    in there so we could turn on or turn off something or get the right brightness or
    whatever we’re using in there we will use this and the serial monitor to
    figure out what settings we want and we could either hard-code that in there or
    we could set limits on it through the the map function over here now let me do
    something with the map map function I’m gonna keep the values in there but I’m
    going to change it between 10 100 and 255 and you’ll see what happens there when I turn this all the way down it’s
    not gonna go completely off so it’s only going to go between 100 and 255 you
    can’t really see it on there so let me go on the other range of it I’ll go from
    0 to about 125 and we’ll do it that way and we’ll see what it looks like now and okay it starts out at zero and then it
    only goes up to 125 at full throttle right there let me take the delay back
    out of it so you can see what it does smoothly instead of in steps okay there
    we go now bring it back down okay we’re gonna see what that reading
    is right there so we’ll bring up the serial monitor and that’s set at 50 so
    what we’re gonna do is we’re gonna set the low point at 50 and so that it won’t
    go any dimmer than that right there and so we’ll upload that and I’m turning it
    down and it doesn’t go down any further than that but it will go up to our set
    point of 125 now I have this all the way up right now and we have that part set
    at 125 so we’ll change that up to our maximum 255 and we’ll see what that does okay now it’s bright all the way and
    we’ll bring it down and it’s only going to go down as far as 50 it’s not gonna
    go to total dim or total total blackout so that’s the good read that’s the good
    part about the map function on there you could set you could set your limits in
    there you can also do that in another function constraint but we won’t go into
    that one this time we’ll go into that a little bit later on but this is just to
    give you an idea of how you could play around with these numbers and the reason
    why you want to play around with these numbers say you have a ambient light
    sensor and we’ll get into that later on but that’s what most modelers use
    whenever they want to operate their crossing gates and lights they put them
    between the ties and as the train goes over it it changes value so what you
    have to do is once you have the ambient light sensor in place you have to use
    the serial monitor to find out where that sweet spot is where it will trigger
    your crossing lights and gate so that’s the reason why you want to have this
    serial monitor you want to be able to monitor what your values are so you
    could write that into your code to operate your devices okay so I hope this
    helped out this is as far as we’re gonna go I ran pretty long on this one again
    but you have a lot of information in there go back and try different things
    with your sketch it’s a good idea to go in there and change some of the numbers
    and to experiment with it you know don’t just do what I do here you know do some
    other things and get familiar with coding and changing things around and
    see what happens in there you know just by changing this if we go
    in there and change let me pull that part up in
    there let me see if we go up there and change this value right here other than
    zero we’re going to have different results so go ahead and try doing that I
    mean you could go up to anywhere up to 255 I wouldn’t go higher than that but
    anyway you know try 50 try 100 and see what happens you’re led whenever you run
    it back and forth and whenever you running back and forth the potentiometer
    you’re gonna see your LED go brighten and dim and then go brighten and dim
    when you change that value on that first value over there because that is a
    global value because it’s above the set up everything everything in there is
    based on that value right there of zero it now whenever you change your value in
    the loop that changes it in what you’re doing on your project right here and it
    uses that value up on top as a starting point go ahead and pause your video and
    take a look at the code and the Fritzing diagram and for your information I
    usually put these up a couple of days ahead of time of the video so if you
    don’t would like to see them ahead of time for future episodes go ahead maybe
    on Thursday or Friday you could see them up on my website Tom’s trains and things
    dot-com / Arduino I hope you learned something go ahead and spare mint with
    it next time we’re going to be doing if statements for statements and wild
    statements and you’ll see we’ll be able to operate these LEDs and without having
    to code a lot of different things in there we’ll be able to use if for and
    wild statements to step things through and count and
    we’ll and we’ll get into that on the next lesson lesson four and that’s
    coming up next week so take a look for that and we’ll see ya

    Model Railroad Layout Tour Of Leakin Creek & Big Rock RR
    Articles, Blog

    Model Railroad Layout Tour Of Leakin Creek & Big Rock RR

    August 19, 2019


    i’m going to show you my layout, what I’ve already done back here, and over there all the way around and what I am currently working on and what I will be working on in the near future. So let’s get started with this! About two to three months ago I did a few videos showing you little pieces here and there of my layout but on this one I’m going to take you all the way around it give you a good view of everything that I’ve done and what I’m going to be doing in the future. This is the newest section of my layout i did about a year and a half ago and I had to finish this part of it mainly because it’s sitting over top of my stairs coming up to the second floor. This is connected to the one area that I did. I showed in a previous video of me building Leakin Creek. This town right here is Rockwood Pennsylvania, but this is basically the outskirts of the city. This corner right here is a catch-all for all my loose items. Anyway we go all the way down as you can see the mountains in the far corner. That is the Leakin Creek section of it, and down below in the valley i have an engine facility. Down there i have a to stall engine house with a bunch of buildings that I haven’t yet quite finished . I could pull the buildings up and whether them. That’s all I need to do with them, and then the track, I just have to do a little bit of dirt. I’m not going to do balast or anything, I’m just going to simulate it as dirt up to the level of the ties. Then I have a small creek that runs along through it, and the railroad when they came over and built there right of way over here, they built a little culvert, and then this area right here was a little little lake. I have a lot of these Bar Mills models and a couple of them are Walthers models and then some other ones. Let me see we gotta ah, these are all Bar Mills over here except for the welding house this is a a Walthers kit. I have Hart Supply, and Wicked Wanda, Mooney Plumbing, and then Crown Crate, and then have the grocery store and meat stand and Bulls Salvage, and then the other white building way in the back is a Walthers kit also, its Lakeside Ice and Coal. From this side you can see that the backs of all the buildings and the the hillside on down into the engine facility. I have the bridge over there ,and over here in the corner is where the hobos are hanging out, and I have a an abandoned building that’s an old Campbell Scale Model – abandoned house on the corner. i’ll get a little bit better shot of it, there’s the Campbell Scale Model – abandoned building and then my hobos over here along the tracks. And then in the background I have the wholesale meat, Uncle Tony’s wholesale meats. I think it’s Uncle Tony’s. Right there in the distance you can see the little sawmill. This area right here is Leakin Creek, this is the first part of the layout that i built, and originally I had it about 4 feet over towards the right more because right where your viewing right now used to be a wall that divided the stairs coming up there. You know you came up nine steps than hit a landing and then turn and then go up another six steps. And where that tunnel portal is, is where i had the wall so that was over about another almost four feet so I had to add four feet over in this area right here. And this is the rest of Leakin Creek right there. That right there used to be a wall that went all the way up to the ceiling. Snd that right there I have to build a little bridge over there i’m going to scratch build a bridge, but originally this little building right here was Long’s Coal and I had an elevated track right there where hopper would dump the coal. Well i’m going to extend that track, go over top of Leakin Creek. Ok. and then meet up with these tracks over here, they go into the engine facility. And here’s a long view of the engine facility and got this two stall engine house and then right right behind it where the stacks are is the boiler. and then a couple of sheds and paint shop, and I gotta sand house that’s an old plastics sand house that I picked up at a train show. And then the rest of it is laser cut. That one passenger car right there it’s a wooden model that I picked up at Metro Trains & Hobbies in Fort Myers. I think I paid five bucks for it. The bridge right there was a kit. Okay, that’s Leakin Creek all the way in the back. I did the mountains with hardboard and then i used all the same texturing material, Woodland Scenics, texturing material as I did on the ground cover so you know in order to match it up. A lot of the kits, I got were from train shows, and most of them I built myself, like the DPM kids, and the old I guess they’re Atlas kits or whatever, and then there’s a few Bar Mills over this way, and some other laser cut wood kits. and then the Excel Manufacturing right there is the, I believe that’s the DPM panels that you could create a building from and then this area right here is basically my industrial area. Do a little bit of switching right here but not much. More into running the trains around. And I have to continuous loops on this layout. And basically those in the back are just flats that I’ve made and the ones in front of themare wood kits, some of them, Bar Mills and some of them are FOSe Scale Models. In this area right here, all the track work is finished all the way to you know all the way from the other end down through here. I just have to work on the buildings and some of the some of the textures, groundcovers. These are the buildings that are on one of my access doors. That’s my next project. i’ll be doing a video on those. And going on over there, and that’s the rest of the buildings on the access door. And that’s way back in the other corner of my room. And there is my NMRA Gauge that i modified, and I know exactly where it is right now. I have a little lift out section right here to gain access to the track that is right underneath going to the back. That’s one of the loops it goes back behind underneath the access door. And right there where that void is, is where the access door that I just worked on! And all these backdrops right here, i’m going to pull these out. i’m not really satisfied with them. i put them up here to see what they would look like. You know, they are good scenery, but they just don’t fit right. So I’m going to pull them all down and redo the background. Okay, over here is where I did the hardboard again, I came all the way down to this area right here. I think i’m going to continue with the hardboard down a little bit further and then i’m going to cut out the buildings and place them on some black Gator board and put them in the background like that. Okay now, this is where the other access door is. Where I just finished doing a video on, and that building that’s up on it side, that’s one of my next projects. It’s a it’s a flat or actually it’s got two sides on it and an angled roof because i had it sitting up against the the wall before. And i’m just going to put back walls on it, and continue the roofline. Going back now looking down from this retaining wall i used to have a lot more tracks over here and I just pulled out a lot of the scenery and redid this area. Iit was just too busy with tracks, and you can see the area back here where you can see the wood, I had that all covered up, and couldn’t see the tracks in the back. So I decided I was going to taper that down so at least I could see the rail in the background, and the little trestles, and the the creek that runs along there. Okay that building its just uh I think City Classics, and i just did one panel deep in that so it’s only like two and a half inches deep. And this is what I have to work on, and I’ll probably be working on this for a long time. I’ll get you another angle of it here. Down on the bottom is Big Rock Okay, here’s the access panel that I just finished I just have it laying right here. But on the lower level ,on the low grade, is where Big Rock is, and I don’t have that finished yet. And i’ll head over that way in a little bit, but this area right here is unfinished, and I changed this a couple of times so far because You know, my original track plan, it just didn’t fit right, and really didn’t look right, and it looked too crowded so I redid it. And here’s another coal dump that I have, I built this and I got it on a little piece of hardboard so I can move it around and put it wherever I want to. And then here’s the Big Rock bridge, and then i’m going to build, (scratch-build) two trestles to go over this little creek right here. And then right in this corner right here, i’m going to build up the mountains. Right here i have the creek, let me move this out of the way. I have basically the water in there but I haven’t done any of the ground cover, or anything. And then I tore out what I had and i’m going to redo it and I’m going to put a mountain right there so you won’t see these tracks coming around the curve. And I’m giving you a view of the my isle right here, where I have the drop bridge that i did a video on installing the switches. And on the lower lower end where the box and the braces, that’s where I’m going to have a dock and water scene right there. And then we’ll go past these tripods right here. This area right here is what’s going to be Big Rock. And once i’m finished with doing everything else, basically right now, this is my workbench where I do all my work. And then actually that area right there, back behind the tripod, I have to leave that open, and I have to leave access because right above it I still have the sheet up there as not to get any insulation down on the layout. But if I have to access my air-conditioning unit, it’s right up there, so for right now, the sheets still there but whenever I build, that area right there, I have to make it so i can pull it out very easily. I hope you enjoyed the video i’ll have more vidios out like this with my progress, check my playlists, leave some comments down at the bottom, and if you haven’t done so already, subscribe. And then there’s a little bell [DING] right next to the subscribe button, that if you click on it, there’s a little checkbox that you could check off and it’ll inform you of whenever I have a new video out. And we’ll see ya, and thanks for watching, bye bye