A/D overflow problem on Cube Orange analog CURRENT input

On CUBE Orange, and probably most other hardware, the A/D overflows on analog current sensor inputs greater than 3.3V which results in wildly inaccurate readings.

A lot of current sensors output 0-5V. Is there some way to detect overflow and bound it to the max value?

Zener clamping or changing resistors on the current sensors work, but a software approach would eliminate any required hardware mods.

No, because the input is rated for 3.3V.

Most modern electronics work on 3.3v inputs and outputs. A hardware approach is the only option - software wont make a 3.3v input accept 5.0v
You would have to use a voltage divider, something like this

image

1 Like

I’m a hardware engineer, so I know all about 3.3V vs. 5V logic - and voltage dividers. I don’t know what the ARM does on A/D overflow. But some chips have an overflow flag bit rather than simply roll over.

If the chip has such an indication of overflow, it would be nice if the code would set a bound so that there are no wildly inaccurate readings regardless of what the input is.