Getting started with ESP8266 - first project - need help please

[EDIT]... While I totaly get this topic isnt 100% node-red, I hope you all don't mind me kicking it off / discussing it here. I find this vibrant forum to be one the best I've ever used. And ultimately, I will share for others (and it does integrate with Node-red :)

Hi guys, so continuing on from this thread, I followed your advice and got some ESP8266 & other bits n bobs, I've got PlatformIO working with VSCode and I've done the obligatory hello world (blynk).

Now on to something a bit more adventurous but i need a bit of help and advice (if i thought it was confusing enough buying the bits - finding good info on all the terminology is much worse haha)

So my first project idea was an MQTT doorbell. I prised open my doorbell button but I suspect its NOT 433.9 MHz (the crystal had 26.x MHz on it) - no worries - plan B - the doorbell receiver has plenty of room inside to mount an ESP8266. On to the plan.

The plan...

  1. mount an ESP8266 inside doorbell receiver (picture 3 below)
    1. power it via the internal 78M05 5V regulator on the doorbell PCB
    2. connect a point on the doorbell PCB (that signals "door bell has been pushed") to an input on the ESP
    3. connect (piggyback) the 3 other side buttons from the to the ESP
  2. Program it to send MQTT topic/payload on reception of doorbell push (I can do this bit :slight_smile: no problem )
  3. Node-red instance to subscribe to MQTT topic and send telegram messages & trigger smart speaker (I can do this bit too :))

Fairly straight forward right?

Help needed...

Q. Can this Makerfire D1 Mini ESP8266 ESP-12F be powered via the G and 5V connectors? (picture below). The drawings/info isn't 100% clear & there are no sample wiring diagrams for this particular board
If not possible to power this board with 5V to G and 5V, what would I need to do to power this particular PCB?

Q. Which of the pins on this ESP PCB are actually usable as digital inputs?

  • I have identified a point on the doorbell PCB that outputs +2.8V when "sounding" can I wire this straight to D0? etc. or do i need to something else before hand?
  • The buttons (VOL, << & >>) on the side of the doorbell appear to have 5V on them (un-pressed) and drop to zero when pressed - can these be connected straight to D2 D3, D4? etc. or do i need to something else before hand?

Bonus question...

Can I make this re-programmable via WiFi? - once its all boxed up it would be nice to be able to re-program it via WiFi.

Supporting info...

PINS...
image
The note at the bottom of this picture suggests something can handle 5V
image
Doorbell...

Also, I have a good selection of resistors / caps etc, the odd diode and a handfull of PN2222A (6E) general purpose NPN transistors if needed :slight_smile:

Thanks for your time - its much appreciated (and needed), Steve.

Although this may seem a stupid reply, I shall post all the same.

First question you asked:

I would guess it can be. As USB is 5v and it has a USB connector.
But PLEASE get a second opinion on that. I am not 100% confident on the reply.

I'm not following this.

a) Why would the button have volume controls on it?
b) If it is 5v, it may be dangerous. Most of the boards these days are 3.3v. 5v would do damage. But question (a) kind of makes this redundant in some ways.

The ESP chip itself is a 3.3V device so at the minimum you'd need a resistor between the doorbell and it

Resistor divider

All good info guys, but honestly assume I know nothing about electronics.

If you're able to sketch something using the images I provided - I would be super grateful.

For example - this is how it looks in my head...


note to future readers - no not do this it'll likely damage stuff

I guess you are refering to first Question about powering the ESP?
Do you mean use resistors to reduce V+ to 3.3v?

I still don't understand what the G and 5v pins are for!
And as @Trying_to_learn states, its powered by 5v from USB
And the stock image says - it has an onboard switching power supply max input 24v

See my confusion :confused: haha

No :grin:.
Power supply is OK. You can connect as is in your picture. From voltage regulator 78M05 to Esp8266 module.

Voltage divider is for input pin on esp8266. Inputs on esp8266 are not 5V tolerant. You need make them lower(3.3V).
Easiest is to use voltage divider (2 resistors)


fantastic info - much appreciated.

Believe it or not, I know most of this but I am soooo rusty - its been more years than it hasn't, since I've done anything with electronics.

Question, so I connect the 3.3v signal out to D0? D1? D2? D3? any? are they all ok?
And which of the Dx inputs are usable in this manner (e.g. 3.3 switching to zero) and if you know, do i set them up as this pinMode(D0,INPUT); or this pinMode(D0,INPUT_PULLUP);?

any help you or anyone else can offer would be great.

cheers, Steve.

Connect doorbell output signal (5v) via voltage divider to esp8266 input.

For best pin usage:

2 Likes

Oh for checking you can put 5v on the 5v pin:

Board as is..... Plug in a USB cable with power.

Measure the voltage on the 5v pin/pad. If you see 5v, then you can confidently connect 5v to that pin - but don't also have the USB cable plugged in. That may cause problems if there is a voltage difference between the USB's 5 volts and the power supply's 5v.

  • my preference would go on D1, D2 or D4 .
    The others have specificities that you could need thereafter, as much not to encumber them.

image

  • if you measure a high state at 2.8v (when sounding) and a low state at 0v, you do not need the voltage divider bridge. ESP accepts signals up to 3.3v
  • concerning the push buttons, yes the voltage divider is required if the buttons in place provide 5v <-> 0v.

pinMode(D0,INPUT); or this pinMode(D0,INPUT_PULLUP); i think buttons in place ave already pullup resistor , so don't need to use INPUT_PULLUP.

1 Like