Go Down

Topic: Connecting ProMini and ESP8266 together via uart but not able to upload sketch (Read 399 times) previous topic - next topic

timtailors

Hello,

I'm looking for a good idea how I can solve the issue with uploading a sketch to a Pro Mini and a ESP8266 via Uart. They both are connected to each other and send regularly data. When trying to update one of the two there is interference because it basically looks like this
USB TX -> RX AVR <- TX ESP8266


One solution came to my mind is pulling down the reset of the other board that interfere with its transmission. If pushing manually the reset button that works. So I need to trigger that reset somehow during the entire time when one of the boards is being updated.

How would you solve it? Is it maybe possible to pull a pin high during the bootloader receives the new update?

Juraj

reset is low. connect the reset pin to ground.

it can't work for both. esp is to usb connected rx-rx tx-tx

timtailors

maybe I get you wrong but pushing manually the others reset button definitely works

wvmarle

What ESP module do you have?

Can you show a proper schematic of your wiring?
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Juraj

maybe I get you wrong but pushing manually the others reset button definitely works
usb adapter is smart? or esp?


timtailors

Hi,

I have ESP8266-12 and 7/7s


attached a schematic. For normal operation you have to close the jumpers and for programming remove them.
I'm using CP2102/CH340g (basically they do all the same job)


old.png shows my first circuit but had no inline resistor protection which killed the RX-pin regularly when connected wrong on the breadboard.
The right part of the circuit is for auto reset of the esp, it's in the new circuit as well but doesnt play a role in my question


boards.jpg shows the whole thing simplified

wvmarle

So you have a WeMOS board. Which indeed has an ESP12 module on board, but also a USB adapter. I was already wondering if you really went through the trouble of adding reset buttons and so.

Why don't you just connect that board directly to the USB and upload that way? Much easier.

Otherwise you'll at least need a resistor on the Arduino's Tx pin to bring down the voltage, and prevent breaking the WeMOS.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

timtailors

Hi, yes actually I manufactured a pcb which has the auto reset etc. It's more or less those two boards redesigned on a single pcb with some other additional hardware

For testing I'm also using the Wemos board + Uno as it has the inbuild USB adaptor.


Why don't you just connect that board directly to the USB and upload that way?

Because it doesnt work if the two boards are connected when uploading the sketch. That's the problem and my question what to change ;)

Juraj

for inspiration Robot Dyn Uno + WiFi board. scroll down to the table

timtailors

On this board exists the same problem which I'm trying to solve..


Juraj

On this board exists the same problem which I'm trying to solve..
they simply switch the lines of rx/tx between chips. What you want do better?





timtailors

They also have to disconnect the two chips when flashing one of those.
I need to do that automatically without removing the connection by hand

Juraj


timtailors

That's why I'm asking here. One first idea is that the bootloader of the device which gets flashed pulls an output high which is connected to the other device's reset. So during uploading the other device's reset is high and so didnt send any text which can interfere

EDIT:
Ah maybe you mean how I choose which chips will be flashed? In the Arduino IDE I select the port

Juraj

back to problem X. why is it a problem to toggle a switch on the board before pushing Upload button in IDE?

btw: I have a WiFi solution for upload to both chips.

Go Up