Sometimes you have to do boring stuff

Time to order PCBs and components.

I started by running a BOM in PCBnew.  This lists all the components used on the design.  I imported this into LibraOffice Calc. I then deleted items that don’t have an actual part associated with them. This included mounting holes, the battery, the pushbutton switch, Reset, and the test header. I then sorted on the Reference designators.  I then looked at the old BOM to see what I had already ordered, since I had only used one set of them already.

I ended up with eleven components that I do not already have for the next build. I went to Digikey and added them to my cart for another build of boards.  This will mean I have a mismatch of quantities in the future builds.  I find this acceptable because I may use the leftover parts on another prototype.  I ordered the parts from Digikey. That left the CH340G USB to Serial bridge and the PCBs.

I ordered ten pieces of the CH340G off of Ebay for US $3.68 and I ordered ten PCBs from DFRobot for US$26.95. To order the PCBs i had to plot the gerber files and put them in a zip file and email it to DFRobot’s manufacturing service.

This is not the most fun part of a project but necessary.  As the project progresses, I’ll have to start tracking my inventory as well.

Digikey order V00b

Re-Layout Update V00B

Now that the design review is complete, I am updating the PCB layout.

I started by going into CvPCB to check and fix any components. I feel that the pad sizes are too large with the Handsoldering footprints.  I changed all 1206 Handsoldering footprints to 1206 standard  footprints. The 1×12 connector hasn’t been assigned yet, I chose a 0.100″ pin header footprint which I will leave empty. The Socket Strip 1×12 fit my needs.

While doing some research, I found a chip to replace the level shifter chips I was using.  The FXMA108 chip by Fairchild Semi does all 8 bits with automatic direction changing.  It’s capable of up to 80 Mb/s.  It allows me to simplify my design and remove the shift register.  Each buffer automatically shifts direction based on how its pins are being driven.  I removed the four level shifter chips and replaced them with this one chip. I had to create the chip in my library.

While moving parts around the layout, PCBnew shut down unexpectedly and I lost about 2 hours worth of work. There are so many changes to this layout that I decided to remove all of the traces and start new.  Under the edit menu is Global Deletions, I selected tracks and hit OK.

I moved the microUSB connector to hang off of the edge of the PCB and changed the slotted holes to round with the longest dimension used for the diameter of the circle. I moved the component values outside of the board boundary which helped remove some clutter from the board.

I started laying out the traces around the level shifter first because that section is straight forward.  Ikepth the schematic open so i could make quick changes on the schematic to simplify the layout. With each change I madeon the schematic, I would generate a new netlist and then read it into PCBnew. I made many component placement adjustments while routing the traces. I finished by doing a fill of the ground plane on the bottum side of the board.  This made a couple of unconnected nets stand out so I fixed them.Re-Layout V00B

 

 

 

Design Review V00B

Design reviews should be done often, at least just before a new design goes to fabrication.

During testing I had wished for some test pins at the edge of the PCB for verification. I want to add and label test pins for Reset, Txd, Rxd, 3.3V, SCK, MOSI, MISO, IO2, IO3 and L1 pulse.

I added these testpoints to the schematic along with a ground that’s easy to get to. I am putting them into a through hole 1×12 connector. I moved P1 test into the same header. In layout, I’ll place this connector next to the edge where I can get a clip lead connected for testing.

USB to Uart chip completely changed, copied reference design from NodeMCU design. It’s helpful to look at a second design for a sanity check. Everything matches up to an Arduino clone schematic found on the web.  I had left DCD, RI, DSR, and CTS unconnected.  Leaving inputs unconnected can cause problems.  These connections may have internal pullups/pulldowns but I couldn’t find any reference to that in the datasheet. Each of these lines indicates data is ready to flow when held low, I put pulldowns on each of them.

I had changed the SPI connections to correct the mistakes I had made earlier, I have gone back to verify these connections and found conflicting information. I traced the gerber image I had found to get the pinout I currently have. If it’s not correct, I will have the test pins to help me figure out the  correct pinout.

I had replace the port expander with a shift register still using the SPI to fill the register. According to the datasheet, the data shifted in will be latched on the rising edge of the RCLK pin.  If I treat RCLK as a Chip Select Pin on the SPI, a one byte write will set all of the outputs very quickly. This appears that it will work well.

The VPP circuit changes are a big gamble. I don’t know if it will work.  I am adding a 0.1 µF capacitor to the output to reduce output noise.  I am adding a 10 Ohm resistor and a 100 µF capacitor to filter noise from getting back into the rest of the system. I need to isolate the ground of the high voltage circuit to only connect to regular GND Net at only 1 place on the layout. This will help reduce noise transfer back into the rest of the system. The design update is on GitHub, use the link in the upper right hand of the page.

V00BVPPCircuit

Updating Schematic V00B

In the last few posts, I found several problems with the design as well as found some ways to reduce Bill of Material costs.  I also want to make soldering of the parts easier for a hobbyist.

I had problems using the CH340G chip on my NodeMCU board.  I couldn’t find any references to this problem on the internet.  So I replaced U8 (the CP2104 USB to UART bridge) with the CH340G USB to UART bridge.  I inverted DTR and RTS  and connected them to GPIO0 and RST respectively.  Using transistors as the inverters means that when U8 is not powered, it won’t draw those two lines down.  This is looking forward to when the design is battery powered.

I used the NodeMCU schematic as reference during this part of the design since it is close to what I want to do with this part of the design.

I changed the reset push-button switch to pads on the board and left the upload push-button switch unchanged but don’t plan on installing it unless I run into problems programming the board.

I also want to make things smaller, U9 is a large part of the board.  A shift register can do the same thing and be less expensive. I found the 74HC595 to replace U9. I am still clocking data in using the SPI bus, and then latching it with a pulse from GPIO5.

For the High voltage, I removed the AAT1230 and replaced it with two logic level FETs. One to disable the circuit to drop current draw when in low power mode connected to GPIO14. The other the pulse stream that generates the current through the inductor connected to GPIO4.  This means all the pins on the module are used up again.

Kicad schematic and layout can now be found here. The pcb layout is not current to the schematic, I still need to do a design review before I start the layout.

UProgrammerSchV00B