November 01, 2024, 04:37:39 PM

News:

Be sure to checkout our Vixen interfaces in the Library forum -- if you want PC automation at near zero cost, EFX-TEK and Vixen is a great combination of tools.


Working on an elevator Simulator...

Started by Ryanm0085, January 31, 2009, 01:21:53 PM

Previous topic - Next topic

JonnyMac

We can give it a try but you're going to have to run the VMUSIC at 38.4K and drop down in discrete steps.  In my opinion, the VMUSIC sucks when sending a lot of commands and this can upset the audio output.  Unfortunately, there is not player I know of with a fade out or fade in command, though the uMP3 player from Rogue Robotics seems to work better in this regard.

I may have misunderstood, then, you just have one player, right?  If you're fading out and then another file in there is no need to use two players (you would only need that for cross-fading).
Jon McPhalen
EFX-TEK Hollywood Office

Ryanm0085

yeah i decided to take one out...thought it would be easier and save a little money

GOT

Not to throw in any complexity here, but how about putting the speaker on a small lift.  It could be sitting on the floor at first, then a motor can turn on and slowly raise it up about 10 feet before you start to fade the sound.  Just a thought.

Ryanm0085

thats a pretty good idea but i think because the elevator will be fully inclosed it will give the same effect as fading the music.  once the elevator is completed, i will deff try it though

Ryanm0085

woohoo...the elevator is slowly coming to life...just welded up the main frame and started recieving the interior parts.  hoepfully it will look realistic and feel realistic.  cant wait to get the programming rolling and everything hooked up....

EricTheMannn

The speaker lift is a little complicated too, for that same effect you could just have sets of speakers around the elevator, any way  you like wired up in a series, use relays to turn the individual sets of speakers on and off the way you want it.

Hope this sparks an idea!

-Eric
WooHoo

Ryanm0085

June 12, 2009, 06:50:16 PM #21 Last Edit: July 03, 2009, 09:23:07 AM by Ryanm0085
here is the inputs and outputs in detail and the program in detail....

on the prop-2
0 - Trigger 1 (Push Button)
1 - Trigger 2 (Push Button)
2 - Elevator Lights (High=On Low=Off)
3 - Black Lights (High=On Low=Off)
4 - Door Close (Open Solenoid) Supplies air to move cylindar to close position.  when pin is low, the door will re open
5 -
6 - Elevator Up (Opens Solenoids to fill Bags and raise elevator)
7 - Elevator Dwn (Opens Solenoid to dump air out of bags to lower elevator) 
8 - Divider Close (Opens solenoid to move cylindar to close position)when pin is low door will reoppen
9 -
11 & 12 - VMusic 1
13 & 14 - VMusic 2
15 - Sio

Dc-16
0 - Level 1 Light indicator (High=On Low=Off)
1 - Level 2 Light indicator (High=On Low=Off)
2 - Level 3 Light indicator (High=On Low=Off)
3 - Up Arrow (High=On Low=Off)
4 - Dwn Arrow (High=On Low=Off)
5 - E-Stop indicator

Mp3 files will be called elevator1.mp3  for VMusic 1 and sounds1.mp3 and sounds2.mp3 for VMusic 2  I'm not really sure how i am going to get the music to work but i will give u what i think i am going to use. 

Initilaization:
Elevator1 will be playing.  Level 3 indicator will be high.  Elevator Lights will be High.  Elevator dwn will be high.   Door Close will be high.  All other outputs will be low.  Wait for input 1=high

When Input 1=High, the first sequence will start.  The down arrow will become High.   wait 1 second, The Level 3 will become Low Level 2=High, wait 1 second, Level 2=Low level one=High and the Down Arrow=Low.  wait 2 seconds.  Door Close=low, wait for input 2=High.


When Input 2=High, play sounds1.mp3 on the VMusic2  Arrow up=High, wait 2 seconds, Door Close=High    Elevator1.mp3 on VMusic1 should fade out and then restart but still muted.  Wait 2 seconds, Elevator up=High, Elevator Dwn=Low, wait 1 second, Level 1 indicator=Low Level 2 indicator=High, wait 1 second, Level 2=Low Level 3=High Up Arrow=Low, ElevatorUp=Low ElevatorDwn=High, Fade in elevator1.mp3  wait 3 seconds, Elevator Lights=Low, Blacklights=High, DividerClose=High, wait 3 seconds, Door Close=Low.  After about 1 minute, the sequence should go back to the initialization. 


Whats happening:

