First PCB - ESP-01 AIO Programmer - Page 1
Forum section: electronics / projects

author: siconic
author_rank: Contributor
timestamp: December 14, 2017, 12:45:51 pm
content: Hey guys!I posted in the beginner forum, but I figured this would be a better spot for actual questions regarding my first ever PCB design and layout. I built an ESP-01 Programmer, based on a CH340G chip. I was thinking of using another chip, like a CP2101 for its profile, but I think the CH340G has more widely available drivers, and at least in my case, Windows 10 auto detects it and auto installs the drivers. Its also easier to hand solder I suspect.Anyway, I just couldn't find what I wanted in an ESP programmer. They all either lacked the features I wanted, and I figured if I wanted them, everyone else must as well. I wanted a way to plug in the ESP-01, program, reset, and then test, without removing the cord, module, fabra cobbling, or anything else for that matter. Here is the result! Being my first circuit, is there anything I missed, or anything I could do better? I tried to keep the number of VIA's to a minimum of only 2, but took an hour of making layout adjustments, which I am not sure really matters as an assembler, but may for the fabricator.The actual questions I have are;1. Can I use any 12Mhz passive crystal?2. Are my values and connections correct?3. Will it work?! This being my first go around, I assume I missed something, or got a value wrong, or any number of other screw ups.Let me know what you think!

author: sanwal209
author_rank: Regular Contributor
timestamp: December 14, 2017, 04:02:46 pm
content: Hi,I just checked Datasheet, Everything seems to be connected in right place. What i dont like is placement of components on PCB. Place Cystal as close as possible to IC. Try to match the length of D+ and D- traces. Apart from that everything seems fine. Try Searching on google differential pair.

author: siconic
author_rank: Contributor
timestamp: December 14, 2017, 04:14:00 pm
content: Quote from: sanwal209 on December 14, 2017, 04:02:46 pmThanks for the feedback! I am shocked it looked as good as it did, given this was my first shot, so I will make those changes in Rev. 3! I have 3 version of this board on the way for testing. The fact that it very well may work, makes this all the more exciting.Does the amount of VIA's matter in my design? If not, then I am more willing to move components.Also, is there an advantage to having a ground plane? I was trying to fit one in, but I couldn't figure out how to get Eagle to do it, despite the 3 tutorials I watched, I just could not get one.

author: phil from seattle
author_rank: Super Contributor
timestamp: December 14, 2017, 05:32:19 pm
content: I've been playing with the CH340 and have yet to get it work. Or, I should say, can't get the crystal to work. Unfortunately, there isn't a huge amount of info on this chip out there. The translated datasheet is pretty minimal.I would definitely move the resistors and put the crystal next to the chip.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 14, 2017, 06:34:47 pm
content: Rotate the crystal 90 degrees so you can place it closer to the 2 pins it connects to. The example schematic in the CH340G datasheet shows 22pF load capacitors like you have so when you choose a crystal make sure you find one that has that, or close to it, load capacitance specified, something like the ECS-120-20-5PX-TRWhat layout program are you using, if it's something I have installed on one of my machines I can show you what I think would yield a better layout.

author: siconic
author_rank: Contributor
timestamp: December 14, 2017, 08:06:00 pm
content: Quote from: GeorgeIoak on December 14, 2017, 06:34:47 pmI am using Eagle. PM me and I will send it to you.

author: siconic
author_rank: Contributor
timestamp: December 14, 2017, 08:16:22 pm
content: Actually, here is version 3. I think it is a bit better. Doesnt look as "neat" but the crystal and caps are closer to the IC, and D1 and D2 are almost the same length.

