5 ms·
It seems that the best method to use with non-specialized GPIO is the charge transfer. Instead of using a resistor, charge a sampling capacitor. The presentati
by RicoElectrico 5y ago
It seems that the best method to use with non-specialized GPIO is the charge transfer. Instead of using a resistor, charge a sampling capacitor.
The presentation below deals with a specialized block, but the only major change is using hardware for cycle counting and multiplexing a single sampling capacitor.
https://www.st.com/content/ccc/resource/training/technical/product_training/6b/ea/47/06/18/83/43/67/STM32L4_Peripheral_Touchsense.pdf/files/STM32L4_Peripheral_Touchsense.pdf/jcr:content/translations/en.STM32L4_Peripheral_Touchsense.pdf https://www.st.com/content/ccc/resource/training/technical/p...
- kurthr 5y agoCharge sampling is nice because it effectively puts a (leaky) integrator into the measurement narrowing the band. It looks like the ST solution requires an internal mux to share the storage/sampling cap, which may be present in your micro-controller/FPGA, but isn't quite so standard. The cited patent (above) actually shows how to reuse IOs to get a pair of sensors on a pair of IOs (and a shared component cap), which is fairly efficient for charge transfer. However, be careful of IP... I can only really recommend OpenSource implementations that read directly on out of coverage patents. There are even sigma-delta and other relatively narrow-band IO based solutions, but they may carry IP risk.
- RicoElectrico 5y agoI was about to link Atmel QTouch, they do the same thing with plain vanilla GPIO, but annoyingly do not provide the exact sequence of operations as ST presentation does. But they seem to be equivalent. This chip on the diagram is ATTiny in disguise - just rearrange the cap and no special hardware needed: https://eu.mouser.com/new/microchip/atmel_qtouch/ https://eu.mouser.com/new/microchip/atmel_qtouch/
- kurthr 5y agoJust to clarify, Atmel acquired the company and expired IP that I cited above. They may continue to use it in some portion of their IC portfolio.