wpilibsuite / wpilibsuite/SystemcoreTesting

SmartIO AnalogInput voltage steadily climbing

Open
#191 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

HARDWARE Limelight Pending
Dominant language
Java
Stars
186
Forks
24
Avg merge
8h 27m
Merged PRs (30d)
9

Description

We've been coming across an issue with trying to use AnalogInputs - the voltage reading appears to steadily climb a non-insignificant amount for a sustained period of time, which makes it nearly impossible to utilize something like a potentiometer for homing or controlling a mechanism. We initially wondered if this was just an issue with our potentiometer or another sensor plugged in to the SmartIO, so we made the following changes:

  1. Unplugged everything from the SmartIO
  2. Added a jumper cable that connects the 3.3v SmartIO output rail to the signal port, allowing us to read the rail voltage as an AnalogInput itself.

This still demonstrated the issue, which leaves us wondering if we have a hardware issue or not. We've also tried the jumper in multiple different SmartIO ports.

Image

This chart shows roughly an increase of about 0.0075v per minute, which is 0.227% of the total range (0 - 3.3v), which means our potentiometer drifts about 0.81 degrees per minute if my napkin math checks out - enough to make mechanisms consistently initialize incorrectly. Notably, this steady climb seemed to continue for about 40 minutes, until the value seemed to stabilize at approximately 3.295v. This makes me wonder if maybe something is causing the 3.3v SmartIO rail to not reach it's intended target for a sustained period.

I'm curious if anyone else has seen this behavior or can replicate it. The charted value is the output of AnalogInput.getVoltage() - we're using Java, and are on firmware 166.

The next thing we going to test is to attempt to use our jumper cable reading to account for the drift manually, since RobotController.getVoltage3V3() is not implemented fully. This will hopefully let us normalize our potentiometer reading similar to how the AnalogPotentiometer class does.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the drift with the 3.3v jumper on a SmartIO AnalogInput using firmware 166, then inspect the behavior exposed through AnalogInput.getVoltage() and RobotController.getVoltage3V3(). Compare readings across multiple SmartIO ports and determine whether the issue is in the rail, ADC behavior, or voltage reporting; done means the cause is confirmed and a corrective path is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.