Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Bonzo
#86152 I have moved from the ESP-12E to the mini ESP-12E using the Arduino IDE.

I would like to reduce the size of some of my projects and am considering a board without a usb connection. I have got hold of a TTL-232R-3V3 and have found instructions on how to program a board without a USB connection.

I have a couple of questions:
What would be the next step for a suitable board; I usually only need a couple of I/O connections and understand that some pins I can not use and that some are pull up or pull down.
How to program - get the code working on a development board and then transfer it to the more basic board.

Any insights would be useful.

Just realise I want something with a built in aerial which will narrow it down further and it is probably the ESP-12
User avatar
By btidey
#86164 When you say moving from ESP12E to mini ESP12e I assume you mean a ESP12E mounted on a dev board like a NodeMCU or a Wemos.

Also consider the ESP12F which is identical to the ESP12E but with an improved antenna design. THE ESP12S is very similar and marginally smaller as it doesn't have access to the internal flash connections.

On pull ups/downs the 2 critical pins are EN which needs to be high for the board to run and GPIO15 which needs to be low at start up for it to execute normally from the flash program. Either link EN to 3.3V or better use a pull up resistor like 100K if you want to be able to drive that pin. For GPIO15 best to use a pull down resistor to ground (e.g. 4k7). This minimises risk of shorting the pin and allows the pin to be used for IO.

Reset has a internal pull up. GPIO0 and GPIO2 need to be high for normal operation but will default high via weak internal pull ups. This works fine in my experience providing you don't have long external connections to these pins.

For programming you can use your USB serial board with board TX out connected to ESP RX and board RX to ESP TX. To do an upload the board must be put into upload mode. You can do this manually by having a switch to GND on GPIO0 and a switch on RESET or EN to GND. If the board is powered up, RESET pulsed, or EN pulsed with the GPIO0 grounded then it goes into upload mode and you can then initiate your upload from Arduino IDE.

It is possible to automate this just like an development board. Easiest if your USB board has bothe DTR and RTS connections as DTR can drive the GPIO line and RTS the EN signal. Best to use this rather than reset as EN does not have the internal capacitor that the reset line has. There are other schemes which can automate using just DTR but you need external components for that.

The trickiest part is probably making connections to the module to program it. You can just solder wires to it or you can make up something like my poso pin connector if you are going to be doing this a lot. https://www.thingiverse.com/thing:2147460

The other thing to make this easier is always to include OTA programming in your sketches. This means you only ever have to do serial programming once per module.
User avatar
By Bonzo
#86173 Yes it was the ESP12F which I was thinking about - I didn't realise it had the F on the end as I only found it this morning.

Thank you for the tips as I have only used the Dev boards before and the probably have parts included that I did not think of. I will buy a couple and see how it goes.

The OTA is a good idea as well; I did try it last year but it was on quite a complicated program and I could not get it to work. I ignored my own advice on trying new things on something simple to start with!
User avatar
By Bonzo
#86442 @btidey It is a real rats nest of wires just to upload a program! I think I will have to 3d print and wire up a programming board as you suggest.

I had a problem uploading and after a few hours managed to upload a program using the info on this site: https://riktronics.wordpress.com/2017/1 ... explained/

The pins I had were tring to load from Flash which did not work and changing them to UART did. I recomend the site above to anyone having problems.

I now have a blinking LED and am going to draw up a scimatic so I do not have to go throgh this next time.

To save me a bit frustration if I upload the basic OTA program now and solder the ESP-12 onto the board I will not need the reset and flash button? or do/should I wire them in anyway. I was going to wire the reset button in anyway.