xTimer V1.0

[05-23 02:47:29]   来源:http://www.88dzw.com  单片机电路图   阅读:8450

文章摘要:My wife asked me to find another timer for using in the kitchen. She got one already with analog setting, but it needs one AA size battery. Digital setting may not easy for human interface. However I will make it for easy time setting. When I am free I will modify it to be analog setting. May be I c

xTimer V1.0,标签:电路图讲解,电路图练习,http://www.88dzw.com
My wife asked me to find another timer for using in the kitchen. She got one already with analog setting, but it needs one AA size battery. Digital setting may not easy for human interface. However I will make it for easy time setting. When I am free I will modify it to be analog setting. May be I can use 555 monostable for POT reading. So I got my lab at home finding old boards and parts on the shelf. I found MAX7219, 8-digit LED display module and two buzzers. The MAX7219 needs serial interface, like SPI. This enables me to use a 20-pin 89C4051 MCU, since the pin counts for i/o port is quite limited. The 8-digit LED lets me have four timers, each will have two digit. I can set say, 00-99mins or 0-99Hrs. The output would  be open collector with my favorite 7407!

Figure 1: The prototype of xTiemr V1.0.

The LED module with MAX7219 is a ready made having 10-pin header for easy plugin to the 4051 board. As shown in Fig. 1, four keys are used to set time for each timer. Each timer will have two digit LED. The right hand side, timer 1 and timer 2 are for minute counting, the left hand, timer 3 and timer 4 are for hour counting.

For easy setting with key switch, it has a preset time value that was commonly used, e.g. -1, 0, 3, 5, 10, 15, 20, 25.

When time-out, display will show 0, and the output bit is activated. The optional two buzzers are for timer1 and timer2 alarm. I made this output alarm for kitchen use.

Hardware Schematic

Complete schematic is shown in Fig 2. The MCU is AT89C4051 with 11.0592MHz xtal. The MAX7219 needs only three signals, CLK, DIN and LOAD. These signals are software generated assembly code. You may learn how assembly code interface with c from the firmware. Since when power up, all port bits are logic high, so I chose the 7407, open collector to provide NPN O/C output. These output bits are suitable for opto-isolator driving. The sample output module is opto-triac, the MC3040. The input circuit is simple with current mode driving, say 15mA is enough for MC3040. The output triac having ZCS drives a 220V coil electromechanical relay. Since the relay contact provide NO and NC, so we can provide two function AC plugs, i.e., delay on for NO and delay off for NC contacts.


Figure 2: Hardware schematic of xTimer V1.0.


xtimer1.pdf

You can notice that we have reset button to wake up MCU! This version has no main switch to power on and off the board. Instead it uses MCU and MAX7219 power down mode. We will see later sample code that put MCU and MAX7219 to power down mode. When All LEDs are light, the dc current drawn about 90mA @+5V, and when power down mode, it will be approx. 10mA. The circuit of MAX7219 is recommenced by MAXIM application note, it is simple hardware and most of settings are done by software control.

[1] [2] [3] [4] [5]  下一页


Tag:单片机电路图电路图讲解,电路图练习电子电路图 - 单片机电路图

《xTimer V1.0》相关文章