Avatar

Arduino Nano Cisco Discovery Protocol (CDP) Display w Soft Latch Power and Function Button

Sep 13th, 2020 | by: Homewater 2609
Category: Electronics Arduino
Views 280
Arduino Nano Cisco Discovery Protocol (CDP) Display with a Custom built Soft Latch Power and Function Button Proto Board and with its own internal BMS and Boost circuit to run off a 1s LiON.

Hello!

Full disclosure I am posting this because of the competition, hopefully it quilifies as I have just finished the prototype!  The whole project is mostly off the shelf compoenents with a 3d printed enclosure, the reason I am posting this is because I built a proto board soft latch for it.  I was able to solder it directly to the pins of the ENC28J60 breakout board.  The soft latch itself draws very little power when off, and the power button is also connected to the nano so it can be used as a button when operating.

This is obviously a very simple design but, as this is only a hobby for me, I personally found it really chalanging to get working.  I am hoping that the way I implemented it into my project will get me a few votes though!

I also have a version powered only by USB, but that one doesn't have a prototype board.

Reference
I wish I could say I built and programmed this all from scratch, but naturally I started this project by looking at what others had done, of course I did have to glue it all together and programme parts, like working with the soft latch switch and using the OLED and getting over the memory constarints that caused.

Soft latch - Thanks to Dave for getting me started on this one https://www.youtube.com/watch?v=Foc9R0dC2iI
It was Embrace Racing which showed different options https://www.youtube.com/watch?v=7D9L9oS4AJM&list=PLyS6jvbGzmVKKKbBjlu4j5P7taw_RqS5o&index=3&t=761s
My latch is based on the 3rd one in his video which I beleive comes from Ian M who provided the schematic for this originally https://www.eevblog.com/forum/beginners/push-button-power-circuit-for-arduino-trying-to-modify-it-for-12v-input/

CDP Code - Kristian from ModLog was the main help with this part of the code, they have taken this further than I ever could! https://modlog.net/cdp-discorvery-with-an-arduino/

Purpose
The Nano based CDP Display is used to collect the network settings of a compatible switch, it shows you the port you are plugged into, the name of the switch, MAC address, the management IP address, the VLAN, Voice VLAN if configured and lastly the model of the switch.  This is really useful when you are trying to trace back network cables to a switch, which can be difficult in a large building or if the network cabinet is choka with cables!

Using the device
  • Simply plug in a network cable to the ethernet port on the nano ENC breakout board!
  • Hold the button for 3 seconds, the OLED display a prompt
  • Wait for DHCP discovery to complete or timeout, DHCP is not neccesary for the CDP to work
  • The display will show DHCP settings and a progress dot as it waits for the switch to send over its CDP data (usually within 60 seconds)
  • Once CDP data is received the screen will breifly show the Name, Model, MAC address and Voice VLAN
  • It will then switch to the Management IP Address of the Switch, Port Number and VLAN number
  • You can press the button to switch back between the two displays
  • You can then switch ports on the switch if you want to check another port (no need to switch off or reboot the nano)
  • Or you can switch it off by holding down the power button for 3 seconds, the OLED shows a prompt

Future Plans
  • Hoping to do custom BMS/Boost/Soft latch PCB
  • Hoping to add (back in) LLDP as well, but don't have a test switch currently and I removed it originally due to progmem contraints
  • Also want to configure the device to work in parrallel with another one so you can do simple end-to-end cable testing

Problems
  1. Battery Power doesn't currently have a physical switch so is connected to the nano even when the USB PC connector is used.  I plan to connect the USB
  2. Data and Ground to the charge board instead but I wasn't able to succesfully solder these as my 926 (and my skills) are limited. Also because of this there is a seperate charge and programming USB exposed in the prototype.
  3. The DHCP setup takes a few seconds to timeout if no DHCP server is on the port, while this is happeneing you can't switch the nano off.
  4. The button isn't attached to an interupt yet so it can only be used as part of the main loop.
  5. When powering off, the nano doesnt actually switch off after 3 seconds, it waits for 3 seconds and then you need to release the power button.



PHOTO GALLERY

Added a link to Imgur Album so I can add in more pics and vids if needed.  This has some short vids already and I plan to upload one of it working too.

First image below is of the OLED Power Up Message.
Second Image is the EasyEDA Schematic, but it also includes both sides of the proto board.
Third and fourth image are closeups before it was installed.



Showing Power On Message
Easy EDA Schematic
Component Side of Board
Solder Side of Board

0 Comments

Login or Sign Up to post comments on this project.