文档库 最新最全的文档下载
当前位置:文档库 › 模拟路灯控制系统英文资料

模拟路灯控制系统英文资料

模拟路灯控制系统英文资料
模拟路灯控制系统英文资料

LED Lighting Control using the MC9S08AW60 Designer Reference Manual

To provide the most up-to-date information, the revision of our documents on the World Wide Web is the most current. Your printed copy may be an earlier revision. To verify you have the latest information available,

The following revision history table summarizes changes contained in this document. For your convenience, the page number designators have been

linked to the appropriate location.

Revision History

Chapter 1

Introduction

1.1 Introduction

This manual describes a reference design of a multi-color LED lighting control solution by using the

MC9S08AW60 Microcontroller.

Using a microcontroller (MCU) to control the red/green/blue (RGB) color LEDs increases system flexibility and functionality for the next generation of lighting applications, architectural/entertainment lighting or LCD backlighting, that require a smart and adaptive control methodology to ensure optimized color space rendering for various display contents, excellent color contrast for realistic display scene and a consistent color setting in manufacturing. In many cases, these new applications

are controlled by a central control unit that requires a connectivity interface that can be implemented at a low cost using MCU-based lighting controller.

A compact light-box with more than a million display colors is implemented to demonstrate the advantages of using MCU to control RG

B color LEDs with different luminosity settings. The average current through each color LED is controlled by an individual PWM signal generated from MCU and the LED luminosity is almost in

linear relationship with the pulse width of the driving PWM signal. The final display color is determined on the mix of light emitted by RGB LEDs, so one of the simple methods to set the light source in different color is changing the RGB PWM duty cycles equal to the corresponding mixing ratio required for a particular color. In addition, a serial control protocol with user interface is also developed as a communication link to control and monitor system parameters through a personal computer.

All hardware schematic diagrams and firmware source codes are available as reference materials.

1.2 Features

?Apply for architectural/entertainment lighting or LCD backlighting applications ?Exceptional color mixing

?Pre-set or dynamic RGB colors

?High resolution on dimming control

?Automatic white balance tracking on dimming

?Flexible connectivity interface

?User friendly control menu

1.3 MC9S08AW60

The MC9S08AW60, MC9S08AW48, MC9S08AW32, and MC9S08AW16 are members of the low-cost, high-performance HCS08 family of 8-bit microcontroller units (MCUs). All MCUs in the family use the enhanced HCS08 core and are available with a variety of modules, memory sizes, memory types, and package types. Refer to Table 1-1 for memory sizes and package types.

Table 1-2 summarizes the peripheral availability per package type for the devices available in the

MC9S08AW60/48/32/16 series.

Chapter 2

Hardware Description

2.1 Introduction

The system consists of a MCU control board and a LED driving board. The MCU control board, DEMO9S08AW60LED, is one of the demonstration boards for the Freescale MC9S08AW60. This board allows easier developmet of code for LED control applications, architectural/entertainment lighting or LCD backlighting. The

on-board serial interface allows you to control and monitor the system status via the RS232 serial port connection. The separated LED light-box with driving circuitries is also available as a whole demo kit to demonstrate how to do the color mixing and see the visual effects on changing different type of parameter settings.

2.2 DEMO9S08AW60LED Features

?MC9S08AW60 CPU

–44 pin LQFP package

–20 MHz Internal Bus Frequency

–60 Kbytes of on-chip in-circuit programmable FLASH

– 2 Kbytes of on-chip RAM

–8-channel, 10-bit analog-to-digital converter

–Two SCI modules

–SPI module

–I2C module

–6-pin keyboard interrupt (KBI) module

–34 general-purpose input/output (I/O) pins

?External power jack for DC power supply (+12 VDC)

?Four pushbutton user switches

?Four LEDs connected to I/O port

?Master reset switch

?RGB PWM output port

?Optical sensor input port

?On-board RS-232 serial port

?100mm x 80mm board size

2.3 DEMO9S08AW60LED Layout

Figure 2-2. DEMO9S08AW60LED Top Side

2.4 Development Support

Application development and debug for the MC9S08AW60 is supported through a 6-pin BDM header

(CON8). The pinout is as follows:

Table 2-1. BDM Connector (CON8) Pinout

2.5 Power

The DEMO9S08AW60LED is powered externally through the barrel connector CON2. This connector is a 2.5 mm, center positive connector. Voltage supplied through this connector should be positive 12 volts DC. This is also the supply voltage for the LED light box.

The DEMO9S08AW60LED can be run with V DD set to 5 or 3 volts. To run the board at 3V, move jumper

LED D5 turns green to let you know that power has been correctly applied to the board.

2.6 Reset Switch

The reset switch (SW5) provides a way to apply a reset to the MCU. The reset switch is connected directly to the RESET signal of the MCU. A 10 k Ω pullup resistor to V DD on the RESET signal a operation. When the reset switch is pressed, the RESET signal is grounded and the MCU recognizes a reset llows for normal

2.7 Clock Source

An on-board 16 MHz crystal (X1) is connected between the XTAL and EXTAL pins of the MCU. This offers flexibility on clock source selection. Refer to the MC9S08AW60 data sheet for details on how to use the internal clock generation (ICG) module to generate the system clocks for the MCU

2.8 RS-232

An RS-232 translator provides RS-232 communication on COM connector P2. This connector is a 9-pin Dsub right angle connector. TXD and RXD signals are routed from the MCU to the RS-232 transceiver

2.9 User Options

The DEMO9S08AW60LED includes various input and output devices to assist in application development. These devices include four pushbutton switches, four LEDs, and an operational amplifier with RC filter connected at each

ADC input channel for signal amplification and filtering

2.9.1 Pushbutton Switches

Four pushbutton switches provide momentary active low input for user applications.

The table below describes the pushbutton switch connections.

2.9.2 LED Indicators

Four green LED indicators (D1-D4) are provided to assist during code development. The LEDs are active low and illuminated when a logic low signal is driven from the MCU port pin. Two of the LEDs are connected to port A, and the other two are connected to Port C. The connections are described below:

Table 2-4. LEDs (D1-D4) Connections

2.9.3 ADC Interface

Eight operational amplifiers are provided to assist users in developing applications with feedback control signals. For examples, the signal generated by an optical sensor in LED backlight system should be scaled to a level matched with the ADC input range without any saturation. Each operational amplifier can be configured as an inverting or non-inverting amplifier with variable gain setting by different resistor connections. A RC filter is also connected at each output for noise filtering

2.9.4 Other I/O Connectors

One user assignable and eight pre-defined I/O connectors are available to help users connect the board into their target system.

sensor interfaces can be used for sensor input

2.10 LED Driving Board

In general, LEDs have a nonlinear I-V behavior and current limitation is required to prevent the power dissipation to exceed a maximum limit. Therefore, the ideal source for LED driving is a constant current source. A linear type LED driver is used in this reference design and the block diagram is shown in Figure 2-4. The major advantage of linear driver is fast turn ON and OFF response times to support high frequency PWM dimming method and wide range control on dimming level. An integrated DC-to-DC boost converter (MC34063) generates the high voltage required for LED driving in series and is shared with RGB channels, but the drawback is the power loss on R channel is higher than G or B channels. Individual DC-to-DC block should be used for each channel in power sensitive applications

