WKP RST pin wiring on custom PCB

I’m currently developing a PCB for the Photon to easily attach external hardware. To make the PCB a bit future proof I’m also wiring the WKP and RST to screw terminals. But I want to make sure that, by simply wiring them without attaching a device, the pin doesn’t ‘accidentally’ wake up the Photon from deep sleep or reset it at any moment.

I’ve found some documentation on the WKP pin being active-high and RST pin being active-low. What does this mean exactly? I’ve looked at the Photon Eagle board and both pins directly go into the P0 WiFi module, so I’m not sure if they have pull-down/pull-up resistors. If this is not the case, I’d like to add them to ensure that they aren’t triggered randomly.

Thanks for a response :slight_smile:

Active-high means the pin’s function will be triggered if the pin voltage is at a logical high level, wheresas active-low means the opposite. For example, it’s very common for RST pins to be active-low, so that grounding the pin resets the device.

I believe there’s a debouncing circuitry for the RST pin as shown. This keeps the RST pin HIGH and you probably won’t get false triggers.

From: https://github.com/spark/photon/blob/master/pdfs/photon_v100/photon_v1.0.0.pdf

Need to check with @BDub if the WKP pin can be set to pull-down or an external resistor will be required.

1 Like

Ah like so. I’ll experiment with it and a breadboard.

For deep sleep, it's active high only. It may already add the 40k ohm internal pulldown. Adding a 40k ohm pullup resistor while measuring the WKP pin voltage will tell you for sure (you'll see ~3.3V/2 onthe WKP pin with respect to GND if so).

To future proof your design, just add a spot on the board for an external pulldown. Also all wires that are accessible external to your enclosure should have ESD protection added. The simplest form of this is a 1k - 10k series resistor, and there are also devices specifically manufactured for ESD protection. This is a big topic, so I'll let you do some reading about it, but if I remember correctly the Photon is rated for 2KV currently.

You can also design a simple active circuit that has a higher ESD rating, of which the output directly controls RST and WKP. That way you wouldn't have to add a large series resistor which may not work well in the case of RST. Should be ok for WKP though. The purpose of the series resistor is to limit current flowing into the STM32F205 pins to power and GND when an ESD event occurs. The ESD suppressors do the same thing, but shunt the current to GND before allowing it to reach the STM32F205.

4 Likes

Whoa, that’s a lot of information that I haven’t heard before.

How would I make a simple active circuit with a higher ESD rating? This is a higher rating that the Photon 2kV? What would I do with analog pins and digital pins? Do they all need resistors? Doesn’t this impact my readings?

I’m currently reading lots of websites on ESD, it’s very interesting though. I never knew we, humans, have had to work with electrical charge many centuries, even millennia ago. Pretty cool.

using something like a higher gain transistor(s) that ends up with a low impedance output to control the Photon WKP pin for instance.

You wouldn't know until you tested it with an ESD gun and proper test setup (IEC61000-4-2), but it can be, yes.

Here's a slew of examples for ESD protection devices: http://www.littelfuse.com/~/media/electronics/design_guides/esd/littelfuse_esd_suppression_design_guide.pdf.pdf

The best thing you can do though, is figure out a way to isolate humans from touching the bare inputs if you can. Ask yourself, do I need this ADC input dangling out here on this screw terminal? If so, you need to add more than just ESD protection. You need over voltage, reverse voltage protection as well. And yes these things can affect your ADC input sensitivity and accuracy... so if you need something specific, you have to design for it specifically. There is no one solution and leaves you with a perfect ADC result. You can save yourself a lot of extra circuitry by just not exposing your circuitry to the outside world, especially If this is for a product end goal. If it's for some kind of development board and you want to keep costs down (like the Photon itself) then you just just need to specify what the limits are in a datasheet :smile:

4 Likes

Many thanks for all the information! :slight_smile:

1 Like

Was it ever determined if WKP on the P1 module has an internal pulldown or is an external pulldown required?

Have you considered looking for help from some PCB manufacturers? I often customize some PCB boards at PCBGOGO, or they can help you