I ran the annotate schematic tool, then ERC to look for obvious mistakes.
I got a bunch of errors because I had left pins unconnected. This is a reminder that I have to make sure these pins are set to outputs later. I marked each unconnected pin with a no connect marker and I am down to 3 errors. I replaced the battery connector with a battery symbol. It didn’t get rid of the error, I will have to check this connection on the netlist.
I then ran the netlist tool with default settings.
Then I ran the CvPCB module of KiCAD. I assigned footprints to the parts from the schematic. Most of these matched. For resistors and capacitors, I chose to use 1206 SMD for the footprints. There is no footprint for the ESP-12E.
I found a footprint online for the module, but KiCAD would not import it. So, I created a footprint and added it to the custom library for the project.
I chose the SW_PUSH_SMALL for the two tactile switches Reset and Upload. These are through hole footprints, I am thinking I will copy this footprint to the custom library and modify it to go surface mount.
I have only done very simple layouts. This will be quite a learning experience for me.
I would like to get the new ESP-12E modules soldered onto a board and start testing. I have completed the basic schematic. I added a reset switch, a switch to start in bootloader mode, Decoupling caps.
I moved the PC serial interface chip to a different part of the schematic to make it easier to read. I added the Net Names TxD and RxD. I added pull up and pull down resistors to make sure the chip would boot in the right mode. Searching the web for boot modes showed that GPIO15 has to be pulled low during boot to load firmware. I think I can leave GPIO15 pulled low the rest of the time for normal operation. I also added a connector to the output pins and one for power.
I still want to add battery charging, and a switching boost regulator to generate VPP. These can be left off at this time so that I can start laying out the board for fabrication. This would not be normal in an engineering session, the whole design would be complete the first time the boards would be fabricated.
I found a really interesting boost regulator, the Skyworks Solutions AAT1230. It would make the VPP circuit fairly easy to design.
Note: Decoupling caps are connected very close to the pins of a chip to reduce how much a sudden change in current can adversely affect a circuit.
Note: Net Names on schematics are used to say these lines are connected. So TxD at the PC interface is also connected to TxD at the ESP-12E(Pin 21)
The PC interface will be how I change firmware. I can also use the USB connector for charging of the battery. I can use a dedicated USB to UART bridge or I can use a microcontroller for this purpose. The dedicated USB to UART bridge is very simple to set up. The microntroller will need it’s own firmware which can be updated via the USB connection.
The least expensive FTDI chip to go from USB to UART(FT230XS-R) is $1.438 on DigiKey. Microchip has a microcontroller that can be used as a USB client without a crystal. The Microchip PIC16F1455 is $1.18 in quantities of 100. Having a seperate microcontroller on the board can be used to create more pin availability if it becomes necessary.
I decided on the microcontroller option. I think I am going to want two ADC channels. I can use the microcontroller to read these analogue values and report them over serial. I might also use the PWM to operate a switching voltage regulator for the VPP voltages.
I have created the PIC16F1455 in the Programmer library. I then added it to the schematic, I added a programming connector, and USB connnector. I also added a Capacitor to the Vusb pin of the chip. This is required for proper regulation of the USB interface voltage. Microchip recommends a 0.47 µF.
I Received the ESP-12E Modules this week. I will start basic testing.
If you need just a few more pins on your design, one option is multiplexing. Some chip manufacturers add multiplexing into their microcontrollers to add versatility. Often however you have to choose between pin functions that you will use in your design. For Instance the SPI Pins are shared with the I2C interface. This can be hard to set up to use both. If I have a target system that is programmed over I2C, I can use the buffers to isolate the I2c devices from the SPI bus when accessing memory.
I need to be able to pull GPIO0 low for reprogramming the ESP8266 module. I have already assigned GPIO0 as an output to control the signal direction of the voltage buffers. During boot it is an input to switch into boot loader mode. I can pull it low to reprogram the module and let it float the rest of the time. I have attached a resistor to GPIO0 and a switch to ground to pull it low when I want to reprogram the module. The resistor needs to be small enough to reliably pull the pin low during boot, but not small enough to cause damage when the pin is driving a high output. As a rule of thumb a 10K resistor should work well. I will have to experiment with it when I have an actual module to work with.
A 10K resistor will limit current drawn off the pin to 330µA. 3.3V / 10,000Ω = 330µA
I am almost out of pins and may have to do some more multiplexing.
I have ordered some ESP-12E modules and hope to be testing/playing with them soon. I will probably temporarily stop working on the design and do a couple of Hello World projects.
A developer will make a simple project to test key steps of the design. In programming this is usually an attempt to put the words “Hello World” somewhere he can see it. This is called a “Hello World” project. For hardware, this can be as simple as flashing a LED. In this design flashing an LED would prove I could reprogram the device, and have a basic understanding of the build toolchain.