Here is an “elevator” project I’ve been working on. A motor moves the car up and down based on button presses (up or down), and an ultrasonic sensor tells when the car has reached the destination “floor”. A 7-segment LED displays the floor number, and a piezo buzzer goes off when the car reaches its destination.
This is the first electronics project I’ve done myself. I had soldered kits together before, but had never started one from the beginning. I’m a software developer by trade, so learning to code wasn’t a barrier. I learned a great deal through what worked, and much more from what didn’t.
I bought an Arduino Uno, and started with the project kit from Adafruit (named in the parts list), and built the practice circuits. As I went, I thought about what I wanted the elevator to do (run a motor, respond to button presses, etc.) and I returned often to the schematics of the samples.
When something didn’t work like the example (hooking a bigger motor up didn’t work like the little toy motor), I went looking for help and found things like h-bridges. Things that would bore many of you, but that I had never heard of.
Of course, I learned a ton from people online - hooking up an h-bridge, driving the LED with a shift register, troubleshooting the PING))) sensor’s output, solving timing problems, etc. Here are a few of the sites that helped me get from 0 to 60 on certain topics, but they are by no means the only ones.
http://wiki.bildr.org/index.php/7-Segment_Red_LED
http://ee.hawaii.edu/~sasaki/EE361/Fall06/Lab/7disp.html
http://allaboutee.com/2011/07/04/arduino-proximity-sensor-circuit-tutorial-and-code/
I’m including a parts list, Fritzing file, the source code, a few pictures, and a few videos of the finished prototype. The “car” in the videos is just a piece of cardboard packing material, and the rails the car rides on are drawer runners. Legos make up part of the structure.
Fritzing image (Fritzing file is attached to this post):
Some various parts (if you want to see it all together, the videos below show it better)
YouTube: Elevator without buzzer:
Elevator with buzzer that sounds when the destination floor is reached - it’s quiet, and definitely needs something louder.
Elevator.fzz (23.2 KB)
ElevatorPartsList.pdf (183 KB)
ThreeFloorElevator.ino (8.53 KB)