Connecting switches/pots to PSoC

We have managed to hook up a rotary switch, a SPST switch and a 100K pot to the PSoC kit, using one of the breakout boards available now.

The switches are working fine and their states can be seen in the Driver Station (inside the I/O tab) but the Analog Input has an odd behavior.

When nothing is connected on the AI lines, the voltage as reported by the Driver Station is jittery but around the max 3.3 range for each of the AIs.

When I connect one 100K Lin pot to AI 01, that input stays rock steady and moves correctly to 3.3V without jitters.

Oddly the other AIs (2,3,4) that are not connected and are floating, also follow the AI 01 - when the pot is changed!

Why would this be the case?
What should be the teams doing ? Tie the unused AIs to ground ? Of course one should not be checking the unused ones in the software but what would be the safest solution ?

Please advise.

This is normal behavior for an unconnected analog input. There’s not really anything you have to do as long as you’re not looking at those values in your code. If you want to eliminate the distraction, you could tie the unused inputs to ground. If you use a series resistor instead of a direct connection you’ll be safe even if that input somehow becomes an output.

Thanks Dave.
I was wondering why the other unconnected AIs were following the connected one’s behavior although electrically they are all independant. May be the PSoC has some internal parameters?
Gopal

Basically, the unconnected inputs are very high impedance and are picking up the signal that’s on the other input. There’s no electrical connection between them and the PSoC isn’t doing anything to make it happen. The signal traces for the unconnected analog inputs are acting kind of like an antenna and picking up the AI01 signal that is nearby.

Thanks Dave!

… and this is exactly why most DAQ modules have either pull-up or pull-down resistors.