Tuesday, April 11, 2017

Next Steps

Now that I have presented my research in rochester it is time to move on to the next few steps of the project. The current relay board is not properly functioning. Dr. Hassel has bought two new boards and I will need to replace them. We will also proceed to collect data and try to further develop an observation technique. Lastly, I will need to pass on the knowledge I have acquired and skills developed to either Dr. Hassel, another student, or both so that we can continue to use VIPER. This will involve operating the motor controls, understanding and troubleshooting the code, relays, etc, and taking measurements. I can do this personally or I can write an operations manual.

Wednesday, March 22, 2017

How To Test a Relay

In order to check if a relay is functioning properly all you need is a voltmeter and a way to activate the relay. Change the setting on the voltmeter to resistance. Check the resistance between the COM and NC pins as well as between the COM and NO pins. Do this when the relay is turned off and turned on. The relay is working properly if when it is off the resistance between COM and NC is very small and the resistance between COM and NO is very large (nearly infinite; the voltmeter should read 0L). Similarly, when it is activated, the resistance between COM and NO should be small and the resistance between COM and NC should be large. If this is not the case, then your relay is not working properly.

Fixed The Motors

I have identified that the problem with the motors originated from a bad relay. The V- relay was not working properly and so I had switched the wires to a functioning relay and adjusted the pins in the motor control code. Now the motors are working as intended again.

Wednesday, March 15, 2017

Troubleshooting The Motors

After removing the top motor from VIPER,I tried to troubleshoot why the motor no longer functioned. The problem does not appear to be with the motor itself. There was no water inside of it and all the wiring seems to be intact. The brakes are also operational because we can hear the click that signifies that they are disengaged and we are able to move the motor by hand.

The problem also does not appear to be with the power supply as we measured the output with a voltmeter and the measurement checked out.

The angle encoder appears to be fine as well. I had originally thought that there may have been something wrong with the wire that connects the angle encoder to the relays was malfunctioning because when you shook the wire while the angle encoder was not attached, the counts would increase. However, while the encoder was attached this problem did not persist.

To ensure that there were no problems with the code or that I accidentally changed some parameters, I redownloaded the original code that I had used when we successfully moved the motors the first time.

This leads me to believe that the problem lies with the relays because it is the only aspect left unchecked and I measured the voltage at the leads where the motors connect to the relays and there was no output.

Moving VIPER

Using the instructions included with Jon's simulink code, I was able to operate a small motor. The motor was unable to handle the power of the power supply used and it fried very quickly after using it.

Afterwards I used the same instructions on the VIPER motors with some mixed results. Overall the motors functioned but not to full expectations. The top motor often stopped moving partway through its intended distance. The motors also oscillated around the desired angle until fully coming to a stop. A few days later I tried to operate the motors again with no success. The motors failed to move at all.

Tuesday, February 14, 2017

Issues with Linux

This week I have been troubleshooting the simulink code. There were several errors regarding missing files that I was able to fix by creating my own with the proper text. After all of these issues were resolved I encountered another error that I was unable to resolve on my own. I had a conference call with Jonathan Farrell who was unable to recreate the error on his computer which ran Mac OS. I tested the simulink on a mac provided by Dr. McColgan and the program ran without any issues.
I have also contacted tech support from MathWorks and tried to troubleshoot the problem with them to no success. I am currently awaiting further feedback from them.

Currently the plan is to employ the simulink on a windows or mac and use the SRT software on the linux. I will test out the program on a smaller motor this week.

Tuesday, February 7, 2017

Familiarizing myself with the motor controls

I have been reviewing the code that Jonathon Farrell developed in the summer of 2016. Here is a picture of the simulink code from Jon's blog:



A basic understanding of angle encoders is necessary to understand this code. You can find this here: http://henrysbench.capnfatz.com/henrys-bench/arduino-sensors-and-input/keyes-ky-040-arduino-rotary-encoder-user-manual/

The basic idea is that there are two switches within the angle encoder each with different phases and the code identifies where the switches are and determines which direction the encoder is moving by the change in the two switches, Then, based on the desired input, the code determines the difference in the current angle and the desired angle and tells the motor to move in the correct direction and how far. The code has various outputs so you can observe in real time which direction and what angle the motor is at.

The MatLab code appears to only measure the angle encoder and does not control the motors as is the case with the simulink code. However, I have been unsuccessful thus far in connecting the arduino to simulink. I have been able to connect it to MatLab however and hopefully there are only minor discrepancies in the process.

Based on what Jon has left for me, it should be as simple as connecting the arduino to a laptop with the code, entering a desired angle, and running the program. I aim to test this with a small motor this week.

Once this is complete I can move onto the larger motors for VIPER. However, there have been changes to the control system that I had developed in the summer of 2015 and I will need to relearn how to use it. Once I can confidently power the motors I will attempt to use the motor controlling program with them.