Arduino Nano INPUT_PULLUP Template

by JeremySCook in Circuits > Arduino

8965 Views, 5 Favorites, 0 Comments

Arduino Nano INPUT_PULLUP Template

How to Set Up a Compact Arduino Nano (DIP Switches/INPUT_PULLUP)
logo-template-intro-smalllogo-nano.jpg
SnapShot-crop.jpg

The Arduino Nano is a great platform for small projects, and what makes it even better IMHO is having a standard switch/power layout to take your prototypes from 0 to done in record time. This howto will show how to put together a compact package that takes advantage of the system's built-in pullup inputs, so that you don't need any external resistors, specifying pins as "INPUT_PULLUP."

Battery power is provided by a pair of CR2032 coin cell batteries with heat-shrink used to hold everything in place.

What You'll Need:

SnapShot(1).jpg

You'll notice that there's no power switch, which is conveniently taken care of by the battery pack.

Solder Everything Together

SnapShot(2).jpg
SnapShot(0).jpg

Solder up the switches and power supply as shown. Conveniently, the spacing of the DIP switches lines up perfectly with the Nano's holes, and you can bend the leads over to keep them secure when soldering. Ground each pin on the other side, and this "blob" can act as a great ground point for other sensors, etc. when needed.

Heat Shrink

shrink-wrap.gif

Affix the battery pack to the back of the Nano with heat shrink. The GIF is cool enough to merit its own section!

Make sure you have any accessory lines and devices connected before this step, otherwise you'll likely have to cut it off.

Program

SnapShot(5).jpg

Program the device as you so desire. Sample code is found here on GitHub, and heavily features setting pins up as "INPUT_PULLUP." Really excellent for space saving.

The same concept could be used with an Arduino Pro Mirco and/or a LiPo, though you'll need to make sure that your board will run properly on sub-5V power. I did this successfully in this project if you'd like an example.

Note that links to Amazon on this writeup are affiliate.

Enclosure? Sensors? Lights?

lights-gif.gif
SnapShot(4).jpg

With this basic design in mind, there are many ways you can go with it. As shown here, it can be set up with a PIR sensor to blink lights in response to movement, or be housed in a nice see-through enclosure. Interestingly, it seems the clear plastic interferes with PIR sensors, so this demo wasn't as good as I'd hoped.

As an example of one of the projects I've done with this setup, check out the CNC light graffiti fixture seen here! I was able to put the Arduino part together in just a couple hours with the correct parts in-hand and a standard design already laid out!

If you enjoyed this tutorial, I'd invite you to vote for it in the 2019 Instructables Arduino Contest here!