Книга: Best Arduino Automation Project: Arduino Project Ideas for Automated System
Назад: 4. Flyback diode for extra safety
Дальше: 6. Isolation Of Control From Inputs

consumer controls the operation of the elevate through ground buttons. There are 4 floor push buttons, while pressed indicates to the microcontroller that the lift wishes to be brought to the desired floor.

1.png

A push button when pressed momentarily creates a excessive signal and a then LOW signal when the user releases the button. The challenge of the microcontroller is to pick out a excessive signal from a floor button pressed by using the consumer. This unique mission need now not be handled through an interrupt. so long as the person presses the button for a sufficient time period the MCU is able to sign up the signal from the button. the next venture of the microcontroller is to evaluate whether or not to show the Up or Down motor depending on the person enter and the current ground of the elevate.

1.png

With smart programming through microcontrollers we can get rid of extra hardware that might have been required if a gadget is designed basically through common sense and analog. The previous machine for the lift required an additional directional transfer as proven within the diagram beneath changed into used to enable the system to pick out the course the elevate is travelling (Up or down).

 

however via designing an set of rules to hold the modern-day ground of the raise in a variable and comparing it to the input from the consumer enabled the device to absolutely rid of the directional switches to decide the course the raise ought to move so as to get to the desired ground. as an example: within the input and floor sense connections to MCU diagram proven above, the carry is indicating to the MCU that it is on the second ground thru Pin three. Then the person inputs through pushing the Fourth ground button. The MCU receives this command and compares the 2 inputs. because the enter from the person, “four” is greater than the enter from the restriction switch, “2” the MCU sends a sign thru the MotorUp Pin to prompt the transistor to power the Up relay.

because the carry movements up, the modern-day ground variable in the software gets up to date while it receives to the 1/3 ground. As quickly as a limit transfer is triggered it's miles as compared to the input value from the person which in this example is “four” and once more compares this fee to the up to date modern ground to determine if the carry has approached the favored ground. as soon as the fourth ground restrict switch is caused, the MCU identifies that the carry has approached the fourth floor and sends a LOW sign thru the Motor Up signal pin to prevent power to the motor to save you it from shifting further.

Назад: 4. Flyback diode for extra safety
Дальше: 6. Isolation Of Control From Inputs