Author Topic: My Model Railroad with Electronics  (Read 32074 times)

0 Members and 3 Guests are viewing this topic.

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7741
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Model Railroad with Electronics
« Reply #50 on: June 06, 2013, 09:23:49 pm »
Good stuff.  Much nicer colours and less current draw than the "grain of wheat" lamps I remember buying as a kid for my model railway.

The green SMD LED is bright. Really bright. Way too bright @ 20 mA, so I reduced the current to 10 mA. Still way too bright. Then down to 8 mA, then finally to 3 mA!

So at only 3 mA it's apparent brightness is the same as the red and yellow LEDs running at 20 mA.

Wow, that green LED is pretty efficient!
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: My Model Railroad with Electronics
« Reply #51 on: June 06, 2013, 09:29:16 pm »
Yeah, there can be massive differences in the intensity of LEDs.  As you found, you only need a few mA for some types.  Maybe a good excuse to make yourself a resistance box or an adjustable current source for testing.   :)

If you check the LED data sheets, they will specify the wavelength (in nm) so you can use that to choose LED colours that are nice.  eg. Some greens are definitely yellow tinged while others are a nicer (imo) emerald green.
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7741
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Model Railroad with Electronics
« Reply #52 on: June 07, 2013, 12:25:36 am »
Yeah, there can be massive differences in the intensity of LEDs.  As you found, you only need a few mA for some types.  Maybe a good excuse to make yourself a resistance box or an adjustable current source for testing.   :)

Yea, and another good point is modelling real traffic lights with LEDs is valid, because real traffic lights are being constructed with LEDs now.

 :clap:

I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38720
  • Country: au
    • EEVblog
Re: My Model Railroad with Electronics
« Reply #53 on: June 07, 2013, 12:33:49 am »
With terms like "frogs", etc people new to the hobby often wonder what the hell is being spoken about.  No different to Electronics and all the associated weird terms I guess.

Yep, now I have to get my head around again.
I want to add two crossovers to my set, to potentially run two trains but don't know if DCC is the best way to go, or simply a regular controller with maybe isolated parts of tracks or whatever. It's been 30 years wince I had a train set  ;D
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7741
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Model Railroad with Electronics
« Reply #54 on: June 07, 2013, 12:55:49 am »
It's been 30 years wince I had a train set  ;D

Same here. Three years ago I waltzed into a hobby shop just to get some track to display my old N scale cars on (for my nephew) and was completely sucked back into the hobby, because of the DCC capabilities. Now look at me.  :-DD

There's something simple and pure about a DC layout, and it may be all you need to use. But if you like more advanced electronic gadets and all that lot, then you will want DCC locomotives.

Oh, I just described you didn't I.  :-/O

I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38720
  • Country: au
    • EEVblog
Re: My Model Railroad with Electronics
« Reply #55 on: June 07, 2013, 01:04:00 am »
There's something simple and pure about a DC layout, and it may be all you need to use. But if you like more advanced electronic gadets and all that lot, then you will want DCC locomotives.

The last thing I need is another advanced hobby that will suck my time!
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7741
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Model Railroad with Electronics
« Reply #56 on: June 07, 2013, 01:06:00 am »
The last thing I need is another advanced hobby that will suck my time!

LOL - well it's DCC for your layout!

Truthfully, I don't know how you  are doing all you are doing anyway. You must be one Hell of a multitasker.  :o
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38720
  • Country: au
    • EEVblog
Re: My Model Railroad with Electronics
« Reply #57 on: June 07, 2013, 01:12:20 am »
Truthfully, I don't know how you  are doing all you are doing anyway. You must be one Hell of a multitasker.  :o

