WiFi Pocket Remote

by Colin Trachte in Circuits > Remote Control

1529 Views, 17 Favorites, 0 Comments

WiFi Pocket Remote

thumbnail.jpg
Tinkercad Schematic.jpg

A simple remote could come in handy for projects involving WiFi. You can make one from the following items:

*Save money by salvaging this component from a broken stereo or similar junk device (try your local thrift store)

With the following tools:

**only needed if you plan to salvage your own parts

It is also worth mentioning that this remote control can be used in reverse - to browse information received from somewhere else.

Test Fit Everything on the Protoboard. Glue Down the LCD. Test the Resistors and Button Pins With a Multimeter.

Test Layout.jpg
IMG_20180425_110444422.jpg
Button Test.jpg
IMG_20180428_124352143.jpg

Make sure you are using a nodeMCU "v2" by Amica, as the "v3" Lolin version is slightly larger and will not fit!

Buttons don't always have four pins - but when they do, you have to check them. Set your multimeter to read resistances. Touch two pins. If the resistance reads zero, the pins are connected to each other. It's easier to test the buttons when they are sitting on the protoboard.

Resistors can fool you! For example, we want three 1k resistors, which are brown, black, red. The red band can be easily confused with orange, which designates a 10k resistor! Also, anytime you salvage a component, it is good to check that it is still working right, if possible. So long as all the 1k resistors read something close to 1,000 ohms, you are good to go.

Solder the On/Off Switch First, Then the Wires/Buttons/Resistors, Then the NodeMCU. See Schematic.

Tinkercad Schematic.jpg
Pull through hole.jpg
IMG_20180426_080723482.jpg
Clip the pins.jpg
IMG_20180427_201435645.jpg
IMG_20180428_093907920_HDR.jpg

TinkerCAD was used to create the schematic pictured. Since TinkerCAD does not have a NodeMCU in the available parts list, I used header pins to represent it. Labels were added with a photo editor.

Most of the circuit will be covered up by the NodeMCU and the battery, so it is important to double check everything. Take care that your power switch is not going to block the usb port on the NodeMCU. Use a pliers to route the 9V battery wires, one at a time, through a mounting hole. This will protect the wires from being broken over time. After you have soldered all the rest of the circuit, I recommend only soldering the NodeMCU pins that you are going to use.

Next comes the anti-static plastic. Cut a piece out of the bag the NodeMCU came in. Hotglue the plastic to the underside of the protoboard where the battery will go. This will protect the solder and pins from shorting against the battery casing, or anything else you might set the remote on top of. Also, the plastic provides a smooth surface on which to place the battery.

Hardware Testing

Button Press.jpg
Hardware Testing.jpg

Instead of reading a digital on/off signal, we are going to read the analog voltage. This allows us to put all three buttons on a single pin. Each button has a different resistance, which is then connected to a voltage divider when you press the button. The NodeMCU will read a voltage between 0-3.3 volts and give you a corresponding value between 0-1024. I am including a sketch that will fire up the lcd screen and display the value being captured by pin A0. This will allow you to tell whether the buttons are working. The values I captured, from left to right, were 545, 520, and 365 but yours may vary somewhat. When no buttons are pressed, the analog value should be between 0-15.

WiFi Programming Choices

2018-04-29_081535.jpg

There are a number of ways to program the remote to talk to other devices over WiFi and even across the internet. The method you choose will depend on your particular situation. It is also worth mentioning that this remote control can be used in reverse (to browse information received from somewhere else). The two major methods I've seen are HTTP and MQTT. Here are a few tutorials which you can follow from here:

HTTP Software Tutorial

Raspberry Pi MQTT Setup Instructable

MQTT Software Tutorial

PubNub Tutorial

Also check out the examples included with the NodeMCU hardware library (pictured)!

Thanks for reading! There are many ways you could choose to expand upon this remote control once you get the hang of it. By all means, post your results. I'd love to see how it turned out!