Adding a Power Switch
This project has definitely had its distinct phases. For someone who knew (and still knows) very little about electronics… there are a lot of small steps. Get a button to work. Get an LCD to work. Get a GPS module to work. Get some information from the GPS to show up on the LCD. And so on.
I’ve been slowly making progress, and combining things together. And I’m at a point now where I’m looking at a power issue. Namely: how do I power this thing with a battery, but not have the battery drain due to continual usage?
My original goal was to have something like this: button press turns on the project, then any subsequent button press checks the distance to the final location. And after a certain period of inactivity, the project shuts off.
I got stuck trying to figure out how to pull this with just one button. And after exploring a lot of other options, decided to take the hit… and just deal with my desired functionality using two buttons.
Button A would handle power on/of. Button B would handle checking for the distance to the final location.
I ended up getting a push-button power switch, to handle my powering on/off concerns. It comes with its own push button (once for turning power on, again for turning power off). I replaced the small push button with a rugged momentary pushbutton, and that made for quite a nice effect.
I also added some code so that, after a certain amount of time, the project would automatically shut off (thanks to a nifty KILL pin on the power switch).

Soldering header pins to the power switch. Not great, but not terrible. I feel like I did a better job with the LCD backpack soldering.
Also, every time I see photos of soldering I think about Hershey’s kisses. I may break down and get a small bag of them out of necessity, soon.

Soldering some wires to a second rugged momentary button. Not my greatest work here, but it’ll serve?

I’m seeing double here: four buttons!

Added an external power source (9V battery), and routed it through the power switch. A really nice touch on this switch is the LED light, serving as an indicator that it’s on and power should be supplied. Super helpful.

The full setup. The wires have now gotten a little cray cray, so likely a chance/time to refactor once more.
It’s been interesting to think about this project in the here and now (what do I need to do, to make things work). Versus how I imagine things will be in their final form (how do I want to wire this up, via a Perma-Proto board).
I think the Arduino Uno is overkill for what my project needs. And my next step is either to get a shield for the Arduino Uno (which also feels like overkill), or to switch to something smaller like an Arduino Nano (which I could set on top of a Perma-Proto board).
This whole setup needs to be smaller (small enough to fit in a jewelry box), so there’s definitely more refactoring in my future.
But that’s like me wanting to improve my kitchen production line, when I’m just happy that I baked a cake that tastes very cake-like, and doesn’t kill anyone. Improvements to come, but they’re coming later.
Related:
Second Solder
First Solder
This Post Has 0 Comments