Page 2 of 2 FirstFirst 12
Results 21 to 40 of 40

Thread: Simplest Circuit to Sync Lights and Sounds?

  1. #21
    Join Date
    Feb 2012
    Location
    NJ, near old Lehigh Valley RR
    Posts
    3,036
    Blog Entries
    7
    Thanks
    11,569
    Thanked 3,959 Times in 1,564 Posts
    Mentioned
    73 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by ChicagoNW View Post
    The sequencer doesn’t sync anything. It turns things on and off, think theater marquee or chaser lights. You are just substituting sound activation for a flash.
    That certainly is an option if I just use the "boom" edited by itself. Or separate the commands as one part, then boom, flash... Makes more sense now.

    It's all about timing. Hope to play with an old Raspberry Pi today.

    The clip does have cars in background. But found the commands and firing interesting.
    My second choice is:


    Again, extraneous sounds. But the commands, drumming and cannon echo are nice. From about mark :15 - :35 seconds. Perhaps I can't have everything...
    Steve - Jugtown Modeler - Don't know enough about railroading yet, but scale modeling is my life - Web-Folio
    Blog: American Revolutionary War Diorama:https://www.nscale.net/forums/entry....onment-Diorama
    The introduction of so powerful an agent as steam to a carriage on wheels will make a great change in the situation of man. -- Thomas Jefferson, 1802


  2. The Following 2 Users Say Thank You to Jugtown Modeler For This Useful Post:


  3. #22
    Join Date
    May 2010
    Location
    CHICAGO!
    Posts
    10,625
    Thanks
    1,465
    Thanked 8,320 Times in 4,640 Posts
    Mentioned
    277 Post(s)
    Tagged
    1 Thread(s)

    Default

    If there was a budget, each of the sounds that make the scene would be recorded separately then placed on separate chips.
    • The drum - on a loop that played the length of the scene
    • The officer giving the order to fire - played once
    • A cannon firing - triggered for each flash

    But this project doesn’t have that kind of budget, does it.
    Use what you know about the world to model…
    Learn from modeling what you don't know about the real world.



  4. The Following User Says Thank You to ChicagoNW For This Useful Post:


  5. #23
    Join Date
    Apr 2008
    Location
    Ashburn, VA, USA
    Posts
    1,539
    Thanks
    323
    Thanked 2,894 Times in 842 Posts
    Mentioned
    56 Post(s)
    Tagged
    0 Thread(s)

    Default

    The Arduino sound shield has an SD card reader. The API can tell it which to read and play. What I’m unclear about is if it can play one over another….

    https://www.adafruit.com/product/94
    --
    Leo Bicknell

  6. The Following 2 Users Say Thank You to bicknell For This Useful Post:


  7. #24
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    732
    Blog Entries
    7
    Thanks
    3,146
    Thanked 2,362 Times in 572 Posts
    Mentioned
    38 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by bicknell View Post
    The Arduino sound shield has an SD card reader. The API can tell it which to read and play. What I’m unclear about is if it can play one over another….

    https://www.adafruit.com/product/94
    According to the FAQ, it is unable to mix multiple tracks.

    https://learn.adafruit.com/adafruit-...or-arduino/faq

    You would have to break the sounds down in the sequence you would want them to play.
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  8. #25
    Join Date
    Apr 2008
    Location
    Ashburn, VA, USA
    Posts
    1,539
    Thanks
    323
    Thanked 2,894 Times in 842 Posts
    Mentioned
    56 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Gary Rowan View Post
    According to the FAQ, it is unable to mix multiple tracks.
    .
    Good find. That's a bummer.

    This one can mix tracks apparently: https://nootropicdesign.com/audio-hacker/

    It may also be possible to stack more than one shield. We'd have to see if they have selectable GPIO lines.

    A RPi may be a better option in this case, it's got a full music library and all the hardware onboard to mix.
    --
    Leo Bicknell

  9. The Following 2 Users Say Thank You to bicknell For This Useful Post:


  10. #26
    Join Date
    Feb 2012
    Location
    NJ, near old Lehigh Valley RR
    Posts
    3,036
    Blog Entries
    7
    Thanks
    11,569
    Thanked 3,959 Times in 1,564 Posts
    Mentioned
    73 Post(s)
    Tagged
    0 Thread(s)

    Default

    Shields, RPi, GPIO lines...

    All Greek to me....
    I should have sold the museum on this or cut back on something.

    Hope to be making a decision in the next day.
    The Pi is older and I did not get very far with it.

    Will keep you posted.
    Steve - Jugtown Modeler - Don't know enough about railroading yet, but scale modeling is my life - Web-Folio
    Blog: American Revolutionary War Diorama:https://www.nscale.net/forums/entry....onment-Diorama
    The introduction of so powerful an agent as steam to a carriage on wheels will make a great change in the situation of man. -- Thomas Jefferson, 1802


  11. The Following User Says Thank You to Jugtown Modeler For This Useful Post:


  12. #27
    Join Date
    Apr 2008
    Location
    Ashburn, VA, USA
    Posts
    1,539
    Thanks
    323
    Thanked 2,894 Times in 842 Posts
    Mentioned
    56 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Jugtown Modeler View Post
    Shields, RPi, GPIO lines...

    All Greek to me....
    I realize this may not be the direction you want to go for your time/budget/knowledge constraints, but I want to summarize for the world and archive purposes.

    With a Raspberry Pi it would be possible to:




    The software would then be fairly simple, this is pseudocode, but a Python script wouldn't look too different.

    Code:
    while (1 == 1) {
        if (button_pin == HIGH) {
           // Button has been pushed.
           play_sound("firing_command.mp3");
           delay(100);
           gpio(1, on);
           delay(10);
           play_sound("boom.mp3");
           gpio(1, off);
           delay(100);
           gpio(2, on);
           gpio(2, off);
           delay(100);
           gpio(3, on);
           gpio(3, off);
        }
    
        delay(10);
    }
    The delays between the various lights and sounds could then be adjusted to get the effect just right.
    --
    Leo Bicknell

  13. The Following 3 Users Say Thank You to bicknell For This Useful Post:


  14. #28
    Join Date
    Feb 2012
    Location
    NJ, near old Lehigh Valley RR
    Posts
    3,036
    Blog Entries
    7
    Thanks
    11,569
    Thanked 3,959 Times in 1,564 Posts
    Mentioned
    73 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by bicknell View Post
    I want to summarize for the world and archive purposes.
    I do appreciate your thoughts and thank you all for your help. Not trying to brush anyone off. If this thread can end up helping others than it serves a purpose.

    I am have a very visual, hands on learning style and or need to start at very beginning with a qualified mentor/instructor. Reading material that has any level above novice takes more time and brain power than I can commit to at the moment. Even looking at tutorials on some of the suggested ideas presented here presume a level of understanding that I do not have yet.
    Not unwilling. Just overwhelming. Even though it may seem straight forward to some, with no background at all, it is a slight challenge for me to try and catch up.

    Had I brought this up 6 months ago, there would have been time. I put my expectations onto a young guy who said he could make this happen and we worked out a deal. As my deadline approaches, it appears he is not as knowledgeable as he had said. As said, this is a bonus feature above the basic lighting I had offered to the museum. I have gone overboard on the level of detail in the modeling of this large diorama (a conscious decision on my part) but bit off more than I can chew as an individual modeler. I am enjoying the process. It has gotten me off my rear and renewed my aging confidence in my skills.

    At any rate, I assumed () the sound/lighting was a done deal and have only just realized I am up creek...

    I may end up going back to finish this sound/light feature after installation.
    Steve - Jugtown Modeler - Don't know enough about railroading yet, but scale modeling is my life - Web-Folio
    Blog: American Revolutionary War Diorama:https://www.nscale.net/forums/entry....onment-Diorama
    The introduction of so powerful an agent as steam to a carriage on wheels will make a great change in the situation of man. -- Thomas Jefferson, 1802


  15. The Following User Says Thank You to Jugtown Modeler For This Useful Post:


  16. #29
    Join Date
    Apr 2008
    Location
    Ashburn, VA, USA
    Posts
    1,539
    Thanks
    323
    Thanked 2,894 Times in 842 Posts
    Mentioned
    56 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Jugtown Modeler View Post
    I may end up going back to finish this sound/light feature after installation.
    I'll note, if you build the LEDs into the model and just leave some wires dangling it would be easy to connect them to any of these, or a custom circuit, later. They are the same no matter what is used to drive them. You may need to change resistor values depending on the voltage of your end circuit, but the LEDs will be the same.

    You can find tons of suitable LEDs on Amazon with wires pre-installed for cheap. Search the electronics section for "pre wired LED diodes". They come in every size and color imaginable, with 5mm (diameter) and 3mm the most popular. Just avoid the ones that already have a resistor attached, as they are basically set to only work at one voltage. If your final project is a different voltage you'll have to remove it. Better to add resistors later.
    --
    Leo Bicknell

  17. The Following 2 Users Say Thank You to bicknell For This Useful Post:


  18. #30
    Join Date
    Feb 2012
    Location
    NJ, near old Lehigh Valley RR
    Posts
    3,036
    Blog Entries
    7
    Thanks
    11,569
    Thanked 3,959 Times in 1,564 Posts
    Mentioned
    73 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by bicknell View Post
    Just avoid the ones that already have a resistor attached, as they are basically set to only work at one voltage.
    Wow. See? Learn something every day. My 9-12 volt micro LED's on the cannons have a resister pre-wired... I should remove them probably...?

    Quote Originally Posted by bicknell View Post
    if you build the LEDs into the model and just leave some wires dangling
    As of now, the plan is to wire in the sound cards with a delay timed to one cannon blast and simultaneous cannon flash.
    We'll look closer at refining the system later on.
    No need for any dangling for now...
    Steve - Jugtown Modeler - Don't know enough about railroading yet, but scale modeling is my life - Web-Folio
    Blog: American Revolutionary War Diorama:https://www.nscale.net/forums/entry....onment-Diorama
    The introduction of so powerful an agent as steam to a carriage on wheels will make a great change in the situation of man. -- Thomas Jefferson, 1802


  19. The Following User Says Thank You to Jugtown Modeler For This Useful Post:


  20. #31
    Join Date
    Apr 2008
    Location
    Ashburn, VA, USA
    Posts
    1,539
    Thanks
    323
    Thanked 2,894 Times in 842 Posts
    Mentioned
    56 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Jugtown Modeler View Post
    Wow. See? Learn something every day. My 9-12 volt micro LED's on the cannons have a resister pre-wired... I should remove them probably...?
    I wouldn't do anything until you come to a final solution, as you may be able to make them work.

    LEDs will burn out quickly if connected directly to a power source as they let an unlimited amount of current flow. To prevent that a resistor is used to limit the current flow to a value the LED can tolerate 24x7x365. Also, to a degree more current results in more light, so you can control the brightness somewhat by the resistor value.

    Most LEDs have a maximum of 20ma of current. The equation is simple, Voltage = I (current) * Resistance.


    • 12 volts / 0.020 amps = 600 Ohms resistance
    • Using the same resistor at 9 volts, 9 volts / 600 Ohms = 15ma, still plenty to light the LED.
    • Use the same resistor at 5 volts, 5 volts / 600 Ohms = 8ma, probably still lights, but is starting to get dimmer.
    • Where as at 5 volts / 0.020 amps = 250 Ohms would be full brightness.


    Also, as a technical detail, resistors only come in particular values, so there is always a rounding up or down as appropriate to the closest normal value.

    Anyway, there's this window of working, perhaps 1ma to 20ma, and then there is brightness of the LED. Depending on the voltage you use to drive it you may want/need a different resistor to stay in the safe range, or get the brightness you want. It's all going to depend on the voltage output of your final circuit. Arduino use 5v. Raspberry Pis use 3.3v. If you build a circuit it may well be 9 or 12v.

    My $0.02 for the future is to buy without a resistor and buy a cheap (< $10) resistor assortment. Then you can dial in the brightness you want on each light.
    --
    Leo Bicknell

  21. The Following 2 Users Say Thank You to bicknell For This Useful Post:


  22. #32
    Join Date
    May 2010
    Location
    CHICAGO!
    Posts
    10,625
    Thanks
    1,465
    Thanked 8,320 Times in 4,640 Posts
    Mentioned
    277 Post(s)
    Tagged
    1 Thread(s)

    Default

    As to brightness, all LEDs do not dim with a huger resistance or less voltage. The chemical dope that produces the light has a set Candlepower. Measured as MCD or thousandths of a Candlepower (light from a candle at one foot(300 mm)). The LEDs in a traffic or street light run off 120 volts using minimal circuitry. Mostly the LEDs do the voltage drop.

    Like lightbulbs LEDs brightness cannot be expressed by its size or shape. Be it a SMD or T5 the part that emits the light is identical in size. Plastic/Resin gives an LED its size and shape. If possible ask your LED vendor what the MCD value is. A bigger number is brighter. 4000MCD is like four candles.
    Use what you know about the world to model…
    Learn from modeling what you don't know about the real world.



  23. #33
    Join Date
    Feb 2013
    Location
    Colorado Springs, CO, US of A
    Posts
    4,428
    Blog Entries
    1
    Thanks
    14,885
    Thanked 10,422 Times in 3,043 Posts
    Mentioned
    186 Post(s)
    Tagged
    0 Thread(s)

    Default

    Getting back to simplicity, imagine you have two devices. One to flash LEDs,and one to play commands and cannon fire sounds.

    Activated by a pushbutton, a double pole relay feeds both. The LED flash circuit can be delayed by a time delay device to wait for the end of the commands and the beginning of the cannon fire.

    Momentary pushbuttons, relays and time delay can be had for under $20 for all. The other devices are up to you.

    Aside from cheap, the synchronicity resets each time the button is pushed.

    I used a Faller sound module (expensive) for all the sounds on my German layout, and cheap timers for lights. I'll be changing out my fiddly double pole pushbuttons for single pole and 2P relays.

  24. The Following User Says Thank You to el Gato Gordo For This Useful Post:


  25. #34
    Join Date
    Apr 2008
    Location
    Ashburn, VA, USA
    Posts
    1,539
    Thanks
    323
    Thanked 2,894 Times in 842 Posts
    Mentioned
    56 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by ChicagoNW View Post
    As to brightness, all LEDs do not dim with a huger resistance or less voltage.
    I don't feel this statement is quite accurate. The brightness of an LED is determined by the forward current flowing through it. V = IR, or I, the current, = V/R. So the voltage and resistance combination do affect current, which in turn affects brightness.

    I picked out a white LED at random from mouser, here's a link to the data sheet: https://www.mouser.com/datasheet/2/3..._e-2237596.pdf

    Note on page 2, figure 3, "Relative Luminous Intensity". Note that it varies with forward current. Going from 10ma to 20ma takes it from 0.5 to 1.0, basically doubling the light output and making a brighter LED. Also, in Figure 2 you'll see that light output decreases as the ambient temperature goes up, although not as dramatically.

    Where I think there is a misunderstanding about this is that if the LED turns on at all it is relatively bright for the human eye. That is, if the eye can see a range of 1 (dark) to 10 (sunlight) the LED ranges from like 7 to 10 as the current is varied. To get in the 1-6 range requires a technique like Pulse Wave Modulation (PWM) to drive the LED at a partial duty cycle and make it dimmer. Particularly for something like a standard red indicator LED the human eye may not be able to tell the difference between 10ma and 20ma, even if the test instruments can. The amount of variation in Luminous Intensity varies greatly LED to LED, based on it's wavelengths and technology. Generally higher powered ones have more variation.
    --
    Leo Bicknell

  26. The Following User Says Thank You to bicknell For This Useful Post:


  27. #35
    Join Date
    Feb 2012
    Location
    NJ, near old Lehigh Valley RR
    Posts
    3,036
    Blog Entries
    7
    Thanks
    11,569
    Thanked 3,959 Times in 1,564 Posts
    Mentioned
    73 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by el Gato Gordo View Post
    One to flash LEDs,and one to play commands and cannon fire sounds.

    Activated by a pushbutton, a double pole relay feeds both. The LED flash circuit can be delayed by a time delay device to wait for the end of the commands and the beginning of the cannon fire.

    Momentary pushbuttons, relays and time delay can be had for under $20 for all.
    As it stands, this is similar to what we have come up with for the short term. I believe that it only allows for one simultaneous flash of the cannons. It will be a work in progress.
    Steve - Jugtown Modeler - Don't know enough about railroading yet, but scale modeling is my life - Web-Folio
    Blog: American Revolutionary War Diorama:https://www.nscale.net/forums/entry....onment-Diorama
    The introduction of so powerful an agent as steam to a carriage on wheels will make a great change in the situation of man. -- Thomas Jefferson, 1802


  28. #36
    Join Date
    Feb 2013
    Location
    Colorado Springs, CO, US of A
    Posts
    4,428
    Blog Entries
    1
    Thanks
    14,885
    Thanked 10,422 Times in 3,043 Posts
    Mentioned
    186 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Jugtown Modeler View Post
    As it stands, this is similar to what we have come up with for the short term. I believe that it only allows for one simultaneous flash of the cannons. It will be a work in progress.
    That depends upon whatever is used to sequence the flashes. I simply meant for the relay to activate the sequence, not operate the flashes directly. I can see that I wasn't very clear above.

  29. The Following User Says Thank You to el Gato Gordo For This Useful Post:


  30. #37
    Join Date
    Feb 2012
    Location
    NJ, near old Lehigh Valley RR
    Posts
    3,036
    Blog Entries
    7
    Thanks
    11,569
    Thanked 3,959 Times in 1,564 Posts
    Mentioned
    73 Post(s)
    Tagged
    0 Thread(s)

    Default

    Haven't had time to follow up on this thread.

    I was not able to make time to learn more about a programmable option. But the installation went well and public reception has been very positive even though I had higher expectations.
    What I ended up with is simultaneous cannon fire but leaving option to revisit in the future.

    https://www.facebook.com/1100187776/...03641181976859 - (Can non FB folk see this?)

    For now, I will be making time to learn more about Arduinos and Pi's...

    Much appreciation for the help and encouragement along the way here.
    Last edited by Jugtown Modeler; 22nd Jun 2022 at 04:18 PM.
    Steve - Jugtown Modeler - Don't know enough about railroading yet, but scale modeling is my life - Web-Folio
    Blog: American Revolutionary War Diorama:https://www.nscale.net/forums/entry....onment-Diorama
    The introduction of so powerful an agent as steam to a carriage on wheels will make a great change in the situation of man. -- Thomas Jefferson, 1802


  31. The Following 3 Users Say Thank You to Jugtown Modeler For This Useful Post:


  32. #38
    Join Date
    May 2005
    Location
    Southern Colorado
    Posts
    3,481
    Blog Entries
    8
    Thanks
    1,845
    Thanked 3,068 Times in 1,234 Posts
    Mentioned
    83 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Jugtown Modeler View Post
    (Can non FB folk see this?)
    Yes.

    Cool display. I'm sure the interactive part will be popular with visitors.

    What do the lights on the ground between the rows of guns that you show at the beginning of the video represent?
    "Do Not Hump!?!?! Does that mean what I think it means?!?"--Michelle Blanchard

    "People saw wood and say nothing, but railroad men saw trains and say things that are better left unprinted."--Charles De Lano Hine

    Down with UP

  33. The Following User Says Thank You to ranulf For This Useful Post:


  34. #39
    Join Date
    Feb 2012
    Location
    NJ, near old Lehigh Valley RR
    Posts
    3,036
    Blog Entries
    7
    Thanks
    11,569
    Thanked 3,959 Times in 1,564 Posts
    Mentioned
    73 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by ranulf View Post
    What do the lights on the ground between the rows of guns that you show at the beginning of the video represent?
    Yeah, a bit out of context in that clip....

    Instead of signage, I incorporated LED strips into the landscape, hidden when not lit, with a main board with momentary switches signifying each area of interest. So, that strip is for the 60 cannons displayed out front, along with the artillery a short artillery firing.

    I want to share somewhere here but it is not rail related or 1/160 scale... Maybe a blog post at some point.
    Steve - Jugtown Modeler - Don't know enough about railroading yet, but scale modeling is my life - Web-Folio
    Blog: American Revolutionary War Diorama:https://www.nscale.net/forums/entry....onment-Diorama
    The introduction of so powerful an agent as steam to a carriage on wheels will make a great change in the situation of man. -- Thomas Jefferson, 1802


  35. #40
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    732
    Blog Entries
    7
    Thanks
    3,146
    Thanked 2,362 Times in 572 Posts
    Mentioned
    38 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Jugtown Modeler View Post
    (Can non FB folk see this?)
    Was able to view with no problem.

    Great job!
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  36. The Following User Says Thank You to Gary Rowan For This Useful Post:


Similar Threads

  1. BLI chuff sync cv
    By Chris_L in forum Steam
    Replies: 0
    Last Post: 18th Jul 2020, 09:58 AM
  2. Replies: 20
    Last Post: 6th Feb 2018, 03:46 AM
  3. The worlds simplest electric train.
    By MooseID in forum General Rail Discussion
    Replies: 7
    Last Post: 4th Dec 2014, 03:36 PM
  4. Replies: 10
    Last Post: 30th Mar 2013, 03:41 PM
  5. A1 & B1 Engines...Ever in sync?
    By NewConductor in forum Diesel
    Replies: 12
    Last Post: 6th Mar 2013, 09:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •