On boot up pins go high!

@darkmoon thanks the same thing told me @Jamin …I Tried but failed:( I am 80% sure about hardware failure because when i power it up instant i got high status on the pins… Without bootloader and blynk loaded…!! This is normal …

If anyone solve the mystery i am here :smiley:

@Dimitris I don’t see where jamin tolds you to change the order of your setup function.
You have that:
Pinmode
Digitalwrite
Blink connection

I said you that:
Blink connection
Pinmode
Digital write

Did you test that?

Like this ?

I have uploaded a video to see whats the problem… I just click reset to reboot! @darkmoon @Jamin

https://drive.google.com/open?id=0BzsBXB7LzyHXaXpKdGJRVXNCa1E

@Dimitris just flash a blank sketch and then put your meter on all the pins to see which are high and which are low. On the WeMos some are high and some are low.

Then wire up your system based on what your meter tells you.

For a WeMos D1 Mini Pro the bootup status is:

D0 LOW
D1 LOW
D2 LOW
D3 HIGH
D4 HIGH
D5 LOW
D6 LOW
D7 LOW
D8 LOW
A0 LOW
RX HIGH
TX HIGH

GPIO details for these pins are available at https://www.wemos.cc/product/d1-mini-pro.html
It is normal for D3 and D4 (GPIO 0 and GPIO 2) to be HIGH for all ESP’s as that is part of the regular boot sequence.

4 Likes

Thanks for your info but in first build i used the D6 D7 and was high :frowning: … Now i change them to D1 and D2 and is ok!!

Anyway i will try the Blank sketch as you told me and i will post results :slight_smile:

Thanks!

1 Like

This is my board btw :

1 Like

@Dimitris your OP stated Node MCU V3?

Yes, exactly like this… same problem?

Well, just my 5cents: Yes, in ESP boards some pins are high, some are low at startup… Then the only way (if You can’t allow for short pin-triggering) is to reverse the logic of some particular circuit/pin! There are plenty of ways to do it…

1 Like

yes nodemcu v3!

@darkmoon it’s the same yes :frowning:

@marvin7 can i have an example or guide?

Thanks

Specifically a RobotDyn ESP8266-Pro which they quote as having “10 GPIO’s D0-D10” but the boards are clearly not marked as D0 to D10.

I notice you state you used D6 and D7 to start with but I can’t see any D pins higher than D3. I can’t find a schematic for the board that ties IOx to Dx, do you have one?

These are bespoke boards and the manufacturer may have decided to mess around with the “standard” or just messed up when they were manufactured. I have boards where the screen printing is simply wrong.

Sure, the simplest one is just with NPN transistor:

Or N-channel mosfet:

You can use the CD4049 inverting buffer. Good when more than a couple needs inverting:

Or use an optocoupler. These (below) examples are not the best ones, as the principle of using optocoupler is lost here, but this is the first I’ve found on web, and gives a good “explanation” of “how to use them”.:

1 Like

@Costas you have right the official picture its not the same for some reason sorry here is a picture of my board :

@marvin7 thanks for the examples i will take a look!!

@Dimitris do you have a schematic that ties the screen printed labels to GPIO numbers?

Similar issue appeared in my swing gate remote relay controller. I use local server and nodemcu 1.0. Sketch is simple - 4 relays on digital outputs to open and close gates in push mode. GPIO 4 and 5 appeared free from this fault. I noticed it on the latest server upgrade, before had no idea of why relays burn so often. will look for the other pair :slight_smile: -)

I will reply to myself -
Solution is quite simple: Blynk’s Sync All option syncronises not only Virtual Pins and Widgets data but also the state of Digital Pins despite what is written in DOCS

@Viktor_Guroma so you have confirmed this by:

  1. Reading all pin states
  2. Calling syncAll without resetting your hardware
  3. Reading all pin states again
  4. Comparing results from 1 and 3 and have identified pins that were high or low that are now low or high

Which pins in particular did your tests apply to?

1 Like

I always thought that powering down resets everything but EEPROM. The issue was exactly as described in the topic header: “On boot pins go high”. In my case 2 out of 4 pins I use in my gate opener went high on powering up. I use syncAll exactly as prescribed so it is called on boot only.
And futrhermore, at first (about year ago) I put that function into the sketch, and recently having thorougly read the manual I deleted syncAll and had all my troubles (burned couple of relays and switches. After returning it back everything fine again.