1Important up-front notes.
THIS MATTERS. DON'T SKIP IT.
- Many project assembly instructions are written for a generic audience and include step-by-step component ordering. If you've done enough projects, you probably have your own routine for placing things, and you probably don't pay much attention to that part of the assembly instructions. This board has sizeable components on both sides of the board, and the positions overlap. If you do some of the things in the wrong order, you may find that you can't get at the lands to solder later components. If you are experienced, you can visualize it yourself and do whatever you want. If you are less experienced, I recommend using the order that I enumerate.
- The overall power supplies for the project are the type of 12vdc wall warts you can find many places, and they power the LED strips themselves. In addition, one of the inputs (the "A" input) feeds into an adjustable power supply component mounted on the main board. It powers the microprocessor and everything else other than the LED strips. Once you apply power to the assembled board, that adjustable power supply will be immediately feeding power to the microprocessor board. It is therefore important that you adjust the power supply to have an output 3.3vdc before placing it on the main board. The microprocessor board says it will operate off of 3.0 - 3.6v. If you try to adjust it after it's on the board, you may be unlucky and damage the microprocessor.
- Once things are assembled, there will not be enough room to plug a standard micro-USB cable into the microprocessor board to upload firmware. (It gets power a different way.) There are a few possibilities for dealing with that, from most convenient to least (in my assembly, because I'm paranoid, I did all of them except "d"):
- Load an esphome config to the board ahead of time. It doesn't matter too much what the config is as long as you get far enough to do OTA updates.
- Install a micro-USB right-angle adaptor so that the USB port is can be reached.
- Put the microprocessor board in a socket so it can be removed for updates.
- Create a custom micro-USB cable that has a connector geometry that can be used in the limited available space.
2Headers for the display board
The display board will eventually be directly attached to the cover of the box that holds the project. We have to be able to detach the display board from the rest of the components (to do the initial attachment to the cover, and in case of any additional work on any of the components). We'll fashion sockets out of header pins of both genders.
Before you do any soldering, you should do the "dry fit" described in the next build step. You might want to use longer than standard male header pins. Then come back here and do the soldering.
Solder male header pins to the display board. For reasons of physical geometry, you don't want pins protruding above the surface of the display. Insert them from the other side of the board, with the short ends going through the holes and the display board resting on the little nubbins. There is a set of 4 male headers on one end and a set of 14 male headers on the other end.
Solder female header sockets to the main PCB. There is a 4-pin female header on one end and a 14-pin female header on the other end. You may find it useful to have the display board's male header pins inserted so that the female header socket strips stand up straight while you are soldering them.
When you are done with this part, it should be simple to gently place and remove the display board without bending any pins.
If your "dry fit" showed you that you needed more clearance for the display board, there are a couple of options. First, you could just get some longer male header pins. Most parts suppliers have them in many lengths; I also found some sellers of 17mm - 21mm male header pin strips on The Usual Auction Site. Second, if you just need a little more room, you can make some stand-offs so that they male pins from the display board don't go all the way into the female sockets. Here's an easy way to do that:
- Take 4 standard individual male header pins. With needle-nosed pliers, you will be able to pull off the little plastic nubbins. (I do this accidentally all the time.)
- Slide one nubbin onto each male end pin on each end of the display board.
- Carefully insert the display component into the headers. There should be a little play in the female headers so that you can get both ends started; then push both ends at the same time to seat the display into the headers.
- The plastic nubbins acting as spacers will prevent the display board from seating all the way, and will also prevent the other parts from touching the back of the display. The display board should still slide in far enough to make good contact.
- Check with a multimeter that the solder blobs or pins from the display board on the top side actually are connected to the solder blobs on the bottom side of the main PCB. If there is not good contact, you will have to use a different approach.
The photo was taken with a V1 board, so ignore everything except the green spacers between the male pins (yellow) and the female sockets (blue). If you don't really need to use the spacers, then don't use them. Things will be more structurally stable without them.
3Sparkfun ESP32 thing
Unplug the display board and set it aside.
The next component to be placed is the microprocessor board, a Sparkfun ESP32 thing. You have some choices for how you mount this. I recommend that you read the next couple of steps (the power supply and the display board) and "dry fit" things together to make sure you have adequate clearance without the possibility of shorting anything. Also, for your own convenience, you should load an esphome image onto it to enable OTA firmware uploads before you solder the microprocessor board in place.
If you want to, cut jumper "SJ2 PWR LED" on the microprocessor board to disable the power-on LED. It is not possible to disable this LED in software. For this project, we don't care about the current it draws, but it may be aesthetically undesirable. It will be hidden behind the display board, but an eerie red glow might still be visible.
Because of earlier problems (of my own making) leading me to need to desolder the microprocessor board, I've opted to use a socket this time. The microprocessor board has 20 pins on each side, and the sides are 900 mils apart. It's difficult to find a DIP socket that size. Instead, I used a 40 pin socket (2x20, 500 mils wide), but I snipped it down the middle so I could mount the left and right sides separately. If you choose to use a socket, be sure that it will allow you to insert standard header pins into it.
Speaking of header pins, I did not want the pins from the microprocessor board to be protruding too far out of the bottom of the board. They might interfere with the power supply (coming up next). I also did not want the microprocessor board standing too high off the top of the board. It might interfere with the mounting of the display board. One way to resolve this is to trim off the long ends of the header pins after they are placed. I've done that before, and it tends to look a bit ragged. Instead, I found some shorter header pins. They're almost exactly 10 mm long (not quite 400 mils). Normal headers are another 100 mils or so longer. One way to buy them (and the way that I discovered them) was to shop for Adafruit Short Feather Male Headers (https://www.adafruit.com/product/3002) or Short Male Header Kit for ItsyBitsy (https://www.adafruit.com/product/4173), which are also available from various 3rd parties. We're not lucky enough that they come in 2 sticks of 20 pins. Somehow you'll need to come up with 40 pins altogether. You could also buy the pins generically from normal parts suppliers. Many lengths are available off-the-shelf.
My final arrangement was:
- DIP socket rows soldered to the PCB
- Short header pins inserted into the DIP socket. (I inserted the longer ends of these shorter headers into the socket.)
- Microprocessor board resting on the plastic nubbins of the short header pins, then soldered on the top side of the microprocessor board. If you are using an optional right-angle micro-USB adapter, plug it in before soldering.
- (Because of tight tolerances, it was easiest to place and solder the parts in the order just listed.)
When you place the Sparkfun ESP32 thing, be careful of the orientation. The printed name of the board should match up with the printed name on the silkscreen. See Photo C, below. It's easy to get it mixed up because the USB and battery connectors make it seem like that's the main end of the board. Maybe it is :-), but look for the printed legend.
4Adjustable power supply board
Stop! Don't solder this onto the PCB yet.
Because of the physical layout, we had to solder the microprocessor board onto the PCB first. When we apply power to the adjustable power supply, it will be immediately sending power to that microprocessor board. If the output voltage is not right, it can damage the board. Before adding the adjustable power supply to the main PCB, carefully adjust it so that the output is close to 3.3vdc. The microprocessor board says it will operate off of 3.0 - 3.6v.
The adjustable power supply board has clear markings and handy pins for the inputs and outputs. Using whatever combination of alligator clips, bobby pins, paper clips, and baling wire that you can find, attach a 12vdc supply to the input pins. Positive should go to the IN+ pin, and ground should go to the IN- pin. Measure the output voltage on the OUT+ and OUT- pins. Use a small screwdriver to adjust the potentiometer on the board to get the output voltage close to 3.3vdc. This voltage will be applied directly to the 3.3vdc input voltage of the microprocessor board.
When you have the voltage adjusted, you are ready to place the power supply on the board. It goes on the bottom side of the board, where you see its silkscreen outline.
- Solder individual male header pins to the 4 corner locations of the power supply board. I used read and black for "+" and "-" respectively, but it doesn't really matter.
- Notice that the pins from the microprocessor board are sticking out from the bottom side of the main PCB. As is, they probably don't interfere with the placement of the power supply board. If they do, or if they come close, clip off the ends of the pins from the microprocessor board. You can either clip them all off or clip just the central pins that overlap with the power supply position.
- Insert the pins of the power supply board into the marked holes on the PCB. (I found that I had to "stretch" the power supply pins outward very slightly to get them to fit into the board.) Double check that you got the orientation correct. Also check that no pins from the microprocessor board touch or come close to touching the power supply board.
- Solder the 4 corner pins of the power supply board in place on the top side of the main PCB.
The board will have a total of 28 screw terminals for attaching various wires. It's 2 blocks of 6 pins and 4 blocks of 4 pins. They are arranged around both the top and bottom of the PCB. How you place the terminal blocks will depend in part on your personal preferences and on the sort of enclosure everything will fit into. And, because of certain overlapping physical realities, you should plan carefully for how you will place and orient things.
I am using Euroblock connectors, also known as "Phoenix connectors", which consist of a socket that get soldered to the board and an L-shaped plug with screw terminals. After attaching wires via the screw terminals, you can simply insert the plug into the socket. Sockets are available in both straight-through and right-angle configurations. If you are using the right-angle sockets, you can place them so that the plug is inserted from the outside of the PCB or the inside of the PCB. Regardless of which type of socket you use, the matching plug has only a single orientation with respect to the socket. If you are using the straight-through sockets, the orientation of the socket will determine which way the plug faces. It can be pretty confusing, so I recommend fitting all of the sockets with their plugs inserted on the board to make sure everything is reachable and nothing blocks something else.
My own preference was to use all right-angle sockets with the orientations as shown in Photo E, below.
- Each grouping is marked with a silkscreen outline. Make sure you put each block on the side of the board with its silkscreen outline.
- Start by placing the 2 blocks of 6 pins. Solder the pins. The solder legs for the terminal blocks are fairly long, and you might like to clip them off before placing the 4-pin blocks.
- Place the 4 blocks of 4 pins. If you are using right-angle sockets, some sockets might have something that prevents it from being completely flat against the PCB. For that reason, you should solder them in place with the plugs inserted. Then you'll know that you have the correct angles to get the plugs in and out.
There are a total of 8 resistors in the design. There are 3 different values. On the top of the PCB, you can see the silkscreen outline for R1 through R8.
The values of the resistors are not critical as long as you use something in the ballpark of the designed value.
- R1, R2, R3, R4: 100 ohms (LED current limiting)
- R5, R6: 300 ohms (MOSFET gate current limiting)
- R7, R8: 10k ohms (pull-ups)
Solder them all in place and clip the excess leads.
The only remaining components for this main PCB are a pair of large transistors. They are N-channel MOSFETs. Both are mounted on the bottom side of the PCB, in the middle of the cluster of resistors, though on the opposite side of the board. It is important to get their orientations correct.
- When you are looking at the MOSFET, the metal tab with a mounting hole is the back side. Facing it from the front with the pins pointed down, the pin on the left is pin 1.
- On the silk screen look for Q1 and Q2. There are 3 mounting holes in a single row for each. One of the pads is square. That is for pin 1.
- Insert each MOSFET from the bottom side of the PCB. Double check that you got pin 1 in the correct place. You should be able to push the legs most of the way in (but probably not completely in).
- Solder them in place. Trim off the excess leads.
8Off-board header pins
All of these are optional. You can skip any or all of them if you don't want to have the feature. All have their components mounted on the bottom side of the main PCB.
- J3, with label "Reset", is for a reset switch. Use a 2-pin header strip. Since this is just a normally-open switch, there is no orientation needed.
- J4, with label "i2c", is for an I2C bus. Use a 4-pin header strip. The design uses the same pin order as Seeed Studio's Grove connectors (http://www.switchdoc.com/2016/02/tutorial-intro-to-grove-connectors-for-arduinoraspberry-pi-projects/), though Grove does not use 100 mil headers. Pin 1 is SCL (yellow wire), pin 2 is SDA (white wire), pin 3 is +3.3v (red wire), and pin 4 is ground (black wire).
- J9, with label "Buzzer" , exposes the ESP32's GPIO22 pin. Use a 2-pin header strip. Pin 1 is ground, and pin 2 is GPIO22. I plan to use this for a piezo buzzer, but it could be used for something else.
- Solder the pins in place on the bottom side of the board (solder on the top side of the board).
Assembly of the main PCB is now complete (unless you deferred placing the microprocessor board; if so, do that now).
Locate the 4-pin terminal block on the bottom side of the PCB with the label "J1". (It's on the end of the board opposite of the end where the MOSFETs are.) If you apply 12vdc to pins 1 (+12vdc, label "red" on silkscreen) and 2 (ground, label "black" on silkscreen), it should power up the microprocessor board and display (assuming you have uploaded some firmware that displays something). If that happens, it proves that the on-board power supply is working correctly, and there isn't anything too seriously wrong with the rest of the wiring.
Since the display is only mounted by pressing into the female headers, you can take it back off to work on things on the board.
(Photo K was taken before I switched from 2-pin screw terminal blocks to Euroblock connectors.)