Posts | Comments

Planet Arduino

Archive for the ‘model railroad’ Category

Go to any model railroading convention and you’ll see that most layouts have far more work put into the terrain and buildings than into the trains themselves. The emphasis is usually on realism, so enthusiasts spend uncountable hours constructing and weathering their buildings. But lighting those buildings can be difficult, leading many people choose simple static lighting. This project by Olivier Wagener makes it relatively easy to upgrade that lighting to something much more sophisticated.

Wagener started this project to help his father improve the lighting of a train station building for his model railroad. The result is really impressive, because every room in the building has two of its own LEDs: one a warm temperature and one a cool temperature. This also supports RGB LEDs. Using a smartphone, the user can set the brightness, color, and temperature of each room individually. They can also group those into zones for quick control. Once setup, the user has complete control over the realistic lighting and that adds a whole new dimension to model railroading.

This is possible thanks to an Arduino MKR 1010 WiFi board that communicates with Wagener’s custom app over the local network. This can handle up to 976 single-color LEDs (warm or cool), 305 RGB LEDs, or some combination of the two. To give the Arduino full PWM (pulse-width modulation) control over that many LEDs, Wagener chose PCA9685 PWM module boards. Each one has 16 channels, so a full set of 976 single-color LEDs will require 61 boards. 305 RGB LEDs will also require 61 boards, because each of those LEDs takes up three channels.

If you want to use Wagener’s project in your own buildings, all of the code and information is available on his Gitlab page

The post The ultimate lighting system for model railroaders appeared first on Arduino Blog.

Certain hobbies come in clusters. It isn’t uncommon to see, for example, ham radio operators that are private pilots. Programmers who are musicians. Electronics people who build model trains. This last seems like a great fit since you can do lots of interesting things with simple electronics and small-scale trains. [Jimmy] at the aptly-named DIY and Digital Railroad channel has several videos on integrating railroad setups with Arduino. These range from building a DCC system for about $45 (see below) to a crossing signal.

There are actually quite a few basic Arduino videos on the channel, although most of them are aimed at beginners. However, the DCC — Digital Command and Control — might be new to you if you are a train neophyte. DCC is a standard defined by the National Model Railroad Association.

Model trains pick up electrical power from the rails. DCC allows digital messages to also ride the rail. The signal shifts from positive to negative to indicate marks and spaces. By diode switching the electrical signal, the train or other equipment can get a constant supply of current. However, equipment monitoring the line ahead of the diodes can read the data and interpret it as commands.

To accommodate old equipment, you can stretch the high or low values to make the average voltage either positive (forward) or negative (reverse). This can heat up DC motors, though, so it may shorten the life of the legacy equipment.

The build uses an available Arduino library, so if you want to get into the protocol you’ll have to work through that code. We had to wonder if there were other places where passing power and data on the same lines might be useful. There are other ways to do that, of course, but this would be a reasonable place to start if you needed that capability.

If you want to use an mBed system instead of an Arduino, there’s a great tutorial for that. Either way, it is just the thing for your next coffee table.

Certain hobbies come in clusters. It isn’t uncommon to see, for example, ham radio operators that are private pilots. Programmers who are musicians. Electronics people who build model trains. This last seems like a great fit since you can do lots of interesting things with simple electronics and small-scale trains. [Jimmy] at the aptly-named DIY and Digital Railroad channel has several videos on integrating railroad setups with Arduino. These range from building a DCC system for about $45 (see below) to a crossing signal.

There are actually quite a few basic Arduino videos on the channel, although most of them are aimed at beginners. However, the DCC — Digital Command and Control — might be new to you if you are a train neophyte. DCC is a standard defined by the National Model Railroad Association.

Model trains pick up electrical power from the rails. DCC allows digital messages to also ride the rail. The signal shifts from positive to negative to indicate marks and spaces. By diode switching the electrical signal, the train or other equipment can get a constant supply of current. However, equipment monitoring the line ahead of the diodes can read the data and interpret it as commands.

To accommodate old equipment, you can stretch the high or low values to make the average voltage either positive (forward) or negative (reverse). This can heat up DC motors, though, so it may shorten the life of the legacy equipment.

The build uses an available Arduino library, so if you want to get into the protocol you’ll have to work through that code. We had to wonder if there were other places where passing power and data on the same lines might be useful. There are other ways to do that, of course, but this would be a reasonable place to start if you needed that capability.

If you want to use an mBed system instead of an Arduino, there’s a great tutorial for that. Either way, it is just the thing for your next coffee table.

[kodera2t] discovered the VL53L0X Time of Flight sensor and thought it would make a great way to control the operation of a model train without touching it.

The sensor was small enough for an N-gauge train, which translates to 1:148 scale or about 9mm from rail to rail. His idea was to build a tiny control board that could fit inside the locomotive: 10mm by 40mm. His board consists of the ToF sensor, an ATMega328P-MMH, USB-serial, and a Texas Instruments DRV8830 motor driver. he powers the board via the 6V running through the track.

Right now [kodera2t]’s using the ToF as sort of a gestural controller to get the train to start rolling, but one could imagine the sensor could be incorporated into more advanced programming, like having the train speed up on straightaways and slow down on a curve, based on the height of the bridge over it.

We’ve published a bunch of [kodera2t]’s tiny circuit board projects here on Hackaday, including the smallest basic computer, his minimal frequency counter, and his VFD amplifier.


Filed under: Arduino Hacks
Giu
19

Bringing a Classic Marklin Z-Scale Model Railroad to Life With Arduino

arduino, Craft, model railroad, Woodworking Commenti disabilitati su Bringing a Classic Marklin Z-Scale Model Railroad to Life With Arduino 

Front_049"I have this train I bought in Germany," said Lynn, who approached me at a train show, "and I'm looking for someone to build a railroad for me."

Read more on MAKE



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook