Close

Phase4# Building Hardware

A project log for Optical Power Meter (with SFP and DDM protocol)

DIY Optical Power Meter with SFP (Small Form-factor Pluggable transceiver) and DDM (Digital diagnostics monitoring ) protocol

oakkar7oakkar7 05/01/2017 at 05:590 Comments

Next part is to build working prototype. I choose Arduino Pro Mini for some reasons, its compact and cheap, more IO than normal UNO board. And it can be run with 3.3V and not need level shifter for SFP interface.

There are some limitations in Arduino Pro Mini. I realize that pin count is not enough for my requirements. I need 6 x GPIO pins for 6 push button switches. After using 10 pins for SFP and 5 Pins for LCD, 3 pins for LEDs, there is not much pins left for switches.

1) issues and workarround

Analog pin 6 and 7 are analog only input pins. Problem is these two pins not work reading as digital IO. After using mu GFu, someone shows the trick to use analog only pins as digital I/O. Here is code snip.

EN_sw = analogRead(A7) > 256 ? 0 : 1;

2) UART debug

For debugging and future extension such as PC or phone application interfacing, I added debug function in lib.

3) Menu

There are 6 Switches and main menu + sub-menu system in system.

Key functions are as follows.

TX ENABLE/DISABLE UP Function
CLEAR DOWN SET

4) Schematic

Splash Welcome page, CAN I HAZ POWER

About Page

Main Menu

And RX/TX power, TX enable, TX status and Alarm

Discussions