Eight pieces of 3-in-1 RGB LED chips connected in series are used to form the multi-color light source. The LED chips are arranged in 2 x 4 format and each RGB LED string is driven by a separated constant current source. The average current through each RGB LED is controlled by an individual PWM signal generated from MCU. The final output color is determined by the mix of light emitted by RGB LEDs that are almost in linear relationship with PWM pulse width. An optical diffuser film should be placed on top of the display window for color mixing and brightness uniformity enhancement

2.11 LED Driver Design Procedures

This section presents guidelines for selecting external components for DC-to-DC boost converter and linear drivers.

2.11.1 RGB LED Chip

The system is designed to drive eight pieces of RGB LED chips connected in a series. Assume the LED current for each color is 50mA and forward voltage is 2.3V for red LED and 3.3V for green and blue LEDs

2.11.2 Current Sense Resistor

The value of the current sense resistor R S is determined by two factors: power dissipation on R S and the reference level V REF for operational amplifier non-inverting input. Smaller R S reduces power dissipation, but the detection o f a feedback signal in operational amplifier is more difficult

The voltage V RS across the current sense resistor R S is directly proportional to the current I LED through LED. In closed-loop condition, V RS is equal to the reference level V REF, so the LED current I LED is equal to the reference voltage V REF divided by the current sense resistor R S.

Setting V REF to 1V and R S equals 20Ω, the LED current I LED is equal to 50mA

Power dissipation on R S is around 50mW, I2R = (50mA)2 × 20Ω, which is reasonable

compared to total LED power

2.11.3 Boost Converter

The switching regulator MC34063 from On Semiconductor is a monolithic circuit containing the primary functions required for DC-to-DC converters. It can be incorporated in boost converter application with minimum number of external components.

Boost Converter Calculations

Output voltage V OUT > (V LED x 8) + V RS + V DROP (set maximum linear drop to 2 V) Output current Iout > 50 mA x 3

Set V in = 12 V, V out = 30 V, and I out = 175 mA

Refer to equations in Figure 2-4 to calculate the values for inductor and other external components

V sat = Saturation voltage of the output switch

V F = Forward voltage drop of the output rectifier

V in - Nominal input voltage.

V out - Desired output voltage

I out - Desired output current.

f min - Minimum desired output switchin

g frequency

V ripple(pp) - Desired peak-to-peak output ripple voltage

For further information, refer to On Semiconducto r’s datasheet

Chapter 3

Firmware Description

3.1 Introduction

The MCU firmware in this LED lighting control design is responsible for: ?Controlling timer channels for the RGB LED color PWM output

?Communicating with the host PC for receiving command and data input/output ?Operating as a standalone LED box through on board buttons

Figure 3-1 and Figure 3-2 shows the firmware flow. The LED box can operate in PC control operation mode or standalone operation mode

3.2 PC Control Mode

Every time the MCU is powered up, the firmware detects the status of SW1. The

LED lighting control box is operated in PC control mode if SW1 is not being pressed.

In this mode, you control the LED output through the host PC. The MCU uses the serial communication interface (SCI) module to communicate to the COM port of

the host PC.

After entering this mode, the MCU sends out a number of string characters to the PC COM port. These strings are the contents of the user interface menu displayed

in the PC screen. This user interface menu guides you on how to control the LED box by different function keys. The MCU also sends out existing PWM control parameters to the host for display. For examples, parameters such as existing RGB PWM output values, white balance mode, and PWM frequency are displayed. Figure 3-3 shows the PC screen for the user control menu.

When the MCU receives a control command or PWM input data from the PC, the firmware interprets the information to take the corresponding actions. It may update the output PWM values in next PWM duty or delivery of the corresponding LED control parameter back to the PC. Three timer channels in the timer 1 module are configured to edge-aligned PWM operation mode. This generates the PWM signals for the RGB color channels.

By the proper control of the RGB channel PWM, the LED box can provide different lighting effects.

If you select the white balance mode to AUTO, the LED output gives a white color output. The firmware retains control of the RGB PWM ratio based on the preset white color. You can adjust the output brightness by pressing the + or ?key in the host PC keyboard. Alternatively, you can input a green channel PWM value and the

firmware calculates the blue and red PWM values to give the resultant intensity.

A demonstration display feature is available. After enabling this feature, the firmware adjusts RG

B PWM

so the light box switches among different preset colors, delivery fade in and fade out lighting effects, etc.

You can also set the PWM to different frequencies. At a lower PWM frequency, such as 30 Hz, the flicking phenomenon is more noticeable. This phenomenon can be minimized or removed by setting the PWM frequency to a higher value.

There are examples at the end of this section showing how to control the LED box through the host PC

3.3 Standalone Mode

When the LED box is powered up with SW1 being pressed, it enters standalone mode. When compared to the PC control mode, this standalone mode can act as a quick and simple demo that does not require a host PC. The control of the LED light box can be done through the onboard buttons. However, the PC control mode can have more control on the PWM output

The functions of the

buttons are as follows:

?SW6 (IRQ): Demonstration Display Enable/Disable

If SW6 is pressed, the LED box enters the demonstration display state where

certain preset colors display sequentially with some other lighting effects.

The demonstration mode can be exit by pressing SW6 again.

?SW1: Preset Colors Toggle

Whenever SW1 has been pressed and released, the LED box toggles to

another preset color. The

LED1 lights up while LED2 turns off.

?SW2: Auto White Balance Control

If SW2 has been pressed, the LED box turns to auto white balance state and

give a white color. The small on board LED2 lights up while LED1 turns off,

indicating an auto white balance state. There are two preset white color with

different color temperatures available for selection. To swap between

different preset color temperatures, press the SW2 button once more. The

auto white balance state can be turn off by pressing SW1.

?SW3: Decrease Brightness

The output brightness increases if SW3 has been pressed.

?SW4: Increase Brightness

The output brightness decreases if SW4 has been pressed.

?SW1+SW2: PWM Frequency Selection

The Output PWM Frequency can be changed with following steps:

1. Press and hold SW1

2. Press SW2

3. Release SW2

4. Release SW1

After performing the above action, the output PWM frequency can be

changed. There are three preset settings available, 30 Hz, 120 Hz, and 600

Hz. For examples, after changing from 30 Hz to

120 Hz using above steps, it can set the PWM to 600 Hz by applying the

above steps again.

NOTE utput brightness is changed after changing the frequency. As

the PWM output values remain the same, a change in PWM frequency

modifies the PWM duty as well.

The PWM frequency selection steps above are invalid if the LED box is running at demonstration display state. In addition, the PWM frequency is changed to the default value of 120 Hz after the demonstration display state has been exited by pressing SW6

3.4 Firmware Files

Below is a list of the C files in the firmware

Main.c

?Programs entry point and determination of operation mode, i.e. PC control mode or standalone operation mode

?System initialization

?Common functions used in different firmware modules

Menu.c

