Wemos D1 mini - no pullups

Ok, so I've made a big mistake....

I thought I could use INPUT_PULLUP on all pins, but it turns out the ESP8266 only has fixed internal pullups of 10K on D3 and D4 (which is used for the built-in LED).

My open-collector opto-isolator is connected to D6, so I can't pull it up conventionally (PCBs are already made).

So I'm thinking of just hard-wiring pins D6 and D3 together, both declared as INPUT, and that, in theory, should provide the 10K pullup on D6.

Can anyone suggest any reason why I cant do this ?

TIA

All ESP8266 pins have pull-ups, but they are very weak, around 45K ohms

Not from my experience, Jim. I had a pushbutton to GND connected to D0 input on one board of this project. Once the pin had been taken low, releasing the button it didn't go high again.

I scratched my head over this for hours wondering why, then I found this on a spec sheet.

I was able to add a 10K pullup on that board, but it will be more difficult to add to the board that is using D6 as an input.

Since D3 and D6 are opposite each other on the Wemos D1 mini, it would be easy to just link D3 and D6 together and drive both of them.

Any reason not to ?

What did you do in the prototype and its debugging? You could use some 0805 SMD resistors and tack one to the pin and with a piece of kynar wire wrap wire connect the other end of the resistor to +. Then tack the wire in place with some hot melt glue.

It was such a simple circuit (1 input, and 1 output) I rushed into the PCB design as the project is urgent.

Anyway it would be so much easier to kynar wire pins D3 and D6 together, and use D3's internal 10K pullup. Or I could just change the code to use D3 as the input, and forget about D6 altogether. Presumably it will stay high impedance unless declared as an IO pin ?

So long as they are both declared as INPUT, should be OK, but just checking to be certain.

Some pins are output only and that is one of them

That falls into the should of, could of, wood of class. Next time you will know about those two pins. It is the simple circuits that usually come back and bite.

I believe you are just WRONG on that. My project is working fine with a 10K pullup on D0

How right you will proven to be !!

"Kynarring" stuff together and so on. My word.
A 10k resistor could be soldered from whichever GPIO to 3V.

Well, in any case you can connect D3 and D6 together.
However, D3 which is GPIO0 is also one of the strapping pins, that's why it has an external pull-up.
You need to make sure you don't pull that pin LOW during boot-up

As they say .... "There's never time to do it right, but there's always time to do it over".

1 Like

and over, and over, . . .
"where's all that lovely NRE money gone to?

It should be high impedance until I declare it, shouldn't it ?

Anyway I've breadboarded it, and it seems to be ok.

Anyway I've declared it as an INPUT_PULLUP, probably meaninglessly, but it serves as a reminder that it is being used for as.

Would have thought the compiler would flag this up, but it doesn't....

// Digital I/O
byte Input = D6;
byte Pullup = D3;   // using this to pullup D6
byte LED = D8;

and

  pinMode(Input, INPUT);
  pinMode(Pullup, INPUT_PULLUP);

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.