hardware servos turnouts


Waau, it took the start of a whole new year to get the ESP01’s interface board to the PCA9685 shared with the world! We called it the “mqTrains PCA9685 Servo Turnout Controller” and have it labelled as mqTrains_PCA_02. Very easily found with a search at oshwlab:

So, first warning, don’t just buy all the parts as listed in the BOM, they were the closest and easiest parts to use in the EasyEDA library, read the schematic and find the best 10 uF capacitor in a 3.5 x 2.8 package, or just a trusted 1206 part.

Second, using the EasyEDA tools, you can order the PCBs themselves from JLCPCB for $4 for 5 boards, not per board, all 5 together…or $5 for 10 boards, or $14.80 for 100 boards. BUT, here is the second warning, you will only know the “shipping” part when you place the order and enter your shipping address. Which requires a few more choices: Make us proud and order them in blue, and to save some shipping in weight, reduce the board thickness to 1 mm, but be careful changing other settings, since 0.4 mm thick boards will require ENIG-RoHS (read “Electroless nickel immersion gold“) and GOLD cost more. The problem is, when you change it back to 1 mm, it is still set to ENIG-RoHS, it does not switch back to the cheaper HASL or LeadFree HASL.

Also spend the extra $1.50 and remove the “Order Number” from the board, since I don’t think you want some random number printed all across it. So, to repeat: best things to choose: Number of boards, more will cost more, but less per board, so 5 boards might be $0.40 or $0.80 a piece (take the first time offer) or $0.07 per, when ordering 500; Reduce the board thickness: 1 mm or thicker gives options to pay more for shorter production times, but 1 mm saves money on shipping; Pick Blue as PCB Color (you never want to solder darker color boards: it is really hard to find the 0402 resistor you just placed on it! Blue is also free, compared to purple, red or yellow); And then decide to deal with lead or tin whiskers by selecting HASL or HASL-RoHS.

You can ALSO just generate the Gerber files and order the PCBs from anywhere else you like. A quick Google search will bring you to several places to deliver PCBs to your front door.

The only parts required, are the LM1117-3.3V; at least the two 10 uF capacitors and the 0.1 uF at C3, the LEDs and 1 kOhms are encouraged and a female single row for the PCA connector and a double row for the ESP01 at U1. The diode D1 can be short circuited if you use the 5V from the PCA side (short SJ2) and the re-settable fuse (F1) is only needed on your first 5 boards, after that you know what not to short to what and the fuse serves less of its safety and accident protection purpose! When you buy the OLED LCD you need to check if the GND pin is on the end or not, since they make them in 2 kinds, and then solder the jumpers at END and P2 appropriately. If you get the kind with the GND pin at the end, then follow the jumper suggestion in the schematic. I soldered a male to male 4 pin connector to my LCD, so I can temporarily hold the LCD in place when the ESP boots up, read the IP address and MQTT messages when they show up and then pull the LCD out, it has served its purpose…so only your first few boards might need a 4 pin female connector, the rest can just have the LCD temporarily held in place in the holes. Just know, the LCD needs to be initialized and that only happens on power up or with a reboot. So plugging it in later will not make it work. You have to press RESET when live, or power the system up. Which brings us to the button (RST) and resistor R3 and capacitor C4…I would guess none are required, unless the ESP somehow does not have RST pulled up, then ONLY R3 would be needed.

If you don’t have a PCA9685 connected, then you won’t have i2c pull-up resistors, and if the LCD does not have them, then R4 and R5 might be needed. U2 is there to install a male 2×4 header, so you could wire the ESP01 to a breadboard for other projects. But now the PWR connector, more money, is needed again. A PCA9685 might be less expensive than a 2.5 mm barrel connector, just saying!

Have fun!

servos turnouts

Servo/software/available now!

Follow the github link from the downloads page for the binary file to download, and right above it the pdf file to show you what to do with it…