?Takes care of high level user interface communication with the PC host.

?Interprets the received PC commands or data and initiate the corresponding action. The user interface menu contents can be modified or edited in this file SCI.c

?Takes care of low level SCI hardware for communication between the PC. Functions that accessing the SCI registers are included in this

file.

?String management for input and output functions used in the Menu.c

ISR.c

?Interrupt services routines for different hardware modules

?Timer 1 is used for the PWM channels for the three RGB output color

?Timer 2 is used for generating a periodical interrupt that used in the

demonstration display feature

?IRQ interrupts for enabling or disabling of demonstration display in the

standalone operation mode.

?KBI interrupts for on board buttons detection

?Functions for generating certain display effects are included in this file Keyinput.c

?For operation of standalone mode without the host PC

Chapter 4

Demo Setup

4.1 Introduction

This section shows how to connect the DEMO9S08AW60LED board to your PC, run the demo program, and how to program the board with the source code. The source code can be download from the Freescale website.

4.2 Hardware and Software Setup

The DEMO9S08AW60LED is shipped with the demo program stored in on-chip flash memory. Use Figure 2-2 as a guide to do the setup

4.2.1 Hardware Setup

1. Check the jumper setting and make sure jumper JP1 on DEMO9S08AW60LED

board is set to the 5V (2-3) position.

2. Connect the 2x5 pin ribbon flat cable at LED light box to connector CON3 on

DEMO9S08AW60LED board.

3. Connect a serial cable to the PC or notebook and then to the

DEMO9S08AW60LED board.

4. Power up the demo through the DC jack connector CON1 on

DEMO9S08AW60LED board. The supply voltage is 12V DC and LED D5

should be on.

5. Press SW5 to reset the MCU. The LED light box demo enters PC control

mode. (Make sure SW1 is not pressed during reset.)

4.2.2 PC Software Setup

1. Open up a terminal window from within Windows XP by clicking on Start →All

Programs →

Accessories →Communications →HyperTerminal

2. Give your terminal connection a name (such as AW60_Control) and click the

OK button.

3. In the Connect using pulldown, select the COM port you connected your

serial cable to, and click the OK button.

4. In the Port Settings window, click the OK button after entering

the following settings: Bits per second: 9600

Data bits: 8

Parity: None

Stop bits: 1

Flow control: None

5. Make sure Echo typed characters locally is NOT selected under the ASCII

Setup pop-up menu, see Figure 4-1.

6. After configuring HyperTerminal, the LED Control Menu screen appears as

shown in Figure 4-2

4.3 Demo Examples

Several examples are given here on showing how to use the LED box under the PC control.

4.3.1 Demo 1 - Demonstration Display

1. Press the reset button SW5 on DEMO9S08AW60LED board. The LED

control menu screen appears (Figure 4-2).

2. Press letter D in the PC keyboard to enter demonstration display operation.

3. In this display state, the LED light box switches among different colors

automatically and delivers other lighting effects.

4.3.2 Demo 2 - Preset Colors Display

1. Press the tab key in the PC keyboard.

2. The output is switched to another preset color after the tab key has been

pressed each time

4.3.3 Demo 3 - Auto White Balance Control

1. Press F until PWM frequency is set to 120 Hz.

2. Press W to toggle to AUTO white balance control.

3. Type 2000 at line of input green. The green PWM output value should then

show 2000.

4. The red and blue PWM values are adjusted automatically to keep the output

at the existing color temperature.

4.3.4 Demo 4 - PWM Output Frequenc Control

1. Press W to toggle the output to AUTO mode.

2. Pressing F can switch the PWM output among different preset frequencies.

3. The flicking phenomenon is more significant at the lower frequency such as

at 30 Hz. The flicking can be removed by setting PWM to higher frequencies.

4.3.5 Demo 5 - Full Manual Control

1. Press F until PWM frequency change to 120Hz

2. Press W to toggle the output to MANUAL mode.

3. Press R to switch to manual red channel input.

4. Type 2000 at the Input red line.

5. Press G to switch to manual green channel input.

6. Type 0000 at the Input green line.

7. Press B to switch to manual blue channel input.

8. Type 2000 at the input blue line.

9. The output color is purple. You can repeat the steps with different PWM

values for different output colors and intensities.

4.4 Program the MCU Flash

The DEMO9S08AW60LED board allows you to program the MCU flash and debug

applications via the

BDM connection.

1. Download the source code file from Freescale web site, save it to your PC,

and extract the files to a working directory on your machine.

2. Open CodeWarrior HC(S)08 v5.1 and open the LED_box.mcp project file.

3. Open main.c in the sources folder by clicking the plus sign next to the

sources folder and then double clicking on main.c. This is the application

code.

4. Connect the BDM cable from your development tools to the

DEMO9S08AW60LED board (CON8).

5. Connect a serial cable to the PC and then to the DEMO9S08AW60LED board.

6. Power up the demo through the DC jack connector CON1 on

DEMO9S08AW60LED board.

7. Open up a terminal window from within Windows XP by clicking on Start →All

Programs →

Accessories →Communications →HyperTerminal

8. Give your terminal connection a name (such as AW60_Control) and click the

OK button.

9. In the Connect using pulldown, select the COM port you connected your

serial cable to, and click the OK button.

10. In the Port Settings window, click the OK button after entering

the following settings: Bits per second: 9600

Data bits: 8

Parity: None

Stop bits: 1

Flow control: None.

11.In the Freescale CodeWarrior window, click on Debug under Project in the

menu bar or press F5.

The True-Time Simulator and Real-Time Debugger interface window appears.

12. When the ICD Connection Assistant appears, click the Connect button.

13. When the Erase and Program Flash window appears, click the yes button.

14. The CPROGHCS08 Programmer window should close after the MCU flash

is programmed. To run the source code, click on Start/Continue under Run in the

menu bar or click the green arrow

4.5 Troubleshooting

1. V DD LED does not turn on

Make sure jumper JP1 is set to the 5V (2-3) position.

2. The light box does not display any color

Make sure the 2x5 pin ribbon flat cable at LED light box is installed properly to the

DEMO9S08AW60LED board. Repeat the PC software setup procedures

again

3. Control menu contents are not correct

Make sure the COM port selection is correct.

Check the Port Settings again and make sure the configurations are correct.

4. User input does not be detected correctly

Make sure the HyperTerminal Window is being selected all the time.

When typing HEX PWM input values, use ONLY CAPITAL letter for the input

of A–F.

Use the + or ?keys from the main keyboard area instead of those near the

NUM lock key pad.

模拟路灯控制系统的毕业论文

模拟路灯控制系统的毕业论文

————————————————————————————————作者:————————————————————————————————日期:

