As an aside (and possibly related) I believe the PWM is very unstable. I am having difficulty getting a servo to work correctly in python. Its worked once out of hundreds of attempts…
Correct. its an underwater ROV capable of depths of 100m or more. I am building my second generation version (new and improved) after successfully building my first one in January
Really not much to say here. The Servo rail is powered correctly. The multi meter confirms the voltage on the pins. Running either the sample Python code or my modified version appears to correctly run (either an infinite loop for sample code, or for a set time with my code). Nothing happens. I have tried two separate servos. I have tried various pin combinations for power entry and servo (inc updating python output code), nothing works. I did get the code to work once by luck, but it was not repeatable.
Does the issue persist if you disconnect everything from the Navio2 except the servo?
Do you have an oscilloscope to make sure that Navio2 provides even signal on servo rail?
Just to close this out… below is the code for the correction to the example Python code if you are seeing 18v on A1…there is a new if statement…
while (True):
s = ''
for i in range (0, adc.channel_count):
results[i] = adc.read(i)
if i == 1:
results[i] = results[i] * 0.284
s += 'A{0}: {1:6.4f}V '.format(i, results[i] / 1000)
print(s)
time.sleep(0.5)