When the patrons arrive at the front of the elevator, the elevator is parked on the 3rd floor.  The divider to the side is closed, making it look like a short corridor to the elevator.  Background music is playing.  When the guide presses the down button, the down arrow comes on and the Indicators count from 3 to floor 1.  Once it has arrived, the down arrow turns off and the doors open.  The patrons enter the elevator.  The guide will then press the floor button on the inside of the elevator, which is trigger 2.  The up arrow comes on and the doors close.  The elevator air bags will fill up jolting the elevator up to give the feeling of actually moving up.  Then the floors will count up. the music should fade out, giving the illusion of actually moving, then the second track fade in.   once it arrives on the 3rd floor, the bags will then release the air jolting the elevator down, giving the feeling of stopping.  The up arrow turns off.  after a few seconds, the elevator lights shut off and the black lights turn on.  The divider to the side opens closing off where the patrons entered and opening an entrance to a long tunnel.  after a few seconds the elevator doors open and allow the patrons out.

Solenoids:  the valves i am using for the airbags are 1/2NPT 12V Solenoids.  Each bag has 2 valves, a fill and a dump.  I will tie all the fills together and all the dumps together.  To fill the bags the dump valve must be closed(off,low) to keep the air from escaping.  So by sending a high to the fill side, it will allow air into the bags.  When the fill is off/low, the bags will stay full until the dump valve is opened(on/high).  Its kind of confusing but it works.  the door solenoids and the divider solenoids work the same.  if this is a problem i could add a relay to flip-flop them just by going from the high state to the low state.  i rather not though. 

Emergency Stop: It is very important to maintain the safety of our patrons.  I have to implement some kind of emergency stop.  I will have 3 normal closed switches, one in the elevator, one outside, and one inside the our control room.   I will wire them so when one is pushed the circuit opens, but when in normal state, the circuit will be closed.  When pushed, the sequence must stop, the elevator lights must be on, and the elevator doors must open.  Also the elevator needs to be in the down position which would be Elevator Dwn=High Elevator Up=Low.  Also i will hook up a light to Output-5 on the dc-16 which will need to flash.  But then once the E-stops are returned to normal state, the elevator should go back to the initialization, not continue where it was. 

Once the main program is done, i have a lot of work to do.  There will be a total of 14 floors the elevator will travel.  I am using a 7-Segment LED Display instead of the floor indicators, but i think i can make the adjustments once its completed.  Also, the elevator must jolt up, then randomly fire up and down to shake the platform, then jolt down.  Im thinking of making it jolt up, then just firing the down output every 1/2second allowing it to stutter down, then up the same way. ill work on the timing so it will travel down and then back up before it reaches the floor, the jolt down as it arrives.  After all this is said and done, id like to add a LCD display to give feedback to our control room.  Our control room monitors all computer driven scenes as well as monitors our cameras and flow of patrons.  Its the main hub and everything needs to be fed to here incase of emergency.  Any ideas with any of this would be great.  but if you write the program from above, i should be able to make the adjustments, everything but the LCD and the emergency stop.  Once again Jon its a pleasure talking to you and thanks for all your help.  You guys are great!!!!!!!!!!!!!!!!!!!!!!!!!!!

Ryanm0085

Hey jon,
i made a few modifications to the explanation above.  Unfortunately i do have to use 2 VMusic Players.  The one that takes care of the fading will only have one track.  Itll be sounds of a cave that fade into circus music.  this is so when they arrive at the elevator, if timed right, the circus music will be playing as they get on.  once the elevator starts, the  VMusic should fade down...then restart the MP3 from the beggining, then fade in.  When it fades in it will be the cave sounds.  The second VMusic will be strictly for elevator sound effects.   Thanks again jon.  hopefully everything makes sense, if not let me know....

JonnyMac

Sorry, more questions: How do the open/close solenoids work?  Do you have one off and the other on, or do you just pulse one (if so, for how long) to get the door to that state.
Jon McPhalen
EFX-TEK Hollywood Office

Ryanm0085

actually jon i am gonna switch that solenoid to a 3 way solenoid.  this way, when power is applied, the door will close.  There must be power to the close solenoid at all times to keep the door closed.  once the door is needed to open, the power can be removed and the door will open on a spring.  so as long as the door needs to be closed, there needs to be power.  when it needs to be open, remove the power....

JonnyMac

Okay, once you get the solenoid switched let's revisit the IO and reconstruct the program.
Jon McPhalen
EFX-TEK Hollywood Office

Ryanm0085

June 24, 2009, 09:21:51 PM #26 Last Edit: June 25, 2009, 10:27:53 PM by Ryanm0085
okay everything is looking good. i will just remove the door open output and leave that channel open incase i need to add something....i will do the same thing with the divider....when i supply power it will open and stay open until the power is removed....

Ryanm0085

hey jon...just curious on how your making out...hopefully i explained everything clearly...   theres times where i don't even know what i'm trying to do lol

JonnyMac

You said you were going to change the valve type which would redefine the pins -- I'm waiting on that.
Jon McPhalen
EFX-TEK Hollywood Office

Ryanm0085

okay jon i modified my explanation.  the only thing that i took out was the elevator door open solenoid and the divider open.  To open the elevator door, you low the pin, to close the door, you would high the pin.  when the door is to remain close, the pin must be high.   same with the divider.   hope this helps