Remote dingdong-server

Whenever someone rings the doorbell I want to be notified. An ESP32 at the doorbell initiates a telnet connection with my dingdong server.
An ESP32 module is sleeping on my doorbell. Whenever the doorbell rings the ESP32 module awakens and initiates a telnet connection with my remote dingdong-server.
The dingdong-server is an ESP8266 Fritzelboard. This server will:
The dingdong-server is an ESP8266 Fritzelboard. This server will:
- power up the dingdong in my room, producing a pleasant very loud melodious sound
- do a lot of other important things
Updates van de auteur
EcoKees 7 jaar geleden
One big problem is that you don't have version control. After a few modifications I forgot to save my source code. At the end I had to start again from the beginning.
You really need an automagically save of all your previous versions.
This program will send a telnet-message to a dingdongserver and then go into deep sleep.
The dingdongserver will ding the dong three times. That is something I can't miss in my room.
The program awakens from deep sleep when the doorbellbutton has been pressed by a visitor.
It will draw about 140 mA current at 5 V during about 6 seconds. In deep sleep the current is only 3.5 mA.
In a later version of this program all events will be logged and made available using a website.
EcoKees 7 jaar geleden
It is very usable software, both for Windos or Linux. Also, you don't need Eclipse for GIT version control.
GIT is in no way interfering with your software. It is there in the background. Whenever you made some changes/updates to your program GIT keeps track of all changes. After that you can sort of save the current version of your software.
All the changes you applied are visible later, you can revert to an earlier version of your program and start another branch from that point.
It is possible to recreate an arbitrary version of you sourcecode, but I don't know yet how...
I only started yesterday-night with GIT!
Try it out, read the tutorials and have a long night with this marvellous version control system!
EcoKees 7 jaar geleden
The program is a modification of an example program I found in the list of examples.
The program connects to my home-WiFi and gets an IP-address.
I instructed my local router to always assign it the same IP-address.
After that the program will listen forever at port 80.
Whenever the string defined in the variable char key[] has been received, the dingdong will be driven a few times. Eg. if the string "Laat de dingdong 3 maal gaan" has been recognized the dingdong will drive port myLED 3 times with a pulse of 100 ms and a pause between pulses of 750 ms as defined at the start of the program.
MyLED is defined to be port 9.
The reason to use a specific string is security. Later I might setup an SSL-connection so this string is not seen by anyone, so nobody can ring my dingdong inadvertently or purposely.
For debugging I used PUTTY to send the string to my dingdongserver.
EcoKees 7 jaar geleden
The dingdong draws about 0.8 A @ 7V. Too much for a universal NPN-transistor and certainly too much current for the port of the microcontroller.
First I wanted to use a MOSFET for this job but 3.3 V was not enough to saturate the MOSFET.
I found a BD438 PNP power transistor in my junkbox, very suited for this job. The circuit is a sort of Darlington. Port D9 of the ESP8266 is normally low.
The BC174B has an hFE of 180-460. The base-current is (3.3 V – 0.7 V)/2200 = 1.2 mA when driven high by port D9 of the ESP8266. With hFE=200 the collector-current will be about 200*1.2 = 240 mA. The maximum current is about (8V-0.7V) over 470 ohm = 16 mA. So BC174 will be completely saturated and the base-current of the BD438 will be about 15 mA. It's hFE is 40-140, so the current through the dingdong will be about 50 * 15 mA = 750 mA. The BD438 will be saturated and the dingdong will ding or dong.