-->
Page 1 of 1

ESP01 custom board questions...

PostPosted: Tue Sep 15, 2020 4:52 am
by mosagepa
(UPDATED: later posts showing a picture of said board. With additional comments.

PS - The image shows a very "custom/rough" board design. Obviously this will have to be refined along the way, it's just a prototype of a versatile ESP01 custom board. Flexibility of access to the several ESP01 modes and options is the main purpose. Eventually I'll send it to a PCB fab if it works :) Also, the crude, raw solder joints could get a good use as TEST POINTS, it really allows my testing before connecting this to real VCC-GND, also for testing connections, resistence values etc.)

Hello, I found this forum and wish to contribute while I gain some experience. :D

I've got some experience in electronics, Arduinos, uCs and also ESP01 having read a lot. But that's precisely the origin of my doubts and questions, since I tend to find several apparently contradictory advice on how to setup the ESP01/ESP01S...

Let's see. I'm building this mini-custom board for the ESP01. This is one of those Chinese dealer ESP01, not the 01S but with 1MB flash anyway. It has both LEDs and the relatively big SMD cap just in the vicinity of pin 8 (GPIO16).

My idea was to try expand from a 2x4 female header to which I connect the 01, and try to provide for things as:

- Custom access to the EN pin, by a jumper you could tie it to VCC but could get off the jumper and drive the pin externally also. This was motivated by some thread out there in which people tied the GPIO16 to EN ??? (I thought it was tied to RESET pin, for the deep sleep thing, but oh well... ) Does it have sense to drive EN? I though it ws enough to keep it pullup'ed to VCC (but see next item on what's the proper pullup R value).

- Proper pull-ups for GPIO0 and RESET for their default '1' states, although I've seen designs with 3k3 pullups other with 10k.. which is the best? Is 3k3 dangerous/ borderline in order to drive the current into these pins ?

- I've also attached extra circuitry for the RESET to be able to be riden by external uC (thinking Tiny85 because I'll need extra in/outs to sensors that the ESP01 alone can't provide). So basically I'll need sometimes the ESP01 to act driven by the Tiny85, or also maybe to be able to drive RESET from a firmware-sending PC, all the while maintaning chances of driving externalyl the RESET line.

- In order to do the above point, I put Schotkky diodes, one going directly RESET -> external pin (though for Tiny85 in the future), the other to manual SWitch, but with a 4u7 cap in parallel to earth, and a 100R i.e. not connecting the SW directly to GND in the other end. Later on I though, 4u7 is a bit overkill, I've seen caps in this regard being only 4n7, or maybe just 10/100 nF, what's right?

- Not to talk about the GPIO16 provision which is NONE in these tiny boards, so I managed to solder a tiny wire to that (later on I hotglued the works of course!), my plans are to attach this fixed wire to a female Dupont end so that I could tie it to either RST line or externally. So e.g. if I leave it tied to the RST by the Dupont header, then I can be sure that the deepSleep function will do its thing w/out problems etc... am I right?

All around I think this could work and be a mini design of mine that will serve me for many purposes, because it would allow: programming on- and off-the project, manual SW + external + deepsleep internal resetting, care about multiple drivings to GND of RESET pin (thanks to the Schottkys) etc.

I've got it constructed right now but with 3k3 pullups and the 4u7 cap which I think was an errata? The Schottkys are 1N5819 more than enough I guess.

The board connects to the UART (had of course a 4-way Dupont male header installed in my current hardware version), detects, can flash firmware (I put BOTH a RESET button and a GPIO0 tie-to-gnd button) without a glitch, I already talked to it via miniterm.py blah blah... all right, BUT then I need to confirm the R, C values, and all these design decisions so to speak... that's when I come here to ask for help and advice.

I don't know why some Chinese dealers (and not just those!) are just dropping out ESP01s with the bare minimums!

So any advice on my choosings and any further insight into this design I'll be so grateful. Thanks again folks! And of course when I have it finished I'll show here the results.

Re: ESP01 custom board questions...

PostPosted: Tue Sep 15, 2020 11:23 am
by mosagepa
Further elaborating on these ideas,

1) I own a couple Wemos D1 R2 and even in those, they don't provide anything "interesting " or flexible enough for the RESET issue. What I pursue with my design is to have always the chance to: a) RST by deepSleep automatic wakeup b) RST by physical nearby SW button c) RST by external toggling of both RST & GPIO0 in the way we know to get it flash'ed, d) Those all have to be "safe" RST in the sense that I provide a C for the right timing (and BOR, I cant' recall if the ESP8266 has BOR integrated), chances of e.g. an external RST LOW while the ESP8266 is sleeping with GPIO16='1' (so we need to control the current there, thus the Schottky) etc.

2) This flexibility, and other like UART provision (for debugging, flashing...) could be thought of in advance, by some dealers / makers. Specially if you wish to later on enclose the ESP01 along with other uC or such, inside a case in a place where you don't really want to get the ESP01 out the case every time you think of updating something.

Does it make sense?

PS- I'm working out some schematic in KiCad for my design, I'll share it here, but I still need your suggestions and advice...

Re: ESP01 custom board questions...

PostPosted: Tue Sep 15, 2020 12:29 pm
by mosagepa
Enclosed picture of said "FrankESPstein" board (LOL) in my solderbench :)

(btw, you don't wanna see the underside to this, believe me ....) :mrgreen:

It's working currently with the UART flashing (you manually use the 2 buttons you see, and connect with the 4-pin male header).

The blue jumper is tying the CHPD to VCC right now, but as I mentioned you could find uses for the CHPD being externally manipulated when the jumper is off.

I changed the 3k3 original R's to 10k pullups since most of the advice in the net tend to use 10k's. I thought current limit was like 10mA for the ESP8266 in output mode? (only case in which potentially being drawn to GND).

As you can see there's an additional horizontal 3-way male pin header, just south of the jumper. Left to right these are: 1) RST signal after a Schottky, could be used to control firmware flashing with external uC (I'm planning Tiny85, for several design reasons with this board being a part of a custom window motor domotic applicance). 2) not used at the moment, curently tied to VCC via 3k3 still, 3) GPI0 (which has 10k pullup as I said).

Basically via pins 1 & 3 you could replicate the sequence needed for preparing the ESP for receiving new firmware (without opening the final enclosure of the planned applicance).

The two Schottkys are for controlling current and a safe GND level just in case external ties to GND occur (via the different options, which noone can assure are mutually exclusive).

Comments are welcome (also AESTHETIC ones! xD).

Kind regards from Spain