中文摘要 本作品是具有自动化程度高、运行可靠、使用维护方便的照明控制系统,为城市路灯现代化提供了一些参考方案。系统采用STC单片机为核心的最小系统板,设计了模拟路灯控制系统。控制系统采用定时器设定时钟功能,设定、显示开关灯时间;用了基于555为核心的红外传感器检测物体的定位。路灯单元控制系统采用恒流源供电,具有输出功率调整功能,并能定时调整功率。阐述了基于单片机模拟路灯控制系统实现的设计思想、方法及过程。该模拟控制系统,能有效的节约能源,减少照灯具的损耗。 城市亮化随之被政府所重视,既而大量的资金投入进行建设和改造中去,使得我们的城市夜晚变得灯火辉煌,绚丽多彩,但同时,诸多问题也随之而来:能耗的逐年攀升,产生的某些问题亦逐渐显露出来,如城市路灯的维护量增大,带来人员不足的问题,使得路灯故障时不能得到及时的修复以致造成人民生活的不便;维护费用也随之增加,社会成本过高,电费支出过多,财政承担相对困难,给政府带来了相对大的压力;光污染现象严重……这些问题的产生无疑给当地的路灯管理部门的各方面工作带来很大的压力,因此他们迫切的想解决此问题,故针对这种情况我们设计并制作了这一节能智能型的模拟路灯控制系统,其主要价值在于能更好的节能与监测,在很多方面给人们带来了方便,给维护人员降低了难度。 在白天模式的时候,还能根据环境明暗的变化控制路灯的开启和关闭路灯,在夜晚模式的情况下,根据交通路面情况自动开关灯。当灯出现故障不亮时,能够检测并且通过声光系统报警,显示器上显示故障灯的编号。自制的单元控制器中的LED灯恒流驱动电源,在多数情况下,具有系统稳定,功耗低等特点。 以STC89C51RC为核心,利用时钟控制LED灯的开关时间段,通过红外感应模块将物体运动的信号通过555的TTL高低电平输入单片机,并通过三红外线输入的情况判断物体运行方向,再控制LED灯的开关情况。并完成四方面的功能:时间设定功能,环境明暗判断,独立控制功能,交通条件控制功能。显示部分用LCD 液晶显示,要求能显示实时时间以及对路灯设置的开关灯时。 关键词:STC89C51单片机,红外传感器,1602液晶显示器,DS1302 NE555

基于模拟路灯控制系统的设计毕业论文说明书

毕业论文声明 本人郑重声明: 1.此毕业论文是本人在指导教师指导下独立进行研究取得的成果。除了特别加以标注地方外,本文不包含他人或其它机构已经发表或撰写过的研究成果。对本文研究做出重要贡献的个人与集体均已在文中作了明确标明。本人完全意识到本声明的法律结果由本人承担。 2.本人完全了解学校、学院有关保留、使用学位论文的规定,同意学校与学院保留并向国家有关部门或机构送交此论文的复印件和电子版,允许此文被查阅和借阅。本人授权大学学院可以将此文的全部或部分内容编入有关数据库进行检索,可以采用影印、缩印或扫描等复制手段保存和汇编本文。 3.若在大学学院毕业论文审查小组复审中,发现本文有抄袭,一切后果均由本人承担,与毕业论文指导老师无关。 4.本人所呈交的毕业论文,是在指导老师的指导下独立进行研究所取得的成果。论文中凡引用他人已经发布或未发表的成果、数据、观点等,均已明确注明出处。论文中已经注明引用的内容外,不包含任何其他个人或集体已经发表或撰写过的研究成果。对本文的研究成果做出重要贡献的个人和集体,均已在论文中已明确的方式标明。 学位论文作者(签名): 年月

关于毕业论文使用授权的声明 本人在指导老师的指导下所完成的论文及相关的资料(包括图纸、实验记录、原始数据、实物照片、图片、录音带、设计手稿等),知识产权归属华北电力大学。本人完全了解大学有关保存,使用毕业论文的规定。同意学校保存或向国家有关部门或机构送交论文的纸质版或电子版,允许论文被查阅或借阅。本人授权大学可以将本毕业论文的全部或部分内容编入有关数据库进行检索,可以采用任何复制手段保存或编汇本毕业论文。如果发表相关成果,一定征得指导教师同意,且第一署名单位为大学。本人毕业后使用毕业论文或与该论文直接相关的学术论文或成果时,第一署名单位仍然为大学。本人完全了解大学关于收集、保存、使用学位论文的规定,同意如下各项内容: 按照学校要求提交学位论文的印刷本和电子版本;学校有权保存学位论文的印刷本和电子版,并采用影印、缩印、扫描、数字化或其它手段保存或汇编本学位论文;学校有权提供目录检索以及提供本学位论文全文或者部分的阅览服务;学校有权按有关规定向国家有关部门或者机构送交论文的复印件和电子版,允许论文被查阅和借阅。本人授权大学可以将本学位论文的全部或部分内容编入学校有关数据库和收录到《中国学位论文全文数据库》进行信息服务。在不以赢利为目的的前提下,学校可以适当复制论文的部分或全部内容用于学术活动。 论文作者签名:日期: 指导教师签名:日期: 摘要 随着城市建设和社会经济的迅速发展,城市道路照明作为城市文明与现代化程度的重要标志,已受到越来越多的关注,规模也在不断扩大。路灯是一个城市的照明系统不可分割更无可替代的一部分,现有的路灯管理的方式方法已远远不能满足城市路灯发展与管理的需要,必须依靠现代化的高科技管理手段。由于单片机具有集成度高,处理能力强,可靠性高,系统结构简单,价格低廉的优点,因此在路灯照明工程中被广泛应用。本系统采用MSC-51系列单片机AT89C51和相关的光电检测设备来设计智能光控路灯控制器,利用51系列单片机可编程控制八位逻辑I/O端口实现路灯的智能化,达到节能、自动控制的目的,单片机采集光敏电阻或光电开关的信号控制路灯的亮灭,具有自动检测故障报警等功能,同时根据实际情况,通过计时系统来对时间进行有效的控制,在本设计中,输入是开关按钮,进行时间控制,显示是六个数码管和LED二极管,时

基于51单片机的路灯控制系统设计开题报告

