Part Number: LAUNCHXL-F28069M
Other Parts Discussed in Thread: MOTORWARE,
Hello All,
I need to read an ADC value from a potentiometer. In order to do so, I used the motorware_hal_tutorial.pdf as a guide. We were considering controlling 2 motors, so we originally adapted Lab10d. We decided to not use the second motor, but all of the code to control it is still there, we just don't enable it. The reason I mention this is that because I used the second motors VDC_Bus ADC and moved it to physical pin B0 on the BoosterPack which is where I connected the wiper of the potentiometer. Other than that, everything stays the same.
To a limited extent, it works. If I enter debug mode in CCS and don't enable Motor 1, there are no issues, and I can see the global ADC variable I am reading being updated. If I have the pot physically disconnected - but the code staying the same - and enable Motor 1, it functions as expected. BUT if I enable Motor 1, with the Pot physically connected, and after turning it from the center value regardless of direction, the motor starts making weird noises, and eventually stops, all while consuming a good bit of current.
I can't exactly understand why it is doing this. I originally thought that the potentiometer's value was too low, thus causing too much current to flow from Vdd(3.3V) to Gnd, so I tried changing pots (from a 200 Ohm to 25k Ohm), and I even added a 1k resistor in series, but there was no difference.
Any help would be appreciated.