CE433 s2025 Course Project Updates

The VBP104S/SR photodiode does not output signals. I spent a few hours on it but was not able to figure things out. This is not a very popular photiode and there is very limited resources and examples online.
Let's switch to a visible photodiode that I have in my lab and use flash light pulses to create voltage output from the amplifier PCB board.

Here is the new hardware connection that you need to complete at the beginning of the lab. If you haven't soldered the PCB yet, please go ahead and get that done first.
You can test your PCB using a flash light. Probe Vout and you should see pulses on the oscilloscope.




JB1 - 3 are used as sck, ss, and mosi respectfully.



The FPGA board is now used as the leader transmitter, it outputs voltages to the 5V logic Arduino so no level shifter is needed in this circuit.

On the Arduino board, Pin 13 is mosi, Pin 12 is ss, and Pin 2 is sck.

Pin 11 is used as a testing pin in your C code. This is a very handy technique to debug your circuit. If you are taking my MCU class in the fall, you will use this technique quite often.

This is how Pin 11 creates a pulse to indicate that this piece of code is executed.



The complete Arduino code.

Here is the observation. The mosi line comes from the FPGA. I wrote a constant value 8'b00001111 to the mosi output from the FPGA for debugging purposes.



In the SPI_leader_transmitter.v code, at the negedge of the sck, ss is pulled down to 0 at the same time to enable the follower device. From the observation above, at the left handside of the label '1'. The falling edge of sck, mosi, and ss almost happened at the same time. Waiting for a half sck cycle to sample the data on the mosi line at the rising edge of the sck clock will be perfect (the yellow cursor labeled '1' or 'a' samples a '0' from mosi). The 'a' cursor samples a 0 from mosi, and this 0 is the MSB of the byte '8'b00001111' sent through the FPGA.

After sck rising edge No. 1, you can count to 8 sampled bits by Arduino and the 8th rising edge is right before the 'ss' enable line got pulled up to disable the transmission. This signals the completion of transmission of 1 entire byte.

The Testing pin is pulled up and down at the correct time points which indicates that the Arduino code is executed as expected.

Observing the output from the FPGA should be the first step of this project since we need to know that the SPI leader transmitter module is functioning before moving on.

I connected the entire circuit to Arduino and looked at the output to the Serial monitor. I received '15' constantly there so this is a great news.(8'b00001111).

Here is how I output a constant data to mosi.



Code for the top module main.v
The constraint file.

Switch it back to the commented one above will deliver ADC outputs to mosi.

Here is the demo video.






--------------------------------------------
Final deliverables and rubric

Task 2, 3, and 4.

Task 2:
Soler the PCB, oscilloscope shows voltage outputs (25 points)

Task 3:
XADC outputs constant data (8'b00001111) to an oscilloscope. (25 points)

Task 4:
The PCB and the XADC work together. Signal outputs to an Arduino IDE in the Serial plotter. Upload the report to Canvas. (25 points)