Anamoly with Analog inputs

Hi,

I am running some tests using the analog inputs of an SSC-32u. for these, I have a jumper between the middle row (+5v) and the input pin. When I read the inputs across all values (sending VA VB VC VD VE VF VG VH) to the board, I see something weird. With “A” jumped, its value is 255 with the rest 0 (which is what I expect). When I place it on “B”: A is 100, B is 255 (as expected) but C, D, E, F, G and H read from245 to 252. As I move the jumper across the row, anything before the jumper reads 0 while anything to the right reads high.

I am NOT sending any kind of latching command. Literally just jumping 5v to the input. Why would an input read high if the input is not connected to anything? I would expect the results to be 0 0 255 0 0 0 0 0 if the jumper is sending 5v to input C only.

Hi,

This is because you have floating inputs (not driven by any signal) on a multiplexed ADC. Since all the input pins are related through the multiplexer, the ones that are floating stay charged and will read a partial value of the closest connecting input as they slowly discharge.

See this post for an example with details.

Therefore, if you wish to use analog inputs to detect if something is connected, do not leave them floating! Instead, add a very weak pull-up or pull-down resistor between the input and one of the power rails. A value of 10-50 kOhm should be enough, depending on your application.

Sincerely,