It is a pretty commonly uttered question (sometimes loudly) around the home or office; “Is the internet up?” As the goto IT Support Manager around the house this can get a little tiresome. Most of the time the internet is up and it’s a user or personal device problem that can be solved with a re-boot, re-load, re-etc. Sometimes the internet is really down requiring a router and cable modem reboot or a call to the ISP. Wouldn’t a simple visual check that anyone could quickly understand be helpful? Plus, as a bonus, provide some general network health statistics with a screen print and an hourly update to a Google Drive spreadsheet.
This project is amazingly useful and incredibly simple to duplicate. If you already have a Raspberry PI it is very cheap to implement.
What it does and how it works:
The Raspberry PI runs a Python program that test pings 10 internet sites that you to determine to provide the status of your internet connection.
GREEN: 7 or more sites return a successful ping.
Green LED on. Updates the stats.
YELLOW: 6 to 4 sites return a successful ping.
Yellow LED on. Updates the stats.
RED: 3 or fewer sites return a successful ping.
Red LED on. Updates the stats.
To make the program run faster and not burden the network with outgoing pings, all 10 sites are not pinged on each run. The ping test rotates through the 10 sites. If the selected site does fail the ping test, the program goes into “Deep Probe” and checks all 10 sites to determine the connection status. “Deep Probe” runs are tracked for the status report that prints to the screen.
Each hour a status report is appended to a Google Drive spreadsheet via the Maker channel at IFTTT.Com.
For a visual output we went with a device that anyone can identify with, a simple $8 toy traffic light from Amazon. For $8 you get a lot. The light is well build, looks great, and is a full 7″ tall with three LEDs already installed. It also comes with 12 little toy cars that you can give away; you don’t need those. Next remove the four screws at the bottom of the base. You are going to see four wires that lead up to the three LEDs in the traffic light. Cut those wires and free them from the little ON/OFF switch and microcontroller that was meant to control the blink patterns for the non-hacker. Now you should only be left with four wires. The LEDs are wired common athode (+). The simple schematic below shows the hookup for each LED and their connection to the Raspberry PI. Double check the wiring for your traffic light with a button cell battery to see what wire lights each LED.
Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!
Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.
Join us every Wednesday night at 8pm ET for Ask an Engineer!
Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground” – Adafruit’s Apps!
Maker Business — How Intel Makes a Chip
Wearables — Tape tactics
Electronics — Ground connections cooler via more vias
Biohacking — Itch Tracker for Apple Watch
No comments yet.
Sorry, the comment form is closed at this time.