一、本课题的内容及研究意义 1、论文研究的目的和意义 如今,照明电路的数量越来越多,使得城市街道、小区内的路灯的用电量占城市用电量的比重越来越大,在用电高峰期时,电网超负荷运行,电网电压都低于额定值,在用电低谷期供电电压又高于额定值,当电压高时不但影响照明设备的使用寿命,而且耗电量也大幅增加,当低谷时,照明设备有不能正常工作。 所以,对城市的路灯的设计已经成为了当务之急,特别是午夜之后车流量急剧减少时,应该适当的关闭路灯,节约用电。但是我国的既节能又能延长路灯寿命的技术相比国外却是落后了,因此智能节能路灯控制系统的设计对于城市的发展至关重要。本论文旨在设计一套对外界光线和电压信号的采集来控制路灯的自动启停以及智能调压的控 制系统,它能对路灯进行稳压、调压、自启动并延长路灯寿命的作用。 2、论文研究内容 本设计可以通过对外界光线和电压信号的采集来控制路灯的自动启停以及智能调压从而减少城市路灯照明耗电量,又对输入电压进行稳压调节来提高用电效率。要求独立选择芯片、设计电路、编制程序、调试、完成整个系统功能。 主要内容如下: (1) 根据控制技术的特点,进行路灯系统设计的整体研究与设计。 (2) 针对光线和电压信号的采集,采用数据采集技术。 (3) 通过按键可对相关的参数值进行设置,从而实现对不同时间进行不同的开灯模式。 (4) 当电压符合额定电压时,系统自动进行稳压。 (5) 在午夜之后降低电压以调节路灯亮度,实现调压。 二、本课题的研究现状和发展趋势 目前,路灯系统一般采用钠灯、水银灯、金卤灯等灯具。这类灯具有发光效率高、光色好、安装简易等优点,被广泛使用,但同时也存在着诸如:功率因子低、对电压要求严格、耗电量大等缺点。 我国目前大部分城市都采用全夜灯的方式进行照明,普遍存在的问题有两点:一方面因为后半夜行人稀少,采用全夜灯的方式浪费太大,因此,有的地方采取前半夜全亮,后半夜全灭的照明方式;有的地方在后半夜采用亮一隔一或亮一隔二的节能措施,此种方式虽然节约了电费支出,却带来了社会治安和交通安全问题,不利于城市安全问题。 另一方面,在后半夜因行人稀少,而应该降低路灯的亮度,以避免光源污染,影响居民的晚间的休息。但由于后半夜是用电低谷期,电力系统电压升高,路灯反而比白天更亮了。这不仅造成了能源浪费,还大大影响了设备和灯具的使用寿命。目前,路灯照明广泛采用高压钠灯,其设计寿命在12000小时以上,在正常情况下至少可用3年,但是由于超压使用,现在路灯的使用寿命仅仅只有1年左右,有的甚至只有几个月,造成

声光控路灯控制系统实验报告通用范本

内部编号:AN-QP-HT920 版本/ 修改状态:01 / 00 In Order T o Standardize The Management, Let All Personnel Enhance The Executive Power, Avoid Self- Development And Collective Work Planning Violation, According To The Fixed Mode To Form Daily Report To Hand In, Finally Realize The Effect Of Timely Update Progress, Quickly Grasp The Required Situation. 编辑:__________________ 审核:__________________ 单位:__________________ 声光控路灯控制系统实验报告通用范 本

声光控路灯控制系统实验报告通用范本 使用指引:本报告文件可用于为规范管理,让所有人员增强自身的执行力,避免自身发展与集体的工作规划相违背,按固定模式形成日常报告进行上交最终实现及时更新进度,快速掌握所需了解情况的效果。资料下载后可以进行自定义修改,可按照所需进行删减和使用。 一试验目的 1。了解并掌握光敏三极管和光敏电阻的应用以及声控的交流信号的处理 2。掌握继电器的引脚结构以及其应用方法 3。熟练掌握三极管三个引脚的引用电路 4。熟练掌握LM324运放作为比较器和运放的应用电路 5。掌握与门的工作原理和引脚接法,并应用到实际电路中 二实验内容 1。按要求搭接电路,并调整电路,(注意运放被烧坏)

基于单片机的太阳能路灯控制器设计毕业设计(论文)

安徽工程大学机电学院毕业设计(论文) 毕业设计论文 基于单片机的太阳能路灯控制器设计 摘要 本论文主要完成对光伏电源LED照明控制系统进行优化设计和研究,以使系统达到稳定、操作方便、节能环保的要求。太阳能路灯智能控制器以AT89C52单片机为核心,主要由六个部分组成:太阳能电池板、蓄电池、负载(LED路灯)、控制器、测量电路、充电电路、放电/负载驱动电路。本课题的主要研究内容有:针对现有独立运行的太阳能路灯控制器的特点,实现多点控制蓄电池剩余荷电容量(SOC)控制和脉宽调制信号(PWM)来驱动太阳能LED路灯控制器的硬件设计和软件程序设计。 首先对太阳能路灯基本模块组成、基本功能及发展现状进行了阐述,并根据蓄电池剩余荷电容量(SOC)的数学模型和剩余荷电容量(SOC)与蓄电池的使用寿命的关系提出了单片机系统改进的控制方案,并根据实际需要提出用脉宽调制信号(PWM)来驱动和调节白光LED,可使白光LED工作于发射最纯净白光。半导体PN结技术的太阳能光伏发电技术与发光二极管(LED)照明技术,都有着环保、节能、长寿命和安全的特点。对这两项技术的高效结合进行优化研究,符合我国目前节能,环保及可持续性发展的目标。 总之,随着城市规模的不断扩大,现有的路灯技术不能达到环保节能的要求,本文采用多点控制蓄电池剩余荷电容量(SOC)控制和脉宽调制信号(PWM)来驱动太阳能LED路灯控制器的硬件设计和源程序设计,能有效解决LED太阳能路灯的不足。因此,本课题设计对我国LED路灯节能环保的发展有很大的现实意义。 关键词:光伏发电;剩余荷电容量;脉宽调制信号;控制系统

基于单片机的太阳能路灯控制器设计 II

基于电力载波技术的智能化路灯控制系统设计

毕业论文 基于电力载波技术的智能化路灯控制系统设计 姓名 学院电气工程与自动化学院 专业自动化 指导教师 职称教授 2013年5月1日

天津工业大学毕业论文任务书 题目基于电力载波技术的智能化路灯控制系统设计 学生姓名额外特温 特 学院名称 电气工程与自动化学 院 专业班级 过多个地 方 课题类型实际课题 课题意义 基于电力载波技术的智能化路灯控制系统能够弥补当前路灯控制器的不足,将电力载波技术应用于路灯控制过程中,实现主控站和从控制站之间的信息交换,从而实现路灯的智能化,并且成本低,易于推广应用。它能够实现远程控制,并和现有的电力线兼容,检修方便,可以提高城市路灯的利用率,节能。 任务与进度要求3.12-3.30:对此设计进行初步的了解和资料查询,对本设计方案具有初步的轮廓 4.2-4.30:完成控制设计,及硬件电路设计, 5.4-5.30 :完成毕业论文任务书初稿,并对设计的硬件进行调试; 5.31- 6.7:完善任务书,准备毕业答辩,按时完成 主要参考 文献[1] M.- H. Shwehdi, “A Power Line Data Communication Interface using Spread Spectrum Echnology in Home Automation [J],” IEEE Trans. Power Delivery, vol. 11, no. 3, July 1996, pp. 1232-1237. [2] 张辉.现代通信原理与技术[M].西安:西安电子科技大学出版社,2002. [3] 齐国清.信号检测与估计[M].北京:电子工业出版社,2010. [4] 朱小龙.数字通信技术[M].北京:化学工业出版社,2004. 起止日期2013年3月12日—2013年6月7日备注 院长教研室主任指导教师

基于单片机模拟路灯控制系统

基于51单片机的模拟路灯控制系统1. 系统设计 1.1 设计要求 一、任务(来自原题) 设计并制作一套模拟路灯控制系统。控制系统结构如图1所示,路灯布置如图2所示。 图1 路灯控制系统示意图 .. .专业. .