author: texaspyro
author_rank: Super Contributor
timestamp: December 15, 2017, 12:54:46 am
content: Some hints for building a produceable, trouble free board:Avoid running signals between the pads of SMD passive components (and USB connectors). Spend some effort to minimize running traces between the pads of SOIC chips and headers.Never run signals under a crystal.Center traces that run between device pads.Maximize spacing between traces, pads, and components wherever you can.Use the "loosest" trace width and spacing you can. Just because the board house can do 6/6 mil doesn't mean that you should use it.If you can, don't use SMD passives smaller than 0805.If you are going to hand-assemble the board, it helps to have the components oriented in the same direction.After doing a layout, let it rest for a couple of days. Then go back an re-examine it. You'd be surprised at the issues and improvements that you missed.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 15, 2017, 01:21:09 am
content: I sent you a PM but you can also refer to the NodeMCU layout which uses the CH340G chip. They're using a 4-pin crystal but note the general placement and routing.@texaspyro makes some good points but even with my bad eyes I don't find it difficult to place 0603 parts. Of course if you have the room larger is always easier to place and as a side benefit ceramic caps have better characteristics (in general) in larger packages.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 15, 2017, 03:30:57 pm
content: OK, this is a quick stab at your design, It's not 100% complete but pretty close. Here's some notes:Add a bulk capacitor (maybe 100uF) on the output of the 3.3V regulator, I left some room for a 0805 or 1206I added a ground plane on the bottom. This is significantly better than trying to run traces through the board and works well, especially when using through hole parts.I haven't added it yet but I would take away some of the ground plane on the bottom and make a copper pour for 3.3V so it can be fed to where it's needed.You can probably add a copper pour on the top for 3.3V and GNDI use Altium so it was quicker for me to import your Eagle file and work in Altium. There's not many connections so I think you could easily just duplicate my work if you like it.When laying out the design start with the most important things.Place your bypass caps close to the parts and leave room for vias to connect to GNDPlan out you import traces. For your board it's the D+/D- and Tx/RxMove components to make traces as best as possible.Signals that are only used as triggers (like reset) don't be afraid to add vias so route them lastLet me know if you have questions.

author: texaspyro
author_rank: Super Contributor
timestamp: December 15, 2017, 04:20:33 pm
content: Quote from: GeorgeIoak on December 15, 2017, 03:30:57 pmThere a couple of minor tweaks to improve the layout.The blue trace on R2 should be on the red layer... removes a feedthrough.Run that "REBOOT" trace down below the tact switches and back up to the IO0 signal. Then the blue trace can be kept on the red layer.Move those traces that run between the pads of the CH340. Move left one to the left and down below the CH340 and back up. The right right one can them be done directly on the red layer.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 15, 2017, 04:53:23 pm
content: @texaspyro saw some things that I didn't see at first which goes to prove that with designs it is ALWAYS better to walk away and then go back to look at it with a fresh set of eyes. This is even more important to do when you are arranging components. It's much easier to move unrouted parts than to have to go back and rip up traces and reroute.Another tip is to work on your part placement is groups. Look at the schematic and grab all the components for part of the circuit (like the regulator and the caps). Place those outside your board, arranging the components so you'll get a nice layout. Do that for each section and then use those as building blocks to arrange them on the PCB.

author: texaspyro
author_rank: Super Contributor
timestamp: December 15, 2017, 05:14:10 pm
content: Looking more gooder...Move that trace that runs between the pads of the CH340 to the left of the chip and then down (does need space for two traces to the left of the CH340). That leaves a clear path for routing the 3.3V to the CH340 that isn't blocked by the "flash" trace. Route the 3.3V up on red to the right of the crystal. Getting it to the top end of the board would be easiest on the blue side, but with a little work can be done on red (particularly if you can move those parts on the top of the board to the left.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 15, 2017, 05:15:13 pm
content: I think this is going in the right direction. I would still add the copper pours on the top for ground and 3.3V and add more vias between top and bottom. D+/D- isn't great but it will work without any issues even though the controlled impedance will be off.

author: siconic
author_rank: Contributor
timestamp: December 15, 2017, 06:39:40 pm
content: Wow! Thanks guys. I see you can go through MANY different iterations, and all could function, and I assume, some better than others.I do like your layouts better than mine, they are a bit neater. I was using the cheater method, so now I see that is not always best.Now comes a million questions!The bulk capacitor suggestion, do you think 100uf is really necessary?How should I actually size a cap requirement in the future?If I add a bulk capacitor, could I eliminate C5, and put the bulk cap in its place?I understand the use of a capacitor, but there are SOOOOOO many options. Electrolytic, ceramic, film, etc. I would ASSUME that I could just make the value of C5 bigger, but I just want to check.Is there a specific material that may be better, or is it based on size requirements?Also does polarized vs unpolarized matter, or is that just a function of the cap, more than a design?Thanks a million! this has been super fun and informative!

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 15, 2017, 06:59:19 pm
content: The bulk capacitor is there to handle the power if a surge in current happens (like when the ESP activates WiFi). There are only vary rare cases when adding one (or 2) is a bad thing. Yes, there are many choices in capacitors. In most cases a ceramic cap works well. Stay away from Y5V type and only purchase X5R or X7R. Y5V has worse characteristics but the cost savings is not worth using them.The larger the case size the better (in general) and usually with larger capacitance you pay extra for smaller case sizes. Take your working voltage and double it for the capacitor rating but look at even higher voltage ratings. The cost goes up with higher voltage rating so look at different options and get the higher voltage rating so you can use them on different designs. As an example, if you bought 6.3V rated caps for this project, you probably shouldn't use them on 5V rails so get 16V or 25V and then you'll be covered if you have a 12V project.Most component datasheets go through design considerations and recommend what should be used.The 0.1uF caps are there for bypassing, they help eliminate high frequency noise so the function is different than the bulk capacitor we are talking about. As a habit place a 0.1uF cap close to component power pins. There isn't a chip in the world that doesn't like clean power and the cost of those caps are pennies so it's good insurance.So much can be discussed about caps and different types so just Google and learn but for your design stick with X7R ceramic (as the capacitance gets large you'll have to drop to X5R)

