Bummed out! Built my first PCB and cant program esp!
Posted: Sun Nov 22, 2015 11:56 pm
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:
And here is the actual board layout
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:
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!
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:
And here is the actual board layout
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:
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!