Introduction: Arduino-Controlled Model Elevator

About: Professionally I am an editor, but I love to tinker and make gadgets between deadlines.

In this Instructable I will show you how I built a two-level toy elevator, with working sliding doors and a car that moves up and down on demand.

The heart of the elevator is an Arduino Uno (or in this case an Adafruit Metro), with the Adafruit Motor Shield installed on top of it. The shield makes it much easier to drive the two servos required to open and close the doors, and the stepper motor that brings the car up and down.

The actual structure is really the easy part and can be made any way you want. The tricky part is getting everything to fit inside, and to make sure things are aligned properly.

So, that said, let's get to it!

Supplies

Step 1: The Doors

The first problem I decided to tackle was the doors. The doors had to move back and forth, and be secured at the bottom and the top so they didn’t flap around.

I wound up using aluminum u-channels, normally used as edging for boards, along the bottom to keep the doors on track. The top was a little trickier. I found 3D printed plans for a linear actuator online and figured those would be great for pushing the door closed and pulling it open. I made the doors out of small MDF panels, and wrapped some aluminum sheeting around the panel to give it a metal look. (see photos)

I put a steel rod across the top of the door and hot glued a piece of PVC pipe on the top of the door panel. The rod fit inside the pipe and allowed the door to travel back and forth freely, while the bottom 8th inch or so of the door was inside the u-channel to keep it straight.

I placed the linear actuator above the steel rod, and used more pvc pipe and more hot glue to allow the actuator to move the door. The linear actuator is designed around a hobby-sized servo motor, so I added those in.

Step 2: The Structure

First I made a rough sketch of what I wanted the elevator to look like. It had to have 2 floors, with a car that goes up and down and doors that open on each floor. The final product deviated from the initial sketch, but that’s OK!

Next I built the structure from medium density fiberboard (MDF), measured out the floors and door openings and cut out the shapes with a jigsaw and a hole saw. The base and top are a little bit larger than the building to give it some stability and visual appeal. The structure only has 3 sides, as I decided to leave the back open so you can look inside.

The side pieces are 24 inches high and 12 inches wide, and the top and bottom are 15 inches square, all made of 1/2" MDF panels. The doors are 6 inches high and about 4 inches wide. Make sure to leave enough room for the door to be hidden off to the side when it is open.

I also added a small landing ledge for outside the 2nd floor.

I also made a 2" hole over each door for either a window or floor indicator, holes for the call buttons beside each door and a small hole for an LED above each door opening (which I did not wind up using)

I painted the whole thing a metallic blue color.

Step 3: The Car

The elevator car was made from MDF and a piece of Plexiglas for the back, so you can see the Matchbox cars or Lego guys you put into the elevator. The car itself is a simple box, nothing too fancy. I painted it and put some postcards inside as posters. It turned out kind of heavy so I was not sure how the motor would lift it up using my original plan. We’ll come back to that.

The hard part about the car was how to lift it up and keep it from swinging around. Using the tried and true hot glue and pvc method (I’ll come back to that too, don’t let me forget), I put in four aluminum rods going from the top to the bottom of the structure, and lined them up with the car and the pipe I glued at each corner. This kept the elevator in place as it went up and down.

The 3D printed parts stuck out quite a bit from the inside wall of the structure, so I had to keep the elevator car back a couple of inches from the door opening. I didn’t want to have a mound of bodies at the bottom of the elevator shaft from Lego minifigs who didn’t “mind the huge gap”, so I added a short platform inside the door, that got pretty close to the open side of the elevator car, which solved the problem.

Step 4: Motor and Counterweight

The next problem was how to get the car to go up and down. I purchased a NEMA-17 (that's the size, not the power) stepper motor from Adafruit and attempted to lift the elevator car with it using some string and a 3d printed spool thingy attached to the shaft of the stepper to wind up the string.

That did not work, so I started thinking about how a real elevator works, with a counterweight. That way the motor does not have to lift the full weight of the car, it merely has to start the initial movement, which requires much less torque. I learned a lot about torque on this project.

Anyway, my counterweight idea was solid and I wound up using a 10mm wide belt and pulley system, similar to what is used to build a 3D printer. The car weighed about one kilogram (2 pounds) and the stepper motor was rated as able to lift 2 kilograms at one centimeter from the center of the shaft. (More torque problems) So that was good to go.

One end of the belt was attached to the top of the elevator car (using a screw-down metal plate), then the belt went straight up and onto a toothed gear on the stepper motor, which was mounted on the ceiling of the structure. The belt then went 90 degrees across the top of the structure over to a second toothed pulley, this was attached to another steel rod, mounted on brackets. (see pictures) From there the belt took another 90 degree turn straight down and this was attached to the counterweight. (Obviously you have to measure all of these and place them accurately to avoid extra stress on the belt)

The counterweight was made of four pieces of sample wood flooring from Home Depot that I screwed and duct-taped together. The belt was clamped in the middle of the pieces and the excess tail was also screwed down on the outside. I placed 2 steel rods for the counterweight to travel up and down on, using the PVC pipes glued on either side of the counterweight bundle to mount it.

With all of the structural pieces in place, it was time to work on the electronics.

Step 5: Switches and Electronics

The brains of this project is an Arduino Uno, with an Adafruit Motor Shield on top. The shield makes it a lot easier to drive the two servo motors and the stepper motor, while still allowing access to most of the pins on the Arduino. The stepper motor also requires more than the Arduino’s 5V output, and the shield lets you step up the voltage to the motor and step it down for the Arduino. The motor takes up to 12V, but I eventually went with a 9V input, since I fried a voltage regulator on one Arduino when one of the doors got stuck.

I took another page from the way 3D printers are built, and used small contact switches at all the points where you want things to stop moving. So, I had a momentary contact switches at 6 locations. They detected where the car was and what the status of each door was. When the car was at the bottom of the structure, it was pressing a switch under the car. When it was at the top, a switch at the bottom of the counterweight was activated. The doors also hit a switch on either side, when it was open or closed.

To call the elevator, I put lighted buttons on the front of the structure. These are cool triangular buttons with LEDs inside so they light up when pressed (if you wire them that way).

The actual code for this project is not too complex. The main loop of the Arduino sketch checks for up or down button presses. Depending on the position of the car, the program responds with either moving the car then opening the door for a few seconds, and closing the door. Or, if the car is at the floor where the button was pressed, it just opens the door, then closes it after 5 seconds.

There was lots and lots of troubleshooting, but eventually I got everything working reliably. The final step was a large piece of Plexiglas on the back with a hole drilled for access to the power jack.

This was a really fun project and I learned a lot. When I was building it I was looking all over for plans on something like this but I could not find much. So hopefully this Instructable can help someone looking to build a similar project.

Step 6: ​Closing Thoughts

One thing I would add to a second build would be a way to sense if something is blocking the door, like a real elevator. I think some kind of light sensor could work, but someone smarter than me can figure that out.

Also, this was a project for a client, and I shipped it to them using UPS. However I let UPS pack it which turned out to be a huge mistake. The elevator arrived with some pieces broken off, and the belt was disengaged, and one of the doors was not working. I worked with the client to get it up and running, but some of my hot glued PVC pipe came off, and in the future I would probably try to find a more elegant solution than hot glue. Also, next time I will pack it myself! I hope you guys enjoyed this Instructable. Check out more projects at cascobaystudios.com

Thanks for reading and I’ll see you next time!

Step 7: Code

Arduino code is in the attached file. It's a bloody mess, but it works!

Arduino Contest 2020

Runner Up in the
Arduino Contest 2020