Multitasking to the point where hardly anything gets done!
Continuous video output (at some level, but not as often as I'd like) gets priority of course, because without that Sagan starves.
Apart from that, my non-achievements are outstanding  ;D
 

Offline jh15

  • Frequent Contributor
  • **
  • Posts: 565
  • Country: us
Re: My Model Railroad with Electronics
« Reply #58 on: June 07, 2013, 02:29:31 am »
Yes! Give it all to Sagen before it's too late. We need your time here.
Tek 575 curve trcr top shape, Tek 535, Tek 465. Tek 545 Hickok clone, Tesla Model S,  Ohio Scientific c24P SBC, c-64's from club days, Giant electric bicycle, Rigol stuff, Heathkit AR-15's. Heathkit ET- 3400a trainer&interface. Starlink pizza.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38720
  • Country: au
    • EEVblog
Re: My Model Railroad with Electronics
« Reply #59 on: June 07, 2013, 02:46:33 am »
Yes! Give it all to Sagen before it's too late.

He already broke the train station roof!
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: My Model Railroad with Electronics
« Reply #60 on: June 07, 2013, 02:58:27 am »
Yes! Give it all to Sagen before it's too late.

He already broke the train station roof!

Inevitable I'm afraid.  Been there, had that happen.
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7741
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Model Railroad with Electronics
« Reply #61 on: June 07, 2013, 08:56:19 pm »
Yeah, there can be massive differences in the intensity of LEDs.  As you found, you only need a few mA for some types.  Maybe a good excuse to make yourself a resistance box or an adjustable current source for testing.   :)

Another odd thing is how the SMD LEDs mark the cathode. The green ones have a sortof green "T" that marks it. The yellow have a green triangle symbol, and the red - have no marking, the cathode is only distinguishable because it's metal pad is a different shape than the anode. Weird.

He already broke the train station roof!

Maybe modelling the outback isn't such a bad idea after all.  ;) (at least for now)
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: My Model Railroad with Electronics
« Reply #62 on: June 07, 2013, 11:04:26 pm »
Another odd thing is how the SMD LEDs mark the cathode.

Yeah, you can never assume.  I always test one out of a batch to confirm before loading them onto boards.
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7741
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Model Railroad with Electronics
« Reply #63 on: June 08, 2013, 11:06:46 pm »
Here's five more SMD traffic lights. I have all six made now. Next I need to swap them into my Arduino breadboard and check the whole lot as they will be operating. Might adjust some resistors to make the light levels look more identical.

Then I need to paint them and figure out what type of traffic light pole system to use to hold them on the layout.
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7741
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Model Railroad with Electronics
« Reply #64 on: June 09, 2013, 03:44:00 pm »
Ran into a small problem.  :)

When I swapped the SMD lights into the Arduino + breadboard, the green LEDs were very dim. The red and yellow were OK. Found out that the green 0603s are dropping ~3V. The green 1.6 mm LEDs I was using before on the breadboard prototype only dropped 1.8V.

This was not a concern when I was testing them before because I was using a constant current driver and I had more than enough voltage available. Now I have only 5V on the Ard. digital outputs, and I'm not even using a resistor at the moment. It's pulling 0.15 mA.

The brightness is possibly acceptable, however I'll have to either PWM the other colors to make them look the same brightness or adjust the resistors for them to do it.

or

I can drive the two sets of two greens LEDS each set with a transistor, and use the Vin rail, with associated current limiting resistors.

If it ain't one thing it's another.

I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: My Model Railroad with Electronics
« Reply #65 on: June 09, 2013, 09:49:35 pm »
You should be able to use any of those LEDs on a 5V supply.  Is the Arduino output really 5V?
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7741
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Model Railroad with Electronics
« Reply #66 on: June 09, 2013, 10:40:38 pm »
You should be able to use any of those LEDs on a 5V supply.  Is the Arduino output really 5V?

Yea, sorry David I didn't explain fully. I'm using several of the outputs to drive two LEDs in series to save outputs because certain lanes on the same road are in synch - both the lights in opposite directions are on with the same colors at the same time. If I don't do that I'd have to move up to shift registers.

