Created by
Created October 24, 2012
Last modified October 24, 2012
Tags No tags.

Summary

Not provided.


Description

This circuit demonstrates capacitance sensing using two microcontroller pins, one resistor, and one reference capacitor. Using the the microcontroller's tri-state outputs, we use the unknown capacitance Ctouch to charge the reference capacitor C1 in a series of steps. Each cycle, check if the voltage at Pin A is enough to read "high" while Pin A is high-impedance and Pin B is held low. The number of cycles this takes is inversely proportional to the value of the unknown capacitance.

The top block generates a pair of 25% duty cycle square waves 180 degrees out of phase with each other. The two signals are used to toggle pin A between Z and 1, and pin B between Z and 0. The reset signal holds both pins low initially to ensure that C1 is discharged before the measurement cycle.

You would want to use a larger value for C1 in a real circuit to increase the number of steps needed, and thus the resolution. The low value is used here to show the concept quickly without requiring a long simulation.


Comments

No comments yet. Be the first!

Leave a Comment

Please sign in or create an account to comment.

Revision History

Only the circuit's creator can access stored revision history.