cu-ecen-aeld / final-project-ruchaborwankar

final-project-ruchaborwankar created by GitHub Classroom
0 stars 0 forks source link

Interfacing Ultrasonic Sensor and Motor on Tiva Board #3

Closed ruchaborwankar closed 4 years ago

ruchaborwankar commented 4 years ago

TODO: 1.Interface Ultrasonic sensor to Tiva Board 2.Interface Motor to Tiva Board for implementing feedback system(which can be controlled by beaglebone)

DoD: Get proper output from Ultrasonic sensor and check proper working of motor

ruchaborwankar commented 4 years ago

Ultrasonic sensor interfaced and output as follows using the code: https://github.com/cu-ecen-5013/final-project-ruchaborwankar/blob/master/ultrasonic%20sensor%20code.zip In this code,ultrasonic sensor is interfaced with vcc at 5v(from other board since TIVA C series 123G board has 3.3V on board) gnd,trigger at PA5 and echo at PA6. Ground pins of sensor,tiva c series board and other board which is connected for power supply are connected together. Since,Echo pin gives 5 v output in order to make it compatible for Tiva 123G board,a voltage divider circuit is implemented to bring down the voltage to 3.3V and then applied to the PA6 pin of the TIVA board.3 1k ohm resistor is used to form the voltage divider circuit.

Connections: image

Output as follows: image

ruchaborwankar commented 4 years ago

Using the above code and adding a Motor init function which enables a GPIO pin PA 4 which controls the motor through a motor driver. Motor driver L2930 was used here with a dc motor. The control pin was set with an output configuration in order to send high or low output depending on the requirement.

Code used: https://github.com/cu-ecen-5013/final-project-ruchaborwankar/blob/master/Motor%20control%20with%20ultrasonic%20sensor.zip

Motor driver connections: image

Output Video: Demonstrating motor controlled by ultrasonic sensor output: https://github.com/cu-ecen-5013/final-project-ruchaborwankar/blob/master/Motor%20controlled%20by%20ultrasonic%20sensor%20output.mp4

Thus,successful integration of Ultrasonic sensor along with motor to TIVA board is achieved.