图2 路灯布置示意图(单位:cm) 二、设计要求+ 1.基本要求 (1)支路控制器有时钟功能,能设定、显示开关灯时间,并控制整条支路按时开灯和关灯。 (2)支路控制器应能根据环境明暗变化,自动开灯和关灯。 (3)支路控制器应能根据交通情况自动调节亮灯状态:当可移动物体M(在物体前端标出定位点,由定位点确定物体位置)由左至右到达S点时(见图2),灯1亮;当物体M到达B点时,灯1灭,灯2亮;若物体M由右至左移动时,则亮灯次序与上相反。 (4)支路控制器能分别独立控制每只路灯的开灯和关灯时间。 .. .专业. .

(5)当路灯出现故障时(灯不亮),支路控制器应发出声光报警信号,并显示有故障路灯的地址编号。 2.发挥部分 (1)自制单元控制器中的LED灯恒流驱动电源。 (2)单元控制器具有调光功能,路灯驱动电源输出功率能在规定时间按设定要求自动减小,该功率应能在20%~100%围设定并调节,调节误差≤2%。 (3)性价比高,工作稳定,符合电磁兼容(EMC)方面的要求,无对外干扰或干扰小。 1.2 总体设计方案 1.2.1 功能分解及设计思路 本模拟路灯控制系统的设计方案要实现的主要功能主要分解为以下五个方面: 一是时钟功能及定时开关灯。 二是根据环境明暗变化,自动开灯和关灯。 三是根据交通情况自动调节亮灯状态:当汽车靠近路灯时,路灯能自动点亮;当汽车远离时,路灯自动熄灭。 四声光报警功能,当路灯出现故障时而不亮时,控制器发出信号,并显示有故障路灯的地址编号。 五是根据绿色节能照明要求,采用恒流源驱动LED路灯发亮且能调光,路灯驱动电源输出功率能在20%~100%围设定并调节,调节误差≤2%。 以上功能的实现,都是以单片机为核心,在单片机系统实现的输入输出和显示功能的基础上,由单片机的置逻辑和运算功能,加上一定的外围电路.. .专业. .

路灯控制器报告

上海电力学院飞思卡尔单片机应用实验报告 题目:路灯控制器 专业:电子信息工程 班级: 姓名: 学号:

一、实验要求: 1.实现路灯控制器的功能; 2.至少包含三个模块。 二、实验设备: 1.PC机一台 2.S12嵌入式开发系统一台 3.LED 一个 4.串行通信线一根 5.4连排共阴极8段数码管一个 三、实验原理: 三个模块分别是定时器模块、LED模块和小灯模块。通过时间的变化来达到我改变灯亮暗的目的。其中,定时器进行时间的计算,分为6点-18点和18点-6点两段,而小灯就是由这两段时间产生亮暗的现象(当时间为6:00-18:00时,小灯的状态为暗,当时间为18:00-6:00时小灯的状态为亮)。实验中要确认好相应代码,控制小灯亮红灯或者亮绿灯。 连线如下 Vcc 导线接插点 PTA0 PTA1 PTA2 PTA3 PTA4 PTA5 PTA6 PTA7 PTA口(KEY1-8)

四、实验内容: 设定LED灯的前两位为小时项,后两位为分钟项,当时间为06:00-18:00时,小灯的状态为暗,当时间为18:00-06:00时小灯的状态为亮。 五、实验程序: 1.主函数: //总头文件 #include "Includes.h" //主函数 int main() { DISABLE_INTERRUPTS; //禁止总中断 //1. 芯片初始化 MCUInit(); //2. 模块初始化 SCIInit(); //(1) 串行通信初始化 LEDInit(); //(2) LED控制引脚初始化 TimerInit(); //(3) 定时器1初始化 //3. 内存初始化 //(1) "时分秒"缓存初始化(00:00:00) time[0] = 0; time[1] = 0; time[2] = 0; time[3] = 0; //(2) LED显示缓存初始化为"0123" LEDbuf[0] = '0'; LEDbuf[1] = '0'; LEDbuf[2] = '0'; LEDbuf[3] = '0'; //4. LED初始显示"0123" LEDShow(LEDbuf); //5. 开放各模块中断 EnableSCIReInt; //(1) 开放SCI接收中断 EnableT1OVInt; //(2) 开放定时器1溢出中断 //6. 开放总中断 ENABLE_INTERRUPTS; //总循环 DDRA=0xff; PORTA=0xaa;

路灯控制系统的设计及制作

word文档整理分享 电子综合开发实践报告 设计课题:路灯控制器的设计与制作 专业班级:___________ 学生学号:__________ 学生姓名:________ 秦疆彬__________ 设计时间:2014 年1月月_________ 信息科学与技术学院 2014年1月

