Relaxation oscillators (for capacititive touch sensing)


Results 1 to 25 of 25

Threaded View

  1. #5
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Hello Melanie,

    firstly, thank you as ever for the comprehensive reply (& avoiding an overpowering temptation to pour scorn!)

    Quote Originally Posted by Melanie View Post
    Going back to your first post...

    There is a difference... pin 18 is C12IN0- and pin 15 is C12IN1-

    This is taken from my Datasheet DS41262E (yours might be an extinct version).
    Yes, I had an old datasheet, hey ho!

    Quote Originally Posted by Melanie View Post
    Going back to your first post...

    You asked about RC4. Whether you consider a Comparator OUTPUT as analog I suppose is up to you. I consider Comparators INPUT as ANALOG but technically their OUTPUT is DIGITAL since it can only be a High or a Low. RC4 is the OUTPUT for Comparator 2. If you are using Comparator 2, you DON'T want to set that pin to ANALOG (because ANALOG refers really only to INPUTS), but you want DIGITAL OUTPUT.
    I have to say, this confuses me - as an old analoguey dinosaur (desperately trying to find his feet in the whacky world of digital), a comparator is analogue, but thinking about it more, an SR latch is digital. But that said, I've tried several permutations with digital and analogue pins! I'll revisit this in the light of your reply.

    Quote Originally Posted by Melanie View Post
    Look at figures 8.2 & 8.3 in the Comparator Section. They show you the Comparator INPUT arrangement. For your convenience CxVin- has four possible sources.

    The 16F690 does NOT have a CSM Module.
    Yes, this is one bit I understood...but nevertheless it does have a Comparator SR latch relaxation oscillator possibility ...which ought to work!

    Quote Originally Posted by Melanie View Post
    This means that if you want to play with capacitive sensing you have to configure the Comparators as an Oscillator yourself, the frequency of Oscillation will change when you place your Dabs on the Sensing Terminal. It is up to you to detect the change in frequency. So really any PIC with Comparators can do that. It's nice that the 16F690 has a quad input to each Comparator, which means that each Comparator can potentially service up to four capacitive buttons (NOT like your schematic in the first post which cannot differentiate which Button is being touched). That's the easy part.
    yes that part of the schematic was wrong (and was pretty much lifted from Microchip's application note .... http://ww1.microchip.com/downloads/e...tes/01101a.pdf Appendix B - it's wrong!)

    Quote Originally Posted by Melanie View Post
    The Hard part comes when you discover that the frequency will SIGNIFICANTLY DRIFT with ambient TEMPERATURE and HUMIDITY. This means you have to continually sample and reset your base reference. Then some snotty kid comes along and presses your button with damp hands 'cos he's just been picking his nose, and your base reference swings wildly into the unknown. Enjoy...
    yes I know about the drift....but if you believe the hype on the microchip site, it can be accounted for in code (I should have something ready for this aspect in a few years)

    Quote Originally Posted by Melanie View Post
    Some of us have a life... *smiles*... (quite apart from the fact that a tactile PCB switch costs about 5 cents and is reliable. Mount it behind a flexible overlay and all you need is a pull-up Resistor and ONE LINE of code to see if anybody's pressed it or not. It doesn't care if the overlay is dry or wet or somewhere in between, and it doesn't care about the flavour of Ben & Jerry's you want to slap on it!).
    ......and some of us have guitars, the real estate of which is more sacrosanct than the Turin shroud! :-) believe me, if I could justify a h/w switch I would just use that ...but taking a drill to my vintage guitar would be like violation. (far better to have a capacitive touch sensor located somewhere under the scratchplate)

    Thanks for your help though ...it really is appreciated . :-)
    Last edited by HankMcSpank; - 22nd November 2009 at 17:21.

Similar Threads

  1. Need a cheap touch sensor idea.. here it is
    By mister_e in forum Code Examples
    Replies: 20
    Last Post: - 16th April 2016, 23:42

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts