I am trying to make an air conditioning infrared remote control with brightness detection and temperature detection .
The Problem
Pull down BOOT and power it on, can see that I have successfully entered the firmware flash mode .
ets Jan 8 2013,rst cause:2, boot mode:(1,1)
Received "timed out waiting for packet header" from esp flashing tool when upload the firmware.
esptool.py v3.0
Serial port COM11
Connecting........_____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header
Have a initial firmware which may blink the built-in led when recieve serial data, but didn't blink when I send data from computer. So I can assume that the ESP8266 did not receive serial data.
What I first tried
Pull RXD to GND using tweezers, the built-in led blink
Send serial data from NodeMCU, the built-in led blink
Oscilloscope image on RXD when 8266 connect to ch340 module
Change the jumper from 3v3 to 5v on ch340 module and send serial data, the built-in led blink. I also tried to download firmware, for the most time it shows "Failed to write to target RAM", but success several times.
I heard from Reddit that the IO can withstand 5V
Use another CH340 module, everything was the same.
@Wawa told me regulators can oscillate with the wrong type of capacitors. So I tried to use 1uf capacitors instead of 10uf. The test results are presented in the following section. And here is the oscilloscope image
I ordered a similar pcb but without photoresists and infrared light emitting diodes. I tried it and everything was the same.
What I also tried
I'm trying to combine the following items:
another adapter board with esp8266 stick on breadboard
ams1117 module stick on breadboard
my pcb but only esp8266 and 10k resistors was soldered
my pcb but only ht7333 and the capacitors was soldered
Power by
Where is 8266
Worked?
2
1
Always
4
1
Sometimes
2
3
Never
4
3
Never
"Sometimes" meens that with 10uf capasitors, it can't work.
And with 1uf capasitors, I tried welding it several times, and sometimes it can work but sometimes it can't work.
Detailes
TypeC is for power supply, but I fogot some resistors
GH1.25 is used to connect to ch340 module during flashing firmware
I havesuccessfully entered the firmware flash mode.
I tried using resistors on IO2 and IO15, but there was no difference. Besides, built-in led on IO2 could pull IO2 up. I found an official explanation for this, but a guy on reddit said that wiki sucks wind Boot Mode Selection - ESP8266 - — esptool.py latest documentation
I am a novice in hardware, so next time I will pay attention to not wiring under the wifi antenna and add resistor to the light emitting diode
so just to be clear, at boot, GPIO 0 is pulled LOW, GPIO 1 & GPIO 2 aren't pulled LOW in any way and GPIO 15 is pulled LOW.
(this is at the moment that VCC , RST & CH_PD are all connected to 3.3v )
That is not true ! Not that the ports will break straight away usually, but eventually they do in most cases. There is no need to use 5v, so don't ! it is a 3.3v MCU.
that's fine, actually it does, there is a builtin led on gpio 2 on an ESP-12f.
In that case i suggest from now on you first built a prototype before you start ordering PCBs.
That is actually still the best you can do.
I always make sure that before i start creating a PCB, i first have it working on a breadboard, and then a soldered prototype.
Eh... S1 is not connected the way you have it now, pretty sure of that.
Yeah, i won't do that, but just from looking at the gerbers, the onboard regulator has no heatsink to speak of, you connected the copper-fill to GND, when the regulator has the heatsink on Vout.
Again, if you make a prototype and just use a to-220 package for the regulator it will be fine, but with the current PCB, it doesn't matter if you even manage to upload a new sketch because chances are you will never be able to connect to WiFi anyway due to lack of power.
I wonder why the HT7333 can't provide enough power?
The datasheet said it can provide 250ma. There are a large number of posts on the internet said that ht7333 is enough for esp8266.
The esp 8266 used a current of about 80 ma most of the time with my sketch, while the ht7333 only felt a bit warm, so I don't think it was a big problem. But I'll pay attention to this next time.
So, do you have any other ideas about the serial not working?
Well no not really, i mean 'Serial' is working at least for the TX line or you wouldn't be getting the boot messages.
Eh yes, but while the selected boot-mode is 'upload' , that sketch isn't running. Also i suspect that the baud-rate is relevant, anyway that isn't proof.
Well the result of that test would direct me towards keeping the AMS module as power, and look for differences between the breadboard unit and the PCB. Even though there aren't any looking at the schematic, that may mean that there is a short somewhere from your soldering or something. Anyway i'd start with the PCB and elevate the ESP while connecting the soldring points to make sure that there isn't some flux making connection somewhere, and solder first just the TX - RX to the PCB and solder the other required parts with wires towards the breadboard. If that works, move parts over to the PCB one by one.
Update:
I borrowed a more expensive CMSIS-DAP debugger with a serial port and tried to use its serial to flash firmware for esp8266. It can work very smoothly! There is no problem. I am not allowed to open this debugger, so I do not know what chip is used inside
So the question then is whether there is an incompatibility between ch340 and esp8266? They work well in my previous projects.