author: siconic
author_rank: Contributor
timestamp: December 15, 2017, 07:29:30 pm
content: So, does that capacitor still go to ground and after C5? or is it inline after C5?

author: texaspyro
author_rank: Super Contributor
timestamp: December 15, 2017, 07:43:53 pm
content: 100 uF is probably on the large size. I'd go with something in the 10-22 uF range.Also, remember that the capacitance of ceramic caps can drop considerably as the applied voltage rises. The effect is more pronounced in smaller form factor caps with a high capacitance per unit of volume. I've seen 6V 0603 caps "lose" 90% of their effective capacitance when run at 5V. My standard bypass cap is a 0.47 uF 15V 0805 cap.When using low-dropout voltage regulators pay close attention to the cap on the regulator output. A lot of LDO regulators can oscillate if you use the wrong value or type of capacitor. Ceramic SMD caps can have a very low ESR which a lot of regulators don't like.And finally, when doing a circuit board, learn to despise autorouters! They invariably produce miserable results. That said, I've been known to use them and then spend a lot of time cleaning up the results.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 15, 2017, 08:00:08 pm
content: True, 100uF is a little on the high end but I was going for a trade-off for future design requirements and as stated the DC Bias characteristics can easily knock a cap's actual capacitance in 1/2.SOT-23 isn't the best choice for a linear regulator either, SOT223 gets you more options. Looking at this DigiKey search,https://www.digikey.com/short/qqhrdr, gives some choices but the Diodes Inc, AP2114H-3.3TRG1 is only $0.36 and has 1A capability. Again, not needed here but it would probably work for most of your future projects. The drop out is a little high but no issues when using 5V input. It calls for a 4.7uF on the input and output so you could go with those values or bump it up a little.Another more popular regulator option is the "1117". Many manufacturers make those in SOT223 or D-PAK. Read through the On Semi datasheet,http://www.onsemi.com/pub/Collateral/NCP1117-D.PDF. It's much better than the AP2114 and it talks about the ESR of the output caps. Notice that it calls out 10Uf on the input/output, with 4.7uF being a minimum.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 15, 2017, 08:01:50 pm
content: Yes, the cap goes in parallel to the 0.1uF. You can eliminate the 0.1uF on the input or if you use the regulator I called out change it to a 4.7uF

