Simple Arduino based 4 Floor Elevator Project
Seyedreza Fattahzadeh
2015 Seyedreza Fattahzadeh
www.plc-doc.com
No part of this book may be reproduced, in any form or by any means, without the written permission from the author / publisher.
NOTICE TO THE READER
All rights reserved. No part of this book may be reproduced, in any form or by any means, without permission in writing from the publisher.
Every effort has been made to ensure our books are as accurate as possible. However, there may be mistakes, both typo and in content. This content should be used as a general guide and not as the solution. The author does not warrant or guarantee any of the products described herein. Also, the author does not warrant or guarantee any of the equipment or programs described herein or accept liability for any damages resulting from their use. The reader is warned that both electricity and the construction of electrical equipment can be dangerous. It is the responsibility of the reader to use common sense and safe electrical and mechanical practices.
Arduino is a registered trademark of Arduino.
CodevisionAVR is a registered trademark of HP Info Teach
Proteus is a registered trademark of Lab center Electronics Company.
Altium Designer is a registered trademark of Altiume Company.
AVR and Atmega32 are trademarks Atmel Company.
Please be informed that:
This book contains many images. Since eReaders dont always display images well, upon request, I will provide you with the PDF file which contains the complete e-Book, including the images, if you need an easier-to-read format. To receive a PDF version of this e-book or any other software which is mentioned in the content of this text, you can email me the proof of your purchase of the kindle version of the book from . Upon receipt of that proof, a PDF version will be sent to your email address.
Table of Contents
In this project, we will learn the circuit design for a 4 Floor Elevator Control on how to develop a four stories passenger lift or cargo lift using an ATmega16 Microcontroller. This text consists of two chapters.
is devoted to the design and implementation of a simple 4 Floor Elevator Control system using an AVR Microcontroller (e.g. ATmega16).
is devoted to redesigning the same lift system using the Arduino Mega 2560 board, which is a microcontroller board based on the ATmega2560.
This project is about the model of a simple lift or elevator for a building, which is assumed to have four floors. Each floor has its own illuminated push button to call the elevator to go to the desired floor. The elevator door is emulated with the use of a small 5 V DC motor that opens, stays open for 5 seconds, and then closes the car door to be ready to move to the floor that is called. Also, a 5 V DC motor is used to emulate a hoist motor, which rotates a small disk clockwise or anticlockwise over four slotted optocouplers to generate stop signals. I used these optocoupler sensors to help the system detect if the elevator is at the floor, in a safe position to open. Next, the lift will go back to its standby status for further transportation.
The code generated for this small 4 Floor lift system has been adapted to control the same system for an Arduino board. This text provides a reader with steps he/she needs to take, to come up with a hardware and software to implement the lift system.
The reason I selected to author this text is that I already have written a few texts about the design and implementation of 4 and 8 Floor Elevator controls using a PLC.
I thought it was not a bad idea this time to show how the same design guides can be used to implement the same system, but this time with a Microcontroller instead. I love Elevator systems; they do a great job wherever they are installed. When a programmer can generate control software for a simple Elevator system, that will mean that he knows 'what he/she is talking about' when it comes to programming for any kind of CPU.
The final aspect of this experiment is to organize an intelligent main control code in C language, to control the whole system hardware. Hence, the purpose behind developing a manual like this is to make the learning about microcontroller\or a typical a Microcontroller based board more enjoyable!
This book explains the generating of code for an ATmega8 Microcontroller chip and The Arduino Mega 2560 board to control a 4 Floor Elevator System in general. This book has been prepared for those who are already familiar with basic instructions related to any brand of Microcontroller, and may have already developed some Microcontroller based programs for different purposes. Therefore, this text is prepared for those who want to challenge their programming knowledge to generate even more complex programs with additional features
The project specification will be presented to you. It contains all goals, functionality, and details required for the development of this controller system to fulfill the project's typical minimum requirements. Study the project requirements presented in this text carefully. Your job is to generate the main control program to satisfy the project's requirements.
Take as much time as you think it is needed. You can use a pen and paper and any typical simulator software to develop the control program. When you have completed your project, review and compare it with the one presented in this text. If your solution works properly, then you can celebrate your accomplishment and perhaps go on to learn something new to improve your level of capability further, when it comes to Microcontroller programming. If the solution you come up with has some problem(s), and somehow it is not functioning as it is supposed to, then you can compare your solution against mine. In this case, you know that you did your best, and tried it on your own and then you can use my solution to find out what is wrong with yours. When you find it out what went wrong, then you can resolve the issue to make it function correctly. That is the whole purpose of this text; to give you enough motivation and make you enthusiastic to complete a relatively complex Microcontroller based program.
In , the main control program solution is prepared in C language using CodevisionAVR software. In addition, the schematic of all the hardware used in project is provided.
In , the same main control program which was prepared for the AVR Microcontroller, is redone for an Arduino based platform
The amount of effort you want to place on doing this project is completely up to you and your interest. If you wish, you can build your own controller hardware similar to the one presented in this text or even tailor it to the one with more features as you prefer. In either case, just by simulating the presented program and checking its performance, you can improve your programming knowledge and ultimately, from my side, this is the overall purpose behind developing the text.
In this project, lift control system is going to be produced by using an ATmega16 Microcontroller and the Arduino Mega 2560 board. Thus, the main objectives for this project is to design and construct a Microcontroller based lift control system. There are some scopes, which are needed to achieve the objective of this project:
1. To design a lift control system by using 1- ATmega16 microcontroller.
2. To design a control program for the overall system function based on the predefined basic lift system algorithm.
3. To integrate the hardware and software in order to simulate the function of a basic elevator system.
Next page