Maker Pro
Maker Pro

Unintentional Capacitance Sensor

edmundsj

Feb 22, 2015
13
Joined
Feb 22, 2015
Messages
13
Hello,

I'm working on a project that involves the use of a digipot to control the current to the base of a transistor. Right now I just have an AD8402 14-port digipot, and I'm using it to blink an LED by switching the resistance from 0 to 10k every couple hundred milliseconds via SPI communication with an arduino UNO (the big box on the left in the circuit diagram attached below). I'm only using one of the two possible wipers on the digipot. For some reason, the digipot appears extremely sensitive to ambient capacitance (not sure if this is a real term), because the circuit is acting like a capacitance sensor. When I move my hand near it, or move it, it affects the function of the circuit. The LED will stop blinking, and instead slowly increase in brightness as I move my hand towards it.

Is there any way to prevent this? Ideally I want this to be a high-fidelity circuit that works as expected. Do I need to ensure all pins on the AD8402 are grounded or hooked up to something? Thanks so much, first time posting on this forum.

Also as a side note, it is necessary to use a digital potentiometer rather than an analog potentiometer for my project because I need to control resistance from an external input (eventually) wirelessly, and can't just adjust manually.
 

Attachments

  • circuit_diagram.jpg
    circuit_diagram.jpg
    52.6 KB · Views: 134

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Ensure that all inputs to the digital pot are connected to a valid logic level and that what looks like an analogue ground is properly connected.

If you can post a link to the datasheet I can probably give you more precise information.
 

edmundsj

Feb 22, 2015
13
Joined
Feb 22, 2015
Messages
13
This is the datasheet for three of Analog Devices' digipots, the one I am using is the 14-port AD8402. Thanks!
 

Attachments

  • AD8402_datasheet.pdf
    603.5 KB · Views: 132

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
According to the datasheet on page 12, pin 1 (AGND) MUST be connected to pin 5 (DGND) and these pins must be grounded.

Pin 10 should be tied high, as should pin 6.

I suspect these changes will help. I would also tie the unused potentiometer pins (12, 13, and 14) to ground if they're not being used.
 

edmundsj

Feb 22, 2015
13
Joined
Feb 22, 2015
Messages
13
When you say "tie high" do you mean in this case connecting pins 10 and 6 to Vcc which is 5V? Is this a general term for setting the logic level on certain pins to whatever "high" is for that pin? I have attached the new circuit diagram below.
 

Attachments

  • IMG_0394.JPG
    IMG_0394.JPG
    30.5 KB · Views: 121
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Your new circuit looks like what I recommended. See how it works.
 

edmundsj

Feb 22, 2015
13
Joined
Feb 22, 2015
Messages
13
OK, I will try it out tomorrow or the next day when I have access to it and will post the results. Thank you!
 

edmundsj

Feb 22, 2015
13
Joined
Feb 22, 2015
Messages
13
The circuit worked the first time I wired everything up in accordance with the updated circuit diagram, nothing wrong whatsoever (I think this is a first). Thank you.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
This indicates the importance of ensuring that all unused CMOS inputs must be correctly tied to a known logic level.

CMOS inputs have a very high impedance (kind of means that they are very sensitive) which means they can very easily pick up interference. Moving your hand around the circuit could quite easily have changed the signal at one of these pins.

This signal is essentially capacitivly coupled, so your observation that you had unintentionally made a capacitance sensor were pretty spot on.

There are circuits using CMOS gates which exploit this behaviour to make touch switches.
 
Top