Capacitive sensing maybe?

Posted on
  • Hello,

    I wanted to hack an Otamatone, removed it's strip and tried to read voltage/resistance. It doesn't work!
    I guess it acts as a variable capacitor.
    Any clues on how to read it? maybe there's a basic circuit to build, or a silly software thing to write, but I have no idea!
    thanks!

  • Oh.. it's got just two pins, apparently without a + sign anywhere

  • Hi, It probably is capacitive. It may be possible to set up the STM32 chip to handle it, but I'm not sure how at the moment - it'd be quite a lot of work to do though.

    The best bet might be to buy a capacitive touch IC and just interface that to Espruino. Again, I don't know of any at the moment either - touch isn't something I've had time to look into.

  • Actually after having posted it came to my mind that I could google for "capacitance arduino" and actually found this: http://arduino.cc/en/Tutorial/Capacitanc­eMeter#.UxWz6vRdX2c
    Which is not simple, but doable. I'll let you know if I make any progress.
    Cheers!

  • Yes - however often the capacitance of a human is very small, so the time taken to charge/discharge is pretty tiny. I guess you could have some luck using Espruino's setWatch to measure the amount of time that the signal takes to charge up.

    The solutions I've seen set up the hardware timers to do everything automatically though - but at the moment that would require use of peek and poke :)

  • Oh while you mentioned it... poke sounds great fun in general (also gets my mind back to my speccy days) but.. how do I get something address in js/espruino? I positively want to poke but I don't know where to do it!

  • Yes, it's quite fun - especially when you're able to properly change state with it :)

    Best bet is the reference manual: http://www.st.com/web/en/resource/techni­cal/document/reference_manual/CD00171190­.pdf

    Look up Table 3. Register boundary addresses and then look at the Register map entry for the peripheral you're interested in - then just add the offset to the base address.

    There's also this header file that you can work backwards from (but the reference doc is easier :)

    It would probably make sense to create a module where a lot of the common addresses were defined I guess...

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Capacitive sensing maybe?

Posted by Avatar for Loop @Loop

Actions