2
\$\begingroup\$

I want to add a factory reset onto a PCB design I am working on. Basically, I want it to be a switch (or combination of) that will never be "accidentally" closed and therefore accidentally factory reset the uC.

My initial thought was to add a switch you can only press with a needle that you see often in consumer products, except this PCB will not be inside an enclosure and I believe the "needle" requirement comes from designing the enclosure to have a small opening that only a needle can penetrate.

My next idea is to use an 8PDT switch (or similar) where only 1 combination of the 8 switches (1 / 2*8 = 1/256 = 0.4%) will output a "1" to the factory reset.

Anyone have any experience with this, or suggestions for alternate methods?

Thanks.

\$\endgroup\$
  • \$\begingroup\$ Make it like that game Simon Says! \$\endgroup\$ – Keegan Jay Mar 8 '16 at 17:28
  • \$\begingroup\$ By "8PDT" do you mean an 8-position DIP switch? Because an 8PDT switch is just a two-state device. \$\endgroup\$ – rdtsc Mar 8 '16 at 18:25
  • \$\begingroup\$ Yeah, meant a DIP switch where each could be switched independently. Good catch. \$\endgroup\$ – Jim Mar 8 '16 at 19:22
5
\$\begingroup\$

Use a standard PCB button, but require the user to press it in a sequence that would not happen accidentally.

For example: 1 long press, followed by a long release, followed by a short press. The long press and release could be 2 seconds each, the short press could be 0.5s. Obviously you have to allow for a tolerance on these timings.

Or, press the button 3 times within a certain time interval, etc.

\$\endgroup\$
  • \$\begingroup\$ I like it a lot, but we'd like to keep the majority of the processing in hardware and I think setting up this timing circuitry may be tough. If we decide to include software algorithms to determine the "intention" of the button press, this seems like a very elegant solution. \$\endgroup\$ – Jim Mar 8 '16 at 19:24
1
\$\begingroup\$

Ideas:

  • Use a standard PCB button and check for status immediately after power-up reset. If button is pressed then perform the factory reset. Note that if the button is jammed for any reason that a factory reset will occur.
  • Use a 20 s hold-in. Netgear use this approach on many of their SOHO routers. With this approach you can check that the button is open on power-up and subsequently closed for 20 s. The long time delay is unlikely to be reached by someone just probing about.
\$\endgroup\$
  • \$\begingroup\$ Thanks! I like the 2nd idea a lot, especially since it seems pretty simple to implement in hardware. \$\endgroup\$ – Jim Mar 8 '16 at 19:27
0
\$\begingroup\$

I've seen people use a relatively inaccessible push-button (paper clip or must open case to access) that is held down during power-up.

That ensures enough intention that it won't get accidentally triggered, IMO.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.