author: siconic
author_rank: Contributor
timestamp: December 15, 2017, 08:16:21 pm
content: I actually put a 1uf cap on the input and output, since the specs for the AP2127N-3.3TRG1 call for a 1uf or greater (without an upper limit). Maybe I will switch that to a 4.7uf, couldn`t hurt.So the bulk cap goes on the input of the regulator, not the output?I chose SOT-23, simply for size since AMPS aren't a big deal here. I am pretty sure using a sot-223 would be cheaper even.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 16, 2017, 02:12:45 am
content: You want to add the additional cap on the output. It's there for when the ESP sucks power. That regualtor is only rated for 300mA and that's on the low side for the ESP. I really would switch to a different regulator and when I checked the regulator you had was not in stock at DigiKey.

author: siconic
author_rank: Contributor
timestamp: December 16, 2017, 02:38:29 am
content: Quote from: GeorgeIoak on December 16, 2017, 02:12:45 amI have been shopping at Arrow, because they are a little cheaper, and free shipping! But, Digikey is faster, by far.Sent from my SM-G950U using Tapatalk

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 16, 2017, 01:44:45 pm
content: Yeah, Arrow has been pushing hard on the DIY market this market and sometimes has some good deals. I use them and Avnet (and Future) for production orders but you can't beat the inventory at DigiKey and I can use First Class or Priority Mail and 98/100 times I get the package in 2 days. On top of that I can order from them late in the day and still ships same day.

author: texaspyro
author_rank: Super Contributor
timestamp: December 16, 2017, 05:25:34 pm
content: Quote from: GeorgeIoak on December 16, 2017, 01:44:45 pmI once ordered some stuff from Mouser in the morning and it was delivered in the afternoon... but then they are 40 miles from me. Still, they usually take two days.

author: siconic
author_rank: Contributor
timestamp: December 18, 2017, 02:49:04 pm
content: Thank for all the input guys! I made a few changes of my own, along with all of your suggestions! I decided to go with a 4 pin crystal, since these are a little easier to find, and pretty cheap. It also made it a little easier to get very short traces that way. I also went with the larger regulator as mentioned. I did think originally of the LM1117, but they are pricey. I am trying to keep cost down, and for a simple device like this, I am not sure the LM1117 is really needed. I made the power traces much larger, since in the spec sheet is mention needing the biggest trace you can fit. I did the 3.3 bus , and that made things nice. I like the idea of a bigger bus anyway.Let em know how this latest revision looks!

author: texaspyro
author_rank: Super Contributor
timestamp: December 18, 2017, 04:02:37 pm
content: Don't put vias under the regulator. The backside of the chip is covered by a contact which will short out to them.Also, move the FLASH label. You don't want it on top of a via.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 18, 2017, 04:47:47 pm
content: In the upper right hand corner don't have a trace for ground going between those 2 caps, have a thick trace coming off of each pad and a via for each going to the bottom ground plane.Bigger traces or a small copper pour area for 3.3V coming out of the regulator and C8/C9For traces that come off of pads and go directly to a via I make the trace almost as big as the pad so you have more copper connected to the viaRemove 90 degree bends in your traces. It's not good for high speed signals, not critical but just a "bad" habit to get into.Up near IO2 pin, move the trace away from the pin. You have plenty of room so no need to have a trace close to it.I might move the loading caps on the crystal to the left and right side rather than on the bottom. Try it and see if the layout is betterWhat design rule do you have for copper pour pull back? I would set it to at least 15mil. It's extra insurance when using low cost PCB suppliersYou've come a LONG way since your first layout!

author: siconic
author_rank: Contributor
timestamp: December 20, 2017, 12:16:24 pm
content: Now I need another project to cut my teeth on... And I can't seem to come up with anything at the moment.**** Well, I kind of can, but I think I need to understand more how UART on ESP modules work, how to use at least 2 or all 3 UARTS on an ESP32 chip, and if all of the UART Channels can be used simultaneously. Then my next project could be at hand. Maybe... ***** :-)

author: siconic
author_rank: Contributor
timestamp: December 30, 2017, 01:42:43 am
content: Got my first board in and soldered up! Powers the board, and everything seems ok. All I am missing is the crystal, and the buttons. Once those come in, I can test programming! Very excited. But its not the final revision, and now I also designed a CP2102 version.Sent from my SM-G950U using Tapatalk

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 30, 2017, 02:12:02 am
content: Congratulation!

author: Peabody
author_rank: Super Contributor
timestamp: December 30, 2017, 02:47:07 am
content: Looks like your making good progress. How did you do the soldering?

author: siconic
author_rank: Contributor
timestamp: December 30, 2017, 02:25:37 pm
content: So, I have an old Weller (as I sing "Old Yeller") with no temp control. I think it has either a PTC7 or a PTD7 chisel tip, but I have a PTE7 on the way. I want to get a Hakko 888D, for the temp control.Then, I fluxed the pads, placed the components on, put solder on the tip, and let it wick. Easy peasy. Thought about using Daves tac way, but I tried it and did not like it.Sent from my SM-G950U using Tapatalk

author: Peabody
author_rank: Super Contributor
timestamp: December 30, 2017, 03:06:57 pm
content: There's a thread on here somewhere in which the Goot PX-201 adjustable iron is discussed. Less expensive than Hakko I believe.

author: siconic
author_rank: Contributor
timestamp: December 31, 2017, 02:02:06 am
content: So, another question: I made flux remover, equal parts alcohol and acetone. Works great, for small single parts. But how can I mass clean flux off of an entire board, with things I may already have?Sent from my SM-G950U using Tapatalk

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 31, 2017, 03:00:00 am
content: Not all flux needs to be removed, many are "no clean" flux and are perfectly safe to leave on the board. Many boards can be scrubbed with a tooth brush and distilled water and then left to dry. I use this method on many boards and use compressed air to blow as much water off the boards as possible and then let the board sit in the sun to thoroughly dry the board and components before applying power to the board.

author: texaspyro
author_rank: Super Contributor
timestamp: December 31, 2017, 03:21:32 am
content: Quote from: GeorgeIoak on December 31, 2017, 03:00:00 amTooth brushes are too soft to clean a lot of fluxes. Also water will not work with a lot of fluxes. Rosin based fluxes are examples.The best flux brush is an "acid brush". These have a bundle of bristles (often horse hair) crimped into a metal tube. They are quite cheap. The bristles are long and should be trimmed to around 1/8" long for scrubbing flux.

author: boffin
author_rank: Unknown
timestamp: December 31, 2017, 06:04:53 am
content: Quote from: siconic on December 30, 2017, 02:25:37 pmIf it uses the PTxx tips, it's temperature controlled. Anything ending with a 7 is 700FI use a 40 yr old WTCPL, still works great

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 31, 2017, 02:31:02 pm
content: Quote from: texaspyro on December 31, 2017, 03:21:32 amTrue but it's better to be to less aggressive if you're "learning". A better example of a brush is thisoneYou can also use hot water. During manufacturing boards (if they need to be cleaned) go through equipment that similar to dish washers.

author: Peabody
author_rank: Super Contributor
timestamp: December 31, 2017, 04:35:28 pm
content: I would question using acetone. Acetone dissolves some plastics, including fingernail polish, and might attack your board, or capacitor coatings, or the toothbrush, or whatever. I think CVS and Walgreens sell 90% isopropyl alcohol. That and a toothbrush work well enough, with no risk of damaging anything. I know experts like Jeri Ellsworth use the mixture, but I've never had any problem with using just IPA, and I feel more comfortable with that.

author: siconic
author_rank: Contributor
timestamp: December 31, 2017, 04:39:41 pm
content: Quote from: Peabody on December 31, 2017, 04:35:28 pmI felt the same way about acetone, but having seen so many people use it, figured it was good. Maybe I will stick to just IPA.Sent from my SM-G950U using Tapatalk

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 31, 2017, 04:44:08 pm
content: +1 for staying away from acetone. If you can search for higher grade IPA, 99.9% is typical for electronics use. The 90% also works but can leave residues.

author: texaspyro
author_rank: Super Contributor
timestamp: December 31, 2017, 07:08:18 pm
content: IPA does not work all that well with rosin fluxes. It tends to just coat the board with a rosin film and, if not pure, leaves a white residue and dull appearing solder joints.Try using a real flux remover like Flux Off or Safety Wash.In the before times, TCE (trichloroethylene) was a common flux (and liver) remover.

author: siconic
author_rank: Contributor
timestamp: December 31, 2017, 07:16:22 pm
content: Well, crap... So much conflicting info. Using the acetone/ipa approach, I still got a sticky residue. Maybe I need to soak them, scrub with a toothbush in the first soak, then plunge them in a clean bath of IPA, to finish cleaning them, and blow off with compressed air. Is the alcohol from HD, Lowes or Ace pure enough?Just fyi, using Kester 186 flux pen. I has ChipQuick flux, but I hadnt used it in FOREVER and it was soooooo gummy it wouldnt come out of the syring. I went with a flux pen for ease of application, and hopefully it will last a little longer. I did like the gel, held parts in place better.Sent from my SM-G950U using Tapatalk

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: December 31, 2017, 07:34:27 pm
content: According to theproduct infofrom Kester this flux does not need to be cleaned. By trying to clean with different chemicals you can make matters worse. If you have a sticky gummy residue you might have to use an actual flux remover chemical which you can buy online or at Frys. The IPA you find in stores is "OK" but as mentioned it will leave a white residue in most cases. Sometimes if you clean with the IPA and then follow with a warm DI water rinse/scrub you can remove the residue but it's better to start with a purer IPA.

author: siconic
author_rank: Contributor
timestamp: December 31, 2017, 08:19:26 pm
content: Quote from: GeorgeIoak on December 31, 2017, 07:34:27 pmYeah its a no clean, but I am an OCD bastard, and I HATE the way flux looks on a PCB...Sent from my SM-G950U using Tapatalk

author: Peabody
author_rank: Super Contributor
timestamp: December 31, 2017, 10:05:38 pm
content: Ok, full confession. Since I only do one board at a time, and even that not all that frequently, what I actually do is scrape the flux off with a dental tool - the kind they scrape plaque off your teeth with. I use 60/40 lead rosin core solder. But sometimes I do use IPA after using desoldering braid to remove stuff. Maybe the braid has some kind of flux embedded in it, but the board usually needs cleaning after using it, and IPA works fine for that.

author: siconic
author_rank: Contributor
timestamp: January 01, 2018, 06:22:35 am
content: Happy New Year!Well, crappy. I messed something up. I got my crystals, and when I plug it into a PC, I get power, resets work, but the PC doesnt detect the FTDI! I suspect its the data lines, going into the chip from the USB port. I set pin 2 to D+ (pin 5 on the ch340g) and Pin 3 to D- (pin 6 on the ch340g) and I think its the other way around! Grrrrrr..... any thoughts?Also, does crystal direction matter, so long as grounds and signals are on the right pads? IE, is a crystal "polarized"?Sent from my SM-G950U using Tapatalk

author: phil from seattle
author_rank: Super Contributor
timestamp: January 01, 2018, 04:33:57 pm
content: Do you have an OScope? If so, you can check if the crystal is oscillating. The crystal and load caps have to be right for the ch340 to oscillate. I've not been able to get one working and there isn't a lot of help out there on that point. This is why a crystal free solution is desirable.

author: siconic
author_rank: Contributor
timestamp: January 01, 2018, 04:38:03 pm
content: I do not, but I have been thinking of getting the USB Oscopes, just to have an affordable, usable solution...But what about my USB inputs, are they right? I know for TX/RX on chip and device are reversed, but is D+ and D- also supposed to be?Sent from my SM-G950U using Tapatalk

author: phil from seattle
author_rank: Super Contributor
timestamp: January 01, 2018, 07:16:11 pm
content: Every design I've seen doesn't switch D+ & D-.Do a loop-back test. Connect Rx to Tx and then use a terminal program. You should see your typed characters echoed back if it's working.

author: Peabody
author_rank: Super Contributor
timestamp: January 01, 2018, 11:53:15 pm
content: Quote from: siconic on January 01, 2018, 04:38:03 pmOr you could build your own scope. I mean the DSO150 Shell kit. $21 at Banggood, plus another $10 for a power supply and "real" scope probe.The CH340G datasheet shows D+ and D- NOT crossed. So the only question is which pins those are at the USB socket.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: January 02, 2018, 06:39:56 pm
content: Next to GND on a USB connector is D+ and that is how I believe you have it wired which is correct. USB connections are D+ to D+ not like UART signals where you have to confuse yourself swapping connections!If you have a crystal and not an oscillator then the pins on the crystal can be connected either way to the chip.

author: siconic
author_rank: Contributor
timestamp: January 04, 2018, 03:57:31 pm
content: It vurks!The first crystal I got was from Arrow (ordered 1 with my last order), and it did not work, I was sad. Since I did not have an O-Scope, I had to trial and error it, but no luck. Got in my cheap 10 for $2 Chinese crystals yesterday, de-soldered the arrow cyrstal, soldered on the new Chinese ones, and boom! Worked!So, cool. Now I have a few CH340 boards. But now I have a new design for CP2102, so no crystals needed, fewer components, and I got the CP2102 QFN28 from AliExpress for $0.79 each shipped! Now I gotta wait...Here are some pics. All my traces for signals are now 10, and power is 24 or larger.Just FYI, there is a ground Plane on layer 2....

author: Peabody
author_rank: Super Contributor
timestamp: January 04, 2018, 05:24:08 pm
content: Congratulations! It's nice when things work.I will be interested in seeing how you solder the QFN28.

author: siconic
author_rank: Contributor
timestamp: January 04, 2018, 05:34:01 pm
content: Quote from: Peabody on January 04, 2018, 05:24:08 pmMy friend gave me an old toaster oven, soooo, arduino and relay, here I come!... Also, as long as the pins are exposed, wicking should work, at least for testing purposes. I would hate to do that on more than a few though, lol.Sent from my SM-G950U using Tapatalk

author: texaspyro
author_rank: Super Contributor
timestamp: January 04, 2018, 06:29:34 pm
content: Quote from: siconic on January 04, 2018, 05:34:01 pmOrder a sencil from oshstencils.com... your QFN will love you.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: January 04, 2018, 06:40:25 pm
content: I don't see a bypass cap on your power pin of the CP2102. ALWAYS place a decoupling cap on power pins of ANY IC, even if it's a logic ICI might have missed it but I also don't see a connection to the reset pin of the CP2102

author: siconic
author_rank: Contributor
timestamp: January 04, 2018, 07:13:30 pm
content: Quote from: GeorgeIoak on January 04, 2018, 06:40:25 pmI did forget the CAP.Well, crap guess I better add it now.I never set a reset to the CP2102. Do I need to? I thought that would be optional.

author: NW27
author_rank: Regular Contributor
timestamp: January 04, 2018, 07:51:24 pm
content: Quote from: siconic on January 04, 2018, 05:34:01 pmI found the FT232RL a much easier component to hand solder.

author: phil from seattle
author_rank: Super Contributor
timestamp: January 04, 2018, 08:23:19 pm
content: Yeah, QFNs are pretty small. I use a toaster oven but just do it manually with a thermocouple and my DMM. I was going to hack a reflow control into it but it works pretty well just by watching the temp and the solder paste. When all the paste melts, I cut the power, wait 15 seconds and open door. Works surprisingly well. The trick is to place the thermocouple where it can best measure the PCB's temp.

author: siconic
author_rank: Contributor
timestamp: January 04, 2018, 09:15:21 pm
content: Good to know, until I can find the time to fabricate the computer controller, erc. Thanks for that info!Sent from my SM-G950U using Tapatalk

author: james_s
author_rank: Super Contributor
timestamp: January 04, 2018, 09:51:42 pm
content: Quote from: siconic on December 14, 2017, 04:14:00 pmLooks pretty good for a first try. One thing I would suggest though is get rid of those squiggly traces coming off the side of some of the IC pins, run the traces off the end of the pads and use tidy 45 degree bends.Vias are each a potential source of failure so I try to minimize them, no more than two vias per trace if possible, not a cast in stone rule but a reasonable guideline.Ground plane is a good idea on most boards for a variety of reasons.Also I would suggest you consider dumping Eagle and take a look at KiCAD. After Autodesk bought Eagle they quickly pulled some very shady stunts that have really soured my opinion of the company. Autodesk cannot be trusted.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: January 04, 2018, 11:44:49 pm
content: It's never good to leave a reset signal of an IC floating. It's OK if you're not planning on resetting the part but make sure that signal doesn't float. I also noticed you have traces close to pins again where they don't need to be. It's fine to use 10mil spacing for design rules but don't needlessly put traces next to other signals when they don't have to be there.

author: siconic
author_rank: Contributor
timestamp: January 05, 2018, 12:15:51 am
content: Quote from: GeorgeIoak on January 04, 2018, 11:44:49 pmHow do I terminate the reset signal? Is there a standard way, or do I refer to the datasheet?Sent from my SM-G950U using Tapatalk

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: January 05, 2018, 12:25:49 am
content: Depends on the part but always look through the datasheet. If you're using this part,CP2102then see page 15 where they have a 4.7k pull up on the reset signal. That's because this chip is reset when this pin goes low so pulling it high "eliminates" the chance of this pin going low unexpectedly.

author: Peabody
author_rank: Super Contributor
timestamp: January 05, 2018, 12:27:06 am
content: Quote from: GeorgeIoak on January 04, 2018, 11:44:49 pmThe CP2102 seems to do just fine with reset floating. All* of the modules with that chip have it that way. The data sheet describes it this way:RST 9 D I/O Device Reset. Open-drain output of internal POR or VDD monitor. Anexternal source can initiate a system reset by driving this pin low forat least 15 µs.Notice that it's an "I/O" pin, and it's an open-drain output. Not sure exactly what's going on there, but in my experience this one doesn't need to be pulled up.*The exception is a module discussed earlier that ties it to 5V. That's wrong. Tie to 3.3V if at all.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: January 05, 2018, 12:36:53 am
content: "Open-drain outputs are outputs which at any given time are either actively sinking current (i.e., low voltage, typically considered logic 0) or are high impedance, but which never source current (high voltage, logic 1). Open-drain refers to the drain terminal of a MOSFET transistor."Which means they need an external pull-up to go high. They do show the pull-up as optional but it's always easier to not populate a part then to figure out how you're going to add something to your circuit.Don't always believe what see on the internet, especially if it's sourced from overseas. They are in the business in squeezing every last penny out of a product which doesn't always mean it's done correctly. You know the old saying, it's better to be safe then sorry.

author: james_s
author_rank: Super Contributor
timestamp: January 05, 2018, 12:40:26 am
content: Generally it's not recommended to leave any input pins of digital ICs floating. Either tie them to Vcc or Gnd, or through a pullup resistor, refer to the datasheet if in doubt. Floating pins can cause all kinds of random problems, the sort of weird malfunctions that happen very inconsistently and can be a real pain to track down.

author: Peabody
author_rank: Super Contributor
timestamp: January 05, 2018, 12:49:48 am
content: Well if he ties it to 3.3V, it should be through a resistor, which he can populate or not. Probably doesn't matter much what the value is, but the 4.7K is probably fine.siconic, there are several videos on Youtube showing Arduino-controlled toaster ovens. You might want to look at those. I was going to suggest a heat gun or rework station, but I think the QFN28 has ground on the bottom of the chip, so an oven would probably work better. That said, I've seen one guy report that he doesn't bother with the Arduino or temperature sensor. He just turns on the oven, and waits until he sees the paste reflow through the window, then turns it off and opens the door. Of course that doesn't follow the prescribed temperature algorithm, but it may be close enough.My understanding is that the ovens with ceramic heating elements work better, but I don't know why.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: January 05, 2018, 01:06:18 am
content: This is another one of those don't believe everything. Yes, almost any method of heating a board hot enough will reflow solder but it all comes down to what kind of consistency and quality you want. Trust me, poor soldering can cause you to go crazy when you think something is soldered but it's really a cold solder joint.You can definitely mimic a reflow oven with hand control and temperature monitoring, it's not rocket science. IF the QFN has a ground pad that's tied to ground then you have a bunch of copper that needs to be heated up to melting temp and that is going to take long than a single pin tied to just a trace. That's why there are reflow profiles. You need a ramp to bring up the temp of the entire assembly and then you need a controlled amount of time and heat on the parts or excessive heat/time can damage a part.It's not difficult to reflow a QFN but if you haven't done any reflow before it's not the best thing to get your feet wet. You've designed in the part so that's what you'll work with but you definitely should get a stencil and a thermocouple to monitor the temp. You don't "need" a reflow oven control circuit but it gives you the consistency you really want/need.The heating coils need to ramp up the temperature oven quickly so ceramic are generally better than coils which you find in cheaper ovens. Lots of information out there on this subject though.

author: phil from seattle
author_rank: Super Contributor
timestamp: January 05, 2018, 05:45:30 am
content: Well, if you all are going to picky about having the proper profile, I'll point out that almost no toaster ovens are capable of the required rise and fall times of a normal reflow profile. For cooling, manual intervention is needed (opening the door a crack) but you are stuck with a rise time of what ever the oven is capable of.That said, it's not really that bad. The key points are make sure that a) you don't exceed the max temperature and b) you don't exceed the max time at the reflow temperature. There's a lot of leeway to allow manual control to work just fine. I've read of people that do BGAs that way. If I'm concerned about the thermal mass of one or more parts or the board itself, I will extend the soak time, typically around 150C for a few minutes more. It's not rocket science. You just have to understand how your oven works and watch the temperature - I make sure my thermocouple is connected to the PCB so I have a very clear picture of the temperature.

author: Omgitskillah
author_rank: Newbie
timestamp: January 05, 2018, 06:18:11 am
content: Hey Siconic,The circuit seems ok to me.The PCB however is arranged oddly. Always place the crystal as close as possible to the pins they are connected to. Avoid any lines passing under the D+/D- USB lines and make sure these lines are matched. Most PCB tools will have this tool to help you out.Then comes the power traces, add ground pours where necessary and make the power traces a bit thicker.Move capacitors closer to the pins they decouple as well.Check from a fab house if the min trace width you used is doable.Visitwww.wellpcb.comto see if your PCB can be fabricated in their specs.Cheers

author: siconic
author_rank: Contributor
timestamp: January 08, 2018, 12:32:09 am
content: Quote from: Peabody on January 01, 2018, 11:53:15 pmHow does it compare to say the Hantek 6022be?https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.com%2Fulk%2Fitm%2F152849253138I ask, because when all is said and done, same price, but 2 ch instead of one.Sent from my SM-G950U using Tapatalk

author: Peabody
author_rank: Super Contributor
timestamp: January 08, 2018, 04:22:45 am
content: I've never used a Hantek, and didn't realize they were so inexpensive. Not quite the same price, but yeah, two channels would be nice to have. You might want to see if there are any reviews on Youtube that could give you a feel for how well they work.

author: GeorgeIoak
author_rank: Regular Contributor
timestamp: January 08, 2018, 05:56:06 pm
content: +1 on checking reviews. Hardware is relatively cheap so it really comes down to the software which can be horrible.