Close
0%
0%

Darth Vator

Simulate a HiRise elevator

Public Chat
Similar projects worth following
When I graduated from undergrad, I somehow [sic?] acquired one of the status display panels from one of my dorm's two elevators. I decided to put it to good use[lessness]. Darth simulates an eleVator [get it?] from the HiRise dorm at the West Virginia Institute of Technology in Montgomery, WV.

The Ground floor held the laundry, "kitchen" [an old beat-up stove that we used to reheat Kroger pizzas and green peppers that we stole from the salad bar], ice machine, and a secret place where I spent a lot of time with a butt set, a punchdown tool, and a spool of made-to-look-old cross-connect wire. The 1st floor held the cafeteria, open for three squares a day, plus very, very late at night and on the weekends if you knew the KGM. The 2nd floor held the arcade, mailboxes, and office.

This is a useless machine because this elevator [technically, a bank of two elevators] is gone.
This elevator is gone because HiRise is gone.
HiRise is gone because Tech is gone.

This machine does not monitor a real elevator.  It simulates real-ish requests for service from an elevator in a building that no longer exists.  

On startup, it does a "lamp test" (scrolling all of the LEDs, then blinking them).

After that, an Interrupt Service Routine (the TIMER1 compare ISR) running at 10 Hz uses a probability table to determine how many people, if any, have pressed the Up or Down button on a floor.  Another table determines what floor each passenger presses when he gets inside the car, based on what floor he got into the car from and which direction button he pressed.  For example, a person who pressed the Down button on the 7th floor has no probability of getting inside the car and pressing the 10th floor.  He's most likely going to the 2nd or 1st floor, because the lobby was on 2 and the cafeteria was on 1.

The code simulates that boarding and unboarding passengers take a random amount of time to get into or out of the elevator car, respectively.

The loop() routine runs with interrupts off so the ISR can't mess things up while loop() is handling moving the car and boarding and unboarding passengers. The Arduino queues missed interrupts, so between passes through loop(), I turn interrupts back on momentarily so the ISR can run.  And interrupts are on during delays waiting for things.

In order to make the simulation watchable as a conversation piece, I made the car move a little faster and requests come a little more often than they really did.  And in order to facilitate testing, if you flip the Demo DIP switch, everything happens even faster --- 4x faster.

Future enhancements: The real elevator occasionally stopped working.  The real elevator also dropped people a couple of floors occasionally.  The real elevator would get stuck between two floors often [it seemed to have a special fondness for kidnapping the cooks].  And the real elevator's lamps burned out and took a while to get fixed.

Portable Network Graphics (PNG) - 145.33 kB - 08/30/2019 at 10:52

Preview
Download

x-zip-compressed - 179.39 kB - 08/30/2019 at 10:51

Download

  • 1 × USB1 SMD mini-USB jack
  • 1 × U1 socket 32-pin ZIF socket
  • 3 × R33, R133, R233 150 ohm 0805 SMD resistor
  • 14 × R0 through R13 10k ohm 0805 SMD resistors
  • 1 × n/a printed circuit board

View all 11 components

  • Ouch

    Rob Bailey09/24/2019 at 00:21 0 comments

    Not even a, "No prize for you, but good job, anyway" nod.

  • Special thanks...

    Rob Bailey08/31/2019 at 11:42 0 comments

    All done.  Thanks to Derek Hudson, without whose help this machine would never have been able to be completely useless.

  • Assembly Update

    Rob Bailey08/30/2019 at 10:39 2 comments

    Some of the SMD LEDs that I purchased have the chamfered corner on the cathode side, and some have it on the anode side. What gives? That cost me a PCB when I tried to remove the ones that I'd soldered in backwards and tore a pad loose that resisted efforts to repair it.

    I didn't find out until too late that A6 and A7 can't be digital outputs.  Of course, those were the two that I'd chosen to drive two of the floor LEDs.  PCB engineering change #1.

    I went from using external pullup resistors on the two input switches to using internal pullup resistors, but forgot to update the PCB.  PCB engineering change #2.

    After getting everything soldered down, and working out a few software bugs, I think it's working.

    I'll upload a video shortly, and final pics when I get the LED diffuser in place between the PCB and the indicator panel.

View all 3 project logs

  • 1
    Getting started...

    This machine is so useless, I can't imagine why you'd want to build it.  I did try to write the code so that it could be extended to buildings with different floors and Poisson distributed stochastics.  There are only really two parts to the machine: the panel, and the PC board.

  • 2
    Steal a panel

    Steal the indicator panel from your favorite building.  Ok... we're grownups now.  3D print an exact replica of the indicator panel from your favorite building.

  • 3
    Build the PC board

    Modify the schematic and PC board to fit your panel, and have your favorite fab place [e.g., my hometown favorite] make you a couple of boards [or do it old school with blue transfer, an iron, and hot ferric chloride in one of your best sauce pans].  Solder all of the parts down.  Read my log for things that bit me in the hind.

View all 5 instructions

Enjoy this project?

Share

Discussions

Rob Bailey wrote 07/09/2019 at 20:25 point

Funny you should mention that! Here is my current "things to emulate in the future" file, based on the actual behavior of my dorm's Satan-possessed elevators:

Occasionally, the lamp on a floor would burn out; it would often be a long time before it was fixed.

Occasionally, an elevator would stop working; it might also be a long time before it would be repaired.

Occasionally, the elevator car would stop and get stuck between floors.

Occasionally (although mercifully not often), the elevator would just decide that your underwear were too clean, so it would let go of the car and let you fall a couple of floors under gravity. This was not too bad if you started on the 3rd floor, but if you started on the 9th or 10th floor, it could get pretty exciting.

  Are you sure? yes | no

Ken Yap wrote 07/09/2019 at 13:10 point

You could make it do impossible things once in a while at random especially if you can detect someone is watching it, like skip floors, or disappear under the basement or off the top of the building. Just to make people blink and disbelieve their eyes. 😈😈😈 Bwahahaha.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates