Kind of new to the whole DIY electronics scene.

I'm building a diorama for my son. It will include a length of track, a station, some other buildings, and scenery. It will be HO scale. The buildings came with these cool little LED lights and I've bought additional ones as well. I want it to be of the period of the late 1800s to early 1900s. So the additional LEDs I bought give off a more "yellow" light to simulate candle/lantern light. The track is not a circuit and is not powered. It is just "static" to sit a train so it appears to be at the station.

I have the following questions:

  1. Could I hook up the LEDs to a Arduino and have the different buildings (or floors within a building) be controlled separately?
  2. Could I make the LEDs "flicker" to simulate candle/lantern light?
  3. Could I maybe hook up a little speaker inside the train station to give off train noises, whistles, conductor calls, etc?
  4. Could this setup (Arduino with LEDs/speaker) be run off of batter power (not a custom battery, just off the shelf AAs, AAAs, or Cs, etc.)?
  5. Is an Arduino instead the appropriate controller for this kind of project?

I think this is a great opportunity to teach my kids not only modeling but also electronics (myself as well on the electronics).

Thanks in advance for any help/suggestions.


A little more about the setup. The LEDs are made specifically for this type of application (model buildings/railroads). Hence, they already have an 1800 ohm resistor attached to the input side of the LED. There will indeed be multiple LEDs per building (even per floor). I would like to at least isolate the circuits by building and even better if I could isolate them by floor. I think it would be cool to have the software cycle the buildings/floors on and off at different times.

A smaller form factor for the Arduino would be ideal as it will have to fit into one of the scale buildings. I've never really worked with the Arduino so I don't know all my options. I've done a little with the Raspberry Pi and originally posted this question there and was told the Raspberry Pi would be overkill for this type of application.

  • Yes, but use a compact one, like the Arduino Nano or Pro Mini. I'm not sure how many battery life you will get, but I can't think of anything more appropriate as Arduino.
    – Paul
    Dec 6, 2016 at 7:25
  • Arduino itself doesn't really have good audio capabilities, but there is an "SD card audio mp3 shield" in adafruit, that can be triggered easily
    – Paul
    Dec 6, 2016 at 7:26
  • The Arduino can safely output 20 mA per IO pin, so you may power about ten 1.8 kΩ LEDs per pin without a transistor. But beware of the 100 mA limit per pin group (two groups: pins 5 — 13, all other pins). The LEDs are likely to consume more power than, say, an Arduino Nano, so this will likely be the limiting factor for battery life. Dec 6, 2016 at 20:54
  • Thanks everyone for all the great feedback. I hope to provide a status to this post when I make some progress. It could be a while though. I got to build the actual building first.
    – EL MOJO
    Dec 7, 2016 at 16:38
  • @EdgarBonet Can you further explain what you mean by "pin group"?
    – EL MOJO
    Dec 7, 2016 at 16:55

1 Answer 1


First, since you didn't mention any kind of Arduino, my answer is based on using Arduino Uno/Nano (I think its the most common)
1. Yes you can. You use 1 transistor per building as switch (if there are many LEDs in the building) to gives optimal current and prevent your Arduino pin. The value of R2 -- Rx is depend the LED colour. You can control each group with one Arduino pin.


simulate this circuit – Schematic created using CircuitLab

  1. Yes you can, one in my mind is using PWM feature, like this project
  2. Yes you can. But maybe the generated sound is not up to your expectation. Here is one of the simple example and this maybe a bit challenging.
  3. The battery is up to your setup. More output (such as led and speaker) requires power source that can provide greater current. Arduino Uno voltage limit is 6v-20v
  4. In my opinion, yes.

As for the form factor, I think Arduino Nano is small enough to hide in the building, while Arduino Uno size is just slightly less than a Raspberry Pi.

Good luck for your project :)

  • 2
    The Arduino Nano is essentially the same, but in another form factor, this this answer also applies for the Nano.
    – Paul
    Dec 6, 2016 at 7:36
  • Please don't use a single resistor for multiple leds. One resistor for each led. For yellow leds you probably need a higher value resistor. Also R1 shouldn't be 100 Ohms, as that would result in 44mA of base-emitor current, which if a bit over the maximum rating of an Arduino pin. Use something like 1000 Ohm (i.e. 1 kOhm).
    – Gerben
    Dec 6, 2016 at 13:04
  • Thanks for this help everybody. I failed to mention that the LEDs are specifically built for model buildings and they each have an 1800 ohm resistor already attached. I'll update the original post. This may change this answer a little. But I like the info I'm getting so far.
    – EL MOJO
    Dec 6, 2016 at 19:01
  • 1
    @Gerben Thanks for the info. I updated my original post. All the LEDs are the same color and they already come with an 1.8 KΩ resistor attached, so I think that aspect is taken care of.
    – EL MOJO
    Dec 7, 2016 at 16:41
  • 1
    The only point would be that all LED's would go on/off at the same time. It would be weird if all the candles on the station would be in sync :p But that would be an easy fix, but keep it in mind while building.
    – Paul
    Dec 7, 2016 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.