I wanted to make a small Wemos D1 Mini robot, so I started researching Wemos motor controller add-ons. It turned out there was only one available on the market for the D1 Mini. Just…one!
So, without any other options available, I ordered it. It was this one (pictured below) from Aliexpress, costing a mere £1.58 including postage.
After it arrived I found that it came with pin headers instead of proper terminals, and had all but a single paragraph of instructions from the seller. Not a great start, but you get what you pay for.
It didn’t take long for me to get the hump with it, so I decided to make my own Wemos motor controller. I’d made (and sold) similar boards in the past, so I got cracking on the ‘WeMoto’!
Wemos Motor Controller – Requirements
I had 3 main requirements for my board to make sure I’d be happy with it. It’s wasn’t going to contain any advanced features or ‘nice to have’ elements – just a simple and robust Wemos motor controller.
1 – Chunky terminals
It’s something that always annoys me – teeny-tiny fiddly bastard terminal blocks on motor controllers!
Is it really that much to ask for a block that doesn’t require a baby’s screwdriver to secure? They always come in that nasty green colour as well.
I had a bunch of decent black terminals left over from my MotoZero design, so they were drafted in for the build.
2 – Simple & familiar IC
Give me an inefficient L293D any day, I’m a big fan. Easy to code and cheap to replace, they’re popular for a reason.
The ancient chip was chosen as the controller for my board.
3 – Fun Design
There’s only so much you can do with the small space on a Wemos-sized board, but my goal was to add some form of styling to the project.
I got cracking on the design, first sorting out the outline of the board by using my calipers and measuring my D1 Mini.
Then it was time to prototype the circuit. I was pretty certain that the basic L293D circuit would work like any other, but I had to be sure. I chucked the parts together on a breadboard and sorted out some basic forward/reverse code as a test. Everything worked as expected:
Got the Wemos circuit and code working for my little PCB project. Had these Pimoroni motor shims for ages but never thought to use them. Really handy for prototyping motor control with a breadboard. #Wemos #Motors #PCB pic.twitter.com/cPSFNlZwZk
— Average Maker (@Average_Maker) April 23, 2018
With the circuit working, I started plotting the parts on to the PCB design. I use the free DesignSpark PCB software to design my PCBs.
The layout changed a few times as I had very limited space on the board to play with, but I got there in the end:
I even managed to sneak in a few style elements in the tiny space left on the PCB.
DesignSpark doesn’t let you import images, so I used an image font to add the fuel nozzle image. I also added my Twitter handle in gold, and the ‘WeMoto’ name on the rear for added snaztastic snazzness!
As always, OSH Park was my PCB fabricator of choice. I uploaded my PCB files (gerbers) to OSH’s website, which also checks the design for any issues (handy!).
Everything looked good, so I ordered a small batch of 3 boards. Due to the small size of the boards, the order was filthy cheap – just $6.80 including free shipping!
It took about 15 days for the PCBs to arrive from OSH Park (who I believe are all the way over there in Oregon, USA).
Considering I paid a grand total of $0.00 for shipping, I’d say that’s pretty decent.
The Finished Product
All components are through-hole on this board, so within 15 minutes I had it soldered and ready to go. The board works just like any other L293D motor controller (see link at the bottom of this post for example code).
Here’s the finished product – my very own Wemos motor controller!
Here’s what it looks like sitting on top of a Wemos D1 Mini:
Want to make your own WeMoto?
You can order the PCB and parts to make your own WeMoto board – I’ve listed the PCB design as a shared project on OSHPark.
You don’t have to use the exact same terminals or other generic parts, but you do need to make sure you use an L293D chip and a similar capacitor.
- 1x OSH Park WeMoto PCB (OSH Park)
- 1x L293D IC (RS Components)
- 1x 16-way DIP IC socket (RS Components)
- 1x 10uF Radial Capacitor (RS Components)
- 3x 5mm pitch terminal blocks (RS Components)
- …and you’ll need a Wemos D1 Mini as well of course (Amazon).
I’ve added a code example to PasteBin to get you started as well, which includes pin mapping information.
If you make your own, be sure to send me pictures on Twitter, Facebook, Instagram or Google+.
Nice design. I plan to give it a try. Question: does the power input on your motor shield also supply power to the Wemos board?
Hi David. It doesn’t, so you still need to connect power to your Wemos as usual. BUT this does make me wonder if I could fit a small regulator on there as well…watch this space…