324 10. SYSTEM LEVEL DESIGN
• Proportional speed control with bi-directional motor control. Both of these advanced features
may be provided by driving the H-bridge circuit with PWM signals. This modiﬁcation is
given as an assignment at the end of the chapter.
10.2 WEATHER STATION
In this project, we design a weather station to sense wind direction and ambient temperature.
The sensed values will be displayed on a liquid crystal display (LCD) in Fahrenheit degrees. The
wind direction will also be displayed on LEDs arranged in a circular pattern. The wind direction
and temperature will also be transmitted serially from the microcontroller to an MMC/SD ﬂash
memory card for data logging.
The requirements for this system include:
• Design a weather station to sense wind direction and ambient temperature.
• Sensed wind direction and temperature should be displayed on an LCD.
• Sensed temperature should be displayed in the Fahrenheit temperature scale.
• Wind direction should be displayed on LEDs arranged in a circular pattern.
• Wind direction and temperature should also be transmitted serially from the microcontroller
to an MMC/SD card for storage.
10.2.2 STRUCTURE CHART
To begin, the design process, a structure chart is used to partition the system into deﬁnable pieces.
We employ a top-down design/bottom-up implementation approach. The structure chart for the
weather station is provided in Figure 10.6. The three main microcontroller subsystems needed for
this project are the UART for serial communication, the ADC12 system to convert the analog
voltage from the LM34 temperature sensor and weather vane into digital signals, and the wind
direction display. This display consists of a 74HCT154, 4-to-16 decoder and 16 individual LEDs
to display wind direction. The HCT series of digital logic is chosen because it may be operated at
3.3 VDC. The system is partitioned until the lowest level of the structure chart contains “doable”
pieces of hardware components or software functions. Data ﬂow is shown on the structure chart as
10.2.3 CIRCUIT DIAGRAM
The circuit diagram for the weather station is provided in Figure 10.7.The weather station is equipped
with two input sensors: the LM34 to measure temperature and the weather vane to measure wind