Gather the materials below and get ready to build the PCB for the Thimble WiFi Light Switch!
|WiFi Light Switch PCB||1|
|0.1μF Ceramic Capacitor||1|
|40 Pin Male Breakaway Header||1|
|2x4 Female Socket Header||1|
|1x6 Female Socket Header||1|
|10kΩ Resistor Pack||1|
|Small Tactile Button||1|
|Large Tactile Button||1|
|10μF Electrolytic Capacitors||2|
Your kit will also include two spare capacitors that aren't attached to brown paper.
Tools you'll need
It may help to bend the leads of these components into a U shape before putting them in the PCB.
Place the two 10k resistors through the bottom left of the PCB and bend the leads back to hold them in place. Resistors have no polarity; you can put them in either direction.
Place the diode through the holes marked D1; found above the reset button.
Make sure the black line on the diode matches the line on the PCB.
Unlike resistors, diodes limit the flow of electricity in one direction, if you put the diode in the wrong way the circuit will not get power!
A resistor pack is a group of resistors, in this case they all share the same connection to ground. This is usually
done to save space. It is important to note: unlike the single resistors we put in earlier, resistor packs have
a direction and will not work if soldered in backwards.
Put the resistor pack with pin one (marked with a dot) in the square hole. The markings should be facing towards the thimble logo just above.
There are two types of capacitors in this kit: Electrolytic (the can shaped black ones), and Ceramic (the little
yellow ones). The 10μF Capacitors marked on the PCB are electrolytic and therefor polarized. This
means that the direction does matter when installing them.
Place the negative lead (the shorter one) of the 10μF capacitor through the round hole marked with silkscreen on the PCB. The section of white silkscreen should match the negative line on the side of the capacitor.
Do the same thing for the other capacitor at the top of the PCB.
The ESP8266 (WiFi module) was designed for 3.3v, and not the 5v data lines coming from the Arduino. To protect it,
this circuit uses two 2N7000 N-channel MOSFETs; one for Transmit, TX and one for Receive, RX.
MOSFETs are like a door that uses one voltage to control another. On one side of the door is 3.3v, on other side is the ESP. The 5v signal from the Arduino is what opens and closes the door.
When the Arduino data line is off (0v) the door is closed and the ESP does not get 3.3v data. When the Arduino output goes high (5v) it opens the door for the 3.3v to go to the ESP. This same principle is also used to allow low power devices to safely control high voltages too.
For a more in depth explanation on how MOSFETs work, check out this video by Afrotechmods.
Install the two Mosfets in the holes marked Q1 and Q2, making sure the line up the flat side of the MOSFET to the flat line of the silkscreen.
The 3.3v regulator has three pins, Input, Output, and Ground. Its job is to take 5v input from the Arduino and safely
lower it to 3.3v for powering the ESP.
You might be wondering why we can't just use the 3.3v output that the Arduino already has? The reason is while most Arduinos can supply 3.3v, they can only do so for low power devices. In this case the ESP uses more current than the Arduino's 3.3v regulator can provide.
To install the 3.3v regulator carefully bend the leads with some pliers, or the edge of your PCB, to a 90 degree angle.
Insert your voltage regulator so the large metal side faces down.
Make sure the metal tab doesn't cover the row of holes along the bottom of your PCB.
Cut (or snap) the following segments from the 40 pin strip of male headers:
One segment of 8 pins
One segment of 6 pins
Two segments of 3 pins
The grooves between each pin will help you cut or snap the headers off cleanly.
There will be some leftover if you accidentally cut the wrong number.
If you look closely at the row of holes along the bottom of the PCB and you will notice they don't line up perfectly. This feature was added to help hold the header pins when soldering by applying slight pressure to both sides.
Insert the 8 and 6 pin segments on the bottom row of holes and solder them in:
Install the two 3 pin segments into the rows marked Servo 1 & 2 and solder them in:
When you're done, your PCB should look like this.
Optionally, you can install the ESP breakout header in the top right of the board.
This offers connections to the ESPs two GPIO outputs as well as data and reset lines. This can be very helpful for flashing new firmware onto the ESP but is not required to use this kit.
Your ESP comes pre-programmed with firmware version 1.5, which is required for this kit.
You're done with soldering the PCB.
Make sure you haven't forgotten any parts, and that you only have the two spare capacitors left over. Check over all your solder joints to make sure they are clean and strong.
To test the quality of your work plug in the ESP and a servo like so:
Attach the Arduino to the Light Switch PCB by lining up the analog and power headers to the pins on the bottom of your PCB:
Give your Arduino some power from a computer and you should see the ESP power LED light up as well as hear and see the
servo move to it's default position.
If not, go back through the assembly steps and check that you haven't forgotten anything, and that all your components are installed correctly. If you're still stuck, have a look at the Troubleshooting section for some solutions to common mistakes.