Reset conundrum

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a product, and I would like to have a way for the user to do a hard reset as a last resort.
The device is permanently powered, and spends most of its life in power down sleep mode, but the user can't disconnect the battery without a screwdriver and a soldering iron.

There are four push button switches, which are connected as shown, all four being read by a single ADC input. This works fine.

I was considering the attached circuit for an emergency reset, whereby the right hand switch is held depressed for some lengthy period, discharges the cap through R7 and D2 and forces a reset. When the switch is open, the cap can recharge fairly quickly via R1, R2, R6 and D1.
Values of R6, R7 and C1 are guesswork at this stage.

This may, or may not have worked. I never got as far as testing it because I noticed a big diptera in the viscous topical medication, namely the internal resistor in the ATTiny44A reset circuit, that has a minimum equivalent value of 30K.
So, unless anyone has a bright idea as to how to circumvent this(bearing in mind that I have virtually no PCB real estate left and a tiny[sub microamp] power budget), I will have to re-think.
A while ago I received an email flyer from somewhere containing details of special chips that do this sort of thing for the Kindle, for example. Dedicated circuits that will respond to a very lengthy button press by issuing a reset.
Typically, I deleted it, and now I have searched in vain for any reference to such a device.
Anyone seen these?

John

Attachment(s): 

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would consider two events:

    a) either the application went mad and you want to reset it to bring it back b) or the application is ok but the user wants to reset it (for whatever reason)

For (a) option I would stall the application and wait for b) event whenever WDRF.
for (b) I would do it in software (watchdog on + while(1); ) whenever button is held longer than xyz.

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are the 4 switch input resistors different values so the software ADC can calculate which switch is being pressed? If all four switches are held, could your software detect that and do a soft restart from 0 after time X ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brutte wrote:
I would consider two events:
    a) either the application went mad and you want to reset it to bring it back b) or the application is ok but the user wants to reset it (for whatever reason)

For (a) option I would stall the application and wait for b) event whenever WDRF.
for (b) I would do it in software (watchdog on + while(1); ) whenever button is held longer than xyz.


I already have a software reset.

The problem I had(I think) is that an internal pullup somehow got disabled(static maybe).

So the program was running in a loop, waiting for the Charge_Complete pin to go high, but because the Charge status is OD, and the pullup had got disabled, the device never knew that the charging was complete.
I have modified the code to cure this particular scenario, but I am concerned that very occasionally something similar could go wrong.
I believe this is a fact of life with "always on" devices. Sometimes they lock up. That's why Kindles etc, have these chips that respond to a prolonged keypress.

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

chartman wrote:
Are the 4 switch input resistors different values so the software ADC can calculate which switch is being pressed? If all four switches are held, could your software detect that and do a soft restart from 0 after time X ?

Yes, of course they are different values!
A soft reset I have already, it is much simpler though. The left hand switch is pressed for 10 seconds.

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I already have a software reset.

Ok, I get it - no code just hardware and with minimal investment.

RC filter on a nRESET pin is ok.
Just set the RC value. I do not think these diodes are of any use:

Quote:
the user can't disconnect the battery without a screwdriver and a soldering iron.

So you just solder the battery and wait for the cap to charge.. When the button is pressed for xyzs it will reset uC and the user will have to release button and wait for c to charge again.

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brutte wrote:
Quote:
I already have a software reset.

Ok, I get it - no code just hardware and with minimal investment.

RC filter on a nRESET pin is ok.
Just set the RC value. I do not think these diodes are of any use:

Quote:
the user can't disconnect the battery without a screwdriver and a soldering iron.

So you just solder the battery and wait for the cap to charge.. When the button is pressed for xyzs it will reset uC and the user will have to release button and wait for c to charge again.

The idea of the diodes is so that the discharge of the cap takes a long time, through R7, whereas the charging is fairly fast.
But as I mentioned, none of this works, as the internal reset resistor in the ATTiny44a is equivalent to 30K. Hence the question.

John

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Found it!
http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00039851.pdf

They're called "Smart reset" devices.

Not sure the client will run to another 50p, though...

John

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How much curent does the device draw?

If you have room for a reset chip, you might consider a small normally closed push button switch in the V+ supply. Use a small switch like those on the back of routers where you push them with a un-folded paperclip poked through a small hole.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1.5uA(if you are talking about the Smart Reset chip)

There is no hole. The case is pre-existing.
But if I could use a switch, I'd connect it to the reset pin.

John

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Could you "AND" a couple of the switches together? You can get some pretty small logic packages that would take up very little pcb estate?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Or you could pick pull-ups on push-buttons so that none of them would trigger reset, but when 2/3/4 are pushed simultaneously, then the reset would trigger.

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was thinking "hard" reset = power reset.

Another option, of course, is a micro reed switch in the V+ line.

Wave a magnet over the correct spot on the case and the device does a power reset.

Not a problem if the device only has to be infrequently reset. And this tends to prevent people resetting the device accidentally.

This technique is often used on implanted pacemakers and implanted AICD's to reset them, or put them in stand-by mode.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

max_torque_2008 wrote:
Could you "AND" a couple of the switches together? You can get some pretty small logic packages that would take up very little pcb estate?

Yes, that could work, except it would be OR rather than AND.

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brutte wrote:
Or you could pick pull-ups on push-buttons so that none of them would trigger reset, but when 2/3/4 are pushed simultaneously, then the reset would trigger.

No, I can't do that. The resistors are already carefully chosen so that two of the switches will take the ATTiny input to a logical low, such that they can be used as pin change interrupts to wake the device from sleep mode.

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess one cannot wake the tiny with single button pressed. Neat trick with single IO.
But that does not mean that four of the switches pressed cannot do the same trick with reset IO.

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brutte wrote:
I guess one cannot wake the tiny with single button pressed. Neat trick with single IO.
But that does not mean that four of the switches pressed cannot do the same trick with reset IO.

Sorry, I was ambiguous there. You can wake the ATTiny by pressing either the switch on the left or the one second from left. The resistors are such that either of those two switches take the input safely into the logical low region.

John

Four legs good, two legs bad, three legs stable.