loading

Do you know how many devices are on your local network? That is what we where wondering at our hackerspace HackBergen.

Yes, there are available programs and Apps to scan your network, but we can also scan with the Raspberry Pi (RPi) and show the result on a set of 7-segment displays.

These look cool, retro, are cheap and can be seen from a distance for you to have a general idea of how many devices are currently operating on your local network in these IoT times.

This build uses 3 modules of 7-segment common Anode LED displays that are controlled by an Atmega328. We use 3 because normal home LANs are C nets with a maximum of 256 devices and I had 3 of these nice 7-segment displays lying around. :)

The (AVR Atmega) 328 is loaded with the Arduino bootloader on an Arduino Uno 28pin AVR and then programmed with the Arduino 1.0.1 IDE through the Raspberry Pi on board serial port. The software is the firmware that Sparkfun uses on their serial backpack, but we have to modify a couple of lines since they use a 32 pin SMD 328 instead of the normal 28pin DIP version from the UNO.

By using an 328 for this, we do not need more than the serial port's 2 pins to control the display, and all multiplexing and buffering is done by the 328. No need for a program to do the multiplexing of the 7-seg displays and be problematic with irregular timing. We can also use the built in i2c bus to control it if we want to.

Using the serial port makes it very easy to display 7-seg chars on the display, remaining there until we update it again. This is great for piping information from scripts, and we do not need a program running constantly as a daemon.

You could of course buy a single 4 digit display from SparkFun ready-made and connect it to your Linux box or your RPi, losing all the DIY fun. That is totally up to you. :)

Step 1: What Hardware Do We Need?

  • Soldering Iron with de-soldering gadgets
  • Multimeter with continuity tester
  • Wire
  • Perfboard
  • Lupe or magnifying glass to check the soldering
  • Sharp or X-acto knife
  • Arduino Uno
  • 3 pcs common Anode 7-segment display
  • Atmega AVR 328 DIP 28pin IC
  • Sockets
    • These are optional, but makes it easier to sneak wires behind the ICs
  • Resistors.
    • I used a 8 DIP 180ohm network for the segments as I find these convenient for things like this.
    • 220 ohm for driving the base of the transistors
  • NPN transistors. We used the 2n2222.
  • Raspberry Pi B, B+ or 2.
  • Ribbon cable - 40 pins or 26. We could use 10pin but that might ruin the RPis header.
  • Header connector
  • Breadboards. Optional as you can just reflash the bootloader on the UNO, but we did use the UNO to program the 328 on a breadboard. It is only done once.
<p>I love this! It's certainly a starting point to expand into many other things :) Well done!</p>

About This Instructable

5,200views

97favorites

License:

More by zerblatt007:Raspberry Pi 2 DIY LED LAN device counter NeoPixel Clock with SparkCore Internet Button Shield DIY slim NeoPixel strip with Spark Core 
Add instructable to: