Category Archives: Engineering Course

Firefly PCB Board

The objective of this project is to make PCB from scratch. The Firefly boards are synchronized LED using IR sensors.

Before starting the design, my partner and I set up proper dimensional units, minimum trace, drill and pad diameters. We are very conscious about avoiding sharp turn. We tried our best to reduce the amount of vias and traces. For milling process, by following the tutorial, we milled our bottom layer without any problem. We made sure the drill bits are in the right position before milling.

Fig1: Ultiboard design of the PCB
Fig: Solderpaste Job
Fig: Potentiometer Response

Vout pin looks like a square wave with high duty cycle, and the frequency of the waveform change as we rotate the potentiometer, which is the expected behavior. 

Fig: IR sensor respnnse

We checked Trig pin output using external IR LED circuit.

At first, we get 0V for trig pin signal, but the LED still change its blinking frequency as we approach IR LED to IR transistor.

The actual result for Vout is as expected that we get a square wave with very high duty cycle, and the frequency of the square wave change as we change the potentiometer input and the IR sensor input. 

The actual result for trigger pin is at 0V at first, but after debugging, it become as expected – a saw tooth wave represent how the capacitor charge up and discharge. The trigger voltage also change as potentiometer input change and when we approach the IR LED to the 3 transistors.


Team Members: Nicholas Bilcheck, Sam Greenberg, and Hang Ha

Project Title: Nexys2 Calculator

Project Objectives:

The goal of this project is to develop a broader understanding of Verilog and the Nexys2 board to develop a functional and useful product.  The product for this project will be a calculator whose functionality is limited only by time constraints. In order to develop a calculator, knowledge on components that can be used with the Nexys2 board to make a more practical device will need to be obtained.  These additional components include but are not limited to a keypad for inputs and a LCD display for outputs. In order to power the LCD display, knowledge on how to use an arduino to supply 5 V will also be required. In addition, further knowledge of Verilog will be required to input values from separate components, use those inputs to perform calculations, and then output those results to various screens.  This knowledge will likely be obtained initially from instruction sets and other guides made by the developers of the Nexys2 board, the keypad, and the LCD. Using these guides will allow for an understanding of how integration between the modules and physical components will work. Furthermore, our goal for this project is to implement and master the modules necessary for storing and managing our data on the calculator and implementing the add, subtract, multiply and divide modules.  A significantly challenging task for this project will be displaying the values on the LCD in our calculator. In addition, attempting to take further advantage of the LCD to display operators and previous entries will be later goals that will hopefully be achieved. A successful final project will have lead our group to obtain and understand the knowledge necessary to develop a calculator for the Nexys2 board involving all the functionality previously discussed, while adding further functionality as the project progresses and always being open to improving the final project. 

Hang is in charge of the inputs. This includes the keypad and buttons on the Nexys2 board. Hang will need to implement modules to correctly receive input from the user and interpreting that information as a 4-bit number. She will then have to convert that into its decoded meanings – numbers and operations. In addition, she will have to figure out how the keypad works in terms of how to wire the keypad to the board and how to supply and read voltages to understand the outputs from the device. When she has finished that she will be assisting Nicholas with his section of the project.  Along the way, she will work on integrating the various project components together.

Sam is in charge of the computational aspect of the project. He will have to implement the different computational algorithms which include addition, subtraction, multiplication and division. Implementing these modules may be as simple as just using the operators or may involve writing individual modules to perform the operation.  At later stages of the project Sam will also need to implement these operations, possibly with possibly negative numbers and order of operations. Sam will then need to pass the stored values to Nicholas for his phase of the project.

Nicholas will be using the information sent to him from Sam’s phase of the project to display on the LCD display the information stored in the calculator. This will include the previous number, the operation, and the result. Nicholas may eventually, if time permits, need to learn how to display “scrolling” information to allow the user to read text longer than the LCD display will allow.

There are three big portions in the block diagram: The keypadToHex decoder, the processor, and the output. 

The keypadToHex decoder: this block will receive an input from a 4×4 keypad, and figure out which button was pressed using the keypadScan module.  The keypadScan module will be made up of a multiplexer and an FSM . There is also a debouncer inside this block so that inputs from the keypad function properly. The output will be a hexadecimal value that indicates which value is pressed of the inputs whether it is a decimal value, a clear function, or an operator. This block is of difficult complexity and Hang works on this module.

A delay module is used to delay the key-pressed signal so the keypad scanner and the computational module can work together.