路灯控制器的设计与制作 一、设计任务与要求 (1)设计制作一个路灯自动照明的控制电路,当日照光亮到一定的程度时路灯 自动熄灭,而日照光亮暗到一定程度时路灯自动点亮。 (2)设计计时电路,用数码管显示路灯当前一次的连续开启时间。 (3)设计计数显示电路,统计路灯的开启次数。 二、方案设计与论证 了解常用路灯控制的各种方法,及各自的优缺点,通过相互的比较,确定设计方案,并对所用传感器进行选型,同时加以电路的设计与分析,完成设计任务。下面对路灯控制器的原理,路灯控制器中用到的主要元件以及在电路中的作用分析。 该路灯控制器是由光敏电阻、555定时器、计数器、译码器、数码管显示器和受控灯组成。光敏电阻器又叫光感电阻,是利用半导体的光电效应制成的一种电阻值随入射光的强弱而改变的电阻器,当光照减弱时,光敏电阻阻值增大,555 定时器的2、6端口出现低电平,当它到达一定值时,3 口出现高电平,且大于2/3 (VCC,路灯亮。反之,当光照增强到一定时,光敏电阻阻值减小, 3 口出现低电平,小于1/3 (VCC,路灯熄灭。为了避免外部干扰所带来的错误反应(例如来往的车灯给光敏电阻带来的短暂激励),我们利用电容充电带来的时间延迟来解决问题。经以上论证,方案可行。

三、单元电路设计与参数计算 该部分电路相当于总电路的开关,通过光照强弱的变化改变光敏电阻的阻 值,从而改变Vi 的电压值。在该电路中Vi 即为由555构成的施密特触发器的输 入电压,Vi 的改变会引起施密特触发器的翻转,从而改变输出电平,达到开关 的效果。当光敏电阻周围的环境光照强度比较强时,电阻阻值为几百欧左右,Viv 1 -V cc ;当光敏电阻周围的环境光照强度比较弱时,电阻阻值为 1兆欧左右,Vi> 3 2 V cc 。当光敏电阻周围环境由光变暗时,Vi 增大过程中达到值1V cc 时,引发施 3 3 *数码管显示 图2.1流程框图 1、光敏电阻与555定时器构成的控制电路 图3.1光控电路

基于单片机模拟路灯控制系统

基于51单片机的模拟路灯控制系统 1. 系统设计 1.1 设计要求 一、任务(来自原题) 设计并制作一套模拟路灯控制系统。控制系统结构如图1所示,路灯布置如图2所示。 图1 路灯控制系统示意图

图2 路灯布置示意图(单位:cm) 二、设计要求+ 1.基本要求 (1)支路控制器有时钟功能,能设定、显示开关灯时间,并控制整条支路按时开灯和关灯。 (2)支路控制器应能根据环境明暗变化,自动开灯和关灯。 (3)支路控制器应能根据交通情况自动调节亮灯状态:当可移动物体M(在物体前端标出定位点,由定位点确定物体位置)由左至右到达S点时(见图2),灯1亮;当物体M到达B点时,灯1灭,灯2亮;若物体M由右至左移动时,则亮灯次序与上相反。 (4)支路控制器能分别独立控制每只路灯的开灯和关灯时间。 (5)当路灯出现故障时(灯不亮),支路控制器应发出声光报警信号,并显示有故障路灯的地址编号。 2.发挥部分

(1)自制单元控制器中的LED灯恒流驱动电源。 (2)单元控制器具有调光功能,路灯驱动电源输出功率能在规定时间按设定要求自动减小,该功率应能在20%~100%范围内设定并调节,调节误差≤2%。 (3)性价比高,工作稳定,符合电磁兼容(EMC)方面的要求,无对外干扰或干扰小。 1.2 总体设计方案 1.2.1 功能分解及设计思路 本模拟路灯控制系统的设计方案要实现的主要功能主要分解为以下五个方面: 一是时钟功能及定时开关灯。 二是根据环境明暗变化,自动开灯和关灯。 三是根据交通情况自动调节亮灯状态:当汽车靠近路灯时,路灯能自动点亮;当汽车远离时,路灯自动熄灭。 四声光报警功能,当路灯出现故障时而不亮时,控制器发出信号,并显示有故障路灯的地址编号。 五是根据绿色节能照明要求,采用恒流源驱动LED路灯发亮且能调光,路灯驱动电源输出功率能在20%~100%范围内设定并调节,调节误差≤2%。 以上功能的实现,都是以单片机为核心,在单片机系统实现的输入输出和显示功能的基础上,由单片机的内置逻辑和运算功能,加上一定的外围电路得以实现。针对以上的五个功能,采用模块化的设计思想,以下分别叙述之。 1.2.2 方案论证与比较 1.2.2.1 时钟功能及定时开关机。 方案一:采用专用时钟芯片。

基于PLC路灯控制系统_毕业设计论文

基于PLC路灯控制系统 摘要 随着数字技术和网络技术的发展,公共照明数字化和网络化已经成为一种必然趋势。节约能源、保证灯具寿命、提高照明管理水平、美化城市夜量和保证城市夜间出行安全等,已经成为对公共照明系统的一项基本要求。公共照明系统广泛采用高压钠灯或金属卤化物灯传统照明系统经常采用电感镇流器,本文将介绍基于PLC的路灯控制系统。本文设计基于PLC的路灯监控系统根据时间的变化,控制路灯的明亮程度。同时考虑到不同的季节天气等的变化的实际情况,以亮度检测控制辅助,达到更合理的目的。 关键词:PLC,亮度控制,定时控制

Streetlight monitoring system in the PLC - based design Abstract Along with arithmetic figure technique with technical development in network, the public lighting arithmetic figure turn to turn to have become a kind of inevitable trend with the network. Economy energy, guarantee the lamp life span, increase illuminate to manage the level, beautify the city night measures with guarantee nighttime in city out line safety etc., have become to a basic request of the public lighting system. The extensive adoption in system in public lighting high pressure light metals turns the thing light tradition illuminates the system to usually adopt the electricity feels the town flows the machine, illuminating lamp the adoption unify switch control case. This article will introduce the street lamp control system based on PLC. In this paper, the design based on PLC street lamp monitoring system according to the time change, control the street lamp bright degree. Taking into account the different seasonal weather changes in the actual situation, to brightness detection control auxiliary, achieve more reasonable purpose. KEY WORDS: PLC BRIGHTNESS CONTROL TIMING CONTROL

智能节能路灯控制系统设计

河北机电职业技术学院毕业论文 题目智能节能路灯控制系统设计 系别电气工程系 专业电气自动化技术 姓名孟学文 指导教师刘成伟

目录 摘要 (3) 1 绪论 (4) 1.1 概述 (4) 2 方案论证与选择 (5) 2.1 智能路灯节能方案概述 (5) 2.2 智能路灯节能控制系统结构设计 (5) 2.3 可变电抗器 (6) 2.4 智能控制器 (8) 2.5 每只LED灯控制逻辑关系图 (8) 2.6 系统硬件总体划分 (8) 2.7 智能控制器总体设计 (8) 3 智能路灯节能控制系统各电路部分设计 (9) 3.1 环境光控制电路的设计 (9) 3.2 时钟电路 (12) 3.3 横流驱动电路 (14) 3.4 故障检测电路 (16) 3.5 电源电路的设计 (16) 3.6 报警电路的设计 (17) 4 控制部分设计 (18) 4.1 单片机系统介绍 (18) 4.2 整个系统的控制流程 (19) 4.3 显示装置流程图 (20) 总结与展望 (21) 总结 (21) 展望 (21) 参考文献 (22) 附图 (23)

智能路灯节能控制系统设计 杨亮亮 (安徽工业大学工学院农业电气化与自动化07级) 摘要:随着我国经济的快速发展,电力消费也随之快速地增长。电力资源已成为紧缺资源。如何节能降耗已成为近年来研究的热点课题。 本文研究的智能路灯节能控制系统是针对我国在城市照明上所存在的巨大的能源消耗 而开发的基于单片机的新型节能控制系统,集稳压控制、软起动功能、自动起停、智能调 压控制于一体。智能路灯节能控制系统将晶闸管功率变换单元和智能控制系统相结合,利 用可变电抗器隔离高压和低压,将可变电抗器的一次绕组(高压)与路灯相串联,将二次绕 组与晶闸管和具有模糊控制算法的控制系统相联,通过改变其低压绕组上的电压来控制高 压绕组上电压的变化,从而达到改变路灯端电压的效果,以实现路灯的软起动和调压节 能。 本文对基于单片机的智能路灯节能控制系统进行了深入分析和研究。讨论了智能路灯节能控制系统的构思、设计方案,介绍了该装置的系统设计、工作原理,详细分析了以89C51为主控单元的硬件电路设计,以及电气连接。 关键词:单片机、智能路灯 Abstract: with the rapid development of our economy, electricity consumption is subsequently fast growth. Electric power resource has become shortage resources. How to energy consumption has become the hot topic research in recent years. This paper studies of intelligent street lamp energy saving control system is aiming at existing in urban lighting on the huge energy consumption and development based on SCM system, set the new energy-saving control voltage control, soft starter to function, the automatic starting and stopping, intelligent pressure regulating control in one body. Intelligent street lamp energy saving control systems will be thyristor power changing unit and intelligent control system by combining, high voltage and low voltage variable reactor isolation, a winding variable reactor (HVT) and street lamp in series, will be secondary windings and thyristor and fuzzy control algorithm with associated the control system by changing its low voltage to control

模拟路灯控制系统英文资料

LED Lighting Control using the MC9S08AW60 Designer Reference Manual To provide the most up-to-date information, the revision of our documents on the World Wide Web is the most current. Your printed copy may be an earlier revision. To verify you have the latest information available, The following revision history table summarizes changes contained in this document. For your convenience, the page number designators have been linked to the appropriate location. Revision History Chapter 1 Introduction 1.1 Introduction This manual describes a reference design of a multi-color LED lighting control solution by using the MC9S08AW60 Microcontroller. Using a microcontroller (MCU) to control the red/green/blue (RGB) color LEDs increases system flexibility and functionality for the next generation of lighting applications, architectural/entertainment lighting or LCD backlighting, that require a smart and adaptive control methodology to ensure optimized color space rendering for various display contents, excellent color contrast for realistic display scene and a consistent color setting in manufacturing. In many cases, these new applications are controlled by a central control unit that requires a connectivity interface that can be implemented at a low cost using MCU-based lighting controller. A compact light-box with more than a million display colors is implemented to demonstrate the advantages of using MCU to control RG B color LEDs with different luminosity settings. The average current through each color LED is controlled by an individual PWM signal generated from MCU and the LED luminosity is almost in

模拟路灯控制系统最终

模拟路灯控制系统 摘要:本设计以STC89S54单片机作为模拟路灯控制系统的核心;由光电开关实现对定位点处经过物体的精确定位,并将检测的信号经单片机分析处理后控制LED灯的亮灭;LED的电源采用自制的恒流源驱动;由光敏电阻根据环境光线的变化实现路灯的自动开关;通过调节PWM脉冲占空比实现功率的调节,以此达到调光效果。由DS12C887完成控制器的时钟功能,并通过键盘设定和调整时间; 24C08存储芯片实现路灯开关时间单独控制。 关键词:STC89S54; 光电开关; DS12C887; 光敏电阻; 恒流源; PWM脉冲;24C08 Abstract: The analog light control system of this design is based on the microcontroller STC89S54. Object is detection by the photoelectric switch at anchor point, and the detected signal is analyzed and processed by the MCU to control LED light. A self-made continuous current source is adopted to drive light regulation circuit. Photosensitive resistors are used to control the light switches automatically according to the natural light. By adjust the PWM pulse duty achieve power adjust, thus we achieve light regulation. The controller's clock is provided by the DS12C887, which can adjust and set the time by keyboard. For individual control of lights, we use 24C08 storage to achieve switching time. Keywords: STC89S54; Photoelectric Switch; DS12C887; photosensitive resistor;Continuous current source; PWM pulse;24C08

模拟路灯控制系统附硬件图及c程序

摘要 本文介绍了一个模拟路灯控制系统的应用方案,用以实现模拟路灯的智能控制。本方案以宏晶公司的MCU芯片STC12C5410AD为核心,加以简单的外围电路,实现了模拟路灯控制系统所要求的全部技术内容。STC单片机在最近几年应用越来越广泛,因其抗干扰能力强、稳定性好,性价比高,因此是低成本路灯控制解决方案的首选。该控制系统除了选用廉价的单片机芯片,还采用了廉价的红外对射传感器,大大降低了系统成本。整个系统的电路简单,结构紧凑,电源驱动仅采用变压器与三端稳压器相结合,附加少许滤波电容便实现了稳定的电源输出。经过多次测试,证实该系统能长时间稳定工作,完全满足设计要求指标。 关键词:模拟控制;LED照明;单片机

ABSTRACT This paper introduces a simulation control system application scheme street, to simulate the street lamp of intelligent control. This plan to macro crystal company MCU, STC12C5410AD as the core, to chip the periphery of the simple circuit, realize the simulation street lamp control system all of the requested technology content. STC SCM in recent years more and more wide application, because of its strong anti-interference ability, good stability, high performance/price ratio, and so is the low cost street lamp control solutions of choice. The control system in addition to choose cheap single-chip microcomputer chip, also adopted the cheap infrared mutual illuminate sensor, and greatly reduce the cost of system. The whole system of the circuit is simple, compact structure, power drive only used three transformer and the regulators, and the combination of a few additional filter capacitance will realize the stable power output. After many test, and confirm that the system can work stably for a long time, fully meet the design requirements index. Keywords: Simulate controlling; LED lighting; Single-chip microcomputer

路灯控制课程设计报告

《路灯控制》课程设计报告 学院:化工装备学院 专业:电气自动化技术 班级:2班 姓名:xx 学号: 5 指导教师:xxx 20 11年6 月20~24 日

目录 N O TABLE OF CONTENTS ENTRIES FOUND. ( 1.课程设计目的 1)结合所学的电子电路的理论知识完成路灯控制课程设计; 2)通过该设计学会并掌握常用电子元器件的选择和使用方法; 3)提高自己综合分析问题和解决问题的能力。 2.课程设计任务和要求 课程设计任务 本次设计的程序为路灯控制设计,此程序是通过中断控制器8259和并行接口芯片8255与8088计算机的硬件连接,以及延时方法,来实现夜晚路灯亮灭的控制。 程序主要分四大部分:输入部分,中断部分,延迟部分和输出部分。

