karamjotkaur / capstone_project

0 stars 2 forks source link

DC Motor interfacing #9

Closed mikeshams closed 3 years ago

mikeshams commented 3 years ago

Harmandeep 1) What issues did you face when interfacing the DC Motor? 2) How did you resolve them? 3) Why WINSCP?

harmandeepsingh1234 commented 3 years ago

While interfacing DC motor with Beaglebone Black I faced several issues which are listed below:

1.) During installation of gpio library “iobb.h” in beaglebone black I wasn’t successful in my first attempt because when I did “make install” I was getting error that permission is denied and the installation wasn’t successful. To resolve this issue I used “sudo” command with it so I typed “sudo make install” which allows the permission in the root mode and then the error was resolved and the gpio library installation in beaglebone black was successful.

2.) When I tried to execute the file in beaglebone black I got segmentation fault error message and I found that this occurs because when a program tries to access a memory location that it is not allowed to access. So to resolve this issue I had to go into root mode and use “sudo ./filename “ command to execute the file and then I was able to run the program.

3.) When I tried to execute the program I was not getting any output from the ultrasonic sensors then I verified the connections and code again and everything looked perfect to me then I researched on internet to find the underlying cause of this issue and I came to know that I have connected my VCC pin of ultrasonic sensors to the VDD pin on beaglebone black and the on board VDD pin on beaglebone black only works if beaglebone is connected to power adapter and getting constant 5V DC, 2.5A barrel plug supply and I was using USB cable to power it so I should use the SYS5V pin which can be used if the beaglebone is powered by a USB cable and if current drawn from the board by a sensor is under 500mA. Since The ultrasonic sensor draws only 15mA of current so it should be fine to use the SYS5V pin of beaglebone black.

The reference for this is provided in this link : https://cdn-shop.adafruit.com/datasheets/BBB_SRM.pdf

4.) When I was interfacing DC motor with beaglebone black then my beaglebone stopped working. It was not powering on and the lights were not flashing so to resolve it I first tried changing the usb cable and I connected another usb cable with beaglebone and it worked and my beaglebone powered up and the lights started flashing. So my previous usb cable was not working which was the root cause of this issue.

5.) Moreover, when I executed the program then only one motor was running and the second motor was not even rotating so in order to resolve this issue I checked the connections and code properly and I didn’t found anything wrong so then I recharged the battery which I was using to power the motor driver L298N and after recharging the battery still I wasn’t able to run the second motor then I tried to switch the positions of motor to check if that motor is damaged or not and then I run the program again and then I came to know that there is an issue with my motor driver L298N because after swapping the positions of motor I found that the motor which was connected with OUT1 and OUT2 terminals of motor driver L298N was rotating properly and the motor which was connected with OUT3 and OUT4 terminals is not even rotating so the OUT3 and OUT4 terminals of motor driver L298N were damaged and I had to change the motor driver so I got another one and then I tried with the new L298N motor driver and this time both the motors were working properly with the driver.

6.) Lastly, I faced a lot of difficulties with the connecting wires because every time when my motor was rotating the wires were coming out of the motor terminals so to resolve this issue I had to do soldering to fix the wires at the motor terminals and then after soldering the wires didn’t came out and it stayed fixed there and I was able to interface it successfully.

I used WinSCP software for secure file transfer between my host machine and the beaglebone black. It is a very popular free and open source application for secure file transfer between a local and a remote computer in Microsoft windows. Transferring the file is very simple as we have to just drag and drop the file which we want to send and we do not have to remember or type any command for this so its very convenient and easy to use. We can even create a folder or delete or rename a file with just a single click and there is no need to memorise the commands for doing this so its very good and fast also.