The computing module: this block receives the hexadecimal input from the keypadToHex module. The code involves a case/if statement to navigate through different arithmetic modules and produce the result of the equation as the output. This task is very difficult and Sam works on this module.

The result from the computational module is connected to a binary to decimal converter, which divide the result into hundreds digit, tens digit, and one digits so that it can be easily displayed on either 7 segment display or LCD.

The hexToAscii module converts hex value to corresponse string value.

The storeEq module store the equation string until the equal button is pressed. At that point, the result of the equation is assigned to the equation string.  

The LCD module: this block receives inputs from the memory block to display equations and results on the LCD display. This task is very difficult as well. Hang and Nick work on this module. 

How the module will be tested: The methods of testing will mostly involve having the Nexys2 board run the module. For the keypadToHex decoder, there will be the 7-segment-display on the board show the value of the button pressed. For the arithmetic module simulations will be run as well as physically using the Nexys2 board.  For the LCD display, the only method of testing that will be used is attempting to display and change outputs on the LCD display properly.

[Research] Analysis on Smart Residential Microgrid Testbed


This program will parse all the important data in all the log file that in place in the same folder with this program into 1 single csv log file. This only parse the power data with the unit of kW. There are 3 mode: 1 (5 min data), 3 (15 min data), and 12 (hourly data).

Some of the label of the output log file is explained below:

  • Utility: The total power of the system
  • P_ab: Power from panel a and b (similar to Utility)
  • PV: Power generated from PV system
  • Demand: Power used by load in the house
  • P_unmetered: Power of loads that are not metered by the AccuRev

When run the program, it will ask for the path of the folder. Put in the full path of the log folder. Don’t use any extra character. Then when it ask for output file name don’t put in “.csv”.


Similar to powerParser in term of parsing data, this program is suitable for parsing a single or small amount of log files. Put in the “files” list all the name of log files you want to parse in the form of Python string and run the program.

III, PV_analysis.m

From ENGR 100 lab. Basically it will parse the PJMLMP, PJM Load data and PV data and generate graphs.

IV, datalog_analysis.m

This MATLAB program will plot all the power data from all channel and also generate another plot with only load power data. Besides, another output is the txt file with has maximum, minimum, mean, median of each channel.

Put all the data file in one folder to do analysis.

[ENGR251]Final Project – One Dollar Glasses Bending Tool

For final project, we focused on eye care for third world countries. A German company started an initiative known as to provide inexpensive glasses for those in impoverished areas. On-site production of these glasses is enabled by the company’s creation kit, a small bending machine that forms spring steel into a basic, round glasses frame. However, the purported price of the box is over $2500 USD, which severely limits distribution to only significantly invested or incredibly motivated entrepreneurs. 
To eliminate this significant barrier to entry, the goal of our project is to produce a more economical design for the bending machine that can recreate or emulate the style and structure of the glasses frames built by the One Dollar Glasses organization, making efficient designs and material choices to reduce the total cost of the optician’s kit and make the fabrication process more intuitive.

Figure 1: A child wearing the one dollar glasses


Figure 2: The one dollar glasses


Figure 3: The first bending tool


Figure 4: The second bending tool

To determine the efficiency of the bending box, a model of the bending machine was reverse-engineered from specifications from the training manuals on the One Dollar Glasses website.

Figure 5: The reverse engineered bending machine

With the knowledge and experience from the reverse-engineered model, some fundamental concepts for design were established for creating a more intuitive and inexpensive system.

Figure 6: Concept sketch of one of our ideas


Figure 7: Dubro EZ Wire Bender

Commercially available at $24.95, the DU-BRO E-Z Wire Bender provided the most effective design for making precise 90o bends. Because the wire is placed between two ridges in the casted die, the bend is not only secured on both sides, but is also guaranteed to bend to exactly 90o due to the angle of the ridges accounting for springback of the wire. This repeatable system of making 90o bends without guesswork or slipping makes this product the most efficient system for making wireframe glasses, reducing the occurrence of irreparable mistakes in the frame fabrication process. In line with the fundamental concepts of design for the project, the final design for the bending machine was based off of this design, with minor adjustments made for the dimensions of the ridges to match the notch lengths of the wireframe design.

Figure 8: SolidWorks design of final prototype (Dubro EZ Wire Bender)

In the end, for this project, we dis a lot of analysis and try to find out the best possible solution for this. It is unexpected that there is an existing commercialize product that perfectly solve our problem, and we glad we found it.