UPC EETAC Bachelor's Degree in Telecommunications Systems and in Network Engineering EEL

Chapter 1 problems

- D1.1 -

Wind vane

Products

 

D1.2


1. Specifications

We want to design a digital wind direction meter (Wind_compass) or wind vane as shown in Fig. 1, based on a 16-position optoelectronic rotary encoder.

The same project B3.1 is proposed in Chapter 3 for learning the basics of μC software organisation and basic digital I/O.

To promote class and cooperative group discussions, we can plan the project in several ways, as represented in our CSD design flowchart. Each plan means a different project and circuit realisation that is useful for comparing solutions.

Symbol

Fig. 1. Circuit symbol and its realisation in Proteus Wind_compass.pdsprj for better comprehending how does it work.

Fig. 2 represents the wind compass subdivided in 16 directions each of which is assigned to a 4-bit Gray code.

Wind directions

Fig. 2. Wind compass describing the sixteen principal bearings used to measure wind direction and an example of commercial manufactured wind transducer.

Fig. 3 represents the sensor disk coded in Gray, which is used instead of binary radix-2 code to prevent spurious outputs from electromechanical switches. The objective is to develop the VHDL code and the final circuit to be synthesised into a target complex programmable device (CPLD) or a field programmable gate array (FPGA) chip.

Gray pattern and trnasducer details

Fig. 3. Gray code error reduction with encoders (ref.) Adjacent codes differentiate themselves by only one bit which makes this coding style very convenient for a rotating wheel.

Sensor

Fig. 4. Sensor codes assigning for instance the code "0000" to the NNW direction.

Write the truth table of the wind_compass. The inputs have to be ordered in this way: E, D(3..0).

Truth table

Fig. 5.Wind compass circuit and truth table.

Draw an example timing diagram showing the input stimulus and output responses. Assuming that Min_Pulse = 3.56 ms, how long does it take to simulate all the circuit specifications?


CPLD or FPGA target chip options:

 option #1.: MAX II

 option #2.: MAX 10

 option #3.: Cyclone IV

 

Planning

Plan A: structural circuit based on logic gates and equations in a single VHDL file. We have many strategies, for instance:

option #1:  use Minilog to obtain PoS.

Project location:

 C:\CSD\P2\wind_compass_PoS\(files)


option #2: use Minilog to obtain SoP.

Project location:

 C:\CSD\P2\wind_compass_SoP\(files)

 


Plan B: Behavioural flat design with a single VHDL file, using high-level description of the specifications.

Draw a schematic or a flowchart to translate the Wind_compass truth table to VHDL, representing the required signals to interface the truth table artefact.

Project location:

 C:\CSD\P2\wind_compass\planB\(files)

 


Plan C2: Structural hierarchical design with multiple VHDL files, building the project using an architecture consisting of components and signals.

Fig. 6 shows an example of an internal electronic schematic for the Wind_compass when plan C2 is used. It is available for experimentation "Wind_compass.pdsprj". The output of Chip1 (Gray_bin_converter) is connected to both Chip2, a 1-digit 7-segment decoder (HEX_7seg_decoder), and Chip 3, a 16-bit decoder (Dec_4_16) with one-hot output to light a wheel of 16 LED to display the wind direction.

Ciircuit plan C2

Fig. 6. Internal design for the project wind_compass based on plan C2. The picture shows the Gray code "1101" that is "1001" in binary radix-2 representing the wind direction South-East "SE". In the way it is connected, the code "0000" corresponds to the direction "NNW", and it advances counter-clockwise up to the code "1111"which is the direction "N".

Run the Proteus simulator of the circuit in Fig. 6. Print the screen results when you input the Gray code "0101" and explain how it works.

Fig. 7 shows the Chip1 truth table. Realise how the 16 input combinations do not have to be ordered necessarily in binary radix-2. 

Truth table

Fig. 7. Chip1 Gray_bin_converter truth table to be written to Minilog for extracting its equations.

Project location:

 C:\CSD\P2\wind_compass\planC2\(files)

 


After having studied P4 tutorials, additional questions can be added to our report. For instance: