Jump to content
Electronics-Lab.com Community

Search the Community

Showing results for tags 'internet watchdog'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Electronics Forums
    • Projects Q/A
    • Datasheet/Parts requests
    • Electronic Projects Design/Ideas
    • Power Electronics
    • Service Manuals
    • Theory articles
    • Electronics chit chat
    • Microelectronics
    • Electronic Resources
  • Related to Electronics
    • Spice Simulation - PCB design
    • Inventive/New Ideas
    • Mechanical constructions/Hardware
    • Sell/Buy electronics - Job offer/requests
    • Components trade
    • High Voltage Stuff
    • Electronic Gadgets
  • General
    • Announcements
    • Feedback/Comments
    • General
  • Salvage Area

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Skype


Location


Interests

Found 2 results

  1. Destiny Internet Ghost - Internet Notifier The Internet has changed the way we live our lives. From communication, education, banking, entertainment and shopping, the Internet has had a profound impact on our world. Gone are the days when the pen was the most important tool in this world. times have changed and now the internet rules the world. It is very difficult to imagine our world without the Internet. In the year 2021 I created a "Internet Hardware WatchDog" using NodeMCU which reboots my home router whenever there is an issue with the Internet. This device sits next to my router and happily takes care of it whenever it has a hiccup. This year, I wanted to extend the watchdogs horizon by adding an "Internet Status Notifier" that displays the current status of the Internet using an RGB LED. When the Internet is up and running, the notifier displays a blue light and when the Internet is down it goes red. Video: https://youtu.be/mWDEx0khpWM Note: If you do any work with "mains power" such as 120v or 240v AC power wiring, you should always use proper equipment and safety gears and determine whether you have adequate skill and experience or consult a Licensed Electrician. This project is not intended for use by children. Awards Video Featured on Instructables Components Required For this project we need: 1 x RGB LED 1 x 200 Ohm Resistor 1 x WeMos-D1 Mini/NodeMCU 1 x 220V to 5V Step Down Converter 1 X 2M Long Power Chord 1 x 220v Male Wall Plug, and 1 x 3D Printer Circuit Diagram The circuit is very simple. Connect the 5V pin and the GND pin of the D1-mini to the stepdown converter. Then, connect the Common Anode of the RGB LED via a 220ohm resistor to the 3.3V pin of the D1-mini. Then connect the Blue LEDs to D6, Red to D7 and Green to D8 pin of the board. That's it as simple as that. The Logic When the device is turned on it starts pinging "www.google.com". If it receives a successful ping, the Blue LED turns on and starts fading in and out. If the ping drops, the blue LED turns off and the Red LED turns on and starts fading in and out until a successful ping is received. After running the code on a breadboard for a few days, I figured out that the D1-mini board sometimes freezes and completely becomes unresponsive. To avoid this situation, I added a logic to "reboot" the board every hour. 3D Model While browsing the Internet, I stumbled upon "Destiny Ghosts". The Ghost is an AI companion in the game "Destiny". It is a floating intelligence that was created by the "Traveler" during his dying days to assist the Guardians to protect the Universe. I immediately fell in love with the concept and the design of the Ghosts. I spent a few days creating my own 3D model of the Ghost. You can download the STL files from www.cults3D.com. 3D Printing Ghosts are floating machine entities slightly larger than a human hand. They consist of a spherical core with a single glowing "eye" surrounded by a "shell". The default Ghost shell consists of eight roughly tetrahedral white segments with orange highlights, but there are huge diversities of shells available that Ghosts can adopt for cosmetic purposes. In the game Ghosts are used for navigation, accessing computer systems, lighting dark areas, summoning your Sparrow, and much more. 3D Printing is a highly addictive hobby! There are so many things you can do using a 3D printer. From designing 3D Models to printing them using the 3D printer has now become my new hobby. I've been a "maker" since I was 10 years old, and have always constructed and made my own stuff. 3D printing for me is a blessing. I am totally lost in the 3D printing heaven. 3D printing has changed my electronics workshop life forever. Before when I used to order parts, I always used to wonder if the parts would fit into my project's resources... but after I got my 3D printer... it doesn't matter at all, because if it doesn't fit - I could design and print it myself. The 3D printer was definitely "The Missing Piece" from my electronics workshop. Coloring Using Acrylic Colors, I painted the body of the Ghost. After that, I super glued the orange highlights to the tetrahedral white segments. Next, I super glued the front eye and the back lid to the body of the Ghost. After that, I super glued the stand to the back bit of the Ghost. This stand will keep the unit straight when you place it on your desk. Adding Electronics Since the circuit is very simple, I did not design a PCB for this. I just went ahead and soldered the D1-Mini and all other components to a general purpose perf-board. At the top bit, I soldered the D1-Mini and the RGB LED and at the bottom bit, I soldered the 200v-to-5v step-down converter and the 220ohm resistor. Next, after soldering the 2M long power-cord, I hot glued the perf-board to the back bit of the unit. The Code The code starts by including all the necessary libraries. Then it defines all the variables needed for setting up the WiFi connection. Next, it defines the LED Pins followed by the list of all the global variables used in the code. In the setup() section, I first defined all the pin modes followed by setting up the Wi-Fi connection. I assigned a static IP address to the D1-mini board. If you want to use DHCP then go ahead and delete these three lines from your code. void setup() { Serial.begin(9600); /** Define the pin modes **/ pinMode(LED_RED, OUTPUT); analogWrite(LED_RED, 1023); pinMode(LED_BLUE, OUTPUT); analogWrite(LED_BLUE, 1023); pinMode(LED_GREEN, OUTPUT); digitalWrite(LED_GREEN, HIGH); /** We start by connecting to a WiFi network **/ IPAddress local_IP(192, 168, 0, 240); // Static IP Address for ESP8266 IPAddress subnet(255, 255, 255, 0); // Subnet Mask IPAddress gateway(192, 168, 0, 1); // Default Gateway /*********** Setup a WiFi connection ***********/ Serial.println(); if (WiFi.config(local_IP, gateway, subnet)) { Serial.println("Static IP Configured"); } else { Serial.println("Static IP Configuration Failed"); }; WiFi.mode(WIFI_STA); WiFi.begin(WIFI_SSID, WIFI_PWD); Serial.println("Connecting to WiFi"); while (WiFi.status() != WL_CONNECTED) { delay(300); Serial.print("."); switch(ctr){ // Green LED Flashes On Boot case 0: digitalWrite(LED_GREEN, HIGH); ctr=1; break; case 1: digitalWrite(LED_GREEN, LOW); ctr=0; break; }; }; Serial.println("\nWiFi connected"); Serial.print("IP address: "); Serial.println(WiFi.localIP()); digitalWrite(LED_GREEN, HIGH); // Turn off the Green LED }; Next in the loop() section, I am pinging 8.8.8.8 or Google.com and if I receive a successful ping I am fading in and out the Blue LED. If the ping fails the Red LED faded in and out. void loop() { if (pingTest()) BrightnessController("BLUE"); // If a successful ping is received else BrightnessController("RED"); // If the ping fails turn on the red LED if (millis() >= 3600000) ESP.reset(); // Reboot the WEMOS D1 Mini Every Hour = 3600000 milliseconds }; Both BrightnessController() and pingTest() functions are defined in the bottom section of the code. Then, to avoid the D1-mini from freezing and becoming unresponsive, I am using the ESP.reset() function to reset the device every hour. Demo On A Breadboard Before adding the electronic bits to the 3D printed bits, I did a quick test on a Breadboard to make sure everything works as expected. As you can see, when I turn on the circuit the Green LED starts flashing. As soon as a connection is established with the router the device starts pinging 8.8.8.8. Initially, few of the pings fail and the Red LED lights up. As soon as a successful ping is received the Blue LED starts fading in and out. Bingo! Job done... Final Demo So, this is how my final setup looks like. Powering on the unit makes the green LED flash until it establishes a connection with the router. After that, the Blue LED starts fading in and out advising us that the unit has received successful ping from www.Google.com. You can install this unit anywhere in your house and use it as an "Internet Status Notifier". Thanks Thanks again for checking my post. I hope it helps you. If you want to support me subscribe to my YouTube Channel: https://www.youtube.com/user/tarantula3 Video: View Full Blog Post: View References GitHub: View Stl Files: Download Internet Hardware WatchDog Using NodeMCU: View Support My Work BTC: 1Hrr83W2zu2hmDcmYqZMhgPQ71oLj5b7v5 LTC: LPh69qxUqaHKYuFPJVJsNQjpBHWK7hZ9TZ DOGE: DEU2Wz3TK95119HMNZv2kpU7PkWbGNs9K3 ETH: 0xD64fb51C74E0206cB6702aB922C765c68B97dCD4 BAT: 0x9D9E77cA360b53cD89cc01dC37A5314C0113FFc3 LBC: bZ8ANEJFsd2MNFfpoxBhtFNPboh7PmD7M2 COS: bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23 Memo: 572187879 BNB: 0xD64fb51C74E0206cB6702aB922C765c68B97dCD4 MATIC: 0xD64fb51C74E0206cB6702aB922C765c68B97dCD4 Thanks, ca again in my next tutorial.
  2. I love mining and I truly believe that blockchain and digital currencies will one day change the world. Cryptocurrency has played a significant role in my life and has made me a morning person, ha ha. Miners require 24 x 7 access to the Internet. Recently, I went on a short business trip and my router for some stupid reason stopped working. I lost complete access to my home network and my miners. When I returned from my trip, my only aim was to fix this issue by creating an "Internet Hardware Watchdog" that reboots the router whenever something silly happens to it. Note: If you do any work with "mains power" such as 120v or 240v AC power wiring, you should always use proper equipment and safety gears and determine whether you have adequate skill and experience or consult a Licensed Electrician. This project is not intended for use by children. The Logic Let me first explain the logic to you. In a nutshell, in this setup I am going to ping "www.google.com" and as soon as the ping drops I will reboot the router. To achieve this, the NoduMCU first connects to the WiFi network and then pings 8.8.8.8 (www.google.com). If it receives a successful ping, one out of the 3 blue LED patterns is displayed. If the ping fails, 5 more retries are given before rebooting the router. The reason I am NOT rebooting the router straightaway is to avoid false positive ping fail responses. However, once the "fail_count" counter becomes 5, NodeMCU turns off the router by pulling the armature of the relay module. The armature of the relay is held for 15 seconds before releasing it so that the router is properly power cycled. Once the armature is released, the system waits for a minute before sending the next ping request. This gives enough time to the router to successfully perform its POST activities. The above steps are then endlessly repeated in the loop section of the code. Components Required For this project we need: NodeMCU Stepdown Converter Relay Module 2 x Red LEDs 3 x Blue LEDs 100Ω Resistor Power Plug and a Power Socket Schematic Now, let's put the components together exactly the way I have shown in the schematic diagram. Be very careful while handling AC Main Power sockets and cables. The Stepdown Converter powers the NodeMCU and the Relay Module. LEDs are connected to the Digital pins of the microcontroller. The relay acts as a switch and switches on or off the router based on the ping response. Please make sure you check the pins of your relay module before hooking it up to the circuit. The Board So, this is how my board looks like in 2D and 3D. I basically have created a replica of the NodeMCU Prototyping Board which you can buy from AliExpress for about $4 to $6. Components Assembly Lets start by soldering the NodeMCU to the board. Since I care a lot about my Sensors and Microcontrollers, I am not going to solder them directly to the board. Instead I am soldering 'female pin headers' to the board which will house all the sensors and the microcontrollers in them. I initially thought of soldering the LEDs directly on the board however something clicked in my mind and I went ahead and soldered them on a separate perfboard and then soldered the perfboard to the NodeMCU development board. Well, this was totally unnecessary. Once the LEDs were in place, my next step was to solder the step-down-converter and the relay-module to the board. If you want to know how I created this relay module, please check out my tutorial no. 19 DIY Relay Module : https://www.youtube.com/watch?v=3n69b4sdDjk the video and the blog post links are in the description below. Next, I made a hole in the transparent box and glued the power socket into it. Well I created a bit of mess while gluing the socket and accidentally glued the box on to my dining table, silly me. I also drilled a hole at the back of this box, for the cable that will connect to the AC Main power supply. Pretty much that's it. Once again, I would like to warn you guys: If you do any work with the "main power" such as 110v or 240v AC, you should always use proper equipment and safety gears and determine whether you have adequate skill and experience or consult a Licensed Electrician. This project is not intended for use by children. To conclude the setup, I added a small skull inside the acrylic box. This skull has been sitting on my desk just collecting dust for over a year, ha ha. The Code Now, let's have a look at the code. You can download the code and other resources from the links provided in the description below. To Run the attached code you need to download and install the "ESP8266Ping" library. You can either download it from GitHub or from the link provided in the description below. Unzip and copy the archive to the Arduino's Library Folder and change the board type to ESP8266 in the Arduino IDE and select NodeMCU. The code starts by including all the libraries and variables on top. Then in the setup() section I have defined all the pin modes and have made a connection to the WiFi router. In the loop() section I am performing a ping test and based on the test result I am either blinking the blue LEDs or power cycling the router. Thanks Thanks again for checking my post. I hope it helps you. If you want to support me subscribe to my YouTube Channel: https://www.youtube.com/user/tarantula3 Blog Posts: Internet Hardware WatchDog : https://diy-projects4u.blogspot.com/2021/12/internet-hardware-watchdog.html DIY Relay Module : http://diy-projects4u.blogspot.com/2020/08/diy-relay-module.html Video: Internet Hardware WatchDog : DIY Relay Module : https://www.youtube.com/watch?v=3n69b4sdDjk Other Resources: Code: https://drive.google.com/file/d/1HyTUMUBDK0neO854XMl3dyy5ceoeTImw/view?usp=sharing ESP8266Ping Library : https://github.com/dancol90/ESP8266Ping.git ESP8266Ping Library : https://drive.google.com/file/d/1uFfY5wW7-oWRNjP_XaBj2IM189M1n1FK/view?usp=sharing Schema: https://drive.google.com/file/d/1gn2ZhMp5Uz4YDv5GjxgIq1rtzh-21Rwe/view?usp=sharing Gerber File: https://drive.google.com/file/d/1l0bszJ0AV7S9s-y9jTWGcw9MrWayVJxZ/view?usp=sharing Flowchart: https://drive.google.com/file/d/1CL3g0nT1IZfdL8MZqN_PB-mKC9k_JfWH/view?usp=sharing Support My Work: BTC: 1M1PdxVxSTPLoMK91XnvEPksVuAa4J4dDp LTC: MQFkVkWimYngMwp5SMuSbMP4ADStjysstm DOGE: DDe7Fws24zf7acZevoT8uERnmisiHwR5st ETH: 0x939aa4e13ecb4b46663c8017986abc0d204cde60 BAT: 0x939aa4e13ecb4b46663c8017986abc0d204cde60 LBC: bZ8ANEJFsd2MNFfpoxBhtFNPboh7PmD7M2 Thanks, ca again in my next tutorial.
×
  • Create New...