Wake Photon via Cap Touch Alert Question

I am layout out a schematic for a design that will use a Photon along with a CAP1188 Capacitive Touch chip.

This is a battery based design so the Photon will be put to sleep and I want to be able to wake the Photon using the Alert pin on the CAP1188 chip.

Which of these Alert modes would be best for working with a sleeping Photon?

Adafruit’s CAP1188 breakout has the ALERT pin wired to 3.3v with a pull-up resistor.

Here is the datasheet for the CAP1188 chip if needed: http://ww1.microchip.com/downloads/en/DeviceDoc/00001620C.pdf

You could use either, but if you want to use deep sleep and immediate response as soon the alert gets triggered, you may want to go for active high on WKP.

@ScruffR Thanks for the quick reply.

So would the Active High IRQ line be wired up like this?

So the CAP_ALERT pin would go to a Photon pin to trigger the wake?

@RWB, the ALERT output is an ACTIVE output meaning it goes HIGH and LOW without the need for a pull-up or pull-down. You can, however, put a week pull-down just to be sure the pin is low on power-up. To do that you would need a resistor from the IRQ output to GND (use 100K). The IRQ also goes to the WKP pin of the Photon. The way you have it shown, CAP_ALERT is basically shorted to 3V3!! :wink:

@peekay123 I see, I ran the IRQ to 3.3v because that’s how Adafruits breakout was wired.

I’ll do as you stated, switch the 10k resistor to 100k and run that to ground.

Now, can I wake on a separate pin that specifically calls code to poll the CAP touch chip to see what buttons was pressed?

I may have a few wake sources so it might be good to know what exactly triggered the wakeup.

Or maybe I’ll just have the first IRQ alert just wake the Photon and then start listening for button presses as normal.

@RWB, you need to look at the Adafruit schematics again. The way you have it, CAP_ALERT is connected to 3.3V instead of the junction of the IRQ pin and the 10K pull-up resistor!

I suggest you take a look at Section 4.6 of the CAP1188 specs which describes how the IRQ pin can be setup. With the pull-up, I suggest you use active LOW for the pin.

@peekay123 Of coure your correct again :slight_smile:

I changed the schematic to mirror the correct wiring:

I see what Active low means via this diagram.

If I wanted to set the IRQ pin for Active High would I just need to change the layout to this?

This diagram was helpful to me for understanding the difference between wiring Active High vs Active Low.

@RWB, your active low schematic is still wrong since you are shorting the IRQ line to 3V3!!! The schematic is like the high one except that the resistor goes to 3V3 instead of GND. I suggest you use the active HIGH since CAP_ALERT will be held low even when power is off .

Got it!

Active High is what I want so this should work just fine correct?

I see what you mean about the Active Low schematic being shorted without the resistor being in line to the IRQ pin.

Let me know if I’m still missing anything :blush:

@RWB, you’re good to go. You could make the resistor 10k if you want.


I switched to the 10K resistor :thumbsup:

1 Like