﻿ Digital Circuits and Systems - Circuits i Sistemes Digitals (CSD) - EETAC - UPC
 Bachelor's Degree in Telecommunications Systems and in Network Engineering

## 3. Projects: a taste of real-world applications

Skills

PLA3, PLA7 and PLA11 consist of designing an application where you have to apply knowledge acquired during the course. PLA3 and PLA7 are based on hardware design (VHDL) and PLA11 is based on μC but following adaptations of Chapter 2 on FSM and dedicated processors. These are some ideas on how to organise and (self-)assess oral presentations and written reports.

This is the expected outcome from you as cooperative groups: three files to be uploaded to Atenea task PLA3, PLA7 and PLA11 before the deadline:

• Handwritten report (scanned in pdf format).

• ZIP file containing project development and testing.

• 10 minutes group oral presentation video recording or a link to where we can watch it for assessment purposes.

### Examples ideas and projects from former CSD courses based on PLD and FPGA

VHDL project will be targeted to a Xilinx, Intel or Lattice Semiconductor CPLD or FPGA . Some projects are based on the analysis of circuits already written in CSD as tutorials. Other projects are new developments that has to be designed following the usual planning and organisation in CSD.

 N. Title Description and details 1. Programmable timer Full project development and testing of the programmable timer already available in P8. It is the analysis of the tutorial circuit. 2. 8-bit hardware series multiplier Analysis of this circuit. Dedicated processor: FSM + datapath for multiplying sequentially using only adders and data shift registers. 3. Serial data transmitter and receiver Analysis of this USART module circuit: 9200 b/s, parity odd, 1 bit stop. 4. Tachometer up to 200 km/h It is a frequency meter. How to measure the frequency of an external signals using a dedicated processor? The pulsed input will be generated by means of an inductive sensor connected to the car. Speed computation from the measured frequency of pulses. This is an similar problem solved using classic chips  (1) - (2). Hall effect sensors. 5. Bicycle taillights LED sequencer This project is like the Johnson Counter in but in VHDL. FSM controlled by an ST/SP button click to begin the sequence generation. A Datapath  includes basically shift registers. Clicking again the same ST/SP button the sequence stops when it finishes. 6. HH:MM:SS real-time clock Study the tutorial P8 and attach to it Hours_Counter tutorial in P7 to be able to enhance the counter up to a modulo 86400. What buttons are required to set time? 7. A stepper motor controller This project, in its first design phase, is practically a FSM similar to the ones developed in P6. This is a sample circuit proposed by J. C. Arco (download, unzip the file and visualise it as a web page). 8. LED dimmer The idea behind a LED dimmer or a DC motor speed controller is the PWM generation. Here there is an example in Arduino to figure out how it works. In this case, the PWM generator must be organised as a dedicated processor. For instance, imagine how an 8-bit vector input can program up to 256 different PWM values. 9. TV remote control. PWM generator Similar to the PWM generator from the LED dimmer. For instance, this encoder circuit 16key_matrix_encoder_reg may be used as input to generate 16 different duty-cycle rectangular waves. This is an initial sketch idea: a FSM will control a datapath (programmable counter) to set the duty cycle of a fixed frequency signal (for instance 1 kHz). Another source for studying how a PWM works is the TMR2-PWM peripheral in PIC18F µC. What about the receiver end? How to demodulate 16 binary values from an incoming PWM waveform? 10. 8-bit I/O port expander with SPI bus  serial interface How to design a chip like  MAX7301 or MCP23S17? These are peripheral subsystems or a dedicated processors that can be conceived using the architecture of an advanced digital circuit presented in P8. Study the commercial chip features, and try to order them so that it becomes possible to conceive such chip by means of several design steps. 11. 8-bit I/O expander with I2C bus serial interface How to design a chip like MCF8574, MAX7300 or MCP23017? These are peripheral subsystems or a dedicated processors that can be conceived using the architecture of an advanced digital circuit presented in P8. Study the commercial chip features, and try to order them so that it becomes possible to conceive such chip by means of several design steps.

### Examples ideas and projects from former CSD courses based on microcontrollers

µC projects will be based on PIC18F family, Arduino or  Raspberry Pi. Some projects are analysis of circuits already designed in CSD following our organisation: specify, plan, develop and test. Other project are new ideas or applications to be yet specified and planned. Some projects from this list may be also used as initial ideas for your degree final dissertation.

Other materials of interest

A few links on FSM that naturally can be implemented in hardware (VHDL -PLD) or in software (μC): (1) on traffic light controllers; (2) academic; (3) sequence recogniser and vending machines; (4) an excellent table of content and web page of resources (5); (6) academic; (7) a robot that avoid obstacles; (8) hobby robotics; (9) theory from AMD; (10) a complete book; (11) All about circuits FSM & μC (12) Software based FSM using μC (ARM paper); (13) A nuclear reactor shutdown system; (14) stepper motors; (15) Control for mobile robots; etc. etc.

This is a list of very interesting teaching experiments and projects based on platform Digital Systems Development Board (DSDB) also compatible with ELVIS III from National Instruments. A typical FPGA board populated with a Xilinx device. It can be programmed with VIVADO EDA tools.

Research papers

This is an example of a reseach paper in the area of microcontrollers and peripherals on the topic of low power consumption, leaded by prof. Ferran Reverter of the dept. of Electronic Engineering

Reverter, F., "Toward Non-CPU Activity in Low-Power MCU-Based Measurement Systems", IEEE Transactions on Instrumentation and Measurement ( Volume: 69 , Issue: 1 , Jan. 2020 ). DOI: 10.1109/TIM.2019.2953374.

Abstract: This article evaluates the benefits of having peripheral-triggered peripherals in a microcontroller unit (MCU) intended for low-power sensor applications. In such an architecture, the functionality is moved from the central processing unit (CPU) to the peripherals so that a peripheral is able to trigger another peripheral with non-CPU intervention. For the sensor data logging application under study, both energy consumption and measuring time are reduced by a factor of 2 with respect to the case of applying an interrupt-based approach that requires the CPU intervention.

Bachelor dissertations

A pair of bachelor thesis (TFG) on the subject:

- Gómez Blázquez, A., "Autonomous low-power wireless sensor for a remote weather monitoring station", 2016. To examine the project documentation, download and unzip these two files: 1, 2.

 Fig 5. Weather station representation and its final prototype.

- García Moreno, A. "Autonomous low-power wireless sensor for greenhouse irrigation, 2016. To examine the project documentation download and unzip these two files: 1, 2.

 Fig 6. Greenhouse irrigation system block diagram.

 Remarks on projects in engineering context: Students design solutions for a problem for which there is no single answer. The problem may require students working in cooperative groups to design a combination of plans, schematics, models, diagrams, simulations, source files and presentations. Going through the design process (specify, plan, develop and test) will require students to constantly adjust and modify their solutions to meet criteria. While designing a solution, it will be important to recognise that the idea of failure in engineering is a sign of growth in the cognitive process. Therefore, students may not get a viable solution on the first try or within the provided time constraints. In that case, the instructor can encourage them to reflect on their solution to identify what they have learned and look back to identify and correct design errors.