My program only works, when the serial monitor is open. When i close it, nothing happens, when i start the serial monitor (i.e. arduino ide) everything is fine. I can see my code in the monitor and the leds are blinking, etc.
It seems like this problem, 'cause i bought this board. Can i fix this issue with some soldering and if yes, how?
Here is my code. When the serial monitor is closed, led1 (on GPIO 5, see line 33 / 48) is just blinking. This means in my program, that something goes wrong with the sd card (mounting or something like this). This happens when the serial monitor is closed. When i open it and restart the code, everything is working.
Hardware problem: Program only works when serial monitor is open
Re: Hardware problem: Program only works when serial monitor is open
Without a schematic it's impossible to really say.
However their automatic reset circuit is probably implemented with 2 of the 3 SOT23 transistors visible on the back of the PCB. The third transistor is probably for managing access to the SD card slot.
I expect if you desolder the two transistors you can probably get the board out of reset when serial is disconnected. Although this will break automatic reset, so you'll have to use the RESET & MODE buttons to put the board into flashing mode each time you want to upload a new program.
The other possibility is the design of your board is fine and there's a "cold solder joint" somewhere not making a connection, or a solder bridge. So you could try reflowing some of the solder joints and see if this helps.
The easiest solution is probably to buy a different development board, unfortunately...
However their automatic reset circuit is probably implemented with 2 of the 3 SOT23 transistors visible on the back of the PCB. The third transistor is probably for managing access to the SD card slot.
I expect if you desolder the two transistors you can probably get the board out of reset when serial is disconnected. Although this will break automatic reset, so you'll have to use the RESET & MODE buttons to put the board into flashing mode each time you want to upload a new program.
The other possibility is the design of your board is fine and there's a "cold solder joint" somewhere not making a connection, or a solder bridge. So you could try reflowing some of the solder joints and see if this helps.
The easiest solution is probably to buy a different development board, unfortunately...
Re: Hardware problem: Program only works when serial monitor is open
Well, i've got a handfull of those now. I have this problem on any of these boards. Also i don't have a schematic and the seller is in vacation (duh). I will try to desolder 2/3 transistors on the back by luck.
If anyone has any other ideas I would be very grateful.
If anyone has any other ideas I would be very grateful.
Re: Hardware problem: Program only works when serial monitor is open
Update: Weird. I desolderes 2/3 transistors. Know its working - the TX LED is blinking, so it's writing on my sd card. This works for ... 10 seconds or so. Then it just stops. When i open the serial monitor, the LED is blinking again and i can see my output.
I also desoldered the third one. Still the same problem and the sd card is working. I dont know for what those transistors are for.
Edit: Okay, if I exactly desolder the two transistors, which are right next to each other, then I can not flash the ESP32. Time out. Even desoldering only the third one (and left the other two soldered) i can't flash the esp. But this doesn't has something to do with IO0, cause i can use the Button still in my code, even without those tranistors. But on the other hand, when i left all those tranistors soldered and don't use the Boot Button (IO0) to start/stop the skript, everything is working for like 10 seconds.
But when this is only working, when the serial monitor is open, that this should be also a software error? something, which i could fix with some code? I mean, i "only" have to claim, that the board is connected and the serial monitor is open.
I don't get why the script is only working for around 10 seconds? I realized, that this happens only when the esp32 is connected with my pc. When it's connected i.e. with a powerbank the script won't start.
I also desoldered the third one. Still the same problem and the sd card is working. I dont know for what those transistors are for.
Edit: Okay, if I exactly desolder the two transistors, which are right next to each other, then I can not flash the ESP32. Time out. Even desoldering only the third one (and left the other two soldered) i can't flash the esp. But this doesn't has something to do with IO0, cause i can use the Button still in my code, even without those tranistors. But on the other hand, when i left all those tranistors soldered and don't use the Boot Button (IO0) to start/stop the skript, everything is working for like 10 seconds.
But when this is only working, when the serial monitor is open, that this should be also a software error? something, which i could fix with some code? I mean, i "only" have to claim, that the board is connected and the serial monitor is open.
I don't get why the script is only working for around 10 seconds? I realized, that this happens only when the esp32 is connected with my pc. When it's connected i.e. with a powerbank the script won't start.
Re: Hardware problem: Program only works when serial monitor is open
Maybe something with gpio 2, 12 pullups for SD card and strapping for boot
Re: Hardware problem: Program only works when serial monitor is open
I know I said this already, without seeing a schematic it's really impossible to know exactly what's going on here.
Going back to the absolute basics, if you flash a "blink" sketch to the program (ie no code except for blinking a single LED on and off), what situations does that work in (out of: serial monitor open, serial monitor closed, connected to power bank).
I've found powering microcontroller projects with power banks can be difficult, because when the current draw becomes low during normal operation the power bank will sometimes cut the output off thinking the phone is fully charged.
Going back to the absolute basics, if you flash a "blink" sketch to the program (ie no code except for blinking a single LED on and off), what situations does that work in (out of: serial monitor open, serial monitor closed, connected to power bank).
I've found powering microcontroller projects with power banks can be difficult, because when the current draw becomes low during normal operation the power bank will sometimes cut the output off thinking the phone is fully charged.
Re: Hardware problem: Program only works when serial monitor is open
Sorry, i can't try this until monday. But i get the schematic:
https://i.imgur.com/hJKJVso.jpg
https://i.imgur.com/hJKJVso.jpg
Re: Hardware problem: Program only works when serial monitor is open
Don't ask me why, but it works now. I did nothing, left everything at it is for 1 week and now it works.
But a quick question: Everytime i write something in my serial monitor, the TX LED is blinking (see schematic at D3). This LED only blinks when the serial monitor is open. Can i controll TX without the serial monitor? As a "normal" LED for some projects like
The TX LED goes over a 1k resistor to CBUS2 at the FT231XS-R chip.
But a quick question: Everytime i write something in my serial monitor, the TX LED is blinking (see schematic at D3). This LED only blinks when the serial monitor is open. Can i controll TX without the serial monitor? As a "normal" LED for some projects like
Code: Select all
digitalWrite(TX_LED, HIGH);
-
- Posts: 9709
- Joined: Thu Nov 26, 2015 4:08 am
Re: Hardware problem: Program only works when serial monitor is open
If the LEDs go to the usb-to-serial-converter, there's no way to control them from the ESP32. (Maybe you can make the RxD led blink as a side effect of sending a character out of the serial port, but that only works whenm USB is plugged in and the serial port is open.)
Who is online
Users browsing this forum: No registered users and 192 guests