Smart pushbutton power switch

Author: Melody Liu

Dec. 16, 2024

Smart pushbutton power switch

I bought a mini pushbutton power switch board, and I'm trying to wire it so I can re-use the push-button as a sensor to an Arduino so it can read the button state and perform a controlled shutdown.

TMAZTZ Product Page

My goal is that when the Arduino is off, an external pushbutton wired to the A pin will short to ground, turning the Arduino on. Then, when someone presses the external pushbutton again, the Arduino will register the key-press, do some internal cleanup, and then set OFF pin high to turn itself off.

This is the simplest way I thought I could accomplish this behavior:


I found I had to add the diode because when the pushbutton board latches on, the A pin appears to stay shorted to ground, causing the Arduino's SB pin to always register low, regardless of the external pushbutton state, meaning the Arduino could never tell when the external pushbutton was pressed again.

However, this circuit still doesn't work. The problem I'm now having is that the pushbutton board immediately turns 'on' and stays stuck 'on'. Even setting the OFF pin to high has no effect. How do I fix this circuit?

Featured content:
Electrical Equipment & Supplies
Drives
Unleashing the Power of PCBA OEM
What is Explosion Proof or Hazardous Location Lighting?
Railway Spare Microswitches: Essential Insights for 2025
Essential Guide to Railway Spare Microswitches for Maintenance
What Are Key Features of Molded Case Circuit Breakers?

Are you interested in learning more about me- limit switch wiring diagram? Contact us today to secure an expert consultation!

Momentary push button versus latching push button switch

Understanding the differences: Momentary vs Latching push button switches 

The choice between a momentary and a latching push button switch largely depends on the functionality required in the circuit and the expected user interaction with the switch.  

The comprehensive table below details a side-by-side comparison of Momentary versus Latching push button switches. Discover key insights into their functionality, applications, and advantages to seamlessly integrate into your systems.  

Whether you're upgrading existing configurations or spearheading new innovations, this guide is designed to enhance your decision-making process, ensuring you select the perfect switch that aligns precisely with your project's demands. 

To sum up, here's a table comparing momentary and latching switches: 

Featured content:
Are Your Miniature Circuit Breakers Truly Protecting Against Electrical Fires?
What Should You Consider Before Buying European Standard Switches?
Unlocking Precision: Diamond Tools for Laser Optics
What are Ultra Precision Diamond Tools and Their Benefits?
10 Things to Consider When Buying 3 gang switch
7 Essential Facts About PG Type Cable Connectors You Need to Know
Understanding PG Type Cable Connectors: Applications and Uses

42

0

Comments

Please Join Us to post.

0/2000

All Comments ( 0 )

Related Articles

Guest Posts

If you are interested in sending in a Guest Blogger Submission,welcome to write for us!

Your Name: (required)

Your Email: (required)

Subject:

Your Message: (required)