-->
Page 1 of 5

Bummed out! Built my first PCB and cant program esp!

PostPosted: Sun Nov 22, 2015 11:56 pm
by shoelessone
Hey all!

So, I'm working on an Xmas present for my family and have been for the past month or two. Today, after breadboarding up a design and then designing in Eagle, I FINALLY got back the first 3 boards from OSH Park for my project.

I soldered all of the parts on the board (which was no small task as they are 0805 which I'd never worked with before!), and hooked up the board to my computer to program, and bam! no luck!

First, here is a schematic of the board in Eagle:
Image

And here is the actual board layout
Image


So, here is what I know:

1. Power to the board seems to "work" - you'll note there are two places that power can come from, the first being the voltage regulator, and the second being directly from the pins next to the TX/RX pins in the corner. The idea is that when the board is "running" and actually "in production" the power will come from a 5V wall wart plugged in (on the left side of the board). When the board is being programmed, I'll plug 3.3V directly into the board using the pins next to the RX/TX pins.

2. When I use my FTDI cable and plug VCC/GND/RX/TX into the board, the board seems to have the expected 3.3V to it (actually it's closer to 3.2V I think). The little blue LED on the board itself blinks once when you first plug power in, and using a multimeter I can read that 3.2V from the VCC and GND pin on the esp.

3. Note that I have a jumper that when set should pull GPIO0 to gnd. This might sound stupid but frankly I'm not sure if there is a great way to test this and make sure it's working.. But I've also tried to use a jumper cable to go directly from GND to GPIO0 and I don't THINK that it seems to make a difference.

OK, so what happens when I actually try to program the board:

First thing to note, is that because I'm tired and perhaps not thinking super well, I have been trying random things to see if they work. Specifically, I've tried switching the RX/TX pins to make sure that I don't somehow have those setup wrong in my design. The important thing to note about this is that I get different results depending on whether I have RX -> TX/TX -> RX or RX -> RX/TX -> TX.. I point this out because I guess it means that SOMETHING is working in terms of communication to/between the programmer and the ESP8266...

Anyway, when the RX/TX connection is CORRECT (I'm about 85% sure at least :)), I get this:

Image

wrong direction/command: 0x00 0x08, expected 0x01 0x08


I've googled this, but a lot of the results seem to be related to older issues/versions of the programmer. The thing is, the board I'm using is this one: http://www.aliexpress.com/item/New-vers ... 17567.html

It's the ESP8266-12E, according to the listing at least. Frankly, I don't know what this means, my understanding is that it shouldn't matter much and that it should work much the same as with other ESP-12(E?)s. I also want to point out that with the exact same wiring configuration (simply using FTDI cable for power, etc), I'm able to program the ESP-12E on this test board no problem: http://www.aliexpress.com/item/ESP8266- ... 70377.html

The sketch I'm trying to run isn't anything complicated or crazy. It's actually just the "blink" sketch. And again, I can get the exact same sketch to upload to the ESP-12E on the test board.

The ESP-12E on the PCB I made is BRAND NEW. In other words I literally removed it from the little anti-static packaging and soldered it directly to my PCB. Not sure if that matters, I didn't do anything to "flash" it originally, it's straight out of the packaging. That said, IIRC the ESP-12E on the yellow test board I never did anything special with either, it just worked right out of the packaging.


If anybody has any idea what I might be doing wrong, or can give me some advice on how I might debug this problem, I would really really appreciate it.

My plan tomorrow, once I get some sleep, is

1. Try to use another one of these boards on a different breakout board and just solder the "bare minimum" number of pins to try and separate my PCB from the ESP itself. If I get the same results then at least I know it's a problem/issue with the board or the way that I'm programming it, not my circuit/soldering/layout
2. Hope that somebody who actually knows what they are doing responds here with an idea about what I'm doing wrong or what I might try!

One other thing to add, the only pin I'm currently "pulling down" to GND is GPIO0. I don't know if this matters. Also, in theory, CH_PD and RST should go to VCC through a 4.7k resistor (though I am able to program the ESP-12E on the test board without doing this anyway). Keep in mind at this point I'm not so worried about anything other than programming the ESP, once I manage that I hope that the rest of my circuit will do an OK job.

Thanks for any advice/help. I realize there may not be an "easy answer" (though I'd LOVE one of those!), but even some great troubleshooting steps or ideas would be much appreciated!

THANK YOU!

Re: Bummed out! Built my first PCB and cant program esp!

PostPosted: Mon Nov 23, 2015 8:52 am
by martinayotte
We can see on your schematic that GPIO15/GPIO2/GPIO0 are available on an header. But they are still left floating.
GPIO15 needs to be pulled down to GND, while GPIO2/GPIO0 needs to be pulled yo VCC for normal execute mode, and GPIO0 needs to be temporarly bring to GND for Upload Boot mode.

Re: Bummed out! Built my first PCB and cant program esp!

PostPosted: Mon Nov 23, 2015 8:59 am
by Mario Mikočević
Heya,

few things I've noticed -

- GPIO15 pulldown to GND is missing
- VCC routes should be thicker (I usually put them 24) presuming layer 16-bottom is GND plane

--
Mozz

Re: Bummed out! Built my first PCB and cant program esp!

PostPosted: Mon Nov 23, 2015 10:04 am
by shoelessone
martinayotte wrote:We can see on your schematic that GPIO15/GPIO2/GPIO0 are available on an header. But they are still left floating.
GPIO15 needs to be pulled down to GND, while GPIO2/GPIO0 needs to be pulled yo VCC for normal execute mode, and GPIO0 needs to be temporarly bring to GND for Upload Boot mode.


Martin, let me start by saying, if you are ever in the Chicago area, and if you drink beer, please allow me to buy one for you.

I don't really have any idea how I missed the bit about GPIO15 needing to be pulled to ground. I really have no idea. But, somehow I did!

When I ran a jumper wire from gpio15 to gnd, I was able to program (one of three!) of the boards! I can't tell you how happy this makes me, because despite my stupidity and lack of attention to detail at somehow missing this requirement, I've spent a ton of time on this project (the PCB design is just one of many aspects!) and this was a real "blocker." So I'm thrilled to have been able to program the board. THANK YOU.

So, of the three boards I had made for testing, 1 of them is at least programmable. Somehow this is the first/worst board that I soldered (i have tiny solder pads for the .1uF and 10uF caps, and I'm pretty terrible at soldering!).

The second board, I ruined by ripping out a trace (somehow).

The third board, I did an OK job soldering actually, but for some reason when I connect power the ESP's little blue LED no longer flashes blue. So I"m guessing I somehow killed the thing, or perhaps when I was trying to remove excess solder I disconnected VCC or something. I'm going to spend tonight trying to figure out why it's no longer working.

I still have to actually TEST the board to make sure it works. So that's a big "todo". But at least I can program one of the boards, which with some luck will allow me to do a "full" end-to-end test of the board (before I design/order "rev b"!)

Thanks again!