Is there a way to make the RESET pin work in the inverse?

Is there a way for me to have this work the opposite way?

I have one cable with an alligator clip hooked up to the reset pin and another hooked up to ground. When I clip them both together, the board resets.

However, I would like for this to work in the opposite way such that they’re already clipped together and when you detach the cables, the board resets.

I was given a potential solution in another forum which involved using a 2N222 transistor as a NOT gate. I tried out but still isnt working. I.e when I detach the alligator clips, the board doesn’t reset.

Is anyone able to please help me troubleshoot, as I don’t know if I may have done something wrong.

Here is a link to the forum I was referring to: arduino nano - Is there a way to make the RESET pin work in the inverse? - Arduino Stack Exchange

a resistor / pull-down could do the trick ?

EDIT: that's answer #1 in your link

Can I just check something?

When you clip them together the board is held in reset, and will only start running again when you unclip them. Is that right? Or are you using a capacitor to create a short reset pulse?

So, in your desired outcome, do you want unclipping the clips to hold the board in reset, or just reset it and allow it to run?

Just to backtrack a little, I initially only had one cable in ground and the other in reset. When I clipped them together, it held the board in reset.

I then tried the pull-down/ resistor method, which gave me the same result.

Lastly, I tried the NOT gate solution and now clipping the wires together doesn’t hold the board in reset and neither does unclipping them.

My desired outcome is to have it set up in a way whereby unclipping then cables holds the board in reset

Thank for this! I did give it a go however and it didn't seem to work. I used a 10K resistor though. could this be why?

@iflow1 Why do you want to do this ?

Is it related to your other very similar topic ?

what board do you have? I said 3.3V but it might be 5V if it's a UNO for example

10kΩ should be OK, you could get higher to limit the current consumption.

So that sounds like you want a pull-down resistor on the RESET pin (which will hold the board in reset), and then connect your cable between the RESET pin and Vcc. So with the cable connected, RESET is held at Vcc by the cable; with the cable disconnected, RESET is pulled down to GND by the resistor. Would that work?

If you have room for a normally closed relay, that is open until you remove the signal wire, that would work. Not sure if you have the option or not

Ahh yes it is related to that actually. Upon further research, I discovered the reset pin feature, so I thought why not give it a go

Did you try the suggestion in the other topic ?

So this topic should have been promptly merged with the original.

I notice that the moderators are now locking topics instead of merging them. Is it not practical to merge topics in the new forum software?

(And don't refer me to the "Do you like the new forum" topic with 1548 postings so far! :woozy_face: I am only half way through reading it.)

Of course it is possible to merge topics but it is not clear to me that they relate to exactly the same problem.

As to locking a duplicate topic rather than merging them, there is no such policy in place, but different mods may take different courses of action and it often depends on how many, if any, replies there are to a topic

Merging two (or more) topics that have replies can create a combined topic that is difficult to follow, especially if posters have replied to the topic as a whole rather than to a specific post

In this instance I decided not to merge the topics but if you feel strongly about it then please flag either of the topics suggesting that the be merged and I will let other mods decide whether to or not

Maybe this will help. For my senior design project I made an underwater drill that (in the event of an emergency) needed to be reset or shut down.

I used a hall effect sensor tied high, and if I waved the magnet over it, the signal goes low and resets.

(For you, the hall effect sensor isn't needed) If you wanted to invert the low signal,, consider using a relay that is held open circuit, and when the "ripcord" is pulled. The relay closes, holding the device in reset

I would still be interested to find out why the pull down does not work.

Hi, @iflow1
Did you configure the pull down resistor like this?

R2 may be needed to enable the processor to upload.

Tom... :grinning: :+1: :coffee: :australia:

Come now, the mystery "transistor as NOT gate" circuit would have been the correct solution, had it just been wired correct.y. :astonished:

NPN transistor. Emitter to ground, collector to reset line. Base to Vcc via 22k resistor. Clips go to base and ground.

Clips together, transistor does not conduct, reset is not pulled down, microcontroller operates normally.

Clips open, 22k resistor.pulls up base, transistor conducts and pulls down 10k reset resistor, microcontroller is held in reset until clips open.

(Almost) foolproof. :roll_eyes:

Edit: Oh, OK, looked at the article referenced. It **did** show the correct circuit already!

I'm confused. Why all this talk about relays and transistors? Won't the pulldown approach (which I suggested and @TomGeorge drew) work? I imagine the only thing that might need adjusting by experiment is the value of the pulldown resistor.

(by @TomGeorge)

If it doesn't work, I'd love to find out why - always pleased to learn something new. :grinning:

True enough, 1k wodul be more correct since the reset pull-up is already 10k, so a 10k pull-down will only pull it to half of Vcc and any significant value for R2 will defeat it even more.

But frankly, the transistor is the cleanest and most immediately reliable approach. :sunglasses:

1 Like

Okay I’m just gonna try to rewrite the whole thing again from scratch and see if I may have wires thing weirdly.

Just out of curiosity, does it matter what order things are wired?

E.g Base -> R1 -> Alligator clip as opposed to Base -> Alligator clip -> R1?