Model Railroad Star Wars Project Assistance

I am just starting to get into Arduino’s in order to add animation to model railroad modules.

I am working on a project that will be a Star Wars’ Death Star trench run setup. I will have an x-wing, an advanced tie fighter, and a death star cannon involved. My goal is the following:

a. Push button to start the sequence.

b. LED lights for the x-wing and tie fighter engines (will have fiber optics to the actual vehicles) light up.

c. Sound clip starts of the trench run sequence

d. At W point in time of the sound clip the advanced tie fighter cannons blink

e. At X point in time of the sound clip the death star cannon fires

f. At Y point in time of the sound clip the x-wing tie fighter torpedo shoots. This is run from an electronics module produced by another manufacturer. Basically it will flash two lights.

g. At Z point in time of the sound clip a light flashes once when the torpedo “hits”.

h. The sequence ends.

I have been reading up on your products but am unsure which of your sound shields/devices would best work for me for this project.

I am searching for Arduino sketches to pull pieces from to produce the sketch I will need.

Any suggestions and/or recommendations you can give me would be greatly appreciated.

My electronics knowledge dates back to high school in the mid 1970’s, so am having a steep learning curve.

V/R

Todd Blose

Hi Todd,

That’s a really cool project idea. I think we have a few products that could help you make this project work. For your audio, the [url=https://www.sparkfun.com/products/15165]Qwiic MP3 Trigger would work well. It has a built-in amplifier and can be controlled in a couple of different ways. I would recommend reading through the [url=https://learn.sparkfun.com/tutorials/qw … okup-guide]Hookup Guide to get a better idea of what is on the board and how to use it. The Qwiic connector makes it easy to hook this board up via I2C with a microcontroller like the [url=https://www.sparkfun.com/products/15123]SparkFun RedBoard Qwiic. Just like the Qwiic MP3 Trigger, we have a [url=https://learn.sparkfun.com/tutorials/re … okup-guide]Hookup Guide for the RedBoard Qwiic to get you started with that board.

From there, you can use the digital I/O pins on the RedBoard to toggle your LEDs in the sequence by driving the digital pin they are attached to HIGH or LOW. Unless you have separate audio tracks for each portion of the sequence, you will need to play around with your code to get the timing right using functions like delays. Depending on how the module for the X-Wings is controlled, you may need a relay to toggle that portion. If that is necessary, the [url=https://www.sparkfun.com/products/15093]Qwiic Relay would work to switch between the low-voltage of the Arduino to the high voltage of the controller.

I hope this helps you get started with this project and decide whether SparkFun has the right parts for you. If you have any other questions about these or other SparkFun products you would like to use in this project, let us know and we would be happy to help as much as we can.

My understanding is the Qwiic MP3 trigger has to be powered either through the USB cable or through a RedBoard using a Qwiic cable. There is no way of hooking a wall wart or battery source directly to the Qwiic MP3 trigger. Is this correct?

Here is what the guide states:

"Electrical Characteristics

The Qwiic MP3 Trigger is designed to operate at 3.3V and must not be powered above 3.6V as this is the maximum operating voltage of microSD cards. The 5V power from the USB C connector tied to a robust AP2112 3.3V voltage regulator that can source up to 600mA for the board. Otherwise, the board can also be powered through the Qwiic connector."

You could hook up either a battery or a wall outlet up to the qwiic MP3 via the USB-C connector, though, it does depend on the battery.

The dropout voltage for the AP2112 3.3V regulator appears to be as follows: “Low Dropout Voltage (3.3V): 250mV (Typ.) @IOUT=600mA”. So as long as you source over 3.55(lipos are 4.2v - 3.7v, generally) volts you should be okay.

You could just use the i2c pins SDA and SCL, not worrying about power pins, however, if you do use multiple power sources between boards you still need to have common ground.

It is easier to simply use a single power supply for everything if you can.

Hope this helps.

Two questions. Is this saying I can plug in a 5V wall wart and the board will lower the voltage to the required voltage?

Question 2. Is the 3.3 voltage the minimum requirement? Would a 3volt power source work?

Your arduino powers the audio board, just feed 5 to 7 volts to the barrell connector on your arduino and that will take care of the rest for you.