Newbie: Trying to create small push button

Hello,

Please re-direct me if my forum post is in the wrong section!

Objective: I am trying to create a small device (roughly the size of a quarter) that is essentially a button that relays a boolean "Pressed" (via Bluetooth to an external application) when I press the button.

Current Thoughts: I need a small single board Microcontroller, and a small non latching button. I can connect the button to the microcontroller, press the button, and pass my data to my Application (that I will build). I want the button device to be small and portable, so I am wondering how to do this without the use of USB cables.

I have a history in App development, but no history of Hardware development besides some Computer Architecture courses in my Undergrad.

I would be more than grateful to anyone out there that can help me with my small project!

Welcome to the forum

How do you intend to power this device ?

How big is a quarter ?

Wow, thank you for your warm welcome and quick reply!

To be completely honest, I am starting from scratch, and I do not have a background in Hardware such as this.

My initial thought was to use something small like an Energizer 2032 Lithium Coin Battery. I do not know if this is possible to use such a battery to power the device I am trying to create for this project.

If you have any thoughts as to how I should go about the Hardware for this project, I would be very grateful.

I really want to help but I cannot come close to answering your question. This will probably be kicked off the forum as I do not know of an Arduino product that will do what you want. I may be wrong I do not know the full line. You need to do some ground work first. There are microprocessors that will operate off that battery but they are limited because of current and voltage. You will need to have or have available expertise on PCB design, I know of no standard devices that will fit your initial specification hence you will have to make own. You need to look into how to program and debug the micro of your choice and find one that does it the way you want. You also have bluetooth to contend with, is is a seperate device or part of the micro. Also there is an antenna involved. This is just a bit of what information you will need to acquire. Let us know how you do and feel free to ask questions. Google will probably become your best friend.

Approx a shilling.

Thank you sir for the helpful information. Feel free to kick the post, you gave me more than enough for a starting point.

When I was a kid they were big as a dinner plate. A silver dollar was big as a manhole cover, you had to stand it on the edge and roll it to the store.

Roughly 25% of the whole.

Luckily I am old enough to remember shillings, but have not seen one for decades

I’m not understanding what you want to do from your first post.

Is it that you want to create a small microcontroller that transmits a message to a phone or computer application, via bluetooth, when you press a button?

My initial thought on how to achieve this would be to first get a very small Arduino compatible Microcontroller, with built in bluetooth. A quick google gives me this;

That’s an esp32 with built in Bluetooth and WIFI, with plenty of compatibility.

Lucky for you, there's literally a photo which compares it to the size of a quarter :wink:

Obviously, you’d need a tiny coin cell battery to power the thing and you’d need to get one that can handle the brief increase in current when using bluetooth or wifi. This guy seems to have figured that out; #58 ESP8266 Sensor runs 17 days on a coin cell/transmits data (deep-sleep) - YouTube. He also mentions how to regulate the battery voltage with an LDO regulator

Lastly, you’d need to figure out a way to reduce the power draw on the battery when the button is not being pressed. If you wanted the esp32 to be constantly powered, you’d need it to go into deep-sleep mode, which consumes around 20 microamp. After some rough calculations, that might get you around 1.5 years of battery life. Then you make it exit deep sleep through pressing the button, which commands it to connect to bluetooth, and send the message. Once the message is sent, it goes back to deep sleep.

However, a much better idea, which would allow you to get many more years off the battery is have the ESP-32 physically powered off the majority of the time, and only briefly powered on when the bluetooth message is being sent.

Such a thing can be achieved with a “soft-latching power circuit” using a P-channel mosfet. When the button is pressed once (you don’t need to hold down the button), the ESP-32 powers on, connects to Bluetooth/WIFI and then immediately sends that Bluetooth or WIFI message. When it has finished sending that message, the esp-32 can be programmed to automatically power itself off, through unlatching the circuit, using one of its GPIO pins. Such a circuit can be found here;

You would need a logic-level mosfet to achieve this, as the esp32 and coin cell both operate at around 3 volts. AO3401 should work great, and is very small.

Have fun.

Implement a key fob. Transmit side only needs a battery, switch, and osc w/zigzag trace for antenna. If you're only sending on/off, you might as well use a garage remote.

Thank you!

You hit the nail on the head with what I was looking for. This is a fantastic source of starting information for my project.

I thank you again for the time and effort you put into helping me and answering my forum post.

You sir, are a man of code and honor.

Enters Laboratory

Excellent advice, I will get to researching this as a potentially easier implementation for my desired outcome. I appreciate your timely response and thank you for taking time out of your day to help a newbie.

Actually, this open source project has pretty much everything you need. Lots of documentation too and schematic on github

I don't think the micro-controller is very Arduino IDE compatible though, but you should be able to use an ESP-32 if you wanted to, as it has the same "bluetooth low energy" mode as the Puck device, which is way better if running from a small coin cell, like 3v CR2032 battery they are using, which cannot output much current.

Another thing I just found out is the ESP-32 can go into an even deeper sleep, "Hibernation mode", which uses around 2.5 microamps. You can then wake it up with any of the RTC GPIOs pins (which connect to your push button), so you'd need to make sure that the miniature dev-board you get has access to these pins . That would give the battery many more years of life, which may negate the need for the soft-latching circuit I mentioned.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.