What was the answer to 18v on the servo rail?

Hi

What was the answer to the following?

I have the same issue where A1 is 18v. I know the voltage from my UBEC to the Servo rail is 5.31v via a multimeter.

pi@deepsouth:~/deepsouth/Navio2/Python $ sudo emlidtool
emlidtool version: 1.0.8
Vendor: Emlid Limited
Product: Navio 2
Issue: Emlid 2019-02-27 1548ce733215806c8ad171c8b78ebca0c7cf8395
Kernel: 4.14.95-emlid-v7+
RCIO firmware: 0xb09979ae
2019-09-03 09:18:45 deepsouth root[798] INFO gps: Passed
2019-09-03 09:18:45 deepsouth root[798] INFO mpu9250: Passed
2019-09-03 09:18:45 deepsouth root[798] INFO lsm9ds1: Passed
2019-09-03 09:18:45 deepsouth root[798] INFO rcio_firmware: Passed
2019-09-03 09:18:45 deepsouth root[798] INFO ms5611: Passed
2019-09-03 09:18:45 deepsouth root[798] INFO pwm: Passed
2019-09-03 09:18:45 deepsouth root[798] INFO adc: Passed
2019-09-03 09:18:45 deepsouth root[798] INFO rcio_status_alive: Passed
emlidtool -h to get more help
pi@deepsouth:~/deepsouth/Navio2/Python $ sudo python ADC.py
A0: 4.8480V A1: 18.1940V A2: 0.0420V A3: 0.0160V A4: 0.0200V A5: 0.0240V
A0: 4.9260V A1: 18.4030V A2: 0.0420V A3: 0.0160V A4: 0.0160V A5: 0.0260V
A0: 4.9230V A1: 18.4140V A2: 0.0420V A3: 0.0140V A4: 0.0200V A5: 0.0260V
A0: 4.9260V A1: 18.4030V A2: 0.0420V A3: 0.0140V A4: 0.0160V A5: 0.0280V
A0: 4.9230V A1: 18.4030V A2: 0.0420V A3: 0.0160V A4: 0.0200V A5: 0.0260V
A0: 4.9230V A1: 18.4030V A2: 0.0420V A3: 0.0160V A4: 0.0240V A5: 0.0280V

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…

Hi @deepsouth,

This issue is caused by the wrong displaying of the servo rail voltage, so it barely can provoke the PWM instability.

Could you please describe your difficulties with servos in more details?

OT, but what’s the totally tubular housing for? Is it a pressure vessel?

Hi @bide and @tatiana.andreeva

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

So is there a fix to the wrong display?

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.

4 Likes

Hi @deepsouth,

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?

I have nothing connected to the Navio2 (except the RPI, servo, and power).

I don’t have an oscilloscope.

Hi @deepsouth,

Does Navio2 go through all the tests in emlidtool?

Not sure why, but its currently working better right now…

Hi @deepsouth,

Let me know if you experience any difficulties again.

What was the answer to 18v?

Hi @deepsouth,

It’s just a displaying issue. The voltage on the servo rail always remains 5V.

Is there a accurate programmatic correction I can apply to the python code?

Hi @deepsouth,

You can use voltage multiplier to get the correct value. I believe you can use the multiplier in 0.284 for it.

We’ll fix this displaying issue in one of the following Navio2 images, however, I can’t provide you with any timelines.

Thanks @tatiana.andreeva. I will apply the correction.

1 Like

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)
2 Likes

Hi @deepsouth,

Thanks for sharing the solution!

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.