But, I have it working now. I added a 2N2222 transistor connected to 12V, and I am driving the green LEDs with that, so I now have more than enough to cover the voltage drop for them in series. The other colors are lower voltage drop so are still working as the prototype 1.6 mm LEDs were, meaning I can use two of them in series off of a 5V digital output. It's just that these green SMDs have a 3V drop, unlike their 1.6 mm cousins which had a 1.8 V drop. I have no idea why that is.  :-//
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: My Model Railroad with Electronics
« Reply #67 on: June 09, 2013, 10:57:42 pm »
Different LED colours have different forward voltage drops (Vf) due to the manufacturing process.  Red is the lowest (1.6 - 1.8V usually) while green and yellow are a bit higher.  White and blue are a lot higher (up to 4V).

Using two LEDs in series from 5V is never going to be a good idea.  Much better to use some low-side drivers (2N2222 or a ULN chip) and run from a higher voltage as you've found out.   :)
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7741
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Model Railroad with Electronics
« Reply #68 on: June 09, 2013, 11:14:41 pm »
Using two LEDs in series from 5V is never going to be a good idea.

Why do you say that? I have a series resistor that limits the current to about 16 mA, and the combined voltage drop for both LEDs is ~4V. I don't see any "legal" design problem with doing it, and it works OK.  :)
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: My Model Railroad with Electronics
« Reply #69 on: June 09, 2013, 11:20:54 pm »
I guess if you can choose LEDs with a low enough Vf, it is ok.  Just be aware that once you start operating the LEDs with very little headroom (Vsupply - Vf), the series resistor value becomes more more critical.

The Vf of the LED also varies with temperature (lower Vf when hotter).  This means that the drive current can vary a lot with temperature when the headroom is low.  This is because the change in Vf becomes significant compared to the headroom.
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7741
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Model Railroad with Electronics
« Reply #70 on: June 09, 2013, 11:24:28 pm »
I guess if you can choose LEDs with a low enough Vf, it is ok.  Just be aware that once you start operating the LEDs with very little headroom (Vsupply - Vf), the series resistor value becomes more more critical.

Oh yes, for sure. I think we're on basically the same page then. I had it all worked out on the prototype just fine, it's just that the green SMDs threw me a curve, because their combined drop was 6V.  |O

Onward and upward!
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: My Model Railroad with Electronics
« Reply #71 on: June 09, 2013, 11:30:17 pm »
For sure, if it works go for it.  Being a non-commercial application you don't have to make sure it will work with substituted parts, etc.  Sorry if I sounded like I was putting a damper on your idea.  I just wanted you to know the pitfalls and why you saw some differences.   ;D
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7741
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Model Railroad with Electronics
« Reply #72 on: June 09, 2013, 11:31:30 pm »
For sure, if it works go for it.  Being a non-commercial application you don't have to make sure it will work with substituted parts, etc.  Sorry if I sounded like I was putting a damper on your idea.  I just wanted you to know the pitfalls and why you saw some differences.   ;D

Not at all. It's hard to communicate all these technical details over a forum.  :-/O
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7741
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Model Railroad with Electronics
« Reply #73 on: June 10, 2013, 02:28:57 pm »
So here's the final test of the prototype with all SMD lights connected, and transistor drivers for the greens that are in series. Everything cycles properly and the brightness across all colors looks good.

What it's simulating is a "T" intersection, with a main road being controlled in both directions (a traffic light for each direction), and the intersecting road with it's own light, being allowed to go when the main road is stopped and vice-versa.

Now that it's finalized, I need to move on to gluing the SMD's in place, painting the traffic light body, working on how to hang them over the little road, running all the wires through holes to the underside of the layout, mounting the Arduino, powering it, and soldering up the proto board. This project will have taken more time than any other project on the layout so far.
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline Alana

  • Frequent Contributor
  • **
  • Posts: 297
  • Country: pl
Re: My Model Railroad with Electronics
« Reply #74 on: June 12, 2013, 05:02:24 pm »
How about designing a current source switchable by TTL or 3V signal but capable of being powered from 12-15V AC/DC?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf