Operation of the motor - Sean Cleary
Introduction
In this one week sprint of the experiment, the sweeper bots were examined more closely in order to get the motor running. Through this it was seen how the wheels could be controlled through sending PWM (Pulse Width Modulation) signals. The previously established C code for the PIC microcontroller that alters the PWM signal sent on the pins with every press of the button was used in this experiment.
Procedure
To start the sweeper bot was examined, in order to trace the wires back to the motor. Initially it appeared that the wires weren't properly connected to the motor, however this was found to be due to a blown fuse. Once the fuse was replaced, the motor was thus connected to the battery.
In order to drive the motor, the wires that relayed the PWM signal were fed into S1 and S1 on the Sabetooth 2x12 motor controller. The sabetooth 2x12 was put into R/C mode through having switch one down and two up. Through further putting switch six down it was set to accept PWM signals from a microcontroller. Switch four is set down, which puts the motor controller to independent mode, this means that two different motors are controlled independently. This means the signal in S1 controls motor 1, while the signal in S2 controls motor 2.
The code that is loaded onto the PIC controls two PWMs. Once these PWMs are connected, whether the motor causes the wheel to go forward or backward depends on the voltage signal sent. A voltage of 1.5v causes the motor to stay in place. In practice the motor moved slightly as the voltage was actually slightly below 1.5v. The motor was supposed to go full backwards at 1v, however in practice this caused the motor to go full forward. The motor was also supposed to go full forwards at 2v, however again this was reversed and so it went full backwards.
There were a number of difficulties with getting the sweeper bot running. Crocodile clips had to be connected to the wires that were to be connected to the battery as they had no connectors on their ends.
Initially there were problems with the wheel only turning forward and not being able to turn backwards. This was due to the motor controller erroneously being in analog mode, when it should have been in RC mode. When the motor controller was set to RC mode the wheel was then capable of moving forward and backward depending on the signal received.
Comments
Post a Comment