HANcoder/Training Material/AutomaticLightControlSystem/7

From OpenMBD
Jump to: navigation, search

<<<Go back to part 6


LED Control System Part 7

Part 7: Creating a control system

Modern cars are often equipped with various comfort increasing features. One of these features is the automatic engagement of the lights when it turns dark. On the sensor shield, you’ll find an LDR sensor next tot he potentiometer. This sensor sends out an analog signal that is dependent on the amount of light that’s being picked up by the light sensor.

Use HANtune to read the LDR sensor value and determine at which sensor value you'd want the lights to turn on. Use the knowledge that you’ve gained during the past parts of the tutorial to make the model of the light control system in Simulink. Don’t hesitate to look back at the previous chapters.

Tip: The following function blocks can come to good use and are all available in the Library Browser under Simulink => Commonly Used Blocks.

P1figure24.PNG

Figure 24 Relational Operator Block


P1figure25.PNG

Figure 25 Switch Block


P1figure26.PNG

Figure 26 Constant Block


<<<Go back to part 6