输入部分用K0至K7来实现,中断部分用中断控制器8259来实现,延迟部分用一个延迟 子程序来实现,而输出部分则用LED显示单元及开关单元来实现。 通过中断K++来实现天黑,天黑时路灯电亮,天亮时路灯关闭。 课程设计要求 1)通过K O—K7和K++来输入。 2)用LED指示灯显示结果。 3)输出为1灯亮,输入为0灯灭。 3. 课程设计报告内容 课程设计方案选择及说明 本次微机原理课程设计我设计的是路灯控制器。通过中断信号来使路灯点亮,再经延时程序来使灯自动熄灭。然后重新回到初始状态。 我们用到的芯片是中断控制器8259和可编程并行接口8255这两种芯片再外加一个LED显示单元及开关单元。用中断控制器8259的控制字来设置单片、边沿触发、非缓冲、非自动,用ICW4来设置IR7非屏蔽。 设置中断控制器8255的控制字,让它A口输出来显示灯亮,。由于我们没用到B口和C口,所以让B口输入C口高低四位均输出。 设置完控制字后,再使A口输出全为0(这时路灯初始状态为灭),接着让程序循环进入空操作。当天黑需要路灯亮时,按下中断(代表天黑),程序从循环执行空操作中中断出来,使A口输出从全为0变成全为1(这时路灯全亮),程序后面连接一个延迟子程序,来控制灯亮的时间。 最后到了程序该结束的时候了,A口输出从全1再次变为全0(这时路灯全灭,代表夜晚已过,天亮了)。这时程序本该结束了,程序结束后,又返回到中断控制器8259这部分,这样程序又可以通过按中断来控制灯亮,这样就简单又实用。 大体上程序主要分四大部分:输入部分,中断部分,延迟部分和输出部分。 结合所学的 知识外加查找相关资料,把这几大部分合理的连接起来,从而实现一个完整、功能强大的程 序。

相关